Conversation
A slightly modified script of the xrootd/XrdCl/XrdClFileSystem.hh one, in order to avoid compilation errors.
This change includes the XrdClFileSystem_v2.hh script instead of the XrdClFileSystem.hh so as to avoid compilation errors.
|
Why did you copy an entire file from the XRootD code into this package, much less a header not in the interface folder? You're not going to want to maintain XrdClFileSystem_v2.hh. A better strategy is to put in static_asserts and header guards to make sure you pick up the correct files or exit right away upon a missing dependency. |
| edm::EDGetTokenT<PFCandidateView> srcPFCandidates_; | ||
| edm::EDGetTokenT<std::vector<edm::FwdPtr<reco::PFCandidate> > > srcPFCandidatesAsFwdPtr_; | ||
| edm::EDGetTokenT<vector<reco::GenParticle> > srcGenParticles_; | ||
| // edm::EDGetTokenT<vector<reco::GenParticle> > srcGenParticles_; |
There was a problem hiding this comment.
You should remove code, specifically commented code, which is no longer needed. If you need to switch back an forth you should consider using an `edm::View``` and then casting to the correct base type.
There was a problem hiding this comment.
Okay, I removed the code that is no longer needed.
JetAnalyzers/python/Defaults_cff.py
Outdated
| saveCandidates = cms.bool(False), | ||
| # MATCHING MODE: deltaR(ref,jet) | ||
| deltaRMax = cms.double(0.25), | ||
| deltaRMax = cms.double(0.4), |
There was a problem hiding this comment.
I've been out of the loop for a while, so feel free to tell me I don't know the latest developments. That said, 0.4 seems awfully permissive for the deltaR matching. That's the entire cone radius for an R=0.4 jet. The default here should be the most often used value and should not change much. Is that why you changed this to 0.4.
There was a problem hiding this comment.
Apologies for the confusion, this was actually a test version and we will fix it and upload the correct one with the values that were before. (However, this does not affect the results because we require dr max value of 0.2 in the MC Truth JECs derivation.)
JetAnalyzers/python/Defaults_cff.py
Outdated
| doflavor = cms.bool(False), | ||
| noabsflavors = cms.bool(False), | ||
| drmax = cms.double(0.3), | ||
| drmax = cms.double(0.4), |
There was a problem hiding this comment.
I would imagine this should match the value in the JetResponseParameters, so keep that in mind when answering my previous comment.
| #! PF JETS CHS | ||
| #! | ||
| ak1PFCHSJets = ak1PFJets.clone( src = 'pfNoPileUpJME' ) | ||
|
|
There was a problem hiding this comment.
Please remove these newlines to keep the style the same among the various sections of the code. You should strive to keep the formatting consistent throughout the code.
JetAnalyzers/python/addAlgorithm.py
Outdated
| from CommonTools.PileupAlgos.Puppi_cff import * | ||
| from JetMETAnalysis.JetAnalyzers.customizePuppiTune_cff import * | ||
|
|
||
|
|
There was a problem hiding this comment.
Please keep this to 1 newline to maintain the style.
| } | ||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Please try to match the style for this entire section (the getMult function).
|
|
||
| switch (std::abs(pfCand->pdgId())) { | ||
|
|
||
| case 211: //PFCandidate::h: // charged hadron |
There was a problem hiding this comment.
Don't use unnamed constants. Instead, you should define enums as in
and use those as your cases.You also only really have two cases:
- You add one to the
nMultvariable - You add one to the
chMultvariable
You should combine these cases using and OR of the conditions inside if, else if, else statements. This will reduce the number of comparisons. You can use thestd::any_offunction to reduce the verbosity of the conditional (https://www.cplusplus.com/reference/algorithm/any_of/).
| JRAEvt_->jtmuf ->push_back(pfJetRef->muonEnergyFraction() *JRAEvt_->jtjec->at(JRAEvt_->nref)); | ||
| JRAEvt_->jthfhf->push_back(pfJetRef->HFHadronEnergyFraction() *JRAEvt_->jtjec->at(JRAEvt_->nref)); | ||
| JRAEvt_->jthfef->push_back(pfJetRef->HFEMEnergyFraction() *JRAEvt_->jtjec->at(JRAEvt_->nref)); | ||
| int chMult=0, nMult=0; |
JetUtilities/interface/JRAEvent.h
Outdated
| vector<Int_t>* refpdgid_physicsDef; | ||
| vector<Float_t>* refe; | ||
| vector<Float_t>* refpt; | ||
| vector<Int_t>* refnMult; |
There was a problem hiding this comment.
Same comment for all of the nMult and chMult lines.
| fChain->Branch("evt", &evt, "evt/L"); | ||
| fChain->Branch("nref", &nref, "nref/b"); | ||
| fChain->Branch("refrank", "vector<UChar_t>", &refrank); | ||
| fChain->Branch("refpdgid", "vector<Int_t>", &refpdgid); |
There was a problem hiding this comment.
This change means that the refpdgid branch will always be loaded. Is that want you want?
|
You might also consider adding a GitHub action to run clang-tidy/clang-format on the code each time there is a PR or or push to the repo. This will help to keep the code in good shape and to help with formatting. |
1st recipe for Run-3 PF-Hadron Calibrations
Changes suggested by JERC conveners and implemented to run and produce ntuples from MINIAOD: