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)),
31  dz_(0.), dxy_(0.), dzError_(0.), dxyError_(0.), fromPV_(-1), trackQuality_(0),
32  dEdxStrip_(0), dEdxPixel_(0), hitPattern_(reco::HitPattern()),
33  crossedEcalStatus_(std::vector<uint16_t>()),
34  crossedHcalStatus_(std::vector<uint32_t>()),
35  deltaEta_(0), deltaPhi_(0),
39 
40  explicit IsolatedTrack(const PFIsolation &iso, const PFIsolation &miniiso, float caloJetEm, float caloJetHad,
41  bool pfLepOverlap, float pfNeutralSum,
42  const LorentzVector &p4, int charge, int id,
43  float dz, float dxy, float dzError, float dxyError,
44  const reco::HitPattern &hp, float dEdxS, float dEdxP, int fromPV, int tkQual,
45  const std::vector<uint16_t> &ecalst,
46  const std::vector<uint32_t> & hcalst, int dEta, int dPhi,
47  const PackedCandidateRef &pcref, const PackedCandidateRef &refToNearestPF, const PackedCandidateRef &refToNearestLostTrack) :
48  LeafCandidate(charge, p4, Point(0.,0.,0.), id),
49  pfIsolationDR03_(iso), miniIsolation_(miniiso),
50  matchedCaloJetEmEnergy_(caloJetEm), matchedCaloJetHadEnergy_(caloJetHad),
51  pfLepOverlap_(pfLepOverlap), pfNeutralSum_(pfNeutralSum),
52  dz_(dz), dxy_(dxy), dzError_(dzError), dxyError_(dxyError),
53  fromPV_(fromPV), trackQuality_(tkQual), dEdxStrip_(dEdxS), dEdxPixel_(dEdxP),
54  hitPattern_(hp),
55  crossedEcalStatus_(ecalst), crossedHcalStatus_(hcalst),
56  deltaEta_(dEta), deltaPhi_(dPhi),
57  packedCandRef_(pcref),
58  nearestPFPackedCandRef_(refToNearestPF),
59  nearestLostTrackPackedCandRef_(refToNearestLostTrack) {}
60 
61  ~IsolatedTrack() override {}
62 
63  const PFIsolation& pfIsolationDR03() const { return pfIsolationDR03_; }
64 
65  const PFIsolation& miniPFIsolation() const { return miniIsolation_; }
66 
69 
70  bool pfLepOverlap() const { return pfLepOverlap_; }
71  float pfNeutralSum() const { return pfNeutralSum_; }
72 
73  float dz() const { return dz_; }
74  float dzError() const override { return dzError_; }
75  float dxy() const { return dxy_; }
76  float dxyError() const override { return dxyError_; }
77 
78  int fromPV() const { return fromPV_; }
79 
80  bool isHighPurityTrack() const
82  bool isTightTrack() const
84  bool isLooseTrack() const
86 
87  const reco::HitPattern& hitPattern() const { return hitPattern_; }
88 
89  float dEdxStrip() const { return dEdxStrip_; }
90  float dEdxPixel() const { return dEdxPixel_; }
91 
93  const std::vector<uint16_t>& crossedEcalStatus() const { return crossedEcalStatus_; }
95  const std::vector<uint32_t>& crossedHcalStatus() const { return crossedHcalStatus_; }
96 
99  float deltaEta() const { return float(deltaEta_)/500.f; }
100  float deltaPhi() const { return float(deltaPhi_)/500.f; }
101 
105 
106  protected:
109  float matchedCaloJetEmEnergy_; //energy of nearest calojet within a given dR;
114  int fromPV_; //only stored for packedPFCandidates
116  float dEdxStrip_, dEdxPixel_; //in MeV/mm
117 
119 
120  std::vector<uint16_t> crossedEcalStatus_;
121  std::vector<uint32_t> crossedHcalStatus_;
123 
124  PackedCandidateRef packedCandRef_; // stored only for packedPFCands/lostTracks. NULL for generalTracks
127 
128  };
129 
130  typedef std::vector<IsolatedTrack> IsolatedTrackCollection;
131 
132 }
133 
134 #endif
PackedCandidateRef nearestPFPackedCandRef_
std::vector< IsolatedTrack > IsolatedTrackCollection
float dEdxPixel() const
Definition: IsolatedTrack.h:90
const PackedCandidateRef & nearestPFPackedCandRef() const
float matchedCaloJetEmEnergy() const
Definition: IsolatedTrack.h:67
float pfNeutralSum() const
Definition: IsolatedTrack.h:71
PFIsolation pfIsolationDR03_
bool isTightTrack() const
Definition: IsolatedTrack.h:82
std::vector< uint32_t > crossedHcalStatus_
int charge() const final
electric charge
Definition: LeafCandidate.h:91
float dxy() const
Definition: IsolatedTrack.h:75
Definition: HeavyIon.h:7
const PackedCandidateRef & nearestLostTrackPackedCandRef() const
float dz() const
Definition: IsolatedTrack.h:73
~IsolatedTrack() override
Definition: IsolatedTrack.h:61
reco::HitPattern hitPattern_
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
bool pfLepOverlap() const
Definition: IsolatedTrack.h:70
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
PackedCandidateRef nearestLostTrackPackedCandRef_
PackedCandidateRef packedCandRef_
float deltaPhi() const
int fromPV() const
Definition: IsolatedTrack.h:78
const PFIsolation & miniPFIsolation() const
Definition: IsolatedTrack.h:65
float matchedCaloJetHadEnergy_
const reco::HitPattern & hitPattern() const
Definition: IsolatedTrack.h:87
float matchedCaloJetHadEnergy() const
Definition: IsolatedTrack.h:68
const std::vector< uint32_t > & crossedHcalStatus() const
just the status code part of an HcalChannelStatus for all crossed Hcal cells
Definition: IsolatedTrack.h:95
float dxyError() const override
uncertainty on dxy
Definition: IsolatedTrack.h:76
PFIsolation miniIsolation_
const PackedCandidateRef & packedCandRef() const
float deltaEta() const
Definition: IsolatedTrack.h:99
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
bool isHighPurityTrack() const
Definition: IsolatedTrack.h:80
std::vector< uint16_t > crossedEcalStatus_
fixed size matrix
float dzError() const override
uncertainty on dz
Definition: IsolatedTrack.h:74
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
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:40
const PFIsolation & pfIsolationDR03() const
Definition: IsolatedTrack.h:63
const std::vector< uint16_t > & crossedEcalStatus() const
just the status code part of an EcalChannelStatusCode for all crossed Ecal cells
Definition: IsolatedTrack.h:93
bool isLooseTrack() const
Definition: IsolatedTrack.h:84
float dEdxStrip() const
Definition: IsolatedTrack.h:89