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 (const edm::ParameterSet &p, bool skipPe2Fc=false)
 
 CaloSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, int readoutFrameSize, int binOfMaximum, bool doPhotostatistics, bool syncPhase=true)
 
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
 
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() [1/2]

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

◆ CaloSimParameters() [2/2]

CaloSimParameters::CaloSimParameters ( const edm::ParameterSet p,
bool  skipPe2Fc = false 
)

Definition at line 21 of file CaloSimParameters.cc.

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  // some subsystems may not want a single number for this
30  if (p.existsAs<double>("photoelectronsToAnalog")) {
31  photoelectronsToAnalog_ = p.getParameter<double>("photoelectronsToAnalog");
32  } else if (p.existsAs<std::vector<double>>("photoelectronsToAnalog")) {
33  // just take the first one
34  photoelectronsToAnalog_ = p.getParameter<std::vector<double>>("photoelectronsToAnalog").at(0);
35  } else if (!skipPe2Fc) {
36  throw cms::Exception("CaloSimParameters") << "Cannot find parameter photoelectronsToAnalog";
37  }
38  // some subsystems may not want this at all
39 }

References Exception, AlCaHLTBitMon_ParallelJobs::p, and photoelectronsToAnalog_.

◆ ~CaloSimParameters()

virtual CaloSimParameters::~CaloSimParameters ( )
inlinevirtual

Definition at line 28 of file CaloSimParameters.h.

28 {};

Member Function Documentation

◆ binOfMaximum()

int CaloSimParameters::binOfMaximum ( ) const
inline

Definition at line 47 of file CaloSimParameters.h.

47 { return binOfMaximum_; }

References binOfMaximum_.

Referenced by EcalDccWeightBuilder::computeAllWeights().

◆ doPhotostatistics()

bool CaloSimParameters::doPhotostatistics ( ) const
inline

whether or not to apply Poisson statistics to photoelectrons

Definition at line 54 of file CaloSimParameters.h.

54 { return doPhotostatistics_; }

References doPhotostatistics_.

◆ photoelectronsToAnalog() [1/2]

double CaloSimParameters::photoelectronsToAnalog ( ) const
inline

the factor which goes from photoelectrons to whatever gets read by ADCs

Definition at line 38 of file CaloSimParameters.h.

38 { return photoelectronsToAnalog_; }

References photoelectronsToAnalog_.

Referenced by HcalSimParameters::simHitToPhotoelectrons().

◆ photoelectronsToAnalog() [2/2]

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

Reimplemented in HcalSimParameters, CastorSimParameters, and HFSimParameters.

Definition at line 39 of file CaloSimParameters.h.

39 { return photoelectronsToAnalog_; }

References photoelectronsToAnalog_.

◆ readoutFrameSize()

int CaloSimParameters::readoutFrameSize ( ) const
inline

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

Definition at line 45 of file CaloSimParameters.h.

45 { return readoutFrameSize_; }

References readoutFrameSize_.

Referenced by HcalDigitizer::finalizeEvent().

◆ setBinOfMaximum()

void CaloSimParameters::setBinOfMaximum ( int  binOfMax)
inline

Definition at line 51 of file CaloSimParameters.h.

51 { binOfMaximum_ = binOfMax; }

References binOfMaximum_.

◆ setReadoutFrameSize()

void CaloSimParameters::setReadoutFrameSize ( int  frameSize)
inline

some datamixing apps need this to be set dynamically

Definition at line 50 of file CaloSimParameters.h.

50 { readoutFrameSize_ = frameSize; }

References readoutFrameSize_.

◆ simHitToPhotoelectrons() [1/2]

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 34 of file CaloSimParameters.h.

34 { return simHitToPhotoelectrons_; }

References simHitToPhotoelectrons_.

Referenced by HFSimParameters::photoelectronsToAnalog(), and HcalSimParameters::simHitToPhotoelectrons().

◆ simHitToPhotoelectrons() [2/2]

virtual double CaloSimParameters::simHitToPhotoelectrons ( const DetId ) const
inlinevirtual

Reimplemented in HcalSimParameters.

Definition at line 35 of file CaloSimParameters.h.

35 { return simHitToPhotoelectrons_; }

References simHitToPhotoelectrons_.

◆ syncPhase()

bool CaloSimParameters::syncPhase ( ) const
inline

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

Definition at line 58 of file CaloSimParameters.h.

58 { return syncPhase_; }

References syncPhase_.

◆ timePhase()

double CaloSimParameters::timePhase ( ) const
inline

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

Definition at line 42 of file CaloSimParameters.h.

42 { return timePhase_; }

References timePhase_.

Referenced by EcalDccWeightBuilder::computeAllWeights().

Member Data Documentation

◆ binOfMaximum_

int CaloSimParameters::binOfMaximum_
private

Definition at line 65 of file CaloSimParameters.h.

Referenced by binOfMaximum(), and setBinOfMaximum().

◆ doPhotostatistics_

bool CaloSimParameters::doPhotostatistics_
private

Definition at line 66 of file CaloSimParameters.h.

Referenced by doPhotostatistics().

◆ photoelectronsToAnalog_

double CaloSimParameters::photoelectronsToAnalog_
private

Definition at line 62 of file CaloSimParameters.h.

Referenced by CaloSimParameters(), and photoelectronsToAnalog().

◆ readoutFrameSize_

int CaloSimParameters::readoutFrameSize_
private

Definition at line 64 of file CaloSimParameters.h.

Referenced by readoutFrameSize(), and setReadoutFrameSize().

◆ simHitToPhotoelectrons_

double CaloSimParameters::simHitToPhotoelectrons_
private

Definition at line 61 of file CaloSimParameters.h.

Referenced by simHitToPhotoelectrons().

◆ syncPhase_

bool CaloSimParameters::syncPhase_
private

Definition at line 67 of file CaloSimParameters.h.

Referenced by syncPhase().

◆ timePhase_

double CaloSimParameters::timePhase_
private

Definition at line 63 of file CaloSimParameters.h.

Referenced by timePhase().

CaloSimParameters::binOfMaximum_
int binOfMaximum_
Definition: CaloSimParameters.h:65
CaloSimParameters::photoelectronsToAnalog_
double photoelectronsToAnalog_
Definition: CaloSimParameters.h:62
CaloSimParameters::doPhotostatistics
bool doPhotostatistics() const
whether or not to apply Poisson statistics to photoelectrons
Definition: CaloSimParameters.h:54
CaloSimParameters::photoelectronsToAnalog
double photoelectronsToAnalog() const
the factor which goes from photoelectrons to whatever gets read by ADCs
Definition: CaloSimParameters.h:38
CaloSimParameters::timePhase_
double timePhase_
Definition: CaloSimParameters.h:63
CaloSimParameters::readoutFrameSize
int readoutFrameSize() const
for now, the LinearFrames and trhe digis will be one-to-one.
Definition: CaloSimParameters.h:45
CaloSimParameters::simHitToPhotoelectrons
double simHitToPhotoelectrons() const
Definition: CaloSimParameters.h:34
CaloSimParameters::timePhase
double timePhase() const
the adjustment you need to apply to get the signal where you want it
Definition: CaloSimParameters.h:42
CaloSimParameters::syncPhase_
bool syncPhase_
Definition: CaloSimParameters.h:67
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloSimParameters::simHitToPhotoelectrons_
double simHitToPhotoelectrons_
Definition: CaloSimParameters.h:61
CaloSimParameters::readoutFrameSize_
int readoutFrameSize_
Definition: CaloSimParameters.h:64
CaloSimParameters::syncPhase
bool syncPhase() const
Definition: CaloSimParameters.h:58
Exception
Definition: hltDiff.cc:245
CaloSimParameters::doPhotostatistics_
bool doPhotostatistics_
Definition: CaloSimParameters.h:66
CaloSimParameters::binOfMaximum
int binOfMaximum() const
Definition: CaloSimParameters.h:47