#include <SimCalorimetry/HcalSimAlgos/interface/HcalSimParameters.h>
Public Member Functions | |
double | fCtoGeV (const DetId &detId) const |
HcalSimParameters (const edm::ParameterSet &p) | |
HcalSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase, int firstRing, const std::vector< double > &samplingFactors) | |
virtual double | photoelectronsToAnalog (const DetId &detId) const |
virtual double | samplingFactor (const DetId &detId) const |
the ratio of actual incident energy to deposited energy in the SimHit | |
void | setDbService (const HcalDbService *service) |
virtual double | simHitToPhotoelectrons (const DetId &detId) const |
virtual | ~HcalSimParameters () |
Private Attributes | |
const HcalDbService * | theDbService |
int | theFirstRing |
std::vector< double > | theSamplingFactors |
Definition at line 8 of file HcalSimParameters.h.
HcalSimParameters::HcalSimParameters | ( | double | simHitToPhotoelectrons, | |
double | photoelectronsToAnalog, | |||
double | samplingFactor, | |||
double | timePhase, | |||
int | readoutFrameSize, | |||
int | binOfMaximum, | |||
bool | doPhotostatistics, | |||
bool | syncPhase, | |||
int | firstRing, | |||
const std::vector< double > & | samplingFactors | |||
) |
Definition at line 11 of file HcalSimParameters.cc.
00016 : CaloSimParameters(simHitToPhotoelectrons, photoelectronsToAnalog, samplingFactor, timePhase, 00017 readoutFrameSize, binOfMaximum, doPhotostatistics, syncPhase), 00018 theDbService(0), 00019 theFirstRing(firstRing), 00020 theSamplingFactors(samplingFactors) 00021 { 00022 }
HcalSimParameters::HcalSimParameters | ( | const edm::ParameterSet & | p | ) |
Definition at line 24 of file HcalSimParameters.cc.
00025 : CaloSimParameters(p), 00026 theDbService(0), 00027 theFirstRing( p.getParameter<int>("firstRing") ), 00028 theSamplingFactors( p.getParameter<std::vector<double> >("samplingFactors") ) 00029 { 00030 }
virtual HcalSimParameters::~HcalSimParameters | ( | ) | [inline, virtual] |
double HcalSimParameters::fCtoGeV | ( | const DetId & | detId | ) | const |
{
Definition at line 46 of file HcalSimParameters.cc.
References HcalDbService::getGain(), HcalDbService::getGainWidth(), HcalGain::getValue(), HLT_VtxMuL3::result, and theDbService.
Referenced by simHitToPhotoelectrons().
00047 { 00048 assert(theDbService != 0); 00049 HcalGenericDetId hcalGenDetId(detId); 00050 const HcalGain* gains = theDbService->getGain(hcalGenDetId); 00051 const HcalGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId); 00052 if (!gains || !gwidths ) 00053 { 00054 edm::LogError("HcalAmplifier") << "Could not fetch HCAL conditions for channel " << hcalGenDetId; 00055 } 00056 // only one gain will be recorded per channel, so just use capID 0 for now 00057 00058 double result = gains->getValue(0); 00059 // if(doNoise_) 00061 // result += RandGaussQ::shoot(0., gwidths->getValue(0)); 00062 // } 00063 return result; 00064 }
virtual double HcalSimParameters::photoelectronsToAnalog | ( | const DetId & | detId | ) | const [inline, virtual] |
Reimplemented from CaloSimParameters.
Definition at line 23 of file HcalSimParameters.h.
References CaloSimParameters::photoelectronsToAnalog().
00023 { 00024 return CaloSimParameters::photoelectronsToAnalog(); 00025 }
double HcalSimParameters::samplingFactor | ( | const DetId & | detId | ) | const [virtual] |
the ratio of actual incident energy to deposited energy in the SimHit
Definition at line 66 of file HcalSimParameters.cc.
References HcalDetId::ietaAbs(), theFirstRing, and theSamplingFactors.
Referenced by simHitToPhotoelectrons().
00067 { 00068 HcalDetId hcalDetId(detId); 00069 return theSamplingFactors.at(hcalDetId.ietaAbs()-theFirstRing); 00070 }
void HcalSimParameters::setDbService | ( | const HcalDbService * | service | ) | [inline] |
Definition at line 20 of file HcalSimParameters.h.
References theDbService.
Referenced by HcalSimParameterMap::setDbService().
00020 {theDbService = service;}
double HcalSimParameters::simHitToPhotoelectrons | ( | const DetId & | detId | ) | const [virtual] |
Reimplemented from CaloSimParameters.
Definition at line 32 of file HcalSimParameters.cc.
References fCtoGeV(), HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenZDC, CaloSimParameters::photoelectronsToAnalog(), HLT_VtxMuL3::result, samplingFactor(), and CaloSimParameters::simHitToPhotoelectrons().
00033 { 00034 // the gain is in units of GeV/fC. We want a constant with pe/dGeV 00035 // pe/dGeV = (GeV/dGeV) / (GeV/fC) / (fC/pe) 00036 double result = CaloSimParameters::simHitToPhotoelectrons(detId); 00037 if(HcalGenericDetId(detId).genericSubdet() != HcalGenericDetId::HcalGenForward 00038 || HcalGenericDetId(detId).genericSubdet() != HcalGenericDetId::HcalGenZDC) 00039 { 00040 result = samplingFactor(detId) / fCtoGeV(detId) / photoelectronsToAnalog(detId); 00041 } 00042 return result; 00043 }
const HcalDbService* HcalSimParameters::theDbService [private] |
int HcalSimParameters::theFirstRing [private] |
std::vector<double> HcalSimParameters::theSamplingFactors [private] |