-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
New DAQ source for L1Trigger scouting #43467
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8067ab5
New DAQ source for L1Trigger scouting
Mmiglio 567e1fc
Renamed L1 scouting raw data data formats
Mmiglio b9c7ba3
[WIP] fixed orbit collection, new data structure allows to achieve co…
Mmiglio 12b08e1
[WIP] added new calo data structures
Mmiglio 9029aab
[WIP] added plugins
Mmiglio 1771948
[WIP] cleaned orbit collection, now an orbit buffer is directly passe…
Mmiglio 4c0e625
Added Example analyzer
Mmiglio b55f10b
remove dummy file
Mmiglio 4949fc8
fixed small buggs in the unpackers + renamed scouting namespace
Mmiglio afe8b59
New structure for EtSums
Mmiglio 2f1a7c5
Added AaÃòll sums and moved conversion scripts to L1TScouting
Mmiglio f59a381
New DAQ source for L1Trigger scouting
Mmiglio 9dd2a02
Applied code-checks and code-format
Mmiglio e07701b
Removed unused variable
Mmiglio d9c69d0
Merged 133x_L1ScoutingDaqSource from repository Mmiglio with cms-merg…
de54d52
Added data format class version, created unit tests for L1Scouting an…
0a516e4
Added L1 trigger objects interface + Renamed scouting classes
3823a79
Fixed unused variable warning
6dbd84f
applied code checks
f0b7204
Added Exception to OrbitCollection::getBxSize(), removed swap method …
9d13a12
code checks
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 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 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 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,5 @@ | ||
<use name="FWCore/Utilities"/> | ||
<use name="DataFormats/Common"/> | ||
<export> | ||
<lib name="1"/> | ||
</export> |
This file contains 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,8 @@ | ||
# DataFormats/L1Scouting | ||
|
||
## L1 Trigger Scouting data formats | ||
|
||
Any changes to the L1 scouting data formats must be backwards compatible. | ||
In order to ensure the L1 Scouting formats can be read by future CMSSW releases, | ||
there is a `TestWriteL1ScoutingDataFormats` unit test, which makes use of the `TestReadL1Scouting` analyzer and the `TestWriteL1Scouting` producer. | ||
The unit test checks that objects can be written and read properly. |
This file contains 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,198 @@ | ||
#ifndef DataFormats_L1Scouting_L1ScoutingCalo_h | ||
#define DataFormats_L1Scouting_L1ScoutingCalo_h | ||
|
||
#include "DataFormats/L1Scouting/interface/OrbitCollection.h" | ||
|
||
namespace l1ScoutingRun3 { | ||
|
||
class CaloObject { | ||
public: | ||
CaloObject() : hwEt_(0), hwEta_(0), hwPhi_(0), hwIso_(0) {} | ||
|
||
CaloObject(int hwEt, int hwEta, int hwPhi, int iso) : hwEt_(hwEt), hwEta_(hwEta), hwPhi_(hwPhi), hwIso_(iso) {} | ||
|
||
void setHwEt(int hwEt) { hwEt_ = hwEt; } | ||
void setHwEta(int hwEta) { hwEta_ = hwEta; } | ||
void setHwPhi(int hwPhi) { hwPhi_ = hwPhi; } | ||
void setHwIso(int hwIso) { hwIso_ = hwIso; } | ||
|
||
int hwEt() const { return hwEt_; } | ||
int hwEta() const { return hwEta_; } | ||
int hwPhi() const { return hwPhi_; } | ||
int hwIso() const { return hwIso_; } | ||
|
||
private: | ||
int hwEt_; | ||
int hwEta_; | ||
int hwPhi_; | ||
int hwIso_; | ||
}; | ||
|
||
class Jet : public CaloObject { | ||
public: | ||
Jet() : CaloObject(0, 0, 0, 0) {} | ||
|
||
Jet(int hwEt, int hwEta, int hwPhi, int hwQual) : CaloObject(hwEt, hwEta, hwPhi, hwQual) {} | ||
|
||
// store quality instead of iso | ||
void setHwQual(int hwQual) { setHwIso(hwQual); } | ||
int hwQual() const { return hwIso(); } | ||
}; | ||
|
||
class EGamma : public CaloObject { | ||
public: | ||
EGamma() : CaloObject(0, 0, 0, 0) {} | ||
|
||
EGamma(int hwEt, int hwEta, int hwPhi, int iso) : CaloObject(hwEt, hwEta, hwPhi, iso) {} | ||
}; | ||
|
||
class Tau : public CaloObject { | ||
public: | ||
Tau() : CaloObject(0, 0, 0, 0) {} | ||
|
||
Tau(int hwEt, int hwEta, int hwPhi, int iso) : CaloObject(hwEt, hwEta, hwPhi, iso) {} | ||
}; | ||
|
||
class BxSums { | ||
public: | ||
BxSums() | ||
: hwTotalEt_(0), | ||
hwTotalEtEm_(0), | ||
hwTotalHt_(0), | ||
hwMissEt_(0), | ||
hwMissEtPhi_(0), | ||
hwMissHt_(0), | ||
hwMissHtPhi_(0), | ||
hwMissEtHF_(0), | ||
hwMissEtHFPhi_(0), | ||
hwMissHtHF_(0), | ||
hwMissHtHFPhi_(0), | ||
hwAsymEt_(0), | ||
hwAsymHt_(0), | ||
hwAsymEtHF_(0), | ||
hwAsymHtHF_(0), | ||
minBiasHFP0_(0), | ||
minBiasHFM0_(0), | ||
minBiasHFP1_(0), | ||
minBiasHFM1_(0), | ||
towerCount_(0), | ||
centrality_(0) {} | ||
|
||
BxSums(int hwTotalEt, | ||
int hwTotalEtEm, | ||
int hwTotalHt, | ||
int hwMissEt, | ||
int hwMissEtPhi, | ||
int hwMissHt, | ||
int hwMissHtPhi, | ||
int hwMissEtHF, | ||
int hwMissEtHFPhi, | ||
int hwMissHtHF, | ||
int hwMissHtHFPhi, | ||
int hwAsymEt, | ||
int hwAsymHt, | ||
int hwAsymEtHF, | ||
int hwAsymHtHF, | ||
int minBiasHFP0, | ||
int minBiasHFM0, | ||
int minBiasHFP1, | ||
int minBiasHFM1, | ||
int towerCount, | ||
int centrality) | ||
: hwTotalEt_(hwTotalEt), | ||
hwTotalEtEm_(hwTotalEtEm), | ||
hwTotalHt_(hwTotalHt), | ||
hwMissEt_(hwMissEt), | ||
hwMissEtPhi_(hwMissEtPhi), | ||
hwMissHt_(hwMissHt), | ||
hwMissHtPhi_(hwMissHtPhi), | ||
hwMissEtHF_(hwMissEtHF), | ||
hwMissEtHFPhi_(hwMissEtHFPhi), | ||
hwMissHtHF_(hwMissHtHF), | ||
hwMissHtHFPhi_(hwMissHtHFPhi), | ||
hwAsymEt_(hwAsymEt), | ||
hwAsymHt_(hwAsymHt), | ||
hwAsymEtHF_(hwAsymEtHF), | ||
hwAsymHtHF_(hwAsymHtHF), | ||
minBiasHFP0_(minBiasHFP0), | ||
minBiasHFM0_(minBiasHFM0), | ||
minBiasHFP1_(minBiasHFP1), | ||
minBiasHFM1_(minBiasHFM1), | ||
towerCount_(towerCount), | ||
centrality_(centrality) {} | ||
|
||
void setHwTotalEt(int hwTotalEt) { hwTotalEt_ = hwTotalEt; } | ||
void setHwTotalEtEm(int hwTotalEtEm) { hwTotalEtEm_ = hwTotalEtEm; } | ||
void setMinBiasHFP0(int minBiasHFP0) { minBiasHFP0_ = minBiasHFP0; } | ||
void setHwTotalHt(int hwTotalHt) { hwTotalHt_ = hwTotalHt; } | ||
void setTowerCount(int towerCount) { towerCount_ = towerCount; } | ||
void setMinBiasHFM0(int minBiasHFM0) { minBiasHFM0_ = minBiasHFM0; } | ||
void setHwMissEt(int hwMissEt) { hwMissEt_ = hwMissEt; } | ||
void setHwMissEtPhi(int hwMissEtPhi) { hwMissEtPhi_ = hwMissEtPhi; } | ||
void setHwAsymEt(int hwAsymEt) { hwAsymEt_ = hwAsymEt; } | ||
void setMinBiasHFP1(int minBiasHFP1) { minBiasHFP1_ = minBiasHFP1; } | ||
void setHwMissHt(int hwMissHt) { hwMissHt_ = hwMissHt; } | ||
void setHwMissHtPhi(int hwMissHtPhi) { hwMissHtPhi_ = hwMissHtPhi; } | ||
void setHwAsymHt(int hwAsymHt) { hwAsymHt_ = hwAsymHt; } | ||
void setMinBiasHFM1(int minBiasHFM1) { minBiasHFM1_ = minBiasHFM1; } | ||
void setHwMissEtHF(int hwMissEtHF) { hwMissEtHF_ = hwMissEtHF; } | ||
void setHwMissEtHFPhi(int hwMissEtHFPhi) { hwMissEtHFPhi_ = hwMissEtHFPhi; } | ||
void setHwAsymEtHF(int hwAsymEtHF) { hwAsymEtHF_ = hwAsymEtHF; } | ||
void setHwMissHtHF(int hwMissHtHF) { hwMissHtHF_ = hwMissHtHF; } | ||
void setHwMissHtHFPhi(int hwMissHtHFPhi) { hwMissHtHFPhi_ = hwMissHtHFPhi; } | ||
void setHwAsymHtHF(int hwAsymHtHF) { hwAsymHtHF_ = hwAsymHtHF; } | ||
void setCentrality(int centrality) { centrality_ = centrality; } | ||
|
||
const int hwTotalEt() const { return hwTotalEt_; } | ||
const int hwTotalEtEm() const { return hwTotalEtEm_; } | ||
const int minBiasHFP0() const { return minBiasHFP0_; } | ||
const int hwTotalHt() const { return hwTotalHt_; } | ||
const int towerCount() const { return towerCount_; } | ||
const int minBiasHFM0() const { return minBiasHFM0_; } | ||
const int hwMissEt() const { return hwMissEt_; } | ||
const int hwMissEtPhi() const { return hwMissEtPhi_; } | ||
const int hwAsymEt() const { return hwAsymEt_; } | ||
const int minBiasHFP1() const { return minBiasHFP1_; } | ||
const int hwMissHt() const { return hwMissHt_; } | ||
const int hwMissHtPhi() const { return hwMissHtPhi_; } | ||
const int hwAsymHt() const { return hwAsymHt_; } | ||
const int minBiasHFM1() const { return minBiasHFM1_; } | ||
const int hwMissEtHF() const { return hwMissEtHF_; } | ||
const int hwMissEtHFPhi() const { return hwMissEtHFPhi_; } | ||
const int hwAsymEtHF() const { return hwAsymEtHF_; } | ||
const int hwMissHtHF() const { return hwMissHtHF_; } | ||
const int hwMissHtHFPhi() const { return hwMissHtHFPhi_; } | ||
const int hwAsymHtHF() const { return hwAsymHtHF_; } | ||
const int centrality() const { return centrality_; } | ||
|
||
private: | ||
int hwTotalEt_; | ||
int hwTotalEtEm_; | ||
int hwTotalHt_; | ||
int hwMissEt_; | ||
int hwMissEtPhi_; | ||
int hwMissHt_; | ||
int hwMissHtPhi_; | ||
int hwMissEtHF_; | ||
int hwMissEtHFPhi_; | ||
int hwMissHtHF_; | ||
int hwMissHtHFPhi_; | ||
int hwAsymEt_; | ||
int hwAsymHt_; | ||
int hwAsymEtHF_; | ||
int hwAsymHtHF_; | ||
int minBiasHFP0_; | ||
int minBiasHFM0_; | ||
int minBiasHFP1_; | ||
int minBiasHFM1_; | ||
int towerCount_; | ||
int centrality_; | ||
}; | ||
|
||
typedef OrbitCollection<Jet> JetOrbitCollection; | ||
typedef OrbitCollection<EGamma> EGammaOrbitCollection; | ||
typedef OrbitCollection<Tau> TauOrbitCollection; | ||
typedef OrbitCollection<BxSums> BxSumsOrbitCollection; | ||
|
||
} // namespace l1ScoutingRun3 | ||
#endif // DataFormats_L1Scouting_L1ScoutingCalo_h |
This file contains 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,95 @@ | ||
#ifndef DataFormats_L1Scouting_L1ScoutingMuon_h | ||
#define DataFormats_L1Scouting_L1ScoutingMuon_h | ||
|
||
#include "DataFormats/L1Scouting/interface/OrbitCollection.h" | ||
|
||
namespace l1ScoutingRun3 { | ||
|
||
class Muon { | ||
public: | ||
Muon() | ||
: hwPt_(0), | ||
hwEta_(0), | ||
hwPhi_(0), | ||
hwQual_(0), | ||
hwChrg_(0), | ||
hwChrgv_(0), | ||
hwIso_(0), | ||
tfIndex_(0), | ||
hwEtaAtVtx_(0), | ||
hwPhiAtVtx_(0), | ||
hwPtUnconstrained_(0), | ||
hwDXY_(0) {} | ||
|
||
Muon(int hwPt, | ||
int hwEta, | ||
int hwPhi, | ||
int hwQual, | ||
int hwChrg, | ||
int hwChrgv, | ||
int hwIso, | ||
int tfIndex, | ||
int hwEtaAtVtx, | ||
int hwPhiAtVtx, | ||
int hwPtUnconstrained, | ||
int hwDXY) | ||
: hwPt_(hwPt), | ||
hwEta_(hwEta), | ||
hwPhi_(hwPhi), | ||
hwQual_(hwQual), | ||
hwChrg_(hwChrg), | ||
hwChrgv_(hwChrgv), | ||
hwIso_(hwIso), | ||
tfIndex_(tfIndex), | ||
hwEtaAtVtx_(hwEtaAtVtx), | ||
hwPhiAtVtx_(hwPhiAtVtx), | ||
hwPtUnconstrained_(hwPtUnconstrained), | ||
hwDXY_(hwDXY) {} | ||
|
||
void setHwPt(int hwPt) { hwPt_ = hwPt; } | ||
void setHwEta(int hwEta) { hwEta_ = hwEta; } | ||
void setHwPhi(int hwPhi) { hwPhi_ = hwPhi; } | ||
void setHwQual(int hwQual) { hwQual_ = hwQual; } | ||
void setHwChrg(int hwChrg) { hwChrg_ = hwChrg; } | ||
void setHwChrgv(int hwChrgv) { hwChrgv_ = hwChrgv; } | ||
void setHwIso(int hwIso) { hwIso_ = hwIso; } | ||
void setTfIndex(int tfIndex) { tfIndex_ = tfIndex; } | ||
void setHwEtaAtVtx(int hwEtaAtVtx) { hwEtaAtVtx_ = hwEtaAtVtx; } | ||
void setHwPhiAtVtx(int hwPhiAtVtx) { hwPhiAtVtx_ = hwPhiAtVtx; } | ||
void setHwPtUnconstrained(int hwPtUnconstrained) { hwPtUnconstrained_ = hwPtUnconstrained; } | ||
void setHwDXY(int hwDXY) { hwDXY_ = hwDXY; } | ||
|
||
int hwPt() const { return hwPt_; } | ||
int hwEta() const { return hwEta_; } | ||
int hwPhi() const { return hwPhi_; } | ||
int hwQual() const { return hwQual_; } | ||
int hwCharge() const { return hwChrg_; } | ||
int hwChargeValid() const { return hwChrgv_; } | ||
int hwIso() const { return hwIso_; } | ||
int hwIndex() const { return tfIndex_; } | ||
int hwEtaAtVtx() const { return hwEtaAtVtx_; } | ||
int hwPhiAtVtx() const { return hwPhiAtVtx_; } | ||
int hwPtUnconstrained() const { return hwPtUnconstrained_; } | ||
int hwDXY() const { return hwDXY_; } | ||
int tfMuonIndex() const { return tfIndex_; } | ||
|
||
private: | ||
int hwPt_; | ||
int hwEta_; | ||
int hwPhi_; | ||
int hwQual_; | ||
int hwChrg_; | ||
int hwChrgv_; | ||
int hwIso_; | ||
int tfIndex_; | ||
int hwEtaAtVtx_; | ||
int hwPhiAtVtx_; | ||
int hwPtUnconstrained_; | ||
int hwDXY_; | ||
}; | ||
|
||
typedef OrbitCollection<Muon> MuonOrbitCollection; | ||
|
||
} // namespace l1ScoutingRun3 | ||
|
||
#endif // DataFormats_L1Scouting_L1ScoutingMuon_h |
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.
If separate types are needed, please avoid the inheritance (to keep the structure simpler, and therefore easier to support for future evolution).
If separate types are not needed, how about just using
CaloObject
directly for the three cases?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.
Given that persistent data has already been created using these classes as they were in this PR (https://its.cern.ch/jira/browse/CMSTRANSF-799), perhaps it is easiest to just leave the inheritance as it is. The consequence is that the class hierarchy may not be changed in the future. In the PR adding the tests, please add comments here documenting this restriction.