CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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),
74  pfIsolationDR03_(iso),
75  miniIsolation_(miniiso),
76  matchedCaloJetEmEnergy_(caloJetEm),
77  matchedCaloJetHadEnergy_(caloJetHad),
78  pfLepOverlap_(pfLepOverlap),
79  pfNeutralSum_(pfNeutralSum),
80  dz_(dz),
81  dxy_(dxy),
82  dzError_(dzError),
83  dxyError_(dxyError),
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 
124  float dEdxStrip() const { return dEdxStrip_; }
125  float dEdxPixel() const { return dEdxPixel_; }
126 
128  const std::vector<uint16_t>& crossedEcalStatus() const { return crossedEcalStatus_; }
130  const std::vector<uint32_t>& crossedHcalStatus() const { return crossedHcalStatus_; }
131 
134  float deltaEta() const { return float(deltaEta_) / 500.f; }
135  float deltaPhi() const { return float(deltaPhi_) / 500.f; }
136 
140 
141  protected:
144  float matchedCaloJetEmEnergy_; //energy of nearest calojet within a given dR;
149  int fromPV_; //only stored for packedPFCandidates
151  float dEdxStrip_, dEdxPixel_; //in MeV/mm
152 
154 
155  std::vector<uint16_t> crossedEcalStatus_;
156  std::vector<uint32_t> crossedHcalStatus_;
158 
159  PackedCandidateRef packedCandRef_; // stored only for packedPFCands/lostTracks. NULL for generalTracks
162  };
163 
164  typedef std::vector<IsolatedTrack> IsolatedTrackCollection;
165 
166 } // namespace pat
167 
168 #endif
PackedCandidateRef nearestPFPackedCandRef_
std::vector< IsolatedTrack > IsolatedTrackCollection
float dEdxPixel() const
const PackedCandidateRef & nearestPFPackedCandRef() const
float matchedCaloJetEmEnergy() const
float pfNeutralSum() const
float dxyError() const override
uncertainty on dxy
PFIsolation pfIsolationDR03_
bool isTightTrack() const
std::vector< uint32_t > crossedHcalStatus_
const LorentzVector & p4() const final
four-momentum Lorentz vector
float dxy() const
const PackedCandidateRef & nearestLostTrackPackedCandRef() const
float dz() const
~IsolatedTrack() override
Definition: IsolatedTrack.h:97
reco::HitPattern hitPattern_
bool pfLepOverlap() const
PackedCandidateRef nearestLostTrackPackedCandRef_
PackedCandidateRef packedCandRef_
float deltaPhi() const
int fromPV() const
const PFIsolation & miniPFIsolation() const
float matchedCaloJetHadEnergy_
const reco::HitPattern & hitPattern() const
float matchedCaloJetHadEnergy() const
const std::vector< uint32_t > & crossedHcalStatus() const
just the status code part of an HcalChannelStatus for all crossed Hcal cells
PFIsolation miniIsolation_
const PackedCandidateRef & packedCandRef() const
float deltaEta() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
bool isHighPurityTrack() const
std::vector< uint16_t > crossedEcalStatus_
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
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 PFIsolation & pfIsolationDR03() const
Definition: IsolatedTrack.h:99
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
int charge() const final
electric charge
bool isLooseTrack() const
float dEdxStrip() const