CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 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
 Interaction length in cm. More...
 
double moliereRadius () const
 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
 Radiation length in cm. More...
 
double radLenIngcm2 () const
 Radiation length in g/cm^2. More...
 
double rho () const
 Density in g/cm3. More...
 
double spotFraction () const
 Spot fraction wrt ECAL. More...
 
double theAeff () const
 Effective A. More...
 
double theZeff () const
 Effective Z. More...
 
virtual ~HCALProperties ()
 
- 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 ( const edm::ParameterSet fastDet)

Definition at line 10 of file HCALProperties.cc.

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

11 {
12 
13  edm::ParameterSet fastDetHCAL= fastDet.getParameter<edm::ParameterSet>("HadronicCalorimeterProperties");
14  hOPi = fastDetHCAL.getParameter<double>("HCAL_PiOverE");
15  spotFrac= fastDetHCAL.getParameter<double>("HCAL_Sampling");
16  HCALAeff_= fastDetHCAL.getParameter<double>("HCALAeff");
17  HCALZeff_= fastDetHCAL.getParameter<double>("HCALZeff");
18  HCALrho_= fastDetHCAL.getParameter<double>("HCALrho");
19  HCALradiationLengthIncm_= fastDetHCAL.getParameter< double>("HCALradiationLengthIncm");
20  HCALradLenIngcm2_= fastDetHCAL.getParameter<double>("HCALradLenIngcm2");
21  HCALmoliereRadius_= fastDetHCAL.getParameter<double>("HCALmoliereRadius");
22  HCALcriticalEnergy_= fastDetHCAL.getParameter<double>("HCALcriticalEnergy");
23  HCALinteractionLength_= fastDetHCAL.getParameter<double>("HCALinteractionLength");
24  etatow_=fastDetHCAL.getParameter<std::vector<double>>("HCALetatow");
25  hcalDepthLam_=fastDetHCAL.getParameter<std::vector<double>>("HCALDepthLam");
26 
27  // 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:
28  if (etatow_.size() != 42) std::cout << " HCALProperties::eta2ieta - WARNING: here we expect 42 entries instead of " << etatow_.size() << "; is the change intentional?" << std::endl;
29  // splitting of 28-th tower is taken into account (2.65-2.853-3.0)
30  if (hcalDepthLam_.size() != etatow_.size()-1) std::cout << " HCALProperties::eta2ieta - WARNING: the sizes of HCALetatow and HCALDepthLam should differ by 1 unit! HCALDepthLam has size " << hcalDepthLam_.size()<< " and HCALetatow has size " << etatow_.size() << std::endl;
31 
32 
33 }
std::vector< double > etatow_
T getParameter(std::string const &) const
double HCALradiationLengthIncm_
double HCALradLenIngcm2_
double HCALcriticalEnergy_
double HCALinteractionLength_
tuple cout
Definition: gather_cfg.py:121
double HCALmoliereRadius_
std::vector< double > hcalDepthLam_
virtual HCALProperties::~HCALProperties ( )
inlinevirtual

Definition at line 28 of file HCALProperties.h.

28  {
29  }

Member Function Documentation

double HCALProperties::criticalEnergy ( ) const
inlinevirtual

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

Implements CalorimeterProperties.

Definition at line 57 of file HCALProperties.h.

References HCALcriticalEnergy_.

57 { return HCALcriticalEnergy_; }
double HCALcriticalEnergy_
int HCALProperties::eta2ieta ( double  eta) const

Definition at line 50 of file HCALProperties.cc.

References gather_cfg::cout, etatow_, findQualityFiles::size, relval_parameters_module::step, and x.

Referenced by getHcalDepth().

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

Definition at line 35 of file HCALProperties.cc.

References eta2ieta(), and hcalDepthLam_.

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

35  {
36 
37  int ieta = eta2ieta(eta);
38 
39  /*
40  std::cout << " HCALProperties::getHcalDepth for eta = " << eta
41  << " returns lam.thickness = " << hcalDepthLam_[ieta] << std::endl;
42  */
43 
44  return hcalDepthLam_[ieta];
45 
46 }
int eta2ieta(double eta) const
std::vector< double > hcalDepthLam_
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 64 of file HCALProperties.h.

References hOPi.

Referenced by EMShower::compute().

64 {return hOPi;}
double HCALProperties::interactionLength ( ) const
inlinevirtual
double HCALProperties::moliereRadius ( ) const
inlinevirtual

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

Implements CalorimeterProperties.

Definition at line 53 of file HCALProperties.h.

References HCALmoliereRadius_.

53 { return HCALmoliereRadius_; }
double HCALmoliereRadius_
double HCALProperties::radiationLengthIncm ( ) const
inline

Radiation length in cm but static.

Definition at line 47 of file HCALProperties.h.

References HCALradiationLengthIncm_.

Referenced by radLenIncm().

47 { return HCALradiationLengthIncm_; }
double HCALradiationLengthIncm_
double HCALProperties::radLenIncm ( ) const
inlinevirtual

Radiation length in cm.

Implements CalorimeterProperties.

Definition at line 41 of file HCALProperties.h.

References radiationLengthIncm().

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

41 { return radiationLengthIncm(); }
double radiationLengthIncm() const
Radiation length in cm but static.
double HCALProperties::radLenIngcm2 ( ) const
inlinevirtual

Radiation length in g/cm^2.

Implements CalorimeterProperties.

Definition at line 50 of file HCALProperties.h.

References HCALradLenIngcm2_.

50 { return HCALradLenIngcm2_; }
double HCALradLenIngcm2_
double HCALProperties::rho ( ) const
inlinevirtual

Density in g/cm3.

Implements CalorimeterProperties.

Definition at line 38 of file HCALProperties.h.

References HCALrho_.

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

38 { return HCALrho_; }
double HCALProperties::spotFraction ( ) const
inline

Spot fraction wrt ECAL.

Definition at line 67 of file HCALProperties.h.

References spotFrac.

Referenced by EMShower::compute().

67 {return spotFrac;}
double HCALProperties::theAeff ( ) const
inlinevirtual

Effective A.

Implements CalorimeterProperties.

Definition at line 32 of file HCALProperties.h.

References HCALAeff_.

32 { return HCALAeff_; }
double HCALProperties::theZeff ( ) const
inlinevirtual

Effective Z.

Implements CalorimeterProperties.

Definition at line 35 of file HCALProperties.h.

References HCALZeff_.

35 { return HCALZeff_; }

Member Data Documentation

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

Definition at line 86 of file HCALProperties.h.

Referenced by eta2ieta(), and HCALProperties().

double HCALProperties::HCALAeff_
protected

Definition at line 78 of file HCALProperties.h.

Referenced by HCALProperties(), and theAeff().

double HCALProperties::HCALcriticalEnergy_
protected

Definition at line 84 of file HCALProperties.h.

Referenced by criticalEnergy(), and HCALProperties().

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

Definition at line 87 of file HCALProperties.h.

Referenced by getHcalDepth(), and HCALProperties().

double HCALProperties::HCALinteractionLength_
protected

Definition at line 85 of file HCALProperties.h.

Referenced by HCALProperties(), and interactionLength().

double HCALProperties::HCALmoliereRadius_
protected

Definition at line 83 of file HCALProperties.h.

Referenced by HCALProperties(), and moliereRadius().

double HCALProperties::HCALradiationLengthIncm_
protected

Definition at line 81 of file HCALProperties.h.

Referenced by HCALProperties(), and radiationLengthIncm().

double HCALProperties::HCALradLenIngcm2_
protected

Definition at line 82 of file HCALProperties.h.

Referenced by HCALProperties(), and radLenIngcm2().

double HCALProperties::HCALrho_
protected

Definition at line 80 of file HCALProperties.h.

Referenced by HCALProperties(), and rho().

double HCALProperties::HCALZeff_
protected

Definition at line 79 of file HCALProperties.h.

Referenced by HCALProperties(), and theZeff().

double HCALProperties::hOPi
private

Definition at line 74 of file HCALProperties.h.

Referenced by HCALProperties(), and hOverPi().

double HCALProperties::spotFrac
private

Definition at line 75 of file HCALProperties.h.

Referenced by HCALProperties(), and spotFraction().