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
Standard muon selectors #20612
Standard muon selectors #20612
Changes from all commits
b9c86bc
e317148
4886664
8bf0616
ec7e863
1832ba3
ba73ec9
0c5ab4a
dd8206b
04cfab4
ba190d9
e8d20f7
bf7f6b5
738fd09
42f4170
718dc74
9dd45cf
8689825
7fbd779
a26e056
a8dcb6f
59ad7ca
57e47ad
30998ea
f5af074
9cfcfb7
7902379
75d3480
f4cb782
9cc9137
79958f0
0dce48d
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ namespace reco { | |
/// constructor from values | ||
Muon( Charge, const LorentzVector &, const Point & = Point( 0, 0, 0 ) ); | ||
/// create a clone | ||
Muon * clone() const; | ||
Muon * clone() const override; | ||
|
||
|
||
|
||
|
@@ -46,20 +46,20 @@ namespace reco { | |
/// reference to Track reconstructed in the tracker only | ||
using reco::RecoCandidate::track; | ||
virtual TrackRef innerTrack() const { return innerTrack_; } | ||
virtual TrackRef track() const { return innerTrack(); } | ||
TrackRef track() const override { return innerTrack(); } | ||
/// reference to Track reconstructed in the muon detector only | ||
virtual TrackRef outerTrack() const { return outerTrack_; } | ||
virtual TrackRef standAloneMuon() const { return outerTrack(); } | ||
TrackRef standAloneMuon() const override { return outerTrack(); } | ||
/// reference to Track reconstructed in both tracked and muon detector | ||
virtual TrackRef globalTrack() const { return globalTrack_; } | ||
virtual TrackRef combinedMuon() const { return globalTrack(); } | ||
TrackRef combinedMuon() const override { return globalTrack(); } | ||
|
||
virtual TrackRef tpfmsTrack() const { return muonTrackFromMap(TPFMS);} | ||
virtual TrackRef pickyTrack() const { return muonTrackFromMap(Picky);} | ||
virtual TrackRef dytTrack() const { return muonTrackFromMap(DYT);} | ||
|
||
virtual const Track * bestTrack() const {return muonTrack(bestTrackType_).get();} | ||
virtual TrackBaseRef bestTrackRef() const {return reco::TrackBaseRef(muonTrack(bestTrackType_));} | ||
const Track * bestTrack() const override {return muonTrack(bestTrackType_).get();} | ||
TrackBaseRef bestTrackRef() const override {return reco::TrackBaseRef(muonTrack(bestTrackType_));} | ||
virtual TrackRef muonBestTrack() const {return muonTrack(bestTrackType_);} | ||
virtual MuonTrackType muonBestTrackType() const {return bestTrackType_;} | ||
virtual TrackRef tunePMuonBestTrack() const {return muonTrack(bestTunePTrackType_);} | ||
|
@@ -182,6 +182,45 @@ namespace reco { | |
enum ArbitrationType { NoArbitration, SegmentArbitration, SegmentAndTrackArbitration, SegmentAndTrackArbitrationCleaned, | ||
RPCHitAndTrackArbitration, GEMSegmentAndTrackArbitration, ME0SegmentAndTrackArbitration }; | ||
|
||
/// | ||
/// ====================== STANDARD SELECTORS =========================== | ||
/// | ||
enum Selector { | ||
CutBasedIdLoose = 1UL<< 0, | ||
CutBasedIdMedium = 1UL<< 1, | ||
CutBasedIdMediumPrompt = 1UL<< 2, // medium with IP cuts | ||
CutBasedIdTight = 1UL<< 3, | ||
CutBasedIdGlobalHighPt = 1UL<< 4, // high pt muon for Z',W' (better momentum resolution) | ||
CutBasedIdTrkHighPt = 1UL<< 5, // high pt muon for boosted Z (better efficiency) | ||
PFIsoVeryLoose = 1UL<< 6, // reliso<0.40 | ||
PFIsoLoose = 1UL<< 7, // reliso<0.25 | ||
PFIsoMedium = 1UL<< 8, // reliso<0.20 | ||
PFIsoTight = 1UL<< 9, // reliso<0.15 | ||
PFIsoVeryTight = 1UL<<10, // reliso<0.10 | ||
TkIsoLoose = 1UL<<11, // reliso<0.10 | ||
TkIsoTight = 1UL<<12, // reliso<0.05 | ||
SoftCutBasedId = 1UL<<13, | ||
SoftMvaId = 1UL<<14, | ||
MvaLoose = 1UL<<15, | ||
MvaMedium = 1UL<<16, | ||
MvaTight = 1UL<<17, | ||
MiniIsoLoose = 1UL<<18, // reliso<0.40 | ||
MiniIsoMedium = 1UL<<19, // reliso<0.20 | ||
MiniIsoTight = 1UL<<20, // reliso<0.10 | ||
MiniIsoVeryTight = 1UL<<21 // reliso<0.05 | ||
|
||
}; | ||
|
||
bool passed( unsigned int selection ) const { return (selectors_ & selection)==selection; } | ||
unsigned int selectors() const { return selectors_; } | ||
void setSelectors( unsigned int selectors ){ selectors_ = selectors; } | ||
void setSelector(Selector selector, bool passed){ | ||
if (passed) | ||
selectors_ |= selector; | ||
else | ||
selectors_ &= ~selector; | ||
} | ||
|
||
/// | ||
/// ====================== USEFUL METHODs =========================== | ||
/// | ||
|
@@ -221,19 +260,19 @@ namespace reco { | |
void setType( unsigned int type ) { type_ = type; } | ||
unsigned int type() const { return type_; } | ||
// override of method in base class reco::Candidate | ||
bool isMuon() const { return true; } | ||
bool isGlobalMuon() const { return type_ & GlobalMuon; } | ||
bool isTrackerMuon() const { return type_ & TrackerMuon; } | ||
bool isStandAloneMuon() const { return type_ & StandAloneMuon; } | ||
bool isCaloMuon() const { return type_ & CaloMuon; } | ||
bool isMuon() const override { return true; } | ||
bool isGlobalMuon() const override { return type_ & GlobalMuon; } | ||
bool isTrackerMuon() const override { return type_ & TrackerMuon; } | ||
bool isStandAloneMuon() const override { return type_ & StandAloneMuon; } | ||
bool isCaloMuon() const override { return type_ & CaloMuon; } | ||
bool isPFMuon() const {return type_ & PFMuon;} //fix me ! Has to go to type | ||
bool isRPCMuon() const {return type_ & RPCMuon;} | ||
bool isGEMMuon() const {return type_ & GEMMuon;} | ||
bool isME0Muon() const {return type_ & ME0Muon;} | ||
|
||
private: | ||
/// check overlap with another candidate | ||
virtual bool overlap( const Candidate & ) const; | ||
bool overlap( const Candidate & ) const override; | ||
/// reference to Track reconstructed in the tracker only | ||
TrackRef innerTrack_; | ||
/// reference to Track reconstructed in the muon detector only | ||
|
@@ -288,7 +327,8 @@ namespace reco { | |
/// get pointers to best segment and corresponding chamber in vector of chambers | ||
std::pair<const MuonChamberMatch*,const MuonSegmentMatch*> pair( const std::vector<const MuonChamberMatch*> &, | ||
ArbitrationType type = SegmentAndTrackArbitration ) const; | ||
|
||
/// selector bitmap | ||
unsigned int selectors_; | ||
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 it safe to commit to 32 bits now, considering that 22 are already taken? 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. 32 is good enough. We need to resist a temptation to introduce any minor modification as a separate selector. If that's done I don't think we will reach the limit any time soon. In other words it's good to have some limits to avoid id proliferation. 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. Well, OK. |
||
public: | ||
/// get number of segments | ||
int numberOfSegments( int station, int muonSubdetId, ArbitrationType type = SegmentAndTrackArbitration ) 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.
IDSelector may be more descriptive
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.
It's not ID. It's any selector including isolation.