-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Calo towers L1 scouting data format update #48093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 6 commits
d83cd2b
e786cd0
c4f70d5
158489d
94004b7
cb130de
bd06f05
731ffef
22074e8
2326a2f
d4e42b9
aa8f51b
757444f
6d1ab52
bacf191
7217549
697ccac
f19a5bf
0aaa7c4
035eb2d
8ad1596
bfce20e
3efe757
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #ifndef DataFormats_L1Scouting_L1ScoutingCaloTower_h | ||
| #define DataFormats_L1Scouting_L1ScoutingCaloTower_h | ||
|
|
||
| #include "DataFormats/L1Scouting/interface/OrbitCollection.h" | ||
|
|
||
| namespace l1ScoutingRun3 { | ||
|
|
||
| class CaloTower { | ||
| public: | ||
| CaloTower() : hwEt_(0), erBits_(0), miscBits_(0), hwEta_(0), hwPhi_(0) {} | ||
|
|
||
| CaloTower(int hwEt, int erBits, int miscBits, int hwPhi, int hwEta) : hwEt_(hwEt), erBits_(erBits), miscBits_(miscBits), hwEta_(hwEta), hwPhi_(hwPhi) {} | ||
|
|
||
| void setHwEt(int hwEt) { hwEt_ = hwEt; } | ||
| void setErBits(int erBits) { erBits_ = erBits; } | ||
| void setMiscBits(int miscBits) { miscBits_ = miscBits; } | ||
| void setHwEta(int hwEta) { hwEta_ = hwEta; } | ||
| void setHwPhi(int hwPhi) { hwPhi_ = hwPhi; } | ||
|
|
||
| int hwEt() const { return hwEt_; } | ||
| int erBits() const { return erBits_; } | ||
| int miscBits() const { return miscBits_; } | ||
| int hwEta() const { return hwEta_; } | ||
| int hwPhi() const { return hwPhi_; } | ||
|
|
||
| private: | ||
| int hwEt_; | ||
| int erBits_; | ||
| int miscBits_; | ||
| int hwEta_; | ||
| int hwPhi_; | ||
|
||
| }; | ||
|
|
||
| typedef OrbitCollection<CaloTower> CaloTowerOrbitCollection; | ||
|
|
||
| } // namespace l1ScoutingRun3 | ||
| #endif // DataFormats_L1Scouting_L1ScoutingCaloTower_h | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #ifndef DataFormats_L1Scouting_L1ScoutingFastJet_h | ||
| #define DataFormats_L1Scouting_L1ScoutingFastJet_h | ||
|
|
||
| #include "DataFormats/L1Scouting/interface/OrbitCollection.h" | ||
|
|
||
| namespace l1ScoutingRun3 { | ||
|
|
||
| class FastJet { | ||
| public: | ||
| FastJet() : et_(0), eta_(0), phi_(0), nConst_(0), area_(0) {} | ||
|
|
||
| FastJet(float et, float eta, float phi, int nConst, float area) : et_(et), eta_(eta), phi_(phi), nConst_(nConst), area_(area) {} | ||
|
|
||
| void setEt(float et) { et_ = et; } | ||
| void setEta(float eta) { eta_ = eta; } | ||
| void setPhi(float phi) { phi_ = phi; } | ||
| void setNConst(int nConst) { nConst_ = nConst; } | ||
| void setArea(float area) { area_ = area; } | ||
|
|
||
| float et() const { return et_; } | ||
| float eta() const { return eta_; } | ||
| float phi() const { return phi_; } | ||
| int nConst() const { return nConst_; } | ||
| float area() const { return area_; } | ||
|
|
||
| private: | ||
| float et_; | ||
| float eta_; | ||
| float phi_; | ||
| int nConst_; | ||
| float area_; | ||
| }; | ||
|
|
||
| typedef OrbitCollection<FastJet> FastJetOrbitCollection; | ||
|
|
||
| } // namespace l1ScoutingRun3 | ||
| #endif // DataFormats_L1Scouting_L1ScoutingFastJet_h |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,14 +33,21 @@ cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$file" || die "Fail | |
| oldFiles="testL1Scouting_v3_v3_v3_v3_v3_14_0_0_split_99.root testL1Scouting_v3_v3_v3_v3_v3_14_0_0_split_0.root" | ||
| for file in $oldFiles; do | ||
| inputfile=$(edmFileInPath DataFormats/L1Scouting/data/$file) || die "Failure edmFileInPath DataFormats/L1Scouting/data/$file" $? | ||
| cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 0 || die "Failed to read old file $file" $? | ||
| cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 0 --caloTowerVersion 0 || die "Failed to read old file $file" $? | ||
| done | ||
|
|
||
| # added BMTF input stubs data format | ||
| oldFiles="testL1Scouting_v3_v3_v3_v3_v3_v3_14_1_0_pre5_split_99.root testL1Scouting_v3_v3_v3_v3_v3_v3_14_1_0_pre5_split_0.root" | ||
| for file in $oldFiles; do | ||
| inputfile=$(edmFileInPath DataFormats/L1Scouting/data/$file) || die "Failure edmFileInPath DataFormats/L1Scouting/data/$file" $? | ||
| cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 3 || die "Failed to read old file $file" $? | ||
| cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 3 --caloTowerVersion 0 || die "Failed to read old file $file" $? | ||
| done | ||
|
|
||
| # added Calo tower data format | ||
| oldFiles="testL1Scouting_v3_v3_v3_v3_v3_v3_v3_15_0_1_split_99.root testL1Scouting_v3_v3_v3_v3_v3_v3_v3_15_0_1_split_0.root" | ||
|
||
| for file in $oldFiles; do | ||
| inputfile=$(edmFileInPath DataFormats/L1Scouting/data/$file) || die "Failure edmFileInPath DataFormats/L1Scouting/data/$file" $? | ||
| cmsRun ${LOCAL_TEST_DIR}/read_L1Scouting_cfg.py --inputFile "$inputfile" --bmtfStubVersion 3 --caloTowerVersion 3 || die "Failed to read old file $file" $? | ||
| done | ||
|
|
||
| exit 0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of
int16_t, this file should now includeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Do you know why the compiler does not complain about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. I guess it's because
OrbitCollection.h(which is also included) happens to include itselfcstdint.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should I still add it to this file, or is it not needed? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally the best practice is for every header and source file to
#includethe headers that it needs rather than rely on transitive#includes. E.g. hypothetically changingOrbitCollection.hto not#include <cstdint>would result in compilation failures here.