#include <CastorSimParameters.h>
Public Member Functions | |
CastorSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, bool syncPhase) | |
CastorSimParameters (const edm::ParameterSet &p) | |
double | fCtoGeV (const DetId &detId) const |
virtual double | photoelectronsToAnalog (const DetId &detId) const |
void | setDbService (const CastorDbService *service) |
virtual | ~CastorSimParameters () |
Private Attributes | |
const CastorDbService * | theDbService |
double | theSamplingFactor |
Definition at line 8 of file CastorSimParameters.h.
CastorSimParameters::CastorSimParameters | ( | double | simHitToPhotoelectrons, |
double | photoelectronsToAnalog, | ||
double | samplingFactor, | ||
double | timePhase, | ||
bool | syncPhase | ||
) |
Definition at line 11 of file CastorSimParameters.cc.
: CaloSimParameters(simHitToPhotoelectrons, photoelectronsToAnalog, samplingFactor, timePhase, 6, 4, false, syncPhase), theDbService(0), theSamplingFactor( samplingFactor ) { }
CastorSimParameters::CastorSimParameters | ( | const edm::ParameterSet & | p | ) |
Definition at line 33 of file CastorSimParameters.cc.
: CaloSimParameters(p), theDbService(0), theSamplingFactor( p.getParameter<double>("samplingFactor") ) { }
virtual CastorSimParameters::~CastorSimParameters | ( | ) | [inline, virtual] |
Definition at line 24 of file CastorSimParameters.h.
{}
double CastorSimParameters::fCtoGeV | ( | const DetId & | detId | ) | const |
{
Definition at line 71 of file CastorSimParameters.cc.
References CastorDbService::getGain(), CastorDbService::getGainWidth(), CastorGain::getValue(), query::result, and theDbService.
Referenced by photoelectronsToAnalog().
{ assert(theDbService != 0); HcalGenericDetId hcalGenDetId(detId); const CastorGain* gains = theDbService->getGain(hcalGenDetId); const CastorGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId); if (!gains || !gwidths ) { edm::LogError("CastorAmplifier") << "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 CastorSimParameters::photoelectronsToAnalog | ( | const DetId & | detId | ) | const [virtual] |
Reimplemented from CaloSimParameters.
Definition at line 63 of file CastorSimParameters.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 CastorSimParameters::setDbService | ( | const CastorDbService * | service | ) | [inline] |
Definition at line 26 of file CastorSimParameters.h.
References theDbService.
Referenced by CastorSimParameterMap::setDbService().
{theDbService = service;}
const CastorDbService* CastorSimParameters::theDbService [private] |
the ratio of actual incident energy to deposited energy in the SimHit
Definition at line 40 of file CastorSimParameters.h.
Referenced by fCtoGeV(), and setDbService().
double CastorSimParameters::theSamplingFactor [private] |
Definition at line 41 of file CastorSimParameters.h.
Referenced by photoelectronsToAnalog().