CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Attributes
HCALProperties Class Reference

#include <HCALProperties.h>

Inheritance diagram for HCALProperties:
CalorimeterProperties HCALBarrelProperties HCALEndcapProperties HCALForwardProperties

Public Member Functions

double criticalEnergy () const override
 Critical energy in GeV (2.66E-3*(x0*Z/A)^1.1) More...
 
int eta2ieta (double eta) const
 
double getHcalDepth (double) const
 
 HCALProperties (const edm::ParameterSet &fastDet)
 
double hOverPi () const
 
double interactionLength () const override
 Interaction length in cm. More...
 
double moliereRadius () const override
 Moliere Radius in cm (=7 A/Z in g/cm^2) More...
 
double radiationLengthIncm () const
 Radiation length in cm but static. More...
 
double radLenIncm () const override
 Radiation length in cm. More...
 
double radLenIngcm2 () const override
 Radiation length in g/cm^2. More...
 
double rho () const override
 Density in g/cm3. More...
 
double spotFraction () const
 Spot fraction wrt ECAL. More...
 
double theAeff () const override
 Effective A. More...
 
double theZeff () const override
 Effective Z. More...
 
 ~HCALProperties () override
 
- Public Member Functions inherited from CalorimeterProperties
 CalorimeterProperties ()
 
virtual double thickness (double eta) const =0
 Thickness (in cm) of the homegeneous material as a function of rapidity. More...
 
virtual ~CalorimeterProperties ()
 

Protected Attributes

std::vector< double > etatow_
 
double HCALAeff_
 
double HCALcriticalEnergy_
 
std::vector< double > hcalDepthLam_
 
double HCALinteractionLength_
 
double HCALmoliereRadius_
 
double HCALradiationLengthIncm_
 
double HCALradLenIngcm2_
 
double HCALrho_
 
double HCALZeff_
 

Private Attributes

double hOPi
 
double spotFrac
 

Detailed Description

Definition at line 21 of file HCALProperties.h.

Constructor & Destructor Documentation

◆ HCALProperties()

HCALProperties::HCALProperties ( const edm::ParameterSet fastDet)

Definition at line 9 of file HCALProperties.cc.

References gather_cfg::cout, etatow_, edm::ParameterSet::getParameter(), HCALAeff_, HCALcriticalEnergy_, hcalDepthLam_, HCALinteractionLength_, HCALmoliereRadius_, HCALradiationLengthIncm_, HCALradLenIngcm2_, HCALrho_, HCALZeff_, hOPi, and spotFrac.

10  edm::ParameterSet fastDetHCAL = fastDet.getParameter<edm::ParameterSet>("HadronicCalorimeterProperties");
11  hOPi = fastDetHCAL.getParameter<double>("HCAL_PiOverE");
12  spotFrac = fastDetHCAL.getParameter<double>("HCAL_Sampling");
13  HCALAeff_ = fastDetHCAL.getParameter<double>("HCALAeff");
14  HCALZeff_ = fastDetHCAL.getParameter<double>("HCALZeff");
15  HCALrho_ = fastDetHCAL.getParameter<double>("HCALrho");
16  HCALradiationLengthIncm_ = fastDetHCAL.getParameter<double>("HCALradiationLengthIncm");
17  HCALradLenIngcm2_ = fastDetHCAL.getParameter<double>("HCALradLenIngcm2");
18  HCALmoliereRadius_ = fastDetHCAL.getParameter<double>("HCALmoliereRadius");
19  HCALcriticalEnergy_ = fastDetHCAL.getParameter<double>("HCALcriticalEnergy");
20  HCALinteractionLength_ = fastDetHCAL.getParameter<double>("HCALinteractionLength");
21  etatow_ = fastDetHCAL.getParameter<std::vector<double>>("HCALetatow");
22  hcalDepthLam_ = fastDetHCAL.getParameter<std::vector<double>>("HCALDepthLam");
23 
24  // in principle this splitting into 42 bins may change with future detectors, but let's add a protection to make sure that differences are not typos in the configuration file:
25  if (etatow_.size() != 42)
26  std::cout << " HCALProperties::eta2ieta - WARNING: here we expect 42 entries instead of " << etatow_.size()
27  << "; is the change intentional?" << std::endl;
28  // splitting of 28-th tower is taken into account (2.65-2.853-3.0)
29  if (hcalDepthLam_.size() != etatow_.size() - 1)
30  std::cout << " HCALProperties::eta2ieta - WARNING: the sizes of HCALetatow and HCALDepthLam should differ by 1 "
31  "unit! HCALDepthLam has size "
32  << hcalDepthLam_.size() << " and HCALetatow has size " << etatow_.size() << std::endl;
33 }
std::vector< double > etatow_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double HCALradiationLengthIncm_
double HCALradLenIngcm2_
double HCALcriticalEnergy_
double HCALinteractionLength_
double HCALmoliereRadius_
std::vector< double > hcalDepthLam_

◆ ~HCALProperties()

HCALProperties::~HCALProperties ( )
inlineoverride

Definition at line 25 of file HCALProperties.h.

25 {}

Member Function Documentation

◆ criticalEnergy()

double HCALProperties::criticalEnergy ( ) const
inlineoverridevirtual

Critical energy in GeV (2.66E-3*(x0*Z/A)^1.1)

Implements CalorimeterProperties.

Definition at line 53 of file HCALProperties.h.

References HCALcriticalEnergy_.

53 { return HCALcriticalEnergy_; }
double HCALcriticalEnergy_

◆ eta2ieta()

int HCALProperties::eta2ieta ( double  eta) const

Definition at line 46 of file HCALProperties.cc.

References gather_cfg::cout, PVValHelper::eta, etatow_, findQualityFiles::size, and x.

Referenced by getHcalDepth().

46  {
47  // binary search in the array of towers eta edges
48  int size = etatow_.size();
49 
50  double x = fabs(eta);
51  int curr = size / 2;
52  int step = size / 4;
53  int iter;
54  int prevdir = 0;
55  int actudir = 0;
56 
57  for (iter = 0; iter < size; iter++) {
58  if (curr >= size || curr < 1)
59  std::cout << " HCALProperties::eta2ieta - wrong current index = " << curr << " !!!" << std::endl;
60 
61  if ((x <= etatow_[curr]) && (x > etatow_[curr - 1]))
62  break;
63  prevdir = actudir;
64  if (x > etatow_[curr]) {
65  actudir = 1;
66  } else {
67  actudir = -1;
68  }
69  if (prevdir * actudir < 0) {
70  if (step > 1)
71  step /= 2;
72  }
73  curr += actudir * step;
74  if (curr > size)
75  curr = size;
76  else {
77  if (curr < 1) {
78  curr = 1;
79  }
80  }
81 
82  /*
83  std::cout << " HCALProperties::eta2ieta end of iter." << iter
84  << " curr, etatow_[curr-1], etatow_[curr] = "
85  << curr << " " << etatow_[curr-1] << " " << etatow_[curr] << std::endl;
86  */
87  }
88 
89  /*
90  std::cout << " HCALProperties::eta2ieta for input x = " << x
91  << " found index = " << curr-1
92  << std::endl;
93  */
94 
95  return curr - 1;
96 }
std::vector< double > etatow_
size
Write out results.
step
Definition: StallMonitor.cc:98

◆ getHcalDepth()

double HCALProperties::getHcalDepth ( double  eta) const

Definition at line 35 of file HCALProperties.cc.

References PVValHelper::eta, eta2ieta(), hcalDepthLam_, and LEDCalibrationChannels::ieta.

Referenced by HCALEndcapProperties::thickness(), HCALForwardProperties::thickness(), and HCALBarrelProperties::thickness().

35  {
36  int ieta = eta2ieta(eta);
37 
38  /*
39  std::cout << " HCALProperties::getHcalDepth for eta = " << eta
40  << " returns lam.thickness = " << hcalDepthLam_[ieta] << std::endl;
41  */
42 
43  return hcalDepthLam_[ieta];
44 }
int eta2ieta(double eta) const
std::vector< double > hcalDepthLam_

◆ hOverPi()

double HCALProperties::hOverPi ( ) const
inline

h/pi Warning ! This is a ad-hoc parameter. It has been tuned to get a good agreement on 1TeV electrons It might have nothing to do with reality

Definition at line 60 of file HCALProperties.h.

References hOPi.

Referenced by EMShower::compute().

60 { return hOPi; }

◆ interactionLength()

double HCALProperties::interactionLength ( ) const
inlineoverridevirtual

◆ moliereRadius()

double HCALProperties::moliereRadius ( ) const
inlineoverridevirtual

Moliere Radius in cm (=7 A/Z in g/cm^2)

Implements CalorimeterProperties.

Definition at line 49 of file HCALProperties.h.

References HCALmoliereRadius_.

49 { return HCALmoliereRadius_; }
double HCALmoliereRadius_

◆ radiationLengthIncm()

double HCALProperties::radiationLengthIncm ( ) const
inline

Radiation length in cm but static.

Definition at line 43 of file HCALProperties.h.

References HCALradiationLengthIncm_.

Referenced by radLenIncm().

43 { return HCALradiationLengthIncm_; }
double HCALradiationLengthIncm_

◆ radLenIncm()

double HCALProperties::radLenIncm ( ) const
inlineoverridevirtual

Radiation length in cm.

Implements CalorimeterProperties.

Definition at line 37 of file HCALProperties.h.

References radiationLengthIncm().

Referenced by CaloSegment::CaloSegment(), HDShower::HDShower(), HFShower::HFShower(), and HDRShower::setFuncParam().

37 { return radiationLengthIncm(); }
double radiationLengthIncm() const
Radiation length in cm but static.

◆ radLenIngcm2()

double HCALProperties::radLenIngcm2 ( ) const
inlineoverridevirtual

Radiation length in g/cm^2.

Implements CalorimeterProperties.

Definition at line 46 of file HCALProperties.h.

References HCALradLenIngcm2_.

46 { return HCALradLenIngcm2_; }
double HCALradLenIngcm2_

◆ rho()

double HCALProperties::rho ( ) const
inlineoverridevirtual

Density in g/cm3.

Implements CalorimeterProperties.

Definition at line 34 of file HCALProperties.h.

References HCALrho_.

Referenced by Lepton.Lepton::absIsoFromEA(), and Muon.Muon::absIsoWithFSR().

34 { return HCALrho_; }

◆ spotFraction()

double HCALProperties::spotFraction ( ) const
inline

Spot fraction wrt ECAL.

Definition at line 63 of file HCALProperties.h.

References spotFrac.

Referenced by EMShower::compute().

63 { return spotFrac; }

◆ theAeff()

double HCALProperties::theAeff ( ) const
inlineoverridevirtual

Effective A.

Implements CalorimeterProperties.

Definition at line 28 of file HCALProperties.h.

References HCALAeff_.

28 { return HCALAeff_; }

◆ theZeff()

double HCALProperties::theZeff ( ) const
inlineoverridevirtual

Effective Z.

Implements CalorimeterProperties.

Definition at line 31 of file HCALProperties.h.

References HCALZeff_.

31 { return HCALZeff_; }

Member Data Documentation

◆ etatow_

std::vector<double> HCALProperties::etatow_
protected

Definition at line 82 of file HCALProperties.h.

Referenced by eta2ieta(), and HCALProperties().

◆ HCALAeff_

double HCALProperties::HCALAeff_
protected

Definition at line 74 of file HCALProperties.h.

Referenced by HCALProperties(), and theAeff().

◆ HCALcriticalEnergy_

double HCALProperties::HCALcriticalEnergy_
protected

Definition at line 80 of file HCALProperties.h.

Referenced by criticalEnergy(), and HCALProperties().

◆ hcalDepthLam_

std::vector<double> HCALProperties::hcalDepthLam_
protected

Definition at line 83 of file HCALProperties.h.

Referenced by getHcalDepth(), and HCALProperties().

◆ HCALinteractionLength_

double HCALProperties::HCALinteractionLength_
protected

Definition at line 81 of file HCALProperties.h.

Referenced by HCALProperties(), and interactionLength().

◆ HCALmoliereRadius_

double HCALProperties::HCALmoliereRadius_
protected

Definition at line 79 of file HCALProperties.h.

Referenced by HCALProperties(), and moliereRadius().

◆ HCALradiationLengthIncm_

double HCALProperties::HCALradiationLengthIncm_
protected

Definition at line 77 of file HCALProperties.h.

Referenced by HCALProperties(), and radiationLengthIncm().

◆ HCALradLenIngcm2_

double HCALProperties::HCALradLenIngcm2_
protected

Definition at line 78 of file HCALProperties.h.

Referenced by HCALProperties(), and radLenIngcm2().

◆ HCALrho_

double HCALProperties::HCALrho_
protected

Definition at line 76 of file HCALProperties.h.

Referenced by HCALProperties(), and rho().

◆ HCALZeff_

double HCALProperties::HCALZeff_
protected

Definition at line 75 of file HCALProperties.h.

Referenced by HCALProperties(), and theZeff().

◆ hOPi

double HCALProperties::hOPi
private

Definition at line 70 of file HCALProperties.h.

Referenced by HCALProperties(), and hOverPi().

◆ spotFrac

double HCALProperties::spotFrac
private

Definition at line 71 of file HCALProperties.h.

Referenced by HCALProperties(), and spotFraction().