CMS 3D CMS Logo

IsolatedPixelTrackCandidate.h
Go to the documentation of this file.
1 #ifndef HcalIsolatedTrack_IsolatedPixelTrackCandidate_h
2 #define HcalIsolatedTrack_IsolatedPixelTrackCandidate_h
3 
14 
16 
17 #include <vector>
18 #include <map>
19 #include <utility>
20 
21 namespace reco {
22 
24  public:
25  // default constructor
27  enIn_ = -1;
28  enOut_ = -1;
29  nhitIn_ = -1;
30  nhitOut_ = -1;
31  maxPtPxl_ = -1;
32  sumPtPxl_ = -1;
33  etaEcal_ = 0;
34  phiEcal_ = 0;
35  etaPhiEcal_ = false;
36  }
39  enIn_ = -1;
40  enOut_ = -1;
41  nhitIn_ = -1;
42  nhitOut_ = -1;
43  maxPtPxl_ = -1;
44  sumPtPxl_ = -1;
45  etaEcal_ = 0;
46  phiEcal_ = 0;
47  etaPhiEcal_ = false;
48  }
51  const l1extra::L1JetParticleRef& tauRef,
52  double max,
53  double sum)
54  : RecoCandidate(0, LorentzVector((tr.get()->px()), (tr.get())->py(), (tr.get())->pz(), (tr.get())->p())),
55  track_(tr),
56  l1tauJet_(tauRef),
57  maxPtPxl_(max),
58  sumPtPxl_(sum) {
59  enIn_ = -1;
60  enOut_ = -1;
61  nhitIn_ = -1;
62  nhitOut_ = -1;
63  etaEcal_ = 0;
64  phiEcal_ = 0;
65  etaPhiEcal_ = false;
66  }
67  // constructor from a track using l1t
68  IsolatedPixelTrackCandidate(const reco::TrackRef& tr, const l1t::TauRef& tauRef, double max, double sum)
69  : RecoCandidate(0, LorentzVector((tr.get()->px()), (tr.get())->py(), (tr.get())->pz(), (tr.get())->p())),
70  track_(tr),
71  l1ttauJet_(tauRef),
72  maxPtPxl_(max),
73  sumPtPxl_(sum) {
74  enIn_ = -1;
75  enOut_ = -1;
76  nhitIn_ = -1;
77  nhitOut_ = -1;
78  etaEcal_ = 0;
79  phiEcal_ = 0;
80  etaPhiEcal_ = false;
81  }
82 
85  const l1extra::L1JetParticleRef& tauRef, double enIn, double enOut, int nhitIn, int nhitOut)
86  : RecoCandidate(0, LorentzVector(tauRef->px(), tauRef->py(), tauRef->pz(), tauRef->p())),
87  l1tauJet_(tauRef),
88  enIn_(enIn),
89  enOut_(enOut),
90  nhitIn_(nhitIn),
91  nhitOut_(nhitOut) {
92  maxPtPxl_ = -1;
93  sumPtPxl_ = -1;
94  etaEcal_ = 0;
95  phiEcal_ = 0;
96  etaPhiEcal_ = false;
97  }
99  IsolatedPixelTrackCandidate(const l1t::TauRef& tauRef, double enIn, double enOut, int nhitIn, int nhitOut)
100  : RecoCandidate(0, LorentzVector(tauRef->px(), tauRef->py(), tauRef->pz(), tauRef->p())),
101  l1ttauJet_(tauRef),
102  enIn_(enIn),
103  enOut_(enOut),
104  nhitIn_(nhitIn),
105  nhitOut_(nhitOut) {
106  maxPtPxl_ = -1;
107  sumPtPxl_ = -1;
108  etaEcal_ = 0;
109  phiEcal_ = 0;
110  etaPhiEcal_ = false;
111  }
114 
116  ~IsolatedPixelTrackCandidate() override;
117 
119  IsolatedPixelTrackCandidate* clone() const override;
120 
122  reco::TrackRef track() const override;
123  void setTrack(const reco::TrackRef& tr) { track_ = tr; }
124 
126  double maxPtPxl() const { return maxPtPxl_; }
127  void setMaxPtPxl(double mptpxl) { maxPtPxl_ = mptpxl; }
128 
130  double sumPtPxl() const { return sumPtPxl_; }
131  void setSumPtPxl(double sumptpxl) { sumPtPxl_ = sumptpxl; }
132 
134  virtual l1extra::L1JetParticleRef l1tau() const;
135  void setL1TauJet(const l1extra::L1JetParticleRef& tauRef) { l1tauJet_ = tauRef; }
136 
138  virtual l1t::TauRef l1ttau() const;
139  void setL1TTauJet(const l1t::TauRef& tauRef) { l1ttauJet_ = tauRef; }
140 
142  double energyIn() const { return enIn_; }
143  void setEnergyIn(double a) { enIn_ = a; }
144 
146  double energyOut() const { return enOut_; }
147  void setEnergyOut(double a) { enOut_ = a; }
148 
150  int nHitIn() const { return nhitIn_; }
151  void setNHitIn(int a) { nhitIn_ = a; }
152 
154  int nHitOut() const { return nhitOut_; }
155  void setNHitOut(int a) { nhitOut_ = a; }
156 
158  std::pair<int, int> towerIndex() const;
159 
161  void setEtaPhiEcal(double eta, double phi) {
162  etaEcal_ = eta;
163  phiEcal_ = phi;
164  etaPhiEcal_ = true;
165  }
166  std::pair<double, double> etaPhiEcal() const {
167  return ((etaPhiEcal_) ? std::pair<double, double>(etaEcal_, phiEcal_) : std::pair<double, double>(0, 0));
168  }
169  bool etaPhiEcalValid() const { return etaPhiEcal_; }
170 
171  private:
173  bool overlap(const Candidate&) const override;
181  double maxPtPxl_;
183  double sumPtPxl_;
185  double enIn_;
187  double enOut_;
189  int nhitIn_;
191  int nhitOut_;
195  };
196 
197 } // namespace reco
198 
199 #endif
reco::IsolatedPixelTrackCandidate::setNHitIn
void setNHitIn(int a)
Definition: IsolatedPixelTrackCandidate.h:151
reco::IsolatedPixelTrackCandidate::IsolatedPixelTrackCandidate
IsolatedPixelTrackCandidate(const reco::TrackRef &tr, const l1extra::L1JetParticleRef &tauRef, double max, double sum)
constructor from a track
Definition: IsolatedPixelTrackCandidate.h:50
reco::IsolatedPixelTrackCandidate::IsolatedPixelTrackCandidate
IsolatedPixelTrackCandidate(const l1extra::L1JetParticleRef &tauRef, double enIn, double enOut, int nhitIn, int nhitOut)
constructor from tau jet
Definition: IsolatedPixelTrackCandidate.h:84
reco::IsolatedPixelTrackCandidate::overlap
bool overlap(const Candidate &) const override
check overlap with another candidate
Definition: IsolatedPixelTrackCandidate.cc:30
reco::IsolatedPixelTrackCandidate::l1tau
virtual l1extra::L1JetParticleRef l1tau() const
get reference to L1 tau jet
Definition: IsolatedPixelTrackCandidate.cc:26
Jet.h
reco::IsolatedPixelTrackCandidate::etaPhiEcalValid
bool etaPhiEcalValid() const
Definition: IsolatedPixelTrackCandidate.h:169
reco::IsolatedPixelTrackCandidate::l1ttauJet_
l1t::TauRef l1ttauJet_
reference to a S2 L1 tau jet
Definition: IsolatedPixelTrackCandidate.h:179
reco::IsolatedPixelTrackCandidate
Definition: IsolatedPixelTrackCandidate.h:23
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
findQualityFiles.v
v
Definition: findQualityFiles.py:179
reco::IsolatedPixelTrackCandidate::setEnergyOut
void setEnergyOut(double a)
Definition: IsolatedPixelTrackCandidate.h:147
RecoCandidate.h
reco::IsolatedPixelTrackCandidate::setSumPtPxl
void setSumPtPxl(double sumptpxl)
Definition: IsolatedPixelTrackCandidate.h:131
reco::IsolatedPixelTrackCandidate::maxPtPxl
double maxPtPxl() const
highest Pt of other pixel tracks in the cone around the candidate
Definition: IsolatedPixelTrackCandidate.h:126
edm::Ref< TrackCollection >
reco::IsolatedPixelTrackCandidate::setNHitOut
void setNHitOut(int a)
Definition: IsolatedPixelTrackCandidate.h:155
Track.h
reco::IsolatedPixelTrackCandidate::clone
IsolatedPixelTrackCandidate * clone() const override
returns a clone of the candidate
Definition: IsolatedPixelTrackCandidate.cc:20
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition: LeafCandidate.h:142
reco::IsolatedPixelTrackCandidate::phiEcal_
double phiEcal_
Definition: IsolatedPixelTrackCandidate.h:194
reco::IsolatedPixelTrackCandidate::sumPtPxl_
double sumPtPxl_
Pt sum of other pixel tracks in the cone around the candidate.
Definition: IsolatedPixelTrackCandidate.h:183
reco::IsolatedPixelTrackCandidate::IsolatedPixelTrackCandidate
IsolatedPixelTrackCandidate(const LorentzVector &v)
constructor from LorentzVector
Definition: IsolatedPixelTrackCandidate.h:38
reco::IsolatedPixelTrackCandidate::setMaxPtPxl
void setMaxPtPxl(double mptpxl)
Definition: IsolatedPixelTrackCandidate.h:127
reco::IsolatedPixelTrackCandidate::l1ttau
virtual l1t::TauRef l1ttau() const
get reference to L1 tau jet from lt1
Definition: IsolatedPixelTrackCandidate.cc:28
reco::IsolatedPixelTrackCandidate::maxPtPxl_
double maxPtPxl_
highest Pt of other pixel tracks in the cone around the candidate
Definition: IsolatedPixelTrackCandidate.h:181
L1JetParticleFwd.h
a
double a
Definition: hdecay.h:119
reco::LeafCandidate::get
T get() const
get a component
Definition: LeafCandidate.h:239
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
reco::IsolatedPixelTrackCandidate::setEtaPhiEcal
void setEtaPhiEcal(double eta, double phi)
eta, phi at ECAL surface
Definition: IsolatedPixelTrackCandidate.h:161
reco::IsolatedPixelTrackCandidate::nhitIn_
int nhitIn_
number of hits in inner cone
Definition: IsolatedPixelTrackCandidate.h:189
reco::IsolatedPixelTrackCandidate::setL1TauJet
void setL1TauJet(const l1extra::L1JetParticleRef &tauRef)
Definition: IsolatedPixelTrackCandidate.h:135
reco::IsolatedPixelTrackCandidate::setL1TTauJet
void setL1TTauJet(const l1t::TauRef &tauRef)
Definition: IsolatedPixelTrackCandidate.h:139
reco::IsolatedPixelTrackCandidate::etaEcal_
double etaEcal_
Definition: IsolatedPixelTrackCandidate.h:194
reco::RecoCandidate
Definition: RecoCandidate.h:20
reco::IsolatedPixelTrackCandidate::IsolatedPixelTrackCandidate
IsolatedPixelTrackCandidate()
Definition: IsolatedPixelTrackCandidate.h:26
reco::IsolatedPixelTrackCandidate::setEnergyIn
void setEnergyIn(double a)
Definition: IsolatedPixelTrackCandidate.h:143
reco::Candidate
Definition: Candidate.h:27
reco::IsolatedPixelTrackCandidate::energyIn
double energyIn() const
ECAL energy in the inner cone around tau jet.
Definition: IsolatedPixelTrackCandidate.h:142
reco::IsolatedPixelTrackCandidate::nhitOut_
int nhitOut_
number of hits in inner cone
Definition: IsolatedPixelTrackCandidate.h:191
reco::IsolatedPixelTrackCandidate::l1tauJet_
l1extra::L1JetParticleRef l1tauJet_
reference to a L1 tau jet
Definition: IsolatedPixelTrackCandidate.h:177
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
reco::IsolatedPixelTrackCandidate::setTrack
void setTrack(const reco::TrackRef &tr)
Definition: IsolatedPixelTrackCandidate.h:123
reco::IsolatedPixelTrackCandidate::~IsolatedPixelTrackCandidate
~IsolatedPixelTrackCandidate() override
destructor
Definition: IsolatedPixelTrackCandidate.cc:18
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
reco::IsolatedPixelTrackCandidate::nHitOut
int nHitOut() const
number of ECAL hits in the outer cone around tau jet
Definition: IsolatedPixelTrackCandidate.h:154
reco::IsolatedPixelTrackCandidate::track
reco::TrackRef track() const override
refrence to a Track
Definition: IsolatedPixelTrackCandidate.cc:24
reco::IsolatedPixelTrackCandidate::sumPtPxl
double sumPtPxl() const
Pt sum of other pixel tracks in the cone around the candidate.
Definition: IsolatedPixelTrackCandidate.h:130
reco::IsolatedPixelTrackCandidate::towerIndex
std::pair< int, int > towerIndex() const
get index of tower which track is hitting
Definition: IsolatedPixelTrackCandidate.cc:35
reco::IsolatedPixelTrackCandidate::etaPhiEcal_
bool etaPhiEcal_
eta, phi at ECAL
Definition: IsolatedPixelTrackCandidate.h:193
reco::IsolatedPixelTrackCandidate::enOut_
double enOut_
energy in outer cone around L1 tau jet
Definition: IsolatedPixelTrackCandidate.h:187
reco::IsolatedPixelTrackCandidate::enIn_
double enIn_
energy in inner cone around L1 tau jet
Definition: IsolatedPixelTrackCandidate.h:185
reco::IsolatedPixelTrackCandidate::energyOut
double energyOut() const
ECAL energy in the outer cone around tau jet.
Definition: IsolatedPixelTrackCandidate.h:146
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
reco::IsolatedPixelTrackCandidate::IsolatedPixelTrackCandidate
IsolatedPixelTrackCandidate(const reco::TrackRef &tr, const l1t::TauRef &tauRef, double max, double sum)
Definition: IsolatedPixelTrackCandidate.h:68
reco::IsolatedPixelTrackCandidate::nHitIn
int nHitIn() const
number of ECAL hits in the inner cone around tau jet
Definition: IsolatedPixelTrackCandidate.h:150
reco::IsolatedPixelTrackCandidate::track_
reco::TrackRef track_
reference to a Track
Definition: IsolatedPixelTrackCandidate.h:175
L1JetParticle.h
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition: LeafCandidate.h:140
reco::LeafCandidate::pz
double pz() const final
z coordinate of momentum vector
Definition: LeafCandidate.h:144
IsolatedPixelTrackCandidateFwd.h
Tau.h
reco::IsolatedPixelTrackCandidate::IsolatedPixelTrackCandidate
IsolatedPixelTrackCandidate(const l1t::TauRef &tauRef, double enIn, double enOut, int nhitIn, int nhitOut)
constructor from tau jet using l1t
Definition: IsolatedPixelTrackCandidate.h:99
reco::IsolatedPixelTrackCandidate::etaPhiEcal
std::pair< double, double > etaPhiEcal() const
Definition: IsolatedPixelTrackCandidate.h:166