CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CastorSimParameters Class Reference

#include <CastorSimParameters.h>

Inheritance diagram for CastorSimParameters:
CaloSimParameters

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 ()
 
- Public Member Functions inherited from CaloSimParameters
int binOfMaximum () const
 
 CaloSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase=true)
 
 CaloSimParameters (const edm::ParameterSet &p)
 
bool doPhotostatistics () const
 whether or not to apply Poisson statistics to photoelectrons More...
 
double photoelectronsToAnalog () const
 the factor which goes from photoelectrons to whatever gets read by ADCs More...
 
int readoutFrameSize () const
 for now, the LinearFrames and trhe digis will be one-to-one. More...
 
void setBinOfMaximum (int binOfMax)
 
void setReadoutFrameSize (int frameSize)
 some datamixing apps need this to be set dynamically More...
 
double simHitToPhotoelectrons () const
 
virtual double simHitToPhotoelectrons (const DetId &) const
 
bool syncPhase () const
 choice of the ADC time alignment (synchronous for LHC, asynchronous for test beams) More...
 
double timePhase () const
 the adjustment you need to apply to get the signal where you want it More...
 
virtual ~CaloSimParameters ()
 

Private Attributes

const CastorDbServicetheDbService
 
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.

13  theDbService(0),
14  theSamplingFactor( samplingFactor )
15 {
16 }
CaloSimParameters(double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase=true)
const CastorDbService * theDbService
double timePhase() const
the adjustment you need to apply to get the signal where you want it
double simHitToPhotoelectrons() const
double photoelectronsToAnalog() const
the factor which goes from photoelectrons to whatever gets read by ADCs
bool syncPhase() const
choice of the ADC time alignment (synchronous for LHC, asynchronous for test beams) ...
CastorSimParameters::CastorSimParameters ( const edm::ParameterSet p)

Definition at line 33 of file CastorSimParameters.cc.

35  theDbService(0),
36  theSamplingFactor( p.getParameter<double>("samplingFactor") )
37 {
38 }
T getParameter(std::string const &) const
CaloSimParameters(double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase=true)
const CastorDbService * theDbService
virtual CastorSimParameters::~CastorSimParameters ( )
inlinevirtual

Definition at line 24 of file CastorSimParameters.h.

24 {}

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(), query::result, and theDbService.

Referenced by photoelectronsToAnalog().

72 {
73  assert(theDbService != 0);
74  HcalGenericDetId hcalGenDetId(detId);
75  const CastorGain* gains = theDbService->getGain(hcalGenDetId);
76  const CastorGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId);
77  if (!gains || !gwidths )
78  {
79  edm::LogError("CastorAmplifier") << "Could not fetch HCAL conditions for channel " << hcalGenDetId;
80  }
81  // only one gain will be recorded per channel, so just use capID 0 for now
82 
83  double result = gains->getValue(0);
84 // if(doNoise_)
86 // result += CLHEP::RandGaussQ::shoot(0., gwidths->getValue(0));
87 // }
88  return result;
89 }
const CastorDbService * theDbService
tuple result
Definition: query.py:137
const CastorGain * getGain(const HcalGenericDetId &fId) const
const CastorGainWidth * getGainWidth(const HcalGenericDetId &fId) const
float getValue(int fCapId) const
get value for capId = 0..3
Definition: CastorGain.h:17
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.

64 {
65  // pe/fC = pe/GeV * GeV/fC = (0.24 pe/GeV * 6 for photomult * 0.2146GeV/fC)
66  return 1./(theSamplingFactor * simHitToPhotoelectrons(detId) * fCtoGeV(detId));
67 }
double simHitToPhotoelectrons() const
double fCtoGeV(const DetId &detId) const
void CastorSimParameters::setDbService ( const CastorDbService service)
inline

Definition at line 26 of file CastorSimParameters.h.

References theDbService.

Referenced by CastorSimParameterMap::setDbService().

26 {theDbService = service;}
const CastorDbService * theDbService

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