CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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   edm::ParameterSet fastDetEndcap = fastDet.getParameter<edm::ParameterSet>("EndcapCalorimeterProperties");
00013 
00014   lightColl_ =  fastDetEndcap.getParameter<double>("lightColl");  
00015   lightCollUnif_ = fastDetEndcap.getParameter<double>("lightCollUnif");
00016   photoStatistics_ = fastDetEndcap.getParameter<double>("photoStatistics");
00017   thickness_ = fastDetEndcap.getParameter<double>("thickness");
00018   interactionLength_ = fastDetEndcap.getParameter<double>("interactionLength");
00019 
00020   Aeff_ = fastDetEndcap.getParameter<double>("Aeff");
00021   Zeff_ = fastDetEndcap.getParameter<double>("Zeff");
00022   rho_ = fastDetEndcap.getParameter<double>("rho");
00023   radLenIngcm2_ = fastDetEndcap.getParameter<double>("radLenIngcm2");
00024 
00025   // Parameters that might be calculated out of the formulas
00026 
00027   radLenIncm_ = fastDetEndcap.getParameter<double>("radLenIncm");
00028   radLenIncm_ = (radLenIncm_ < 0) ? radLenIngcm2_/rho_ : radLenIncm_;
00029 
00030   criticalEnergy_ = fastDetEndcap.getParameter<double>("criticalEnergy");
00031   criticalEnergy_ = (criticalEnergy_ < 0) ? 2.66E-3*TMath::Power((radLenIngcm2_*Zeff_/Aeff_),1.1) : criticalEnergy_;
00032 
00033   moliereRadius_  = fastDetEndcap.getParameter<double>("moliereRadius");
00034   moliereRadius_  = (moliereRadius_ < 0) ? scaleEnergy_/criticalEnergy_*radLenIncm_ : moliereRadius_;
00035 
00036   Fs_ = fastDetEndcap.getParameter<double>("Fs");
00037   ehat_ = fastDetEndcap.getParameter<double>("ehat");
00038   resE_ = fastDetEndcap.getParameter<double>("resE");
00039 
00040   da_ = fastDetEndcap.getParameter<double>("da");
00041   dp_ = fastDetEndcap.getParameter<double>("dp");
00042 
00043   bHom_ = fastDetEndcap.getParameter<bool>("bHom");
00044 
00045   bool debug = fastDetEndcap.getParameter<bool>("debug");
00046 
00047   if (debug)
00048     edm::LogInfo("ECALProperties") <<" ========== Endcap ========= \n"
00049                                    <<" isHom ? " << bHom_ << "\n"
00050                                    <<" da = " << da_ << " dp = " << dp_ 
00051                                    <<" lightColl = " << lightColl_ << "\n"
00052                                    <<" lightCollUnif_ = " <<  lightCollUnif_  << "\n"
00053                                    <<" photoStatistics_ = " << photoStatistics_ << " photons/GeV\n"
00054                                    <<" thickness_ = " << thickness_ << " in cm \n"
00055                                    <<" interactionLength_ = " << interactionLength_ << " cm \n"
00056                                    <<" Aeff_ = " << Aeff_ << "\n"
00057                                    <<" Zeff_ = " << Zeff_ << "\n"
00058                                    <<" rho_ = " << rho_ << " g/cm3\n"
00059                                    <<" radLenIngcm2_ = " << radLenIngcm2_ << " g*cm2\n"
00060                                    <<" radLenIncm_ = " << radLenIncm_ << " cm\n"
00061                                    <<" moliereRadius_ = " << moliereRadius_ << " cm\n"
00062                                    <<" criticalEnergy_ = " << criticalEnergy_ << " GeV\n"        
00063                                    <<" scaleEnergy_ = " << scaleEnergy_ << " GeV\n"
00064                                    <<" Fs = " << Fs_ << " ehat = " << ehat_ << " resE = " << resE_ << "\n";
00065 
00066 }