CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FastSimulation/CalorimeterProperties/src/ECALEndcapProperties.cc

Go to the documentation of this file.
00001 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00002 
00003 //This class header
00004 #include "FastSimulation/CalorimeterProperties/interface/ECALEndcapProperties.h"
00005 #include "TMath.h"
00006 #include <iostream>
00007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00008 
00009 ECALEndcapProperties::ECALEndcapProperties(const edm::ParameterSet& fastDet)
00010 {
00011 
00012   using namespace std;
00013 
00014   edm::ParameterSet fastDetEndcap = fastDet.getParameter<edm::ParameterSet>("EndcapCalorimeterProperties");
00015 
00016   lightColl_ =  fastDetEndcap.getParameter<double>("lightColl");  
00017   lightCollUnif_ = fastDetEndcap.getParameter<double>("lightCollUnif");
00018   photoStatistics_ = fastDetEndcap.getParameter<double>("photoStatistics");
00019   thickness_ = fastDetEndcap.getParameter<double>("thickness");
00020   interactionLength_ = fastDetEndcap.getParameter<double>("interactionLength");
00021 
00022   Aeff_ = fastDetEndcap.getParameter<double>("Aeff");
00023   Zeff_ = fastDetEndcap.getParameter<double>("Zeff");
00024   rho_ = fastDetEndcap.getParameter<double>("rho");
00025   radLenIngcm2_ = fastDetEndcap.getParameter<double>("radLenIngcm2");
00026 
00027   // Parameters that might be calculated out of the formulas
00028 
00029   radLenIncm_ = fastDetEndcap.getParameter<double>("radLenIncm");
00030   radLenIncm_ = (radLenIncm_ < 0) ? radLenIngcm2_/rho_ : radLenIncm_;
00031 
00032   criticalEnergy_ = fastDetEndcap.getParameter<double>("criticalEnergy");
00033   criticalEnergy_ = (criticalEnergy_ < 0) ? 2.66E-3*TMath::Power((radLenIngcm2_*Zeff_/Aeff_),1.1) : criticalEnergy_;
00034 
00035   moliereRadius_  = fastDetEndcap.getParameter<double>("moliereRadius");
00036   moliereRadius_  = (moliereRadius_ < 0) ? scaleEnergy_/criticalEnergy_*radLenIncm_ : moliereRadius_;
00037 
00038   Fs_ = fastDetEndcap.getParameter<double>("Fs");
00039   ehat_ = fastDetEndcap.getParameter<double>("ehat");
00040   resE_ = fastDetEndcap.getParameter<double>("resE");
00041 
00042   bHom_ = fastDetEndcap.getParameter<bool>("bHom");
00043 
00044   bool debug = fastDetEndcap.getParameter<bool>("debug");
00045 
00046   if (debug)
00047     LogDebug("ECALEndcapProperties") <<" ========== Endcap ========= " << endl
00048          <<" \t\t isHom ? " << bHom_ << endl
00049          <<" lightColl = " << lightColl_ << endl
00050          <<" lightCollUnif_ = " <<  lightCollUnif_  << endl
00051          <<" photoStatistics_ = " << photoStatistics_ << endl
00052          <<" thickness_ = " << thickness_ << endl
00053          <<" interactionLength_ = " << interactionLength_ << endl
00054          <<" Aeff_ = " << Aeff_ << endl
00055          <<" Zeff_ = " << Zeff_ << endl
00056          <<" rho_ = " << rho_ << endl
00057          <<" radLenIngcm2_ = " << radLenIngcm2_ << endl
00058          <<" radLenIncm_ = " << radLenIncm_ << endl
00059          <<" moliereRadius_ = " << moliereRadius_ << endl
00060          <<" criticalEnergy_ = " << criticalEnergy_ << endl      
00061          <<" scaleEnergy_ = " << scaleEnergy_ << endl
00062          <<" Fs = " << Fs_ << " ehat = " << ehat_ << " resE = " << resE_ << endl;
00063 
00064 
00065 }