Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
DataFormats
L1THGCal
src
HGCalTower.cc
Go to the documentation of this file.
1
#include "
DataFormats/L1THGCal/interface/HGCalTower.h
"
2
#include "
FWCore/Utilities/interface/EDMException.h
"
3
4
using
l1t::HGCalTower
;
5
using
l1t::L1Candidate
;
6
7
HGCalTower::HGCalTower(
double
etEm,
8
double
etHad,
9
double
eta
,
10
double
phi
,
11
uint32_t
id
,
12
int
hwpt,
13
int
hweta,
14
int
hwphi,
15
int
qual,
16
int
hwEtEm,
17
int
hwEtHad,
18
int
hwEtRatio)
19
:
L1Candidate
(
PolarLorentzVector
(etEm + etHad, eta, phi, 0.), hwpt, hweta, hwphi, qual),
20
etEm_(etEm),
21
etHad_(etHad),
22
id_(id),
23
hwEtEm_(hwEtEm),
24
hwEtHad_(hwEtHad),
25
hwEtRatio_(hwEtRatio) {}
26
27
HGCalTower::~HGCalTower
() {}
28
29
void
HGCalTower::addEtEm
(
double
et) {
30
etEm_
+=
et
;
31
addEt
(et);
32
}
33
34
void
HGCalTower::addEtHad
(
double
et) {
35
etHad_
+=
et
;
36
addEt
(et);
37
}
38
39
void
HGCalTower::addEt
(
double
et) { this->
setP4
(
PolarLorentzVector
(this->
pt
() + et, this->
eta
(), this->
phi
(), 0.)); }
40
41
const
HGCalTower
&
HGCalTower::operator+=
(
const
HGCalTower
&
tower
) {
42
// NOTE: assume same eta and phi -> need an explicit check on the ID
43
if
(
id
().rawId() != tower.
id
().
rawId
()) {
44
throw
edm::Exception
(
edm::errors::StdException
,
"StdException"
)
45
<<
"HGCalTower: adding to this tower with ID: "
<<
id
().
rawId
()
46
<<
" one with different ID: "
<< tower.
id
().
rawId
() << std::endl;
47
}
48
addEt
(tower.
pt
());
49
etEm_
+= tower.
etEm
();
50
etHad_
+= tower.
etHad
();
51
52
return
*
this
;
53
}
l1t::HGCalTower
Definition:
HGCalTower.h:13
l1t::HGCalTower::etHad
double etHad() const
Definition:
HGCalTower.h:36
edm::errors::StdException
Definition:
EDMException.h:28
l1t::HGCalTower::operator+=
const HGCalTower & operator+=(const HGCalTower &tower)
Definition:
HGCalTower.cc:41
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition:
LeafCandidate.h:146
Exception
Definition:
hltDiff.cc:245
PVValHelper::phi
Definition:
PVValidationHelpers.h:69
reco::LeafCandidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition:
LeafCandidate.h:25
l1t::HGCalTower::addEt
void addEt(double et)
Definition:
HGCalTower.cc:39
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
l1t::HGCalTower::addEtEm
void addEtEm(double et)
Definition:
HGCalTower.cc:29
hgcalTowerProducer_cfi.tower
tuple tower
Definition:
hgcalTowerProducer_cfi.py:4
EDMException.h
HGCalTower.h
l1t::L1Candidate
Definition:
L1Candidate.h:15
l1t::HGCalTower::~HGCalTower
~HGCalTower() override
Definition:
HGCalTower.cc:27
l1t::HGCalTowerID::rawId
unsigned short rawId() const
Definition:
HGCalTowerID.h:29
l1t::HGCalTower::id
HGCalTowerID id() const
Definition:
HGCalTower.h:40
l1t::HGCalTower::etEm
double etEm() const
Definition:
HGCalTower.h:35
l1t::HGCalTower::etEm_
double etEm_
Definition:
HGCalTower.h:55
l1t::HGCalTower::etHad_
double etHad_
Definition:
HGCalTower.h:56
reco::LeafCandidate::et
double et() const final
transverse energy
Definition:
LeafCandidate.h:127
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition:
LeafCandidate.h:148
l1t::HGCalTower::addEtHad
void addEtHad(double et)
Definition:
HGCalTower.cc:34
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition:
LeafCandidate.h:158
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition:
Candidate.h:38
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition:
LeafCandidate.h:152
Generated for CMSSW Reference Manual by
1.8.5