CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | 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 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 ()
 

Static Public Member Functions

static double radiationLengthIncm ()
 Radiation length in cm but static. More...
 

Private Attributes

double etatow [42]
 
double hcalDepthLam [41]
 
double hOPi
 
double spotFrac
 

Detailed Description

Definition at line 20 of file HCALProperties.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file HCALProperties.cc.

References etatow, edm::ParameterSet::getParameter(), hcalDepthLam, hOPi, i, and spotFrac.

10 {
11  hOPi = fastDet.getParameter<double>("HCAL_PiOverE");
12  spotFrac= fastDet.getParameter<double>("HCAL_Sampling");
13 
14  // splitting of 28-th tower is taken into account (2.65-2.853-3.0)
15  double etatow_ [42] = {
16  0.000, 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.870, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853, 3.000, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191
17  };
18 
19  double hcalDepthLam_ [41] = {
20  8.930, 9.001, 9.132, 8.912, 8.104, 8.571, 8.852, 9.230, 9.732, 10.29, 10.95, 11.68, 12.49, 12.57, 12.63, 6.449, 5.806, 8.973, 8.934, 8.823, 8.727, 8.641, 8.565, 8.496, 8.436, 8.383, 8.346, 8.307, 8.298, 8.281, 9.442, 9.437, 9.432, 9.429, 9.432, 9.433, 9.430, 9.437, 9.442, 9.446, 9.435 };
21 
22  for (int i = 0; i < 42; i++) { etatow[i] = etatow_[i];}
23  for (int i = 0; i < 41; i++) { hcalDepthLam[i] = hcalDepthLam_[i];}
24 
25 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
double hcalDepthLam[41]
double etatow[42]
virtual HCALProperties::~HCALProperties ( )
inlinevirtual

Definition at line 27 of file HCALProperties.h.

27  {
28  }

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 56 of file HCALProperties.h.

56 { return 18.63E-3; }
int HCALProperties::eta2ieta ( double  eta) const

Definition at line 42 of file HCALProperties.cc.

References gather_cfg::cout, etatow, findQualityFiles::size, launcher::step, and vdt::x.

Referenced by getHcalDepth().

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

Definition at line 27 of file HCALProperties.cc.

References eta2ieta(), and hcalDepthLam.

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

27  {
28 
29  int ieta = eta2ieta(eta);
30 
31  /*
32  std::cout << " HCALProperties::getHcalDepth for eta = " << eta
33  << " returns lam.thickness = " << hcalDepthLam[ieta] << std::endl;
34  */
35 
36  return hcalDepthLam[ieta];
37 
38 }
int eta2ieta(double eta) const
double hcalDepthLam[41]
T eta() const
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 63 of file HCALProperties.h.

References hOPi.

Referenced by EMShower::compute().

63 {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 52 of file HCALProperties.h.

52 { return 1.712; }
static double HCALProperties::radiationLengthIncm ( )
inlinestatic

Radiation length in cm but static.

Definition at line 46 of file HCALProperties.h.

Referenced by radLenIncm().

46 { return 1.43; }
double HCALProperties::radLenIncm ( ) const
inlinevirtual

Radiation length in cm.

Implements CalorimeterProperties.

Definition at line 40 of file HCALProperties.h.

References radiationLengthIncm().

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

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

Radiation length in g/cm^2.

Implements CalorimeterProperties.

Definition at line 49 of file HCALProperties.h.

49 { return 12.86; }
double HCALProperties::rho ( ) const
inlinevirtual

Density in g/cm3.

Implements CalorimeterProperties.

Definition at line 37 of file HCALProperties.h.

37 { return 8.960; }
double HCALProperties::spotFraction ( ) const
inline

Spot fraction wrt ECAL.

Definition at line 66 of file HCALProperties.h.

References spotFrac.

Referenced by EMShower::compute().

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

Effective A.

Implements CalorimeterProperties.

Definition at line 31 of file HCALProperties.h.

31 { return 63.546; }
double HCALProperties::theZeff ( ) const
inlinevirtual

Effective Z.

Implements CalorimeterProperties.

Definition at line 34 of file HCALProperties.h.

34 { return 29.; }

Member Data Documentation

double HCALProperties::etatow[42]
private

Definition at line 77 of file HCALProperties.h.

Referenced by eta2ieta(), and HCALProperties().

double HCALProperties::hcalDepthLam[41]
private

Definition at line 78 of file HCALProperties.h.

Referenced by getHcalDepth(), and HCALProperties().

double HCALProperties::hOPi
private

Definition at line 73 of file HCALProperties.h.

Referenced by HCALProperties(), and hOverPi().

double HCALProperties::spotFrac
private

Definition at line 74 of file HCALProperties.h.

Referenced by HCALProperties(), and spotFraction().