CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CaloTower Class Reference

#include <CaloTower.h>

Inheritance diagram for CaloTower:
reco::LeafCandidate reco::Candidate

Public Types

typedef CaloTowerDetId key_type
 
- Public Types inherited from reco::LeafCandidate
typedef int Charge
 electric charge type More...
 
typedef CandidateCollection daughters
 collection of daughter candidates More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef math::PtEtaPhiMLorentzVector PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 
- Public Types inherited from reco::Candidate
enum  { dimension = 3 }
 
enum  { size = dimension * (dimension + 1) / 2 }
 matix size More...
 
typedef int Charge
 electric charge type More...
 
typedef candidate::const_iterator const_iterator
 
typedef math::Error< dimension >::type CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef candidate::iterator iterator
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef math::PtEtaPhiMLorentzVector PolarLorentzVector
 Lorentz vector. More...
 
typedef size_t size_type
 
typedef math::XYZVector Vector
 point in the space More...
 

Public Member Functions

void addConstituent (DetId id)
 
void addConstituents (const std::vector< DetId > &ids)
 
 CaloTower ()
 
 CaloTower (CaloTowerDetId id, float emE, float hadE, float outerE, int ecal_tp, int hcal_tp, GlobalVector p3, float iEnergy, bool massless, GlobalPoint emPosition, GlobalPoint hadPosition)
 
 CaloTower (CaloTowerDetId id, float emE, float hadE, float outerE, int ecal_tp, int hcal_tp, GlobalVector p3, float iEnergy, float imass, GlobalPoint emPosition, GlobalPoint hadPosition)
 
 CaloTower (const CaloTowerDetId &id, double emE, double hadE, double outerE, int ecal_tp, int hcal_tp, const LorentzVector &p4, const GlobalPoint &emPosition, const GlobalPoint &hadPosition)
 
 CaloTower (const CaloTowerDetId &id, double emE, double hadE, double outerE, int ecal_tp, int hcal_tp, const PolarLorentzVector &p4, const GlobalPoint &emPosition, const GlobalPoint &hadPosition)
 
DetId constituent (size_t i) const
 
const std::vector< DetId > & constituents () const
 
size_t constituentsSize () const
 
float ecalTime () const
 
double emEnergy () const
 
double emEt () const
 
double emEt (const Point &v) const
 
double emEt (double vtxZ) const
 
int emLvl1 () const
 
const GlobalPointemPosition () const
 
double energyInHB () const
 
double energyInHE () const
 
double energyInHF () const
 
double energyInHO () const
 
double et (const Point &v) const
 
double et (double vtxZ) const
 
double hadEnergy () const
 
double hadEnergyHeInnerLayer () const
 
double hadEnergyHeOuterLayer () const
 
double hadEt () const
 
double hadEt (const Point &v) const
 
double hadEt (double vtxZ) const
 
int hadLv11 () const
 
const GlobalPointhadPosition () const
 
float hcalTime () const
 
double hottestCellE () const
 
CaloTowerDetId id () const
 
int ieta () const
 
int ietaAbs () const
 
int iphi () const
 
unsigned int numBadEcalCells () const
 
unsigned int numBadHcalCells () const
 
int numCrystals () const
 
unsigned int numProblematicEcalCells () const
 
unsigned int numProblematicHcalCells () const
 
unsigned int numRecoveredEcalCells () const
 
unsigned int numRecoveredHcalCells () const
 
double outerEnergy () const
 
double outerEt () const
 
double outerEt (const Point &v) const
 
double outerEt (double vtxZ) const
 
double p (const Point &v) const
 
double p (double vtxZ) const
 
math::PtEtaPhiMLorentzVector p4 (const Point &v) const
 
math::PtEtaPhiMLorentzVector p4 (double vtxZ) const
 
math::PtEtaPhiMLorentzVector p4_HO () const
 
math::PtEtaPhiMLorentzVector p4_HO (const Point &v) const
 
math::PtEtaPhiMLorentzVector p4_HO (double vtxZ) const
 
void setCaloTowerStatus (uint32_t s)
 
void setCaloTowerStatus (unsigned int numBadHcalChan, unsigned int numBadEcalChan, unsigned int numRecHcalChan, unsigned int numRecEcalChan, unsigned int numProbHcalChan, unsigned int numProbEcalChan)
 
void setConstituents (std::vector< DetId > &&ids)
 
void setEcalTime (int t)
 
void setHcalSubdet (int lastHB, int lastHE, int lastHF, int lastHO)
 
void setHcalTime (int t)
 
void setHottestCellE (double e)
 
uint32_t towerStatusWord () const
 
int zside () const
 
- Public Member Functions inherited from reco::LeafCandidate
Vector boostToCM () const final
 
int charge () const final
 electric charge More...
 
LeafCandidateclone () const override
 returns a clone of the Candidate object More...
 
void construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status)
 
const Candidatedaughter (const std::string &s) const override
 return daughter with a specified role name More...
 
Candidatedaughter (const std::string &s) override
 return daughter with a specified role name More...
 
const Candidatedaughter (size_type) const override
 return daughter at a given position (throws an exception) More...
 
Candidatedaughter (size_type) override
 return daughter at a given position (throws an exception) More...
 
double energy () const final
 energy More...
 
double et () const final
 transverse energy More...
 
double et2 () const final
 transverse energy squared (use this for cut!) More...
 
double eta () const final
 momentum pseudorapidity More...
 
void fillVertexCovariance (CovarianceMatrix &v) const override
 fill SMatrix More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
bool hasMasterClone () const override
 
bool hasMasterClonePtr () const override
 
bool isCaloMuon () const override
 
bool isConvertedPhoton () const override
 
bool isElectron () const override
 
bool isGlobalMuon () const override
 
bool isJet () const override
 
bool isMuon () const override
 
bool isPhoton () const override
 
bool isStandAloneMuon () const override
 
bool isTrackerMuon () const override
 
 LeafCandidate ()
 
template<typename... Args>
 LeafCandidate (Args &&... args)
 
 LeafCandidate (const Candidate &c)
 
 LeafCandidate (LeafCandidate &&)=default
 
 LeafCandidate (LeafCandidate &rh)
 
 LeafCandidate (LeafCandidate const &)=default
 
bool longLived () const final
 is long lived? More...
 
double mass () const final
 mass More...
 
bool massConstraint () const final
 do mass constraint? More...
 
double massSqr () const final
 mass squared More...
 
const CandidateBaseRefmasterClone () const override
 
const CandidatePtrmasterClonePtr () const override
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
Vector momentum () const final
 spatial momentum vector More...
 
const Candidatemother (size_type) const override
 return mother at a given position (throws an exception) More...
 
double mt () const final
 transverse mass More...
 
double mtSqr () const final
 transverse mass squared More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
size_t numberOfDaughters () const override
 number of daughters More...
 
size_t numberOfMothers () const override
 number of mothers More...
 
size_t numberOfSourceCandidatePtrs () const override
 
LeafCandidateoperator= (LeafCandidate &&)=default
 
LeafCandidateoperator= (LeafCandidate const &)=default
 
double p () const final
 magnitude of momentum vector More...
 
const LorentzVectorp4 () const final
 four-momentum Lorentz vector More...
 
int pdgId () const final
 PDG identifier. More...
 
double phi () const final
 momentum azimuthal angle More...
 
const PolarLorentzVectorpolarP4 () const final
 four-momentum Lorentz vector More...
 
double pt () const final
 transverse momentum More...
 
double px () const final
 x coordinate of momentum vector More...
 
double py () const final
 y coordinate of momentum vector More...
 
double pz () const final
 z coordinate of momentum vector More...
 
double rapidity () const final
 rapidity More...
 
void setCharge (Charge q) final
 set electric charge More...
 
void setLongLived () final
 
void setMass (double m) final
 set particle mass More...
 
void setMassConstraint () final
 
void setP4 (const LorentzVector &p4) final
 set 4-momentum More...
 
void setP4 (const PolarLorentzVector &p4) final
 set 4-momentum More...
 
void setPdgId (int pdgId) final
 
void setPz (double pz) final
 
void setStatus (int status) final
 set status word More...
 
void setThreeCharge (Charge qx3) final
 set electric charge More...
 
void setVertex (const Point &vertex) override
 set vertex More...
 
CandidatePtr sourceCandidatePtr (size_type i) const override
 
int status () const final
 status word More...
 
double theta () const final
 momentum polar angle More...
 
int threeCharge () const final
 electric charge More...
 
const Pointvertex () const override
 vertex position (overwritten by PF...) More...
 
double vertexChi2 () const override
 chi-squares More...
 
CovarianceMatrix vertexCovariance () const final
 return SMatrix More...
 
double vertexCovariance (int i, int j) const override
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
double vertexNdof () const override
 
double vertexNormalizedChi2 () const override
 chi-squared divided by n.d.o.f. More...
 
double vx () const override
 x coordinate of vertex position More...
 
double vy () const override
 y coordinate of vertex position More...
 
double vz () const override
 z coordinate of vertex position More...
 
double y () const final
 rapidity More...
 
 ~LeafCandidate () override
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
iterator begin ()
 first daughter iterator More...
 
const_iterator begin () const
 first daughter const_iterator More...
 
virtual const TrackbestTrack () const
 
 Candidate ()
 default constructor More...
 
virtual float dxyError () const
 uncertainty on dxy More...
 
virtual float dzError () const
 uncertainty on dz More...
 
iterator end ()
 last daughter iterator More...
 
const_iterator end () const
 last daughter const_iterator More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual void setSourceCandidatePtr (const CandidatePtr &ptr)
 Set the ptr to the source Candidate. More...
 
virtual ~Candidate ()
 destructor More...
 

Private Member Functions

math::PtEtaPhiMLorentzVector emP4 (const Point &v) const
 
math::PtEtaPhiMLorentzVector emP4 (double vtxZ) const
 
math::PtEtaPhiMLorentzVector hadP4 (const Point &v) const
 
math::PtEtaPhiMLorentzVector hadP4 (double vtxZ) const
 

Private Attributes

std::vector< DetIdconstituents_
 
int ecalTime_
 
float emE_
 
int emLvl1_
 
GlobalPoint emPosition_
 
float hadE_
 
int hadLvl1_
 
GlobalPoint hadPosition_
 
int hcalTime_
 
float hottestCellE_
 
CaloTowerDetId id_
 
bool inHBHEgap_
 
bool inHO_
 
float outerE_
 
HcalSubdetector subdet_
 
uint32_t twrStatusWord_
 

Additional Inherited Members

Detailed Description

Author
J. Mans - Minnesota

Definition at line 26 of file CaloTower.h.

Member Typedef Documentation

◆ key_type

Definition at line 28 of file CaloTower.h.

Constructor & Destructor Documentation

◆ CaloTower() [1/5]

CaloTower::CaloTower ( )

Definition at line 3 of file CaloTower.cc.

3  {
4  emE_ = 0;
5  hadE_ = 0;
6  outerE_ = 0;
7  emLvl1_ = 0;
8  hadLvl1_ = 0;
9 }

References emE_, emLvl1_, hadE_, hadLvl1_, and outerE_.

◆ CaloTower() [2/5]

CaloTower::CaloTower ( const CaloTowerDetId id,
double  emE,
double  hadE,
double  outerE,
int  ecal_tp,
int  hcal_tp,
const PolarLorentzVector p4,
const GlobalPoint emPosition,
const GlobalPoint hadPosition 
)

Definition at line 11 of file CaloTower.cc.

20  : LeafCandidate(0, p4, Point(0, 0, 0)),
21  id_(id),
22  emPosition_(emPos),
23  hadPosition_(hadPos),
24  emE_(emE),
25  hadE_(hadE),
26  outerE_(outerE),
27  emLvl1_(ecal_tp),
28  hadLvl1_(hcal_tp) {}

◆ CaloTower() [3/5]

CaloTower::CaloTower ( const CaloTowerDetId id,
double  emE,
double  hadE,
double  outerE,
int  ecal_tp,
int  hcal_tp,
const LorentzVector p4,
const GlobalPoint emPosition,
const GlobalPoint hadPosition 
)

Definition at line 30 of file CaloTower.cc.

39  : LeafCandidate(0, p4, Point(0, 0, 0)),
40  id_(id),
41  emPosition_(emPos),
42  hadPosition_(hadPos),
43  emE_(emE),
44  hadE_(hadE),
45  outerE_(outerE),
46  emLvl1_(ecal_tp),
47  hadLvl1_(hcal_tp) {}

◆ CaloTower() [4/5]

CaloTower::CaloTower ( CaloTowerDetId  id,
float  emE,
float  hadE,
float  outerE,
int  ecal_tp,
int  hcal_tp,
GlobalVector  p3,
float  iEnergy,
bool  massless,
GlobalPoint  emPosition,
GlobalPoint  hadPosition 
)

Definition at line 49 of file CaloTower.cc.

60  : LeafCandidate(0, p3, iEnergy, massless, Point(0, 0, 0)),
61  id_(id),
62  emPosition_(emPos),
63  hadPosition_(hadPos),
64  emE_(emE),
65  hadE_(hadE),
66  outerE_(outerE),
67  emLvl1_(ecal_tp),
68  hadLvl1_(hcal_tp) {}

◆ CaloTower() [5/5]

CaloTower::CaloTower ( CaloTowerDetId  id,
float  emE,
float  hadE,
float  outerE,
int  ecal_tp,
int  hcal_tp,
GlobalVector  p3,
float  iEnergy,
float  imass,
GlobalPoint  emPosition,
GlobalPoint  hadPosition 
)

Definition at line 70 of file CaloTower.cc.

81  : LeafCandidate(0, p3, iEnergy, imass, Point(0, 0, 0)),
82  id_(id),
83  emPosition_(emPos),
84  hadPosition_(hadPos),
85  emE_(emE),
86  hadE_(hadE),
87  outerE_(outerE),
88  emLvl1_(ecal_tp),
89  hadLvl1_(hcal_tp) {}

Member Function Documentation

◆ addConstituent()

void CaloTower::addConstituent ( DetId  id)
inline

Definition at line 80 of file CaloTower.h.

80 { constituents_.push_back(id); }

References constituents_.

◆ addConstituents()

void CaloTower::addConstituents ( const std::vector< DetId > &  ids)

Definition at line 199 of file CaloTower.cc.

199  {
200  constituents_.reserve(constituents_.size() + ids.size());
201  constituents_.insert(constituents_.end(), ids.begin(), ids.end());
202 }

References constituents_.

Referenced by CaloTowersMerger::mergedTower(), and CaloTowersCreationAlgo::rescaleTowers().

◆ constituent()

DetId CaloTower::constituent ( size_t  i) const
inline

◆ constituents()

const std::vector<DetId>& CaloTower::constituents ( ) const
inline

Definition at line 124 of file CaloTower.h.

124 { return constituents_; }

References constituents_.

Referenced by ParametrizedSubtractor::getEt().

◆ constituentsSize()

size_t CaloTower::constituentsSize ( ) const
inline

◆ ecalTime()

float CaloTower::ecalTime ( ) const
inline

Definition at line 196 of file CaloTower.h.

196 { return float(ecalTime_) * 0.01; }

References ecalTime_, and dqmMemoryStats::float.

Referenced by CaloTowersCreationAlgo::rescale().

◆ emEnergy()

double CaloTower::emEnergy ( ) const
inline

◆ emEt() [1/3]

double CaloTower::emEt ( ) const
inline

◆ emEt() [2/3]

double CaloTower::emEt ( const Point v) const
inline

Definition at line 162 of file CaloTower.h.

162 { return emE_ * sin(p4(v).theta()); }

References emE_, reco::LeafCandidate::p4(), funct::sin(), reco::LeafCandidate::theta(), and findQualityFiles::v.

◆ emEt() [3/3]

double CaloTower::emEt ( double  vtxZ) const
inline

Definition at line 152 of file CaloTower.h.

152 { return emE_ * sin(p4(vtxZ).theta()); }

References emE_, reco::LeafCandidate::p4(), funct::sin(), and reco::LeafCandidate::theta().

◆ emLvl1()

int CaloTower::emLvl1 ( ) const
inline

Definition at line 180 of file CaloTower.h.

180 { return emLvl1_; }

References emLvl1_.

◆ emP4() [1/2]

math::PtEtaPhiMLorentzVector CaloTower::emP4 ( const Point v) const
private

Definition at line 145 of file CaloTower.cc.

145  {
146  if (emE_ > 0) {
147  GlobalPoint p(v.x(), v.y(), v.z());
149  return math::PtEtaPhiMLorentzVector(emE_ * sin(dir.theta()), dir.eta(), dir.phi(), 0.0);
150  }
151 
152  return math::PtEtaPhiMLorentzVector(0, 0, 0, 0);
153 }

References DeadROC_duringRun::dir, emE_, emPosition_, reco::LeafCandidate::p(), funct::sin(), and findQualityFiles::v.

Referenced by p4().

◆ emP4() [2/2]

math::PtEtaPhiMLorentzVector CaloTower::emP4 ( double  vtxZ) const
private

Definition at line 113 of file CaloTower.cc.

113  {
114  if (emE_ > 0) {
115  double ctgTheta = (emPosition_.z() - vtxZ) / emPosition_.perp();
116  double newEta = asinh(ctgTheta);
117  double pf = 1.0 / cosh(newEta);
118 
119  return math::PtEtaPhiMLorentzVector(emE_ * pf, newEta, emPosition_.phi(), 0.0);
120  }
121 
122  return math::PtEtaPhiMLorentzVector(0, 0, 0, 0);
123 }

References emE_, emPosition_, PV3DBase< T, PVType, FrameType >::perp(), packedPFCandidateRefMixer_cfi::pf, PV3DBase< T, PVType, FrameType >::phi(), and PV3DBase< T, PVType, FrameType >::z().

◆ emPosition()

const GlobalPoint& CaloTower::emPosition ( ) const
inline

Definition at line 177 of file CaloTower.h.

177 { return emPosition_; }

References emPosition_.

◆ energyInHB()

double CaloTower::energyInHB ( ) const

Definition at line 243 of file CaloTower.cc.

243  {
244  if (inHBHEgap_)
245  return hadE_ - outerE_;
246  else if (subdet_ == HcalBarrel)
247  return hadE_;
248  else
249  return 0.0;
250 }

References hadE_, HcalBarrel, inHBHEgap_, outerE_, and subdet_.

◆ energyInHE()

double CaloTower::energyInHE ( ) const

Definition at line 252 of file CaloTower.cc.

252  {
253  if (inHBHEgap_)
254  return outerE_;
255  else if (subdet_ == HcalEndcap)
256  return hadE_;
257  else
258  return 0.0;
259 }

References hadE_, HcalEndcap, inHBHEgap_, outerE_, and subdet_.

◆ energyInHF()

double CaloTower::energyInHF ( ) const

Definition at line 261 of file CaloTower.cc.

261  {
262  if (subdet_ == HcalForward)
263  return energy();
264  else
265  return 0.0;
266 }

References reco::LeafCandidate::energy(), HcalForward, and subdet_.

◆ energyInHO()

double CaloTower::energyInHO ( ) const

Definition at line 273 of file CaloTower.cc.

273  {
274  if (inHO_)
275  return (energy() - hadE_ - emE_);
276  else
277  return 0.0;
278 }

References emE_, reco::LeafCandidate::energy(), hadE_, and inHO_.

◆ et() [1/2]

double CaloTower::et ( const Point v) const
inline

Definition at line 160 of file CaloTower.h.

160 { return p4(v).Et(); }

References reco::LeafCandidate::p4(), and findQualityFiles::v.

◆ et() [2/2]

double CaloTower::et ( double  vtxZ) const
inline

◆ hadEnergy()

double CaloTower::hadEnergy ( ) const
inline

◆ hadEnergyHeInnerLayer()

double CaloTower::hadEnergyHeInnerLayer ( ) const
inline

Definition at line 185 of file CaloTower.h.

185 { return (subdet_ == HcalEndcap) ? hadE_ - outerE_ : 0; }

References hadE_, HcalEndcap, outerE_, and subdet_.

◆ hadEnergyHeOuterLayer()

double CaloTower::hadEnergyHeOuterLayer ( ) const
inline

Definition at line 184 of file CaloTower.h.

184 { return (subdet_ == HcalEndcap) ? outerE_ : 0; }

References HcalEndcap, outerE_, and subdet_.

◆ hadEt() [1/3]

double CaloTower::hadEt ( ) const
inline

◆ hadEt() [2/3]

double CaloTower::hadEt ( const Point v) const
inline

Definition at line 163 of file CaloTower.h.

163 { return hadE_ * sin(p4(v).theta()); }

References hadE_, reco::LeafCandidate::p4(), funct::sin(), reco::LeafCandidate::theta(), and findQualityFiles::v.

◆ hadEt() [3/3]

double CaloTower::hadEt ( double  vtxZ) const
inline

Definition at line 153 of file CaloTower.h.

153 { return hadE_ * sin(p4(vtxZ).theta()); }

References hadE_, reco::LeafCandidate::p4(), funct::sin(), and reco::LeafCandidate::theta().

◆ hadLv11()

int CaloTower::hadLv11 ( ) const
inline

Definition at line 181 of file CaloTower.h.

181 { return hadLvl1_; }

References hadLvl1_.

◆ hadP4() [1/2]

math::PtEtaPhiMLorentzVector CaloTower::hadP4 ( const Point v) const
private

Definition at line 127 of file CaloTower.cc.

127  {
128  // note: for now we use the same position for HO as for the other detectors
129 
130  double hcalTot;
131  if (inHO_)
132  hcalTot = (energy() - emE_);
133  else
134  hcalTot = hadE_;
135 
136  if (hcalTot > 0) {
137  GlobalPoint p(v.x(), v.y(), v.z());
139  return math::PtEtaPhiMLorentzVector(hcalTot * sin(dir.theta()), dir.eta(), dir.phi(), 0.0);
140  }
141 
142  return math::PtEtaPhiMLorentzVector(0, 0, 0, 0);
143 }

References DeadROC_duringRun::dir, emE_, reco::LeafCandidate::energy(), hadE_, hadPosition_, inHO_, reco::LeafCandidate::p(), funct::sin(), and findQualityFiles::v.

Referenced by p4().

◆ hadP4() [2/2]

math::PtEtaPhiMLorentzVector CaloTower::hadP4 ( double  vtxZ) const
private

Definition at line 93 of file CaloTower.cc.

93  {
94  // note: for now we use the same position for HO as for the other detectors
95 
96  double hcalTot;
97  if (inHO_)
98  hcalTot = (energy() - emE_);
99  else
100  hcalTot = hadE_;
101 
102  if (hcalTot > 0) {
103  double ctgTheta = (hadPosition_.z() - vtxZ) / hadPosition_.perp();
104  double newEta = asinh(ctgTheta);
105  double pf = 1.0 / cosh(newEta);
106 
107  return PolarLorentzVector(hcalTot * pf, newEta, hadPosition_.phi(), 0.0);
108  }
109 
110  return math::PtEtaPhiMLorentzVector(0, 0, 0, 0);
111 }

References emE_, reco::LeafCandidate::energy(), hadE_, hadPosition_, inHO_, PV3DBase< T, PVType, FrameType >::perp(), packedPFCandidateRefMixer_cfi::pf, PV3DBase< T, PVType, FrameType >::phi(), and PV3DBase< T, PVType, FrameType >::z().

◆ hadPosition()

const GlobalPoint& CaloTower::hadPosition ( ) const
inline

Definition at line 178 of file CaloTower.h.

178 { return hadPosition_; }

References hadPosition_.

◆ hcalTime()

float CaloTower::hcalTime ( ) const
inline

Definition at line 197 of file CaloTower.h.

197 { return float(hcalTime_) * 0.01; }

References dqmMemoryStats::float, and hcalTime_.

Referenced by CaloTowersCreationAlgo::rescale().

◆ hottestCellE()

double CaloTower::hottestCellE ( ) const
inline

Definition at line 166 of file CaloTower.h.

166 { return hottestCellE_; }

References hottestCellE_.

◆ id()

CaloTowerDetId CaloTower::id ( ) const
inline

◆ ieta()

int CaloTower::ieta ( ) const
inline

◆ ietaAbs()

int CaloTower::ietaAbs ( ) const
inline

Definition at line 201 of file CaloTower.h.

201 { return id_.ietaAbs(); }

References id_, and CaloTowerDetId::ietaAbs().

Referenced by reco::HcalNoiseInfoProducer::fillcalotwrs(), and setHcalSubdet().

◆ iphi()

int CaloTower::iphi ( ) const
inline

Definition at line 202 of file CaloTower.h.

202 { return id_.iphi(); }

References id_, and CaloTowerDetId::iphi().

Referenced by GlobalHaloAlgo::Calculate(), and HiPuRhoProducer::calculateOrphanInput().

◆ numBadEcalCells()

unsigned int CaloTower::numBadEcalCells ( ) const
inline

Definition at line 211 of file CaloTower.h.

211 { return (twrStatusWord_ & 0x1F); }

References twrStatusWord_.

◆ numBadHcalCells()

unsigned int CaloTower::numBadHcalCells ( ) const
inline

Definition at line 215 of file CaloTower.h.

215 { return ((twrStatusWord_ >> 15) & 0x7); }

References twrStatusWord_.

◆ numCrystals()

int CaloTower::numCrystals ( ) const

Definition at line 204 of file CaloTower.cc.

204  {
205  if (subdet_ == HcalForward)
206  return 0;
207 
208  int nC = 0;
209  std::vector<DetId>::const_iterator it = constituents_.begin();
210  for (; it != constituents_.end(); ++it) {
211  if (it->det() == DetId::Ecal)
212  ++nC;
213  }
214 
215  return nC;
216 }

References constituents_, DetId::Ecal, HcalForward, and subdet_.

◆ numProblematicEcalCells()

unsigned int CaloTower::numProblematicEcalCells ( ) const
inline

Definition at line 213 of file CaloTower.h.

213 { return ((twrStatusWord_ >> 10) & 0x1F); }

References twrStatusWord_.

◆ numProblematicHcalCells()

unsigned int CaloTower::numProblematicHcalCells ( ) const
inline

Definition at line 217 of file CaloTower.h.

217 { return ((twrStatusWord_ >> 21) & 0x7); }

References twrStatusWord_.

◆ numRecoveredEcalCells()

unsigned int CaloTower::numRecoveredEcalCells ( ) const
inline

Definition at line 212 of file CaloTower.h.

212 { return ((twrStatusWord_ >> 5) & 0x1F); }

References twrStatusWord_.

◆ numRecoveredHcalCells()

unsigned int CaloTower::numRecoveredHcalCells ( ) const
inline

Definition at line 216 of file CaloTower.h.

216 { return ((twrStatusWord_ >> 18) & 0x7); }

References twrStatusWord_.

◆ outerEnergy()

double CaloTower::outerEnergy ( ) const
inline

Definition at line 132 of file CaloTower.h.

132 { return (inHO_) ? outerE_ : 0.0; }

References inHO_, and outerE_.

Referenced by muonisolation::CaloExtractorByAssociator::deposits(), and CaloTowersCreationAlgo::rescale().

◆ outerEt() [1/3]

double CaloTower::outerEt ( ) const
inline

◆ outerEt() [2/3]

double CaloTower::outerEt ( const Point v) const
inline

Definition at line 164 of file CaloTower.h.

164 { return (inHO_) ? outerE_ * sin(p4(v).theta()) : 0.0; }

References inHO_, outerE_, reco::LeafCandidate::p4(), funct::sin(), reco::LeafCandidate::theta(), and findQualityFiles::v.

◆ outerEt() [3/3]

double CaloTower::outerEt ( double  vtxZ) const
inline

Definition at line 154 of file CaloTower.h.

154 { return (inHO_) ? outerE_ * sin(p4(vtxZ).theta()) : 0.0; }

References inHO_, outerE_, reco::LeafCandidate::p4(), funct::sin(), and reco::LeafCandidate::theta().

◆ p() [1/2]

double CaloTower::p ( const Point v) const
inline

Definition at line 159 of file CaloTower.h.

159 { return p4(v).P(); }

References reco::LeafCandidate::p4(), and findQualityFiles::v.

Referenced by Electron.Electron::ptErr().

◆ p() [2/2]

double CaloTower::p ( double  vtxZ) const
inline

Definition at line 149 of file CaloTower.h.

149 { return p4(vtxZ).P(); }

References reco::LeafCandidate::p4().

Referenced by Electron.Electron::ptErr().

◆ p4() [1/2]

math::PtEtaPhiMLorentzVector CaloTower::p4 ( const Point v) const

Definition at line 167 of file CaloTower.cc.

167  {
168  if (subdet_ == HcalBarrel || subdet_ == HcalEndcap) {
169  return emP4(v) + hadP4(v);
170  }
171  // em and had energy in HF are defined in a special way
172  GlobalPoint p(v.x(), v.y(), v.z());
173  math::XYZVector dir = math::XYZVector(emPosition_ - p); // em and had positions in HF are forced to be the same
174  return math::PtEtaPhiMLorentzVector(p4().energy() * sin(dir.theta()), dir.eta(), dir.phi(), 0.0);
175 }

References DeadROC_duringRun::dir, emP4(), emPosition_, reco::LeafCandidate::energy(), hadP4(), HcalBarrel, HcalEndcap, reco::LeafCandidate::p(), reco::LeafCandidate::p4(), funct::sin(), subdet_, and findQualityFiles::v.

Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), and Lepton.Lepton::p4WithFSR().

◆ p4() [2/2]

math::PtEtaPhiMLorentzVector CaloTower::p4 ( double  vtxZ) const

Definition at line 155 of file CaloTower.cc.

155  {
156  if (subdet_ == HcalBarrel || subdet_ == HcalEndcap) {
157  return (emP4(vtxZ) + hadP4(vtxZ));
158  }
159  // em and had energy in HF are defined in a special way
160  double ctgTheta =
161  (emPosition_.z() - vtxZ) / emPosition_.perp(); // em and had positions in HF are forced to be the same
162  double newEta = asinh(ctgTheta);
163  double pf = 1.0 / cosh(newEta);
164  return math::PtEtaPhiMLorentzVector(p4().energy() * pf, newEta, emPosition_.phi(), 0.0);
165 }

References emP4(), emPosition_, reco::LeafCandidate::energy(), hadP4(), HcalBarrel, HcalEndcap, reco::LeafCandidate::p4(), PV3DBase< T, PVType, FrameType >::perp(), packedPFCandidateRefMixer_cfi::pf, PV3DBase< T, PVType, FrameType >::phi(), subdet_, and PV3DBase< T, PVType, FrameType >::z().

Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), and Lepton.Lepton::p4WithFSR().

◆ p4_HO() [1/3]

math::PtEtaPhiMLorentzVector CaloTower::p4_HO ( ) const

◆ p4_HO() [2/3]

math::PtEtaPhiMLorentzVector CaloTower::p4_HO ( const Point v) const

Definition at line 179 of file CaloTower.cc.

179  {
180  if (!inHO_ || outerE_ < 0)
181  return math::PtEtaPhiMLorentzVector(0, 0, 0, 0);
182 
183  GlobalPoint p(v.x(), v.y(), v.z());
185  return math::PtEtaPhiMLorentzVector(outerE_ * sin(dir.theta()), dir.eta(), dir.phi(), 0.0);
186 }

References DeadROC_duringRun::dir, hadPosition_, inHO_, outerE_, reco::LeafCandidate::p(), funct::sin(), and findQualityFiles::v.

◆ p4_HO() [3/3]

math::PtEtaPhiMLorentzVector CaloTower::p4_HO ( double  vtxZ) const

Definition at line 188 of file CaloTower.cc.

188  {
189  Point p(0, 0, vtxZ);
190  return p4_HO(p);
191 }

References reco::LeafCandidate::p(), and p4_HO().

◆ setCaloTowerStatus() [1/2]

void CaloTower::setCaloTowerStatus ( uint32_t  s)
inline

Definition at line 117 of file CaloTower.h.

117 { twrStatusWord_ = s; }

References alignCSCRings::s, and twrStatusWord_.

◆ setCaloTowerStatus() [2/2]

void CaloTower::setCaloTowerStatus ( unsigned int  numBadHcalChan,
unsigned int  numBadEcalChan,
unsigned int  numRecHcalChan,
unsigned int  numRecEcalChan,
unsigned int  numProbHcalChan,
unsigned int  numProbEcalChan 
)

Definition at line 221 of file CaloTower.cc.

226  {
227  twrStatusWord_ = 0x0;
228 
229  twrStatusWord_ |= (numBadEcalChan & 0x1F);
230  twrStatusWord_ |= ((numRecEcalChan & 0x1F) << 5);
231  twrStatusWord_ |= ((numProbEcalChan & 0x1F) << 10);
232  twrStatusWord_ |= ((numBadHcalChan & 0x7) << 15);
233  twrStatusWord_ |= ((numRecHcalChan & 0x7) << 18);
234  twrStatusWord_ |= ((numProbHcalChan & 0x7) << 21);
235 
236  return;
237 }

References twrStatusWord_.

Referenced by CaloTowersMerger::mergedTower(), and CaloTowersCreationAlgo::rescaleTowers().

◆ setConstituents()

void CaloTower::setConstituents ( std::vector< DetId > &&  ids)
inline

Definition at line 82 of file CaloTower.h.

82 { constituents_ = std::move(ids); }

References constituents_, and eostools::move().

◆ setEcalTime()

void CaloTower::setEcalTime ( int  t)
inline

Definition at line 83 of file CaloTower.h.

83 { ecalTime_ = t; };

References ecalTime_, and submitPVValidationJobs::t.

Referenced by CaloTowersMerger::mergedTower(), and CaloTowersCreationAlgo::rescaleTowers().

◆ setHcalSubdet()

void CaloTower::setHcalSubdet ( int  lastHB,
int  lastHE,
int  lastHF,
int  lastHO 
)
inline

Definition at line 85 of file CaloTower.h.

85  {
86  int ct_ieta = ietaAbs();
87  if (ct_ieta <= lastHB)
89  else if (ct_ieta <= lastHE)
91  else if (ct_ieta <= lastHF)
93 
94  //account for HO separately
95  if (ct_ieta <= lastHO)
96  inHO_ = true;
97  else
98  inHO_ = false;
99 
100  //account for gap/crossover tower separately
101  if (ct_ieta == lastHB)
102  inHBHEgap_ = true;
103  else
104  inHBHEgap_ = false;
105  }

References HcalBarrel, HcalEndcap, HcalForward, ietaAbs(), inHBHEgap_, inHO_, and subdet_.

Referenced by CaloTowersCreationAlgo::rescaleTowers().

◆ setHcalTime()

void CaloTower::setHcalTime ( int  t)
inline

Definition at line 84 of file CaloTower.h.

84 { hcalTime_ = t; };

References hcalTime_, and submitPVValidationJobs::t.

Referenced by CaloTowersMerger::mergedTower(), and CaloTowersCreationAlgo::rescaleTowers().

◆ setHottestCellE()

void CaloTower::setHottestCellE ( double  e)
inline

Definition at line 120 of file CaloTower.h.

120 { hottestCellE_ = e; }

References MillePedeFileConverter_cfg::e, and hottestCellE_.

Referenced by CaloTowersMerger::mergedTower().

◆ towerStatusWord()

uint32_t CaloTower::towerStatusWord ( ) const
inline

Definition at line 220 of file CaloTower.h.

220 { return twrStatusWord_; }

References twrStatusWord_.

◆ zside()

int CaloTower::zside ( ) const
inline

Definition at line 203 of file CaloTower.h.

203 { return id_.zside(); }

References id_, and CaloTowerDetId::zside().

Member Data Documentation

◆ constituents_

std::vector<DetId> CaloTower::constituents_
private

◆ ecalTime_

int CaloTower::ecalTime_
private

Definition at line 236 of file CaloTower.h.

Referenced by ecalTime(), and setEcalTime().

◆ emE_

float CaloTower::emE_
private

Definition at line 239 of file CaloTower.h.

Referenced by CaloTower(), emEnergy(), emEt(), emP4(), energyInHO(), and hadP4().

◆ emLvl1_

int CaloTower::emLvl1_
private

Definition at line 243 of file CaloTower.h.

Referenced by CaloTower(), and emLvl1().

◆ emPosition_

GlobalPoint CaloTower::emPosition_
private

Definition at line 228 of file CaloTower.h.

Referenced by emP4(), emPosition(), and p4().

◆ hadE_

float CaloTower::hadE_
private

◆ hadLvl1_

int CaloTower::hadLvl1_
private

Definition at line 243 of file CaloTower.h.

Referenced by CaloTower(), and hadLv11().

◆ hadPosition_

GlobalPoint CaloTower::hadPosition_
private

Definition at line 229 of file CaloTower.h.

Referenced by hadP4(), hadPosition(), and p4_HO().

◆ hcalTime_

int CaloTower::hcalTime_
private

Definition at line 237 of file CaloTower.h.

Referenced by hcalTime(), and setHcalTime().

◆ hottestCellE_

float CaloTower::hottestCellE_
private

Definition at line 241 of file CaloTower.h.

Referenced by hottestCellE(), and setHottestCellE().

◆ id_

CaloTowerDetId CaloTower::id_
private

Definition at line 223 of file CaloTower.h.

Referenced by id(), ieta(), ietaAbs(), iphi(), and zside().

◆ inHBHEgap_

bool CaloTower::inHBHEgap_
private

Definition at line 233 of file CaloTower.h.

Referenced by energyInHB(), energyInHE(), and setHcalSubdet().

◆ inHO_

bool CaloTower::inHO_
private

Definition at line 233 of file CaloTower.h.

Referenced by energyInHO(), hadP4(), outerEnergy(), outerEt(), p4_HO(), and setHcalSubdet().

◆ outerE_

float CaloTower::outerE_
private

◆ subdet_

HcalSubdetector CaloTower::subdet_
private

◆ twrStatusWord_

uint32_t CaloTower::twrStatusWord_
private
CaloTowerDetId::ietaAbs
int ietaAbs() const
get the absolute value of the tower ieta
Definition: CaloTowerDetId.h:28
mps_fire.i
i
Definition: mps_fire.py:428
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
reco::LeafCandidate::Point
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
CaloTower::hadP4
math::PtEtaPhiMLorentzVector hadP4(const Point &v) const
Definition: CaloTower.cc:127
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
CaloTower::inHBHEgap_
bool inHBHEgap_
Definition: CaloTower.h:233
HcalBarrel
Definition: HcalAssistant.h:33
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CaloTower::hcalTime_
int hcalTime_
Definition: CaloTower.h:237
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CaloTower::emLvl1_
int emLvl1_
Definition: CaloTower.h:243
CaloTower::p4_HO
math::PtEtaPhiMLorentzVector p4_HO() const
Definition: CaloTower.cc:193
reco::LeafCandidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: LeafCandidate.h:25
CaloTower::inHO_
bool inHO_
Definition: CaloTower.h:233
CaloTower::hadE_
float hadE_
Definition: CaloTower.h:239
reco::LeafCandidate::theta
double theta() const final
momentum polar angle
Definition: LeafCandidate.h:150
CaloTower::twrStatusWord_
uint32_t twrStatusWord_
Definition: CaloTower.h:225
CaloTower::ecalTime_
int ecalTime_
Definition: CaloTower.h:236
Point3DBase< float, GlobalTag >
CaloTower::hadLvl1_
int hadLvl1_
Definition: CaloTower.h:243
CaloTower::emP4
math::PtEtaPhiMLorentzVector emP4(const Point &v) const
Definition: CaloTower.cc:145
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
CaloTower::constituents_
std::vector< DetId > constituents_
Definition: CaloTower.h:244
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
CaloTower::hottestCellE_
float hottestCellE_
Definition: CaloTower.h:241
CaloTower::subdet_
HcalSubdetector subdet_
Definition: CaloTower.h:232
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
CaloTower::ietaAbs
int ietaAbs() const
Definition: CaloTower.h:201
reco::LeafCandidate::LeafCandidate
LeafCandidate()
Definition: LeafCandidate.h:33
DetId::Ecal
Definition: DetId.h:27
CaloTower::emPosition_
GlobalPoint emPosition_
Definition: CaloTower.h:228
CaloTower::id_
CaloTowerDetId id_
Definition: CaloTower.h:223
CaloTowerDetId::iphi
int iphi() const
get the tower iphi
Definition: CaloTowerDetId.cc:30
HcalForward
Definition: HcalAssistant.h:36
eostools.move
def move(src, dest)
Definition: eostools.py:511
CaloTowerDetId::ieta
int ieta() const
get the tower ieta
Definition: CaloTowerDetId.h:30
CaloTower::hadPosition_
GlobalPoint hadPosition_
Definition: CaloTower.h:229
HcalEndcap
Definition: HcalAssistant.h:34
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
p3
double p3[4]
Definition: TauolaWrapper.h:91
CaloTower::emE_
float emE_
Definition: CaloTower.h:239
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
math::PtEtaPhiMLorentzVector
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
CaloTowerDetId::zside
int zside() const
get the z-side of the tower (1/-1)
Definition: CaloTowerDetId.h:26
CaloTower::outerE_
float outerE_
Definition: CaloTower.h:239
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37