CMS 3D CMS Logo

HGCalTower.cc
Go to the documentation of this file.
3 
4 using namespace l1t;
5 
7  double etEm,
8  double etHad,
9  int pt,
10  int eta,
11  int phi,
12  int qual,
13  int hwEtEm,
14  int hwEtHad,
15  int hwEtRatio)
16  : L1Candidate(p4, pt, eta, phi, qual),
17  etEm_(etEm),
18  etHad_(etHad),
19  hwEtEm_(hwEtEm),
20  hwEtHad_(hwEtHad),
21  hwEtRatio_(hwEtRatio)
22 {
23 
24 }
25 
27 {
28 
29 }
30 
31 void HGCalTower::setEtEm(double et)
32 {
33  etEm_ = et;
34 }
35 
37 {
38  etHad_ = et;
39 }
40 
42 {
43  hwEtEm_ = et;
44 }
45 
47 {
48  hwEtHad_ = et;
49 }
50 
52 {
53  hwEtRatio_ = ratio;
54 }
55 
56 double HGCalTower::etEm()const
57 {
58  return etEm_;
59 }
60 
61 double HGCalTower::etHad()const
62 {
63  return etHad_;
64 }
65 
67 {
68  return hwEtEm_;
69 }
70 
72 {
73  return hwEtHad_;
74 }
75 
77 {
78  return hwEtRatio_;
79 }
80 
81 
82 
83 
85 
86  if(this->hwEta()!= tower.hwEta() || this->hwPhi()!= tower.hwPhi()){
87  throw edm::Exception(edm::errors::StdException, "StdException")
88  << "HGCalTower: Trying to add HGCalTowers with different coordinates"<<endl;
89  }
90 
91  this->setP4(this->p4() + tower.p4());
92  this->setEtEm(this->etEm() + tower.etEm());
93  this->setEtHad(this->etHad() + tower.etHad());
94 
95  this->setHwPt(this->hwPt() + tower.hwPt());
96  this->setHwEtEm(this->hwEtEm() + tower.hwEtEm());
97  this->setHwEtHad(this->hwEtHad() + tower.hwEtHad());
98 
99  return *this;
100 
101 }
void setEtEm(double et)
Definition: HGCalTower.cc:31
void setHwEtHad(int et)
Definition: HGCalTower.cc:46
double etHad() const
Definition: HGCalTower.cc:61
void setHwEtEm(int et)
Definition: HGCalTower.cc:41
int hwEtRatio() const
Definition: HGCalTower.cc:76
int hwPhi() const
Definition: L1Candidate.h:50
delete x;
Definition: CaloConfig.h:22
virtual double et() const final
transverse energy
double p4[4]
Definition: TauolaWrapper.h:92
int hwEta() const
Definition: L1Candidate.h:49
int hwEtEm() const
Definition: HGCalTower.cc:66
void setHwEtRatio(int ratio)
Definition: HGCalTower.cc:51
int hwPt() const
Definition: L1Candidate.h:48
int hwEtHad() const
Definition: HGCalTower.cc:71
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
HGCalTower & operator+=(const HGCalTower &tower)
Definition: HGCalTower.cc:84
double etEm() const
Definition: HGCalTower.cc:56
void setHwPt(int pt)
Definition: L1Candidate.h:41
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
void setEtHad(double et)
Definition: HGCalTower.cc:36