CMS 3D CMS Logo

IsolatedTrack.h
Go to the documentation of this file.
1 #ifndef __DataFormats_PatCandidates_IsolatedTrack_h__
2 #define __DataFormats_PatCandidates_IsolatedTrack_h__
3 
4 /*
5  \class pat::IsolatedTrack IsolatedTrack.h "DataFormats/PatCandidates/interface/IsolatedTrack.h"
6  \brief Small class to store key info on isolated tracks
7  pat::IsolatedTrack stores important info on isolated tracks. Draws from
8  packedPFCandidates, lostTracks, and generalTracks.
9  \author Bennett Marsh
10 */
11 
18 
19 namespace pat {
20 
22 
23  public:
24 
26  LeafCandidate(0, LorentzVector(0,0,0,0)),
30  dz_(0.), dxy_(0.), dzError_(0.), dxyError_(0.), fromPV_(-1), trackQuality_(0),
31  dEdxStrip_(0), dEdxPixel_(0), hitPattern_(reco::HitPattern()),
32  crossedEcalStatus_(std::vector<uint16_t>()),
33  crossedHcalStatus_(std::vector<uint32_t>()),
34  deltaEta_(0), deltaPhi_(0),
36 
37  explicit IsolatedTrack(const PFIsolation &iso, const PFIsolation &miniiso, float caloJetEm, float caloJetHad,
38  const LorentzVector &p4, int charge, int id,
39  float dz, float dxy, float dzError, float dxyError,
40  const reco::HitPattern &hp, float dEdxS, float dEdxP, int fromPV, int tkQual,
41  const std::vector<uint16_t> &ecalst,
42  const std::vector<uint32_t> & hcalst, int dEta, int dPhi,
43  const PackedCandidateRef &pcref) :
44  LeafCandidate(charge, p4, Point(0.,0.,0.), id),
45  pfIsolationDR03_(iso), miniIsolation_(miniiso),
46  matchedCaloJetEmEnergy_(caloJetEm), matchedCaloJetHadEnergy_(caloJetHad),
47  dz_(dz), dxy_(dxy), dzError_(dzError), dxyError_(dxyError),
48  fromPV_(fromPV), trackQuality_(tkQual), dEdxStrip_(dEdxS), dEdxPixel_(dEdxP),
49  hitPattern_(hp),
50  crossedEcalStatus_(ecalst), crossedHcalStatus_(hcalst),
51  deltaEta_(dEta), deltaPhi_(dPhi),
52  packedCandRef_(pcref) {}
53 
55 
56  const PFIsolation& pfIsolationDR03() const { return pfIsolationDR03_; }
57 
58  const PFIsolation& miniPFIsolation() const { return miniIsolation_; }
59 
62 
63  float dz() const { return dz_; }
64  float dzError() const { return dzError_; }
65  float dxy() const { return dxy_; }
66  float dxyError() const { return dxyError_; }
67 
68  int fromPV() const { return fromPV_; }
69 
70  bool isHighPurityTrack() const
72  bool isTightTrack() const
74  bool isLooseTrack() const
76 
77  const reco::HitPattern& hitPattern() const { return hitPattern_; }
78 
79  float dEdxStrip() const { return dEdxStrip_; }
80  float dEdxPixel() const { return dEdxPixel_; }
81 
83  const std::vector<uint16_t>& crossedEcalStatus() const { return crossedEcalStatus_; }
85  const std::vector<uint32_t>& crossedHcalStatus() const { return crossedHcalStatus_; }
86 
89  float deltaEta() const { return float(deltaEta_)/500.f; }
90  float deltaPhi() const { return float(deltaPhi_)/500.f; }
91 
92  const PackedCandidateRef& packedCandRef() const { return packedCandRef_; }
93 
94  protected:
97  float matchedCaloJetEmEnergy_; //energy of nearest calojet within a given dR;
100  int fromPV_; //only stored for packedPFCandidates
102  float dEdxStrip_, dEdxPixel_; //in MeV/mm
103 
105 
106  std::vector<uint16_t> crossedEcalStatus_;
107  std::vector<uint32_t> crossedHcalStatus_;
109 
110  PackedCandidateRef packedCandRef_; // stored only for packedPFCands/lostTracks. NULL for generalTracks
111 
112  };
113 
114  typedef std::vector<IsolatedTrack> IsolatedTrackCollection;
115 
116 }
117 
118 #endif
std::vector< IsolatedTrack > IsolatedTrackCollection
float dEdxPixel() const
Definition: IsolatedTrack.h:80
float matchedCaloJetEmEnergy() const
Definition: IsolatedTrack.h:60
float dzError() const
uncertainty on dz
Definition: IsolatedTrack.h:64
PFIsolation pfIsolationDR03_
Definition: IsolatedTrack.h:95
bool isTightTrack() const
Definition: IsolatedTrack.h:72
std::vector< uint32_t > crossedHcalStatus_
float dxy() const
Definition: IsolatedTrack.h:65
Definition: HeavyIon.h:7
float dz() const
Definition: IsolatedTrack.h:63
virtual int charge() const final
electric charge
Definition: LeafCandidate.h:91
reco::HitPattern hitPattern_
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
PackedCandidateRef packedCandRef_
float deltaPhi() const
Definition: IsolatedTrack.h:90
int fromPV() const
Definition: IsolatedTrack.h:68
float matchedCaloJetEmEnergy_
Definition: IsolatedTrack.h:97
const PFIsolation & miniPFIsolation() const
Definition: IsolatedTrack.h:58
float matchedCaloJetHadEnergy_
Definition: IsolatedTrack.h:98
const reco::HitPattern & hitPattern() const
Definition: IsolatedTrack.h:77
float matchedCaloJetHadEnergy() const
Definition: IsolatedTrack.h:61
const std::vector< uint32_t > & crossedHcalStatus() const
just the status code part of an HcalChannelStatus for all crossed Hcal cells
Definition: IsolatedTrack.h:85
PFIsolation miniIsolation_
Definition: IsolatedTrack.h:96
const PackedCandidateRef & packedCandRef() const
Definition: IsolatedTrack.h:92
float deltaEta() const
Definition: IsolatedTrack.h:89
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
bool isHighPurityTrack() const
Definition: IsolatedTrack.h:70
std::vector< uint16_t > crossedEcalStatus_
fixed size matrix
IsolatedTrack(const PFIsolation &iso, const PFIsolation &miniiso, float caloJetEm, float caloJetHad, const LorentzVector &p4, int charge, int id, float dz, float dxy, float dzError, float dxyError, const reco::HitPattern &hp, float dEdxS, float dEdxP, int fromPV, int tkQual, const std::vector< uint16_t > &ecalst, const std::vector< uint32_t > &hcalst, int dEta, int dPhi, const PackedCandidateRef &pcref)
Definition: IsolatedTrack.h:37
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
const PFIsolation & pfIsolationDR03() const
Definition: IsolatedTrack.h:56
const std::vector< uint16_t > & crossedEcalStatus() const
just the status code part of an EcalChannelStatusCode for all crossed Ecal cells
Definition: IsolatedTrack.h:83
float dxyError() const
uncertainty on dxy
Definition: IsolatedTrack.h:66
bool isLooseTrack() const
Definition: IsolatedTrack.h:74
float dEdxStrip() const
Definition: IsolatedTrack.h:79