-
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
Open
tj710
wants to merge
22
commits into
cms-sw:master
Choose a base branch
from
l1scout:rebased
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+741
−224
Open
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d83cd2b
Add support for CaloTower L1 Scouting with data format, blocks, masks…
RoccoA97 e786cd0
Include new collection L1Scouting FastJet and producer
RoccoA97 c4f70d5
Fix wrong calo tower word masks
RoccoA97 158489d
Added tests for calo towers
94004b7
Fixed L1 scouting OrbitCollection constructor
cb130de
updated CaloTowerMinSDSID and an argument in L1Scout file tests
tj710 bd06f05
removed include of depreciated edm::span
tj710 731ffef
applied code format rules and fixed typo
tj710 22074e8
few fixes in the test code
tj710 2326a2f
test script updates
tj710 d4e42b9
code formatter
tj710 aa8f51b
removed cases of 'using namespace'
tj710 757444f
replaced std::cout use with LogDebug(L1Scout)
tj710 6d1ab52
moved nConst and area variables definition for clarity
tj710 bacf191
Merge branch 'master' into rebased
tj710 7217549
code formatting
tj710 697ccac
added mass to fastjet class
tj710 f19a5bf
changed calo tower variables from int to int16_t
tj710 0aaa7c4
swapped order of eta and phi in unpacker constants to match firmware
tj710 035eb2d
replaced all uint16_t with int16_t in L1ScoutingCaloTower
tj710 8ad1596
moved position of mass in L1ScoutingFastJet class
tj710 bfce20e
fixed erBits mask
tj710 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #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(int16_t hwEt, int16_t erBits, int16_t miscBits, int16_t hwEta, int16_t hwPhi) | ||
| : hwEt_(hwEt), erBits_(erBits), miscBits_(miscBits), hwEta_(hwEta), hwPhi_(hwPhi) {} | ||
|
|
||
| void setHwEt(int16_t hwEt) { hwEt_ = hwEt; } | ||
| void setErBits(int16_t erBits) { erBits_ = erBits; } | ||
| void setMiscBits(int16_t miscBits) { miscBits_ = miscBits; } | ||
| void setHwEta(int16_t hwEta) { hwEta_ = hwEta; } | ||
| void setHwPhi(int16_t hwPhi) { hwPhi_ = hwPhi; } | ||
|
|
||
| int16_t hwEt() const { return hwEt_; } | ||
| int16_t erBits() const { return erBits_; } | ||
| int16_t miscBits() const { return miscBits_; } | ||
| int16_t hwEta() const { return hwEta_; } | ||
| int16_t hwPhi() const { return hwPhi_; } | ||
|
|
||
| private: | ||
| int16_t hwEt_; | ||
| int16_t erBits_; | ||
| int16_t miscBits_; | ||
| int16_t hwEta_; | ||
| int16_t hwPhi_; | ||
| }; | ||
|
|
||
| typedef OrbitCollection<CaloTower> CaloTowerOrbitCollection; | ||
|
|
||
| } // namespace l1ScoutingRun3 | ||
| #endif // DataFormats_L1Scouting_L1ScoutingCaloTower_h | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #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), mass_(0), nConst_(0), area_(0) {} | ||
|
|
||
| FastJet(float et, float eta, float phi, float mass, int nConst, float area) | ||
| : et_(et), eta_(eta), phi_(phi), mass_(mass), nConst_(nConst), area_(area) {} | ||
|
|
||
| void setEt(float et) { et_ = et; } | ||
| void setEta(float eta) { eta_ = eta; } | ||
| void setPhi(float phi) { phi_ = phi; } | ||
| void setMass(float mass) { mass_ = mass; } | ||
| 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_; } | ||
| float mass() const { return mass_; } | ||
| int nConst() const { return nConst_; } | ||
| float area() const { return area_; } | ||
|
|
||
| private: | ||
| float et_; | ||
| float eta_; | ||
| float phi_; | ||
| float mass_; | ||
| int nConst_; | ||
| float area_; | ||
| }; | ||
|
|
||
| typedef OrbitCollection<FastJet> FastJetOrbitCollection; | ||
|
|
||
| } // namespace l1ScoutingRun3 | ||
| #endif // DataFormats_L1Scouting_L1ScoutingFastJet_h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.