#include <SimCalorimetry/HcalSimAlgos/interface/HFSimParameters.h>
Public Member Functions | |
double | fCtoGeV (const DetId &detId) const |
HFSimParameters (const edm::ParameterSet &p) | |
HFSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, bool syncPhase) | |
virtual double | photoelectronsToAnalog (const DetId &detId) const |
void | setDbService (const HcalDbService *service) |
virtual | ~HFSimParameters () |
Private Attributes | |
const HcalDbService * | theDbService |
double | theSamplingFactor |
Definition at line 8 of file HFSimParameters.h.
HFSimParameters::HFSimParameters | ( | double | simHitToPhotoelectrons, | |
double | photoelectronsToAnalog, | |||
double | samplingFactor, | |||
double | timePhase, | |||
bool | syncPhase | |||
) |
Definition at line 11 of file HFSimParameters.cc.
00013 : CaloSimParameters(simHitToPhotoelectrons, photoelectronsToAnalog, samplingFactor, timePhase, 00014 6, 4, false, syncPhase), 00015 theDbService(0), 00016 theSamplingFactor( samplingFactor ) 00017 { 00018 }
HFSimParameters::HFSimParameters | ( | const edm::ParameterSet & | p | ) |
Definition at line 20 of file HFSimParameters.cc.
00021 : CaloSimParameters(p), 00022 theDbService(0), 00023 theSamplingFactor( p.getParameter<double>("samplingFactor") ) 00024 { 00025 }
virtual HFSimParameters::~HFSimParameters | ( | ) | [inline, virtual] |
double HFSimParameters::fCtoGeV | ( | const DetId & | detId | ) | const |
{
Definition at line 34 of file HFSimParameters.cc.
References HcalDbService::getGain(), HcalDbService::getGainWidth(), HcalGain::getValue(), HLT_VtxMuL3::result, and theDbService.
Referenced by photoelectronsToAnalog().
00035 { 00036 assert(theDbService != 0); 00037 HcalGenericDetId hcalGenDetId(detId); 00038 const HcalGain* gains = theDbService->getGain(hcalGenDetId); 00039 const HcalGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId); 00040 if (!gains || !gwidths ) 00041 { 00042 edm::LogError("HcalAmplifier") << "Could not fetch HCAL conditions for channel " << hcalGenDetId; 00043 } 00044 // only one gain will be recorded per channel, so just use capID 0 for now 00045 00046 double result = gains->getValue(0); 00047 // if(doNoise_) 00049 // result += RandGaussQ::shoot(0., gwidths->getValue(0)); 00050 // } 00051 return result; 00052 }
double HFSimParameters::photoelectronsToAnalog | ( | const DetId & | detId | ) | const [virtual] |
Reimplemented from CaloSimParameters.
Definition at line 28 of file HFSimParameters.cc.
References fCtoGeV(), CaloSimParameters::simHitToPhotoelectrons(), and theSamplingFactor.
00029 { 00030 // pe/fC = pe/GeV * GeV/fC = (0.24 pe/GeV * 6 for photomult * 0.2146GeV/fC) 00031 return 1./(theSamplingFactor * simHitToPhotoelectrons(detId) * fCtoGeV(detId)); 00032 }
void HFSimParameters::setDbService | ( | const HcalDbService * | service | ) | [inline] |
Definition at line 17 of file HFSimParameters.h.
References theDbService.
Referenced by HcalSimParameterMap::setDbService().
00017 {theDbService = service;}
const HcalDbService* HFSimParameters::theDbService [private] |
double HFSimParameters::theSamplingFactor [private] |