CMS 3D CMS Logo

HcalIsolatedTrackCandidate.h
Go to the documentation of this file.
1 #ifndef HcalIsolatedTrack_HcalIsolatedTrackCandidate_h
2 #define HcalIsolatedTrack_HcalIsolatedTrackCandidate_h
3 
14 
15 #include <vector>
16 #include <map>
17 #include <utility>
18 
19 namespace reco {
20 
22  public:
23  // default constructor
25  maxP_ = -1;
26  enEcal_ = -1;
27  ptL1_ = etaL1_ = phiL1_ = 0;
28  etaEcal_ = phiEcal_ = 0;
30  etaPhiEcal_ = etaPhiHcal_ = false;
31  }
34  maxP_ = -1;
35  enEcal_ = -1;
36  ptL1_ = etaL1_ = phiL1_ = 0;
37  etaEcal_ = phiEcal_ = 0;
39  etaPhiEcal_ = etaPhiHcal_ = false;
40  }
42  HcalIsolatedTrackCandidate(const reco::TrackRef& tr, double max, double ene)
43  : RecoCandidate(0, LorentzVector((tr.get()->px()), (tr.get())->py(), (tr.get())->pz(), (tr.get())->p())),
44  track_(tr),
45  maxP_(max),
46  enEcal_(ene) {
47  ptL1_ = etaL1_ = phiL1_ = 0;
48  etaEcal_ = phiEcal_ = 0;
50  etaPhiEcal_ = etaPhiHcal_ = false;
51  }
54 
56  ~HcalIsolatedTrackCandidate() override;
57 
59  HcalIsolatedTrackCandidate* clone() const override;
60 
62  reco::TrackRef track() const override;
63  void setTrack(const reco::TrackRef& tr) { track_ = tr; }
64 
66  double maxP() const { return maxP_; }
67  void SetMaxP(double mp) { maxP_ = mp; }
68 
70  virtual l1extra::L1JetParticleRef l1jet() const;
71  void setL1Jet(const l1extra::L1JetParticleRef& jetRef) { l1Jet_ = jetRef; }
72  std::pair<double, double> EtaPhiL1() const { return std::pair<double, double>(etaL1_, phiL1_); }
74  void setL1(double pt, double eta, double phi) {
75  ptL1_ = pt;
76  etaL1_ = eta;
77  phiL1_ = phi;
78  }
79 
81  double energyEcal() const { return enEcal_; }
82  void SetEnergyEcal(double a) { enEcal_ = a; }
83 
85  void SetEtaPhiEcal(double eta, double phi) {
86  etaEcal_ = eta;
87  phiEcal_ = phi;
88  etaPhiEcal_ = true;
89  }
90  std::pair<double, double> EtaPhiEcal() const {
91  return ((etaPhiEcal_) ? std::pair<double, double>(etaEcal_, phiEcal_) : std::pair<double, double>(0, 0));
92  }
93  bool etaPhiEcal() const { return etaPhiEcal_; }
94 
96  void SetEtaPhiHcal(double eta, double phi, int ieta, int iphi) {
97  etaHcal_ = eta;
98  phiHcal_ = phi;
99  ietaHcal_ = ieta;
100  iphiHcal_ = iphi;
101  etaPhiHcal_ = true;
102  }
103  std::pair<double, double> EtaPhiHcal() const {
104  return ((etaPhiHcal_) ? std::pair<double, double>(etaHcal_, phiHcal_) : std::pair<double, double>(0, 0));
105  }
106  std::pair<int, int> towerIndex() const {
107  return ((etaPhiHcal_) ? std::pair<int, int>(ietaHcal_, iphiHcal_) : std::pair<int, int>(0, 0));
108  }
109  bool etaPhiHcal() const { return etaPhiHcal_; }
110 
111  private:
113  bool overlap(const Candidate&) const override;
119  double maxP_;
121  double enEcal_;
123  double ptL1_, etaL1_, phiL1_;
131  };
132 
133 } // namespace reco
134 
135 #endif
reco::TrackRef track() const override
refrence to a Track
bool overlap(const Candidate &) const override
check overlap with another candidate
std::pair< int, int > towerIndex() const
double pz() const final
z coordinate of momentum vector
double pt() const final
transverse momentum
reco::TrackRef track_
reference to a Track
std::pair< double, double > EtaPhiL1() const
void setL1Jet(const l1extra::L1JetParticleRef &jetRef)
double ptL1_
pt, eta, phi of L1 object
T get() const
get a component
double enEcal_
energy in ECAL around a cone around the track
l1extra::L1JetParticleRef l1Jet_
reference to a L1 tau jet
double energyEcal() const
ECAL energy in the inner cone around tau jet.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double maxP_
highest P of other tracks in the cone around the candidate
double px() const final
x coordinate of momentum vector
double p() const final
magnitude of momentum vector
void SetEtaPhiEcal(double eta, double phi)
eta, phi at ECAL surface
void SetEtaPhiHcal(double eta, double phi, int ieta, int iphi)
eta, phi at HCAL surface
HcalIsolatedTrackCandidate(const reco::TrackRef &tr, double max, double ene)
constructor from a track
double py() const final
y coordinate of momentum vector
virtual l1extra::L1JetParticleRef l1jet() const
get reference to L1 jet
HcalIsolatedTrackCandidate(const LorentzVector &v)
constructor from LorentzVector
std::pair< double, double > EtaPhiHcal() const
double maxP() const
highest energy of other tracks in the cone around the candidate
void setL1(double pt, double eta, double phi)
math::XYZTLorentzVector l1jetp() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
std::pair< double, double > EtaPhiEcal() const
fixed size matrix
double a
Definition: hdecay.h:121
void setTrack(const reco::TrackRef &tr)
double phi() const final
momentum azimuthal angle
HcalIsolatedTrackCandidate * clone() const override
returns a clone of the candidate
double eta() const final
momentum pseudorapidity