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