CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

HCALProperties Class Reference

#include <HCALProperties.h>

Inheritance diagram for HCALProperties:
CalorimeterProperties HCALBarrelProperties HCALEndcapProperties HCALForwardProperties

List of all members.

Public Member Functions

double criticalEnergy () const
 Critical energy in GeV (2.66E-3*(x0*Z/A)^1.1)
int eta2ieta (double eta) const
double getHcalDepth (double) const
 HCALProperties (const edm::ParameterSet &fastDet)
double hOverPi () const
double interactionLength () const
 Interaction length in cm.
double moliereRadius () const
 Moliere Radius in cm (=7 A/Z in g/cm^2)
double radLenIncm () const
 Radiation length in cm.
double radLenIngcm2 () const
 Radiation length in g/cm^2.
double rho () const
 Density in g/cm3.
double spotFraction () const
 Spot fraction wrt ECAL.
double theAeff () const
 Effective A.
double theZeff () const
 Effective Z.
virtual ~HCALProperties ()

Static Public Member Functions

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

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.

                                                             : CalorimeterProperties()
{
  hOPi = fastDet.getParameter<double>("HCAL_PiOverE");
  spotFrac= fastDet.getParameter<double>("HCAL_Sampling");

  // splitting of  28-th tower is taken into account (2.65-2.853-3.0)
  double etatow_ [42] = {
    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
  };

  double hcalDepthLam_ [41] = { 
    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  };

  for (int i = 0; i < 42; i++) { etatow[i] = etatow_[i];}
  for (int i = 0; i < 41; i++) { hcalDepthLam[i] = hcalDepthLam_[i];}

}
virtual HCALProperties::~HCALProperties ( ) [inline, virtual]

Definition at line 27 of file HCALProperties.h.

                            {
  }

Member Function Documentation

double HCALProperties::criticalEnergy ( ) const [inline, virtual]

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

Implements CalorimeterProperties.

Definition at line 56 of file HCALProperties.h.

{ 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, ExpressReco_HICollisions_FallBack::step, and ExpressReco_HICollisions_FallBack::x.

Referenced by getHcalDepth().

                                             {
  // binary search in the array of towers eta edges
  int size = 42;

  double x = fabs(eta);
  int curr = size / 2;
  int step = size / 4;
  int iter;
  int prevdir = 0; 
  int actudir = 0; 

  for (iter = 0; iter < size ; iter++) {

    if( curr >= size || curr < 1 )
      std::cout <<  " HCALProperties::eta2ieta - wrong current index = "
                << curr << " !!!" << std::endl;

    if ((x <= etatow[curr]) && (x > etatow[curr-1])) break;
    prevdir = actudir;
    if(x > etatow[curr]) {actudir =  1;}
    else                 {actudir = -1;}
    if(prevdir * actudir < 0) { if(step > 1) step /= 2;}
    curr += actudir * step;
    if(curr > size) curr = size;
    else { if(curr < 1) {curr = 1;}}

    /*
    std::cout << " HCALProperties::eta2ieta  end of iter." << iter 
              << " curr, etatow[curr-1], etatow[curr] = "
              << curr << " " << etatow[curr-1] << " " << etatow[curr] << std::endl;
    */
    
  }

  /*
  std::cout << " HCALProperties::eta2ieta  for input x = " << x 
            << "  found index = " << curr-1
            << std::endl;
  */
  
  return curr-1;
}
double HCALProperties::getHcalDepth ( double  eta) const

Definition at line 27 of file HCALProperties.cc.

References eta2ieta(), and hcalDepthLam.

                                                   {

  int  ieta = eta2ieta(eta); 

  /* 
  std::cout << " HCALProperties::getHcalDepth for eta = " << eta 
            << "  returns lam.thickness = " << hcalDepthLam[ieta] << std::endl;
  */

  return  hcalDepthLam[ieta];

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

{return hOPi;}
double HCALProperties::interactionLength ( ) const [inline, virtual]
double HCALProperties::moliereRadius ( ) const [inline, virtual]

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

Implements CalorimeterProperties.

Definition at line 52 of file HCALProperties.h.

{ return 1.712; }
static double HCALProperties::radiationLengthIncm ( ) [inline, static]

Radiation length in cm but static.

Reimplemented in HCALForwardProperties.

Definition at line 46 of file HCALProperties.h.

Referenced by radLenIncm().

{ return 1.43; }
double HCALProperties::radLenIncm ( ) const [inline, virtual]

Radiation length in cm.

Implements CalorimeterProperties.

Reimplemented in HCALForwardProperties.

Definition at line 40 of file HCALProperties.h.

References radiationLengthIncm().

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

{ return radiationLengthIncm(); }
double HCALProperties::radLenIngcm2 ( ) const [inline, virtual]

Radiation length in g/cm^2.

Implements CalorimeterProperties.

Reimplemented in HCALForwardProperties.

Definition at line 49 of file HCALProperties.h.

{ return 12.86; }
double HCALProperties::rho ( ) const [inline, virtual]

Density in g/cm3.

Implements CalorimeterProperties.

Definition at line 37 of file HCALProperties.h.

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

{return spotFrac;}
double HCALProperties::theAeff ( ) const [inline, virtual]

Effective A.

Implements CalorimeterProperties.

Definition at line 31 of file HCALProperties.h.

{ return 63.546; }
double HCALProperties::theZeff ( ) const [inline, virtual]

Effective Z.

Implements CalorimeterProperties.

Definition at line 34 of file HCALProperties.h.

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