#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 19 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 50 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 41 of file CastorSimParameters.cc.
References fCtoGeV(), and theSamplingFactor.
Referenced by CastorAmplifier::amplify().
{ // calculate factor (PMT gain) using sampling factor value & available electron gain //std::cout << " sampling factor = " << theSamplingFactor << " fCtoGeV = " << fCtoGeV(detId) << " and photoelectronsToAnalog = " << theSamplingFactor/fCtoGeV(detId) << std::endl; return theSamplingFactor/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().