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  public:
24  : LeafCandidate(0, LorentzVector(0, 0, 0, 0)),
30  pfNeutralSum_(0.),
31  dz_(0.),
32  dxy_(0.),
33  dzError_(0.),
34  dxyError_(0.),
35  fromPV_(-1),
36  trackQuality_(0),
37  dEdxStrip_(0),
38  dEdxPixel_(0),
39  hitPattern_(reco::HitPattern()),
40  crossedEcalStatus_(std::vector<uint16_t>()),
41  crossedHcalStatus_(std::vector<uint32_t>()),
42  deltaEta_(0),
43  deltaPhi_(0),
47 
48  explicit IsolatedTrack(const PFIsolation& iso,
49  const PFIsolation& miniiso,
50  float caloJetEm,
51  float caloJetHad,
52  bool pfLepOverlap,
53  float pfNeutralSum,
54  const LorentzVector& p4,
55  int charge,
56  int id,
57  float dz,
58  float dxy,
59  float dzError,
60  float dxyError,
61  const reco::HitPattern& hp,
62  float dEdxS,
63  float dEdxP,
64  int fromPV,
65  int tkQual,
66  const std::vector<uint16_t>& ecalst,
67  const std::vector<uint32_t>& hcalst,
68  int dEta,
69  int dPhi,
70  const PackedCandidateRef& pcref,
71  const PackedCandidateRef& refToNearestPF,
72  const PackedCandidateRef& refToNearestLostTrack)
73  : LeafCandidate(charge, p4, Point(0., 0., 0.), id),
75  miniIsolation_(miniiso),
76  matchedCaloJetEmEnergy_(caloJetEm),
77  matchedCaloJetHadEnergy_(caloJetHad),
80  dz_(dz),
81  dxy_(dxy),
84  fromPV_(fromPV),
85  trackQuality_(tkQual),
86  dEdxStrip_(dEdxS),
87  dEdxPixel_(dEdxP),
88  hitPattern_(hp),
89  crossedEcalStatus_(ecalst),
90  crossedHcalStatus_(hcalst),
91  deltaEta_(dEta),
92  deltaPhi_(dPhi),
93  packedCandRef_(pcref),
94  nearestPFPackedCandRef_(refToNearestPF),
95  nearestLostTrackPackedCandRef_(refToNearestLostTrack) {}
96 
97  ~IsolatedTrack() override {}
98 
99  const PFIsolation& pfIsolationDR03() const { return pfIsolationDR03_; }
100 
101  const PFIsolation& miniPFIsolation() const { return miniIsolation_; }
102 
105 
106  bool pfLepOverlap() const { return pfLepOverlap_; }
107  float pfNeutralSum() const { return pfNeutralSum_; }
108 
109  float dz() const { return dz_; }
110  float dzError() const override { return dzError_; }
111  float dxy() const { return dxy_; }
112  float dxyError() const override { return dxyError_; }
113 
114  int fromPV() const { return fromPV_; }
115 
116  bool isHighPurityTrack() const {
118  }
121 
122  const reco::HitPattern& hitPattern() const { return hitPattern_; }
123 
125  int lostInnerLayers() const {
127  }
129  int lostOuterLayers() const {
131  }
132 
133  float dEdxStrip() const { return dEdxStrip_; }
134  float dEdxPixel() const { return dEdxPixel_; }
135 
137  const std::vector<uint16_t>& crossedEcalStatus() const { return crossedEcalStatus_; }
139  const std::vector<uint32_t>& crossedHcalStatus() const { return crossedHcalStatus_; }
140 
143  float deltaEta() const { return float(deltaEta_) / 500.f; }
144  float deltaPhi() const { return float(deltaPhi_) / 500.f; }
145 
149 
150  protected:
153  float matchedCaloJetEmEnergy_; //energy of nearest calojet within a given dR;
158  int fromPV_; //only stored for packedPFCandidates
160  float dEdxStrip_, dEdxPixel_; //in MeV/mm
161 
163 
164  std::vector<uint16_t> crossedEcalStatus_;
165  std::vector<uint32_t> crossedHcalStatus_;
167 
168  PackedCandidateRef packedCandRef_; // stored only for packedPFCands/lostTracks. NULL for generalTracks
171  };
172 
173  typedef std::vector<IsolatedTrack> IsolatedTrackCollection;
174 
175 } // namespace pat
176 
177 #endif
PackedCandidateRef nearestPFPackedCandRef_
std::vector< IsolatedTrack > IsolatedTrackCollection
bool isLooseTrack() const
const reco::HitPattern & hitPattern() const
float deltaPhi() const
int fromPV() const
float matchedCaloJetHadEnergy() const
float dxyError() const override
uncertainty on dxy
PFIsolation pfIsolationDR03_
float matchedCaloJetEmEnergy() const
std::vector< uint32_t > crossedHcalStatus_
const LorentzVector & p4() const final
four-momentum Lorentz vector
float deltaEta() const
Definition: HeavyIon.h:7
const PackedCandidateRef & nearestPFPackedCandRef() const
bool isTightTrack() const
const PFIsolation & miniPFIsolation() const
~IsolatedTrack() override
Definition: IsolatedTrack.h:97
reco::HitPattern hitPattern_
float dEdxStrip() const
float dEdxPixel() const
const PackedCandidateRef & nearestLostTrackPackedCandRef() const
float dz() const
PackedCandidateRef nearestLostTrackPackedCandRef_
PackedCandidateRef packedCandRef_
float pfNeutralSum() const
int trackerLayersWithoutMeasurement(HitCategory category) const
Definition: HitPattern.cc:554
const PFIsolation & pfIsolationDR03() const
Definition: IsolatedTrack.h:99
const PackedCandidateRef & packedCandRef() const
float matchedCaloJetHadEnergy_
bool isHighPurityTrack() const
PFIsolation miniIsolation_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
std::vector< uint16_t > crossedEcalStatus_
int lostOuterLayers() const
fixed size matrix
int lostInnerLayers() const
helper functions for string cut parser
Structure Point Contains parameters of Gaussian fits to DMRs.
int lostLayers() const
float dxy() const
const std::vector< uint32_t > & crossedHcalStatus() const
just the status code part of an HcalChannelStatus for all crossed Hcal cells
IsolatedTrack(const PFIsolation &iso, const PFIsolation &miniiso, float caloJetEm, float caloJetHad, bool pfLepOverlap, float pfNeutralSum, 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, const PackedCandidateRef &refToNearestPF, const PackedCandidateRef &refToNearestLostTrack)
Definition: IsolatedTrack.h:48
const std::vector< uint16_t > & crossedEcalStatus() const
just the status code part of an EcalChannelStatusCode for all crossed Ecal cells
float dzError() const override
uncertainty on dz
bool pfLepOverlap() const
int charge() const final
electric charge