CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloSimParameters Class Reference

Main class for Parameters in different subdetectors. More...

#include <CaloSimParameters.h>

Inheritance diagram for CaloSimParameters:
CastorSimParameters HcalSimParameters HFSimParameters

Public Member Functions

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 skipPe2Fc=false)
 
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...
 
virtual double photoelectronsToAnalog (const DetId &detId) const
 
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

int binOfMaximum_
 
bool doPhotostatistics_
 
double photoelectronsToAnalog_
 
int readoutFrameSize_
 
double simHitToPhotoelectrons_
 
bool syncPhase_
 
double timePhase_
 

Detailed Description

Main class for Parameters in different subdetectors.

Definition at line 14 of file CaloSimParameters.h.

Constructor & Destructor Documentation

CaloSimParameters::CaloSimParameters ( double  simHitToPhotoelectrons,
double  photoelectronsToAnalog,
double  samplingFactor,
double  timePhase,
int  readoutFrameSize,
int  binOfMaximum,
bool  doPhotostatistics,
bool  syncPhase = true 
)

Definition at line 5 of file CaloSimParameters.cc.

16 {
17 }
bool doPhotostatistics() const
whether or not to apply Poisson statistics to photoelectrons
double timePhase() const
the adjustment you need to apply to get the signal where you want it
double simHitToPhotoelectrons() const
int readoutFrameSize() const
for now, the LinearFrames and trhe digis will be one-to-one.
int binOfMaximum() 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) ...
CaloSimParameters::CaloSimParameters ( const edm::ParameterSet p,
bool  skipPe2Fc = false 
)

Definition at line 21 of file CaloSimParameters.cc.

References Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), and photoelectronsToAnalog_.

22 : simHitToPhotoelectrons_( p.getParameter<double>("simHitToPhotoelectrons") ),
24  timePhase_( p.getParameter<double>("timePhase") ),
25  readoutFrameSize_( p.getParameter<int>("readoutFrameSize") ),
26  binOfMaximum_( p.getParameter<int>("binOfMaximum") ),
27  doPhotostatistics_( p.getParameter<bool>("doPhotoStatistics") ),
28  syncPhase_( p.getParameter<bool>("syncPhase") )
29 {
30  // some subsystems may not want a single number for this
31  if(p.existsAs<double>("photoelectronsToAnalog")) {
32  photoelectronsToAnalog_ = p.getParameter<double>("photoelectronsToAnalog");
33  } else if(p.existsAs<std::vector<double> >("photoelectronsToAnalog")) {
34  // just take the first one
35  photoelectronsToAnalog_ = p.getParameter<std::vector<double> >("photoelectronsToAnalog").at(0);
36  } else if(!skipPe2Fc) {
37  throw cms::Exception("CaloSimParameters") << "Cannot find parameter photoelectronsToAnalog";
38  }
39  // some subsystems may not want this at all
40 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:185
virtual CaloSimParameters::~CaloSimParameters ( )
inlinevirtual

Definition at line 25 of file CaloSimParameters.h.

25 {};

Member Function Documentation

int CaloSimParameters::binOfMaximum ( ) const
inline
bool CaloSimParameters::doPhotostatistics ( ) const
inline

whether or not to apply Poisson statistics to photoelectrons

Definition at line 51 of file CaloSimParameters.h.

References doPhotostatistics_.

Referenced by CaloHitResponse::analogSignalAmplitude(), and EcalHitResponse::analogSignalAmplitude().

double CaloSimParameters::photoelectronsToAnalog ( ) const
inline
virtual double CaloSimParameters::photoelectronsToAnalog ( const DetId detId) const
inlinevirtual

Reimplemented in HcalSimParameters, CastorSimParameters, and HFSimParameters.

Definition at line 36 of file CaloSimParameters.h.

References photoelectronsToAnalog_.

int CaloSimParameters::readoutFrameSize ( ) const
inline

for now, the LinearFrames and trhe digis will be one-to-one.

Definition at line 42 of file CaloSimParameters.h.

References readoutFrameSize_.

Referenced by HcalDigitizer::finalizeEvent(), HcalSiPMHitResponse::getReadoutFrameSize(), CaloHitResponse::makeBlankSignal(), and HcalSimParameterMap::setFrameSize().

void CaloSimParameters::setBinOfMaximum ( int  binOfMax)
inline

Definition at line 48 of file CaloSimParameters.h.

References binOfMaximum_.

Referenced by HcalSimParameterMap::setFrameSize().

48 {binOfMaximum_ = binOfMax;}
void CaloSimParameters::setReadoutFrameSize ( int  frameSize)
inline

some datamixing apps need this to be set dynamically

Definition at line 47 of file CaloSimParameters.h.

References readoutFrameSize_.

Referenced by HcalSimParameterMap::setFrameSize().

47 {readoutFrameSize_ = frameSize;}
double CaloSimParameters::simHitToPhotoelectrons ( ) const
inline

the factor which goes from whatever units the SimHit amplitudes are in (could be deposited GeV, real GeV, or photoelectrons) and converts to photoelectrons probably should make everything virtual, but this is enough for HCAL

Definition at line 31 of file CaloSimParameters.h.

References simHitToPhotoelectrons_.

Referenced by CaloHitResponse::analogSignalAmplitude(), EcalHitResponse::analogSignalAmplitude(), CastorHitCorrection::charge(), operator<<(), HFSimParameters::photoelectronsToAnalog(), EBHitResponse::putAPDSignal(), HcalSimParameters::simHitToPhotoelectrons(), and HcalSimParameters::~HcalSimParameters().

31 { return simHitToPhotoelectrons_;}
virtual double CaloSimParameters::simHitToPhotoelectrons ( const DetId ) const
inlinevirtual

Reimplemented in HcalSimParameters.

Definition at line 32 of file CaloSimParameters.h.

References simHitToPhotoelectrons_.

32 { return simHitToPhotoelectrons_;}
bool CaloSimParameters::syncPhase ( ) const
inline

choice of the ADC time alignment (synchronous for LHC, asynchronous for test beams)

Definition at line 54 of file CaloSimParameters.h.

References syncPhase_.

Referenced by EcalTBDigiProducer::setPhaseShift(), and HcalTBDigiProducer::setPhaseShift().

54 {return syncPhase_; }
double CaloSimParameters::timePhase ( ) const
inline

the adjustment you need to apply to get the signal where you want it

Definition at line 39 of file CaloSimParameters.h.

References timePhase_.

Referenced by EcalDccWeightBuilder::computeAllWeights(), and CastorHitCorrection::timeBin().

39 {return timePhase_;}

Member Data Documentation

int CaloSimParameters::binOfMaximum_
private

Definition at line 62 of file CaloSimParameters.h.

Referenced by binOfMaximum(), and setBinOfMaximum().

bool CaloSimParameters::doPhotostatistics_
private

Definition at line 63 of file CaloSimParameters.h.

Referenced by doPhotostatistics().

double CaloSimParameters::photoelectronsToAnalog_
private

Definition at line 59 of file CaloSimParameters.h.

Referenced by CaloSimParameters(), and photoelectronsToAnalog().

int CaloSimParameters::readoutFrameSize_
private

Definition at line 61 of file CaloSimParameters.h.

Referenced by readoutFrameSize(), and setReadoutFrameSize().

double CaloSimParameters::simHitToPhotoelectrons_
private

Definition at line 58 of file CaloSimParameters.h.

Referenced by simHitToPhotoelectrons().

bool CaloSimParameters::syncPhase_
private

Definition at line 64 of file CaloSimParameters.h.

Referenced by syncPhase().

double CaloSimParameters::timePhase_
private

Definition at line 60 of file CaloSimParameters.h.

Referenced by timePhase().