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.

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 }

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

◆ ~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.

53 { return HCALcriticalEnergy_; }

References HCALcriticalEnergy_.

◆ eta2ieta()

int HCALProperties::eta2ieta ( double  eta) const

Definition at line 46 of file HCALProperties.cc.

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 }

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

Referenced by getHcalDepth().

◆ getHcalDepth()

double HCALProperties::getHcalDepth ( double  eta) const

Definition at line 35 of file HCALProperties.cc.

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 }

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

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

◆ 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.

60 { return hOPi; }

References hOPi.

Referenced by EMShower::compute().

◆ 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.

49 { return HCALmoliereRadius_; }

References HCALmoliereRadius_.

◆ radiationLengthIncm()

double HCALProperties::radiationLengthIncm ( ) const
inline

Radiation length in cm but static.

Definition at line 43 of file HCALProperties.h.

43 { return HCALradiationLengthIncm_; }

References HCALradiationLengthIncm_.

Referenced by radLenIncm().

◆ radLenIncm()

double HCALProperties::radLenIncm ( ) const
inlineoverridevirtual

Radiation length in cm.

Implements CalorimeterProperties.

Definition at line 37 of file HCALProperties.h.

37 { return radiationLengthIncm(); }

References radiationLengthIncm().

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

◆ radLenIngcm2()

double HCALProperties::radLenIngcm2 ( ) const
inlineoverridevirtual

Radiation length in g/cm^2.

Implements CalorimeterProperties.

Definition at line 46 of file HCALProperties.h.

46 { return HCALradLenIngcm2_; }

References HCALradLenIngcm2_.

◆ rho()

double HCALProperties::rho ( ) const
inlineoverridevirtual

Density in g/cm3.

Implements CalorimeterProperties.

Definition at line 34 of file HCALProperties.h.

34 { return HCALrho_; }

References HCALrho_.

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

◆ spotFraction()

double HCALProperties::spotFraction ( ) const
inline

Spot fraction wrt ECAL.

Definition at line 63 of file HCALProperties.h.

63 { return spotFrac; }

References spotFrac.

Referenced by EMShower::compute().

◆ theAeff()

double HCALProperties::theAeff ( ) const
inlineoverridevirtual

Effective A.

Implements CalorimeterProperties.

Definition at line 28 of file HCALProperties.h.

28 { return HCALAeff_; }

References HCALAeff_.

◆ theZeff()

double HCALProperties::theZeff ( ) const
inlineoverridevirtual

Effective Z.

Implements CalorimeterProperties.

Definition at line 31 of file HCALProperties.h.

31 { return HCALZeff_; }

References 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().

CalorimeterProperties::CalorimeterProperties
CalorimeterProperties()
Definition: CalorimeterProperties.h:13
HCALProperties::radiationLengthIncm
double radiationLengthIncm() const
Radiation length in cm but static.
Definition: HCALProperties.h:43
step
step
Definition: StallMonitor.cc:94
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DDAxes::x
HCALProperties::HCALZeff_
double HCALZeff_
Definition: HCALProperties.h:75
PVValHelper::eta
Definition: PVValidationHelpers.h:70
HCALProperties::HCALmoliereRadius_
double HCALmoliereRadius_
Definition: HCALProperties.h:79
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
edm::ParameterSet
Definition: ParameterSet.h:47
HCALProperties::HCALcriticalEnergy_
double HCALcriticalEnergy_
Definition: HCALProperties.h:80
HCALProperties::etatow_
std::vector< double > etatow_
Definition: HCALProperties.h:82
HCALProperties::HCALradiationLengthIncm_
double HCALradiationLengthIncm_
Definition: HCALProperties.h:77
HCALProperties::HCALradLenIngcm2_
double HCALradLenIngcm2_
Definition: HCALProperties.h:78
HCALProperties::spotFrac
double spotFrac
Definition: HCALProperties.h:71
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HCALProperties::HCALinteractionLength_
double HCALinteractionLength_
Definition: HCALProperties.h:81
HCALProperties::hcalDepthLam_
std::vector< double > hcalDepthLam_
Definition: HCALProperties.h:83
HCALProperties::eta2ieta
int eta2ieta(double eta) const
Definition: HCALProperties.cc:46
HCALProperties::hOPi
double hOPi
Definition: HCALProperties.h:70
HCALProperties::HCALAeff_
double HCALAeff_
Definition: HCALProperties.h:74
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
HCALProperties::HCALrho_
double HCALrho_
Definition: HCALProperties.h:76