Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:36

0001 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0002 
0003 //This class header
0004 #include "FastSimulation/CalorimeterProperties/interface/ECALEndcapProperties.h"
0005 #include "TMath.h"
0006 #include <iostream>
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 
0009 ECALEndcapProperties::ECALEndcapProperties(const edm::ParameterSet& fastDet) {
0010   edm::ParameterSet fastDetEndcap = fastDet.getParameter<edm::ParameterSet>("EndcapCalorimeterProperties");
0011 
0012   lightColl_ = fastDetEndcap.getParameter<double>("lightColl");
0013   lightCollUnif_ = fastDetEndcap.getParameter<double>("lightCollUnif");
0014   photoStatistics_ = fastDetEndcap.getParameter<double>("photoStatistics");
0015   thickness_ = fastDetEndcap.getParameter<double>("thickness");
0016   interactionLength_ = fastDetEndcap.getParameter<double>("interactionLength");
0017 
0018   Aeff_ = fastDetEndcap.getParameter<double>("Aeff");
0019   Zeff_ = fastDetEndcap.getParameter<double>("Zeff");
0020   rho_ = fastDetEndcap.getParameter<double>("rho");
0021   radLenIngcm2_ = fastDetEndcap.getParameter<double>("radLenIngcm2");
0022 
0023   // Parameters that might be calculated out of the formulas
0024 
0025   radLenIncm_ = fastDetEndcap.getParameter<double>("radLenIncm");
0026   radLenIncm_ = (radLenIncm_ < 0) ? radLenIngcm2_ / rho_ : radLenIncm_;
0027 
0028   criticalEnergy_ = fastDetEndcap.getParameter<double>("criticalEnergy");
0029   criticalEnergy_ =
0030       (criticalEnergy_ < 0) ? 2.66E-3 * TMath::Power((radLenIngcm2_ * Zeff_ / Aeff_), 1.1) : criticalEnergy_;
0031 
0032   moliereRadius_ = fastDetEndcap.getParameter<double>("moliereRadius");
0033   moliereRadius_ = (moliereRadius_ < 0) ? scaleEnergy_ / criticalEnergy_ * radLenIncm_ : moliereRadius_;
0034 
0035   Fs_ = fastDetEndcap.getParameter<double>("Fs");
0036   ehat_ = fastDetEndcap.getParameter<double>("ehat");
0037   resE_ = fastDetEndcap.getParameter<double>("resE");
0038 
0039   da_ = fastDetEndcap.getParameter<double>("da");
0040   dp_ = fastDetEndcap.getParameter<double>("dp");
0041 
0042   bHom_ = fastDetEndcap.getParameter<bool>("bHom");
0043 
0044   bool debug = fastDetEndcap.getParameter<bool>("debug");
0045 
0046   if (debug)
0047     edm::LogInfo("ECALProperties") << " ========== Endcap ========= \n"
0048                                    << " isHom ? " << bHom_ << "\n"
0049                                    << " da = " << da_ << " dp = " << dp_ << " lightColl = " << lightColl_ << "\n"
0050                                    << " lightCollUnif_ = " << lightCollUnif_ << "\n"
0051                                    << " photoStatistics_ = " << photoStatistics_ << " photons/GeV\n"
0052                                    << " thickness_ = " << thickness_ << " in cm \n"
0053                                    << " interactionLength_ = " << interactionLength_ << " cm \n"
0054                                    << " Aeff_ = " << Aeff_ << "\n"
0055                                    << " Zeff_ = " << Zeff_ << "\n"
0056                                    << " rho_ = " << rho_ << " g/cm3\n"
0057                                    << " radLenIngcm2_ = " << radLenIngcm2_ << " g*cm2\n"
0058                                    << " radLenIncm_ = " << radLenIncm_ << " cm\n"
0059                                    << " moliereRadius_ = " << moliereRadius_ << " cm\n"
0060                                    << " criticalEnergy_ = " << criticalEnergy_ << " GeV\n"
0061                                    << " scaleEnergy_ = " << scaleEnergy_ << " GeV\n"
0062                                    << " Fs = " << Fs_ << " ehat = " << ehat_ << " resE = " << resE_ << "\n";
0063 }