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 package DataFormats/L1TCalorimeterPhase2 for Phase2 L1T #29348
New package DataFormats/L1TCalorimeterPhase2 for Phase2 L1T #29348
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29348/14439
|
please test |
The tests are being triggered in jenkins. |
A new Pull Request was created by @rekovic for master. It involves the following packages: DataFormats/L1TCalorimeterPhase2 The following packages do not have a category, yet: DataFormats/L1TCalorimeterPhase2 @cmsbuild can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
-1 Tested at: 8b8eeb4 CMSSW: CMSSW_11_1_X_2020-03-30-1100 I found follow errors while testing this PR Failed tests: HeaderConsistency |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
<use name="rootrflx"/> | ||
<use name="hepmc"/> | ||
<use name="clhep"/> | ||
<use name="SimDataFormats/GeneratorProducts"/> |
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.
By quick look boost
, hepmc
, clhep
, and SimDataFormats/GeneratorProducts
are not used. Can they be removed?
@@ -0,0 +1,17 @@ | |||
<flags GENREFLEX_ARGS="--"/> |
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.
Is this flag needed? I don't see such a flag anywhere in CMSSW.
: l1t::L1Candidate(p4), calibratedPt_(calibratedPt), hovere_(hovere), iso_(iso), PUcorrPt_(PUcorrPt){}; | ||
|
||
// For decay mode related checks with CaloTaus | ||
std::vector<std::vector<float> > associated_l1EGs; |
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.
Member variables should be private
.
// For decay mode related checks with CaloTaus | ||
std::vector<std::vector<float> > associated_l1EGs; | ||
|
||
virtual ~L1CaloJet(){}; |
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.
I wonder how this passed clang-tidy
, I would have expected
virtual ~L1CaloJet(){}; | |
~L1CaloJet() override {}; |
Actually the destructor can be removed (i.e. left for compiler to generate)
inline float isolation() const { return iso_; }; | ||
inline float PUcorrPt() const { return PUcorrPt_; }; | ||
void SetExperimentalParams(const std::map<std::string, float>& params) { experimentalParams_ = params; }; | ||
const std::map<std::string, float> GetExperimentalParams() const { return experimentalParams_; }; |
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.
const std::map<std::string, float> GetExperimentalParams() const { return experimentalParams_; }; | |
const std::map<std::string, float>& experimentalParams() const { return experimentalParams_; }; |
to avoid a copy, and to remove get
prefix of a getter (2.11 in http://cms-sw.github.io/cms_coding_rules.html)
try { | ||
return experimentalParams_.at(name); | ||
} catch (...) { | ||
std::cout << "Error: no mapping for ExperimentalParam: " << name << std::endl; |
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.
cout
is not thread safe.
|
||
// The index range depends on the algorithm eta,phi window, currently 3x5 | ||
// The pt should always be ordered. | ||
inline float GetCrystalPt(unsigned int index) const { |
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.
inline float GetCrystalPt(unsigned int index) const { | |
inline float crystalPt(unsigned int index) const { |
namespace { | ||
namespace { | ||
|
||
l1slhc::L1EGCrystalCluster egcrystalcluster; | ||
std::vector<l1slhc::L1EGCrystalCluster> l1egcrystalclustervec; | ||
l1slhc::L1EGCrystalClusterCollection l1egcrystalclustercoll; | ||
edm::Wrapper<l1slhc::L1EGCrystalClusterCollection> wl1egcrystalclustercoll; | ||
|
||
L1CaloTower l1CaloTower; | ||
std::vector<L1CaloTower> l1CaloTowervec; | ||
L1CaloTowerCollection l1CaloTowercoll; | ||
edm::Wrapper<L1CaloTowerCollection> wl1CaloTowercoll; | ||
|
||
l1slhc::L1CaloJet l1calojet; | ||
std::vector<l1slhc::L1CaloJet> l1calojetvec; | ||
l1slhc::L1CaloJetsCollection l1calojetcoll; | ||
edm::Wrapper<l1slhc::L1CaloJetsCollection> wl1calojetcoll; | ||
|
||
} // namespace | ||
} // namespace |
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 needed anymore
namespace { | |
namespace { | |
l1slhc::L1EGCrystalCluster egcrystalcluster; | |
std::vector<l1slhc::L1EGCrystalCluster> l1egcrystalclustervec; | |
l1slhc::L1EGCrystalClusterCollection l1egcrystalclustercoll; | |
edm::Wrapper<l1slhc::L1EGCrystalClusterCollection> wl1egcrystalclustercoll; | |
L1CaloTower l1CaloTower; | |
std::vector<L1CaloTower> l1CaloTowervec; | |
L1CaloTowerCollection l1CaloTowercoll; | |
edm::Wrapper<L1CaloTowerCollection> wl1CaloTowercoll; | |
l1slhc::L1CaloJet l1calojet; | |
std::vector<l1slhc::L1CaloJet> l1calojetvec; | |
l1slhc::L1CaloJetsCollection l1calojetcoll; | |
edm::Wrapper<l1slhc::L1CaloJetsCollection> wl1calojetcoll; | |
} // namespace | |
} // namespace |
|
||
<lcgdict> | ||
|
||
<class name="l1slhc::L1EGCrystalCluster" /> |
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.
Should these be versioned (for future schema evolution)?
int l1eg_standaloneSS = 0; | ||
int l1eg_standaloneIso = 0; | ||
|
||
bool isBarrel = false; |
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.
Please encapsulate the data properly (private members, access via member functions).
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29348/14672
|
Pull request #29348 was updated. @cmsbuild, @rekovic, @benkrikler, @kpedro88 can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
+upgrade |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
New package
DataFormats/L1TCalorimeterPhase2
for Phase2 L1Trigger.These classes are intended to hold L1T objects reconstructed basic stand-alone Calorimeter objects using full granularity of Phase2 calorimeters available to the Leve1 trigger in Phase2.
These objects can then be used downstream to reconstruct more complex objects, either through matching to L1TTTracks or in ParticleFlow algorithms.
To distinguish these objects from Phase-1 L1T objects, this package name contains string
Phase2
There are existing DataFormats/L1TCalorimeter which hold Phase1-like calorimeter L1T objects reconstructed with 5x5 granularity available to the Level trigger in Phase1.