#include <SimCalorimetry/CastorSim/src/CastorSimParameters.h>
Public Member Functions | |
CastorSimParameters (const edm::ParameterSet &p) | |
CastorSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, bool syncPhase) | |
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 |
the ratio of actual incident energy to deposited energy in the SimHit | |
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.
00012 : CaloSimParameters(simHitToPhotoelectrons, photoelectronsToAnalog, samplingFactor, timePhase, 6, 4, false, syncPhase), 00013 theDbService(0), 00014 theSamplingFactor( samplingFactor ) 00015 { 00016 }
CastorSimParameters::CastorSimParameters | ( | const edm::ParameterSet & | p | ) |
Definition at line 33 of file CastorSimParameters.cc.
00034 : CaloSimParameters(p), 00035 theDbService(0), 00036 theSamplingFactor( p.getParameter<double>("samplingFactor") ) 00037 { 00038 }
virtual CastorSimParameters::~CastorSimParameters | ( | ) | [inline, virtual] |
double CastorSimParameters::fCtoGeV | ( | const DetId & | detId | ) | const |
{
Definition at line 71 of file CastorSimParameters.cc.
References CastorDbService::getGain(), CastorDbService::getGainWidth(), CastorGain::getValue(), HLT_VtxMuL3::result, and theDbService.
Referenced by photoelectronsToAnalog().
00072 { 00073 assert(theDbService != 0); 00074 HcalGenericDetId hcalGenDetId(detId); 00075 const CastorGain* gains = theDbService->getGain(hcalGenDetId); 00076 const CastorGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId); 00077 if (!gains || !gwidths ) 00078 { 00079 edm::LogError("CastorAmplifier") << "Could not fetch HCAL conditions for channel " << hcalGenDetId; 00080 } 00081 // only one gain will be recorded per channel, so just use capID 0 for now 00082 00083 double result = gains->getValue(0); 00084 // if(doNoise_) 00086 // result += RandGaussQ::shoot(0., gwidths->getValue(0)); 00087 // } 00088 return result; 00089 }
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.
00064 { 00065 // pe/fC = pe/GeV * GeV/fC = (0.24 pe/GeV * 6 for photomult * 0.2146GeV/fC) 00066 return 1./(theSamplingFactor * simHitToPhotoelectrons(detId) * fCtoGeV(detId)); 00067 }
void CastorSimParameters::setDbService | ( | const CastorDbService * | service | ) | [inline] |
Definition at line 26 of file CastorSimParameters.h.
References theDbService.
Referenced by CastorSimParameterMap::setDbService().
00026 {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] |