1 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHTrackReference_h 2 #define HeavyFlavorAnalysis_RecoDecay_BPHTrackReference_h 69 const char* modeList =
"cfhbpmnigse",
70 char* modeFlag = 0 ) {
71 if ( rc.
charge() == 0 )
return 0;
72 const char* mptr = modeList;
74 if ( modeFlag == 0 ) modeFlag = &
c;
75 char&
mode = *modeFlag;
77 while ( ( mode = *mptr++ ) ) {
79 case 'c':
if ( ( tkp =
getFromRC( rc ) ) != 0 )
return tkp;
break;
80 case 'f':
if ( ( tkp =
getFromPF( rc ) ) != 0 )
return tkp;
break;
81 case 'h':
if ( ( tkp =
getFromGP( rc ) ) != 0 )
return tkp;
break;
82 case 'b':
if ( ( tkp =
getFromBT( rc ) ) != 0 )
return tkp;
break;
83 case 'p':
if ( ( tkp =
getFromPC( rc ) ) != 0 )
return tkp;
break;
84 case 'm':
if ( ( tkp =
getMuonPF( rc ) ) != 0 )
return tkp;
break;
85 case 'n':
if ( ( tkp =
getMuonBT( rc ) ) != 0 )
return tkp;
break;
86 case 'i':
if ( ( tkp =
getMuonIT( rc ) ) != 0 )
return tkp;
break;
87 case 'g':
if ( ( tkp =
getMuonGT( rc ) ) != 0 )
return tkp;
break;
88 case 's':
if ( ( tkp =
getMuonSA( rc ) ) != 0 )
return tkp;
break;
89 case 'e':
if ( ( tkp =
getElecPF( rc ) ) != 0 )
return tkp;
break;
109 if ( pf == 0 )
return 0;
122 if ( gp == 0 )
return 0;
145 if ( pp == 0 )
return 0;
157 if ( mu == 0 )
return 0;
175 if ( mu == 0 )
return 0;
190 if ( mu == 0 )
return 0;
206 if ( mu == 0 )
return 0;
222 if ( mu == 0 )
return 0;
238 if ( el == 0 )
return 0;
static const reco::Track * getMuonPF(const reco::Candidate &rc)
static const reco::Track * getFromPF(const reco::Candidate &rc)
bool isNonnull() const
Checks for non-null.
static const reco::Track * getMuonSA(const reco::Candidate &rc)
bool isStandAloneMuon() const override
static const reco::Track * getMuonGT(const pat::Muon *mu)
virtual const Track * bestTrack() const
static const reco::Track * getMuonIT(const pat::Muon *mu)
pat::PackedCandidate candidate
bool isTrackerMuon() const override
reco::TrackRef trackRef() const
static const reco::Track * getFromRC(const reco::Candidate &rc)
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
virtual TrackRef muonBestTrack() const
reco::TrackRef innerTrack() const override
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
static const reco::Track * getMuonPF(const pat::Muon *mu)
reco::PFCandidateRef pfCandidateRef() const
reference to the source PFCandidates; null if this has been built from a standard electron ...
static const reco::Track * getTrack(const reco::Candidate &rc, const char *modeList="cfhbpmnigse", char *modeFlag=0)
static const reco::Track * getMuonIT(const reco::Candidate &rc)
bool isGlobalMuon() const override
static const reco::Track * getMuonGT(const reco::Candidate &rc)
reco::PFCandidateRef pfCandidateRef() const
static const reco::Track * getMuonSA(const pat::Muon *mu)
virtual const reco::Track & pseudoTrack() const
Return reference to a pseudo track made with candidate kinematics, parameterized error for eta...
T const * get() const
Returns C++ pointer to the item.
reco::TrackRef track() const override
reco::TrackRef globalTrack() const override
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
reco::TrackRef standAloneMuon() const override
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) ...
static const reco::Track * getMuonBT(const reco::Muon *mu)
Analysis-level electron class.
static const reco::Track * getElecPF(const reco::Candidate &rc)
virtual int charge() const =0
electric charge
BPHTrackReference & operator=(const BPHTrackReference &x)
Particle reconstructed by the particle flow algorithm.
T get() const
get a component
static const reco::Track * getFromPC(const reco::Candidate &rc)
static const reco::Track * getElecPF(const pat::Electron *el)
Analysis-level muon class.
static const reco::Track * getFromGP(const reco::Candidate &rc)
static const reco::Track * getMuonBT(const reco::Candidate &rc)
static const reco::Track * getFromBT(const reco::Candidate &rc)