#include <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.
: CaloSimParameters(simHitToPhotoelectrons, photoelectronsToAnalog, samplingFactor, timePhase, 6, 4, false, syncPhase), theDbService(0), theSamplingFactor( samplingFactor ) { }
HFSimParameters::HFSimParameters | ( | const edm::ParameterSet & | p | ) |
Definition at line 20 of file HFSimParameters.cc.
: CaloSimParameters(p), theDbService(0), theSamplingFactor( p.getParameter<double>("samplingFactor") ) { }
virtual HFSimParameters::~HFSimParameters | ( | ) | [inline, virtual] |
Definition at line 15 of file HFSimParameters.h.
{}
double HFSimParameters::fCtoGeV | ( | const DetId & | detId | ) | const |
{
Definition at line 34 of file HFSimParameters.cc.
References HcalDbService::getGain(), HcalDbService::getGainWidth(), HcalGain::getValue(), query::result, and theDbService.
Referenced by photoelectronsToAnalog().
{ assert(theDbService != 0); HcalGenericDetId hcalGenDetId(detId); const HcalGain* gains = theDbService->getGain(hcalGenDetId); const HcalGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId); if (!gains || !gwidths ) { edm::LogError("HcalAmplifier") << "Could not fetch HCAL conditions for channel " << hcalGenDetId; } // only one gain will be recorded per channel, so just use capID 0 for now double result = gains->getValue(0); // if(doNoise_) // result += CLHEP::RandGaussQ::shoot(0., gwidths->getValue(0)); // } return result; }
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.
{ // pe/fC = pe/GeV * GeV/fC = (0.24 pe/GeV * 6 for photomult * 0.2146GeV/fC) return 1./(theSamplingFactor * simHitToPhotoelectrons(detId) * fCtoGeV(detId)); }
void HFSimParameters::setDbService | ( | const HcalDbService * | service | ) | [inline] |
Definition at line 17 of file HFSimParameters.h.
References theDbService.
Referenced by HcalSimParameterMap::setDbService().
{theDbService = service;}
const HcalDbService* HFSimParameters::theDbService [private] |
Definition at line 24 of file HFSimParameters.h.
Referenced by fCtoGeV(), and setDbService().
double HFSimParameters::theSamplingFactor [private] |
Definition at line 25 of file HFSimParameters.h.
Referenced by photoelectronsToAnalog().