CMS 3D CMS Logo

Public Member Functions | Protected Attributes | 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 radiationLengthIncm () const
 Radiation length in cm but static.
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 ()

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.

                                                             : CalorimeterProperties()
{

    edm::ParameterSet fastDetHCAL= fastDet.getParameter<edm::ParameterSet>("HadronicCalorimeterProperties");
  hOPi = fastDetHCAL.getParameter<double>("HCAL_PiOverE");
  spotFrac= fastDetHCAL.getParameter<double>("HCAL_Sampling");
  HCALAeff_= fastDetHCAL.getParameter<double>("HCALAeff");
  HCALZeff_= fastDetHCAL.getParameter<double>("HCALZeff");
  HCALrho_= fastDetHCAL.getParameter<double>("HCALrho");
  HCALradiationLengthIncm_= fastDetHCAL.getParameter< double>("HCALradiationLengthIncm");
  HCALradLenIngcm2_= fastDetHCAL.getParameter<double>("HCALradLenIngcm2");
  HCALmoliereRadius_= fastDetHCAL.getParameter<double>("HCALmoliereRadius");
  HCALcriticalEnergy_= fastDetHCAL.getParameter<double>("HCALcriticalEnergy");
  HCALinteractionLength_= fastDetHCAL.getParameter<double>("HCALinteractionLength");
  etatow_=fastDetHCAL.getParameter<std::vector<double>>("HCALetatow");
  hcalDepthLam_=fastDetHCAL.getParameter<std::vector<double>>("HCALDepthLam");

  // 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:
  if (etatow_.size() != 42) std::cout << " HCALProperties::eta2ieta - WARNING: here we expect 42 entries instead of " << etatow_.size() << "; is the change intentional?" << std::endl;
  // splitting of  28-th tower is taken into account (2.65-2.853-3.0)
  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;
  

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

Definition at line 28 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 57 of file HCALProperties.h.

References HCALcriticalEnergy_.

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

                                             {
  // binary search in the array of towers eta edges
  int size = etatow_.size();

  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 35 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 64 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 53 of file HCALProperties.h.

References HCALmoliereRadius_.

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

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

Radiation length in cm.

Implements CalorimeterProperties.

Reimplemented in HCALForwardProperties.

Definition at line 41 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 50 of file HCALProperties.h.

References HCALradLenIngcm2_.

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

Density in g/cm3.

Implements CalorimeterProperties.

Definition at line 38 of file HCALProperties.h.

References HCALrho_.

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

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

Effective A.

Implements CalorimeterProperties.

Definition at line 32 of file HCALProperties.h.

References HCALAeff_.

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

Effective Z.

Implements CalorimeterProperties.

Definition at line 35 of file HCALProperties.h.

References HCALZeff_.

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

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

Definition at line 85 of file HCALProperties.h.

Referenced by HCALProperties(), and interactionLength().

Definition at line 83 of file HCALProperties.h.

Referenced by HCALProperties(), and moliereRadius().

Definition at line 81 of file HCALProperties.h.

Referenced by HCALProperties(), and radiationLengthIncm().

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