CMS 3D CMS Logo

CastorSimParameters Class Reference

#include <SimCalorimetry/CastorSim/src/CastorSimParameters.h>

Inheritance diagram for CastorSimParameters:

CaloSimParameters

List of all members.

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 CastorDbServicetheDbService
 the ratio of actual incident energy to deposited energy in the SimHit
double theSamplingFactor


Detailed Description

Definition at line 8 of file CastorSimParameters.h.


Constructor & Destructor Documentation

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]

Definition at line 24 of file CastorSimParameters.h.

00024 {}


Member Function Documentation

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;}


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:14 2009 for CMSSW by  doxygen 1.5.4