-
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
HeavyIon Reaction Plane MiniAOD #31129
Changes from 3 commits
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,168 @@ | ||||||
#ifndef RecoHI_HiEvtPlaneAlgos_EPCuts_h | ||||||
#define RecoHI_HiEvtPlaneAlgos_EPCuts_h | ||||||
|
||||||
namespace hi { | ||||||
|
||||||
enum class EP_ERA { ppReco, HIReco, Pixel, GenMC }; | ||||||
|
||||||
struct TrackStructure { | ||||||
int centbin; | ||||||
float eta; | ||||||
float phi; | ||||||
float et; | ||||||
float pt; | ||||||
int charge; | ||||||
int pdgid; | ||||||
int hits; | ||||||
int algos; | ||||||
int collection; | ||||||
float dz; | ||||||
float dxy; | ||||||
float dzError; | ||||||
float dxyError; | ||||||
float ptError; | ||||||
bool highPurity; | ||||||
float dzSig; | ||||||
float dxySig; | ||||||
float normalizedChi2; | ||||||
float dzError_Pix; | ||||||
float chi2layer; | ||||||
int numberOfValidHits; | ||||||
int pixel; | ||||||
}; | ||||||
|
||||||
class EPCuts { | ||||||
public: | ||||||
explicit EPCuts(EP_ERA cutEra = EP_ERA::ppReco, | ||||||
double pterror = 0.1, | ||||||
double dzerror = 3.0, | ||||||
double dxyerror = 3.0, | ||||||
double chi2perlayer = 0.18, | ||||||
double dzError_Pix = 10.0, | ||||||
double chi2Pix = 40., | ||||||
int numberOfValidHits = 11) { | ||||||
cutera_ = cutEra; | ||||||
pterror_ = pterror; | ||||||
dzerror_ = dzerror; | ||||||
dxyerror_ = dxyerror; | ||||||
chi2perlayer_ = chi2perlayer; | ||||||
dzerror_Pix_ = dzError_Pix; | ||||||
chi2Pix_ = chi2Pix; | ||||||
numberOfValidHits_ = numberOfValidHits; | ||||||
} | ||||||
|
||||||
bool isGoodHF(const TrackStructure& track) const { | ||||||
if (track.pdgid != 1 && track.pdgid != 2) | ||||||
return false; | ||||||
if (std::abs(track.eta) < 3 || std::abs(track.eta) > 5) | ||||||
return false; | ||||||
return true; | ||||||
} | ||||||
|
||||||
bool isGoodCastor(const TrackStructure& track) const { return true; } | ||||||
|
||||||
bool isGoodTrack(const TrackStructure& track) const { | ||||||
if (cutera_ == EP_ERA::ppReco) | ||||||
return trackQuality_ppReco(track); | ||||||
if (cutera_ == EP_ERA::HIReco) | ||||||
return trackQuality_HIReco(track); | ||||||
if (cutera_ == EP_ERA::Pixel) | ||||||
return trackQuality_Pixel(track); | ||||||
return false; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not used now for MC, but may be used later. |
||||||
} | ||||||
|
||||||
bool trackQuality_ppReco(const TrackStructure& track) const { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this and other methods have a fairly large overlap in implementation. Also, the methods will be easier to use in general if there was only a method accepting the cutEra as a function argument There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are prepared for different HI data taking and scenario. We prefer to separate them to make it easy for copy and paste. |
||||||
if (track.charge == 0) | ||||||
return false; | ||||||
if (!track.highPurity) | ||||||
return false; | ||||||
if (track.ptError > pterror_ * track.pt) | ||||||
return false; | ||||||
if (track.numberOfValidHits < numberOfValidHits_) | ||||||
return false; | ||||||
if (track.chi2layer > chi2perlayer_) | ||||||
return false; | ||||||
if (std::abs(track.dxy) > dxyerror_ * track.dxyError) | ||||||
return false; | ||||||
if (std::abs(track.dz) > dzerror_ * track.dzError) | ||||||
return false; | ||||||
return true; | ||||||
} | ||||||
|
||||||
bool trackQuality_HIReco(const TrackStructure& track) const { | ||||||
if (track.charge == 0) | ||||||
return false; | ||||||
if (!track.highPurity) | ||||||
return false; | ||||||
if (track.numberOfValidHits < numberOfValidHits_) | ||||||
return false; | ||||||
if (track.ptError > pterror_ * track.pt) | ||||||
return false; | ||||||
if (std::abs(track.dxy) > dxyerror_ * track.dxyError) | ||||||
return false; | ||||||
if (std::abs(track.dz) > dzerror_ * track.dzError) | ||||||
return false; | ||||||
if (track.chi2layer > chi2perlayer_) | ||||||
return false; | ||||||
//if (track.algos != 4 && track.algos != 5 && track.algos != 6 && track.algos != 7) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this commented out code needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Various HI documents used algo numbers instead of the enum names. We keep it for documentation purpose. |
||||||
if (track.algos != reco::TrackBase::initialStep && track.algos != reco::TrackBase::lowPtTripletStep && | ||||||
track.algos != reco::TrackBase::pixelPairStep && track.algos != reco::TrackBase::detachedTripletStep) | ||||||
return false; | ||||||
return true; | ||||||
} | ||||||
|
||||||
bool trackQuality_Pixel(const TrackStructure& track) const { | ||||||
if (track.charge == 0) | ||||||
return false; | ||||||
if (!track.highPurity) | ||||||
return false; | ||||||
bool bPix = false; | ||||||
int nHits = track.numberOfValidHits; | ||||||
if (track.ptError > pterror_ * track.pt) | ||||||
return false; | ||||||
if (track.pt < 2.4 and (nHits == 3 or nHits == 4 or nHits == 5 or nHits == 6)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
isn't it equivalent? (unless there are legitimate cases of tracks with 2 hits in this context) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[earlier comment] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please clarify/comment on https://github.com/cms-sw/cmssw/pull/31129/files#r472288755 |
||||||
bPix = true; | ||||||
if (not bPix) { | ||||||
if (nHits < numberOfValidHits_) | ||||||
return false; | ||||||
if (track.chi2layer > chi2perlayer_) | ||||||
return false; | ||||||
if (track.ptError > pterror_ * track.pt) | ||||||
return false; | ||||||
int algo = track.algos; | ||||||
if (track.pt > 2.4 && algo != reco::TrackBase::initialStep && algo != reco::TrackBase::lowPtTripletStep && | ||||||
algo != reco::TrackBase::pixelPairStep && algo != reco::TrackBase::detachedTripletStep) | ||||||
return false; | ||||||
if (std::abs(track.dxy) > dxyerror_ * track.dxyError) | ||||||
return false; | ||||||
if (std::abs(track.dz) > dzerror_ * track.dzError) | ||||||
return false; | ||||||
} else { | ||||||
if (track.chi2layer > chi2Pix_) | ||||||
return false; | ||||||
if (std::abs(track.dz) > dzerror_Pix_ * track.dzError) | ||||||
return false; | ||||||
} | ||||||
return true; | ||||||
} | ||||||
|
||||||
bool trackQuality_GenMC(const TrackStructure& track) const { | ||||||
if (track.charge == 0) | ||||||
return false; | ||||||
if (std::abs(track.eta) > 2.4) | ||||||
return false; | ||||||
return true; | ||||||
} | ||||||
|
||||||
private: | ||||||
EP_ERA cutera_; | ||||||
double pterror_; | ||||||
double dzerror_; | ||||||
double dxyerror_; | ||||||
double chi2perlayer_; | ||||||
double dzerror_Pix_; | ||||||
double chi2Pix_; | ||||||
int numberOfValidHits_; | ||||||
}; | ||||||
} // namespace hi | ||||||
#endif |
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 used in this PR -> remove
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.
This is used for PackedCandidate.
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 clarify where.
I did not see any includes of files from this package in this PR.
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.
Failed at link:
/cvmfs/cms-ib.cern.ch/nweek-02650/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/bin/../lib/gcc/x86_64-unknown-linux-gnu/8.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: tmp/slc7_amd64_gcc820/src/RecoHI/HiEvtPlaneAlgos/src/RecoHIHiEvtPlaneAlgos/EvtPlaneProducer.cc.o: in function
EvtPlaneProducer::EvtPlaneProducer(edm::ParameterSet const&)': EvtPlaneProducer.cc:(.text+0x13d3): undefined reference to
typeinfo for pat::PackedCandidate'/cvmfs/cms-ib.cern.ch/nweek-02650/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/bin/../lib/gcc/x86_64-unknown-linux-gnu/8.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: tmp/slc7_amd64_gcc820/src/RecoHI/HiEvtPlaneAlgos/src/RecoHIHiEvtPlaneAlgos/EvtPlaneProducer.cc.o: in function
EvtPlaneProducer::produce(edm::Event&, edm::EventSetup const&)': EvtPlaneProducer.cc:(.text+0x4274): undefined reference to
pat::PackedCandidate::unpack() const'/cvmfs/cms-ib.cern.ch/nweek-02650/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/bin/../lib/gcc/x86_64-unknown-linux-gnu/8.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: EvtPlaneProducer.cc:(.text+0x4284): undefined reference to
pat::PackedCandidate::unpack() const' ... EvtPlaneProducer.cc:(.text._ZNK3pat15PackedCandidate11pseudoTrackEv[_ZNK3pat15PackedCandidate11pseudoTrackEv]+0x19): undefined reference to
pat::PackedCandidate::unpackTrk() const'/cvmfs/cms-ib.cern.ch/nweek-02650/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/bin/../lib/gcc/x86_64-unknown-linux-gnu/8.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: tmp/slc7_amd64_gcc820/src/RecoHI/HiEvtPlaneAlgos/src/RecoHIHiEvtPlaneAlgos/EvtPlaneProducer.cc.o: in function
pat::PackedCandidate::eta() const': EvtPlaneProducer.cc:(.text._ZNK3pat15PackedCandidate3etaEv[_ZNK3pat15PackedCandidate3etaEv]+0x21): undefined reference to
pat::PackedCandidate::unpack() 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.
Thanks,
pat::PackedCandidate::unpack
is defined inDataFormats/PatCandidates
, this is the package to be used hereThere 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.
this was not addressed; based on the feedback, a dependence on
DataFormats/PatCandidates
should be added instead ofPhysicsTools/UtilAlgos