CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes
EBHitResponseImpl< constset > Class Template Reference

#include <EBHitResponse.h>

Inheritance diagram for EBHitResponseImpl< constset >:
EcalHitResponse

Public Types

typedef CaloTSamples< float, constset::sampleSize > EBSamples
 
typedef std::vector< double > VecD
 
- Public Types inherited from EcalHitResponse
typedef std::unordered_map< uint32_t, double > CalibCache
 
typedef CaloTSamplesBase< float > EcalSamples
 
typedef std::vector< unsigned int > VecInd
 

Public Member Functions

void add (const PCaloHit &hit, CLHEP::HepRandomEngine *) override
 
 EBHitResponseImpl (const CaloVSimParameterMap *parameterMap, const CaloVShape *shape, bool apdOnly, bool doComponent, const APDSimParameters *apdPars=nullptr, const CaloVShape *apdShape=nullptr, const ComponentSimParameterMap *componentPars=nullptr, const ComponentShapeCollection *componentShapes=nullptr)
 
void finalizeHits () override
 
void initialize (CLHEP::HepRandomEngine *)
 
void initializeHits () override
 
virtual bool keepBlank () const
 
EcalSamplesoperator[] (unsigned int i) override
 
const EcalSamplesoperator[] (unsigned int i) const override
 
void run (MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *) override
 
unsigned int samplesSize () const override
 
void setIntercal (const EcalIntercalibConstantsMC *ical)
 
 ~EBHitResponseImpl () override
 
- Public Member Functions inherited from EcalHitResponse
void add (const EcalSamples *pSam)
 
virtual void add (const CaloSamples &hit)
 
 EcalHitResponse (const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
 
const EcalSamplesfindDetId (const DetId &detId) const
 
void setBunchRange (int minBunch, int maxBunch)
 
void setEventTime (const edm::TimeValue_t &iTime)
 
void setGeometry (const CaloSubdetectorGeometry *geometry)
 
void setHitCorrection (const CaloVHitCorrection *hitCorrection)
 
void setHitFilter (const CaloVHitFilter *filter)
 
void setLaserConstants (const EcalLaserDbService *laser, bool &useLCcorrection)
 
void setPECorrection (const CaloVPECorrection *peCorrection)
 
void setPhaseShift (double phaseShift)
 
bool withinBunchRange (int bunchCrossing) const
 
virtual ~EcalHitResponse ()
 

Static Public Attributes

static constexpr size_t kNOffsets = constset::kNOffsets
 
static constexpr double kSamplePeriod = constset::Samp_Period
 

Protected Member Functions

void putAnalogSignal (const PCaloHit &inputHit, CLHEP::HepRandomEngine *) override
 
void putAPDSignal (const DetId &detId, double npe, double time)
 
void putComponentSignal (const DetId &detId, double npe, double time)
 
unsigned int samplesSizeAll () const override
 
EcalSamplesvSam (unsigned int i) override
 
EcalSamplesvSamAll (unsigned int i) override
 
const EcalSamplesvSamAll (unsigned int i) const override
 
- Protected Member Functions inherited from EcalHitResponse
double analogSignalAmplitude (const DetId &id, double energy, CLHEP::HepRandomEngine *)
 
void blankOutUsedSamples ()
 
double findLaserConstant (const DetId &detId) const
 
EcalSamplesfindSignal (const DetId &detId)
 
const CaloSubdetectorGeometrygeometry () const
 
const CaloVHitFilterhitFilter () const
 
VecIndindex ()
 
const VecIndindex () const
 
int maxBunch () const
 
int minBunch () const
 
const CaloSimParametersparams (const DetId &detId) const
 
double phaseShift () const
 
const CaloVShapeshape () const
 
double timeOfFlight (const DetId &detId) const
 

Private Member Functions

const APDSimParametersapdParameters () const
 
const CaloVShapeapdShape () const
 
double apdSignalAmplitude (const PCaloHit &hit, CLHEP::HepRandomEngine *) const
 
const ComponentSimParameterMapcomponentParameters () const
 
void findIntercalibConstant (const DetId &detId, double &icalconst) const
 
const double nonlFunc (double enr) const
 
const double nonlFunc1 (double energy) const
 
const VecDoffsets () const
 
const ComponentShapeCollectionshapes () const
 

Private Attributes

std::vector< double > m_apdNpeVec
 
const bool m_apdOnly
 
const APDSimParametersm_apdPars
 
const CaloVShapem_apdShape
 
std::vector< double > m_apdTimeVec
 
const ComponentSimParameterMapm_componentPars
 
const ComponentShapeCollectionm_componentShapes
 
const EcalIntercalibConstantsMCm_intercal
 
const bool m_isComponentShapeBased
 
bool m_isInitialized
 
std::vector< double > m_timeOffVec
 
std::vector< EBSamplesm_vSam
 
const double pasy
 
const double pcon
 
const double pcub
 
const double pehi
 
const double pelo
 
const double pext
 
const double pfac
 
const double plin
 
const double poff
 
const double pqua
 

Additional Inherited Members

- Public Attributes inherited from EcalHitResponse
const float kSamplePeriod = ecalPh1::Samp_Period
 
- Protected Attributes inherited from EcalHitResponse
const CaloSubdetectorGeometrym_geometry
 
const CaloVHitCorrectionm_hitCorrection
 
const CaloVHitFilterm_hitFilter
 
const EcalLaserDbServicem_lasercals
 
const CaloVSimParameterMapm_parameterMap
 
const CaloVPECorrectionm_PECorrection
 
const CaloVShapem_shape
 

Detailed Description

template<class constset>
class EBHitResponseImpl< constset >

Definition at line 18 of file EBHitResponse.h.

Member Typedef Documentation

◆ EBSamples

template<class constset >
typedef CaloTSamples<float, constset::sampleSize> EBHitResponseImpl< constset >::EBSamples

Definition at line 20 of file EBHitResponse.h.

◆ VecD

template<class constset >
typedef std::vector<double> EBHitResponseImpl< constset >::VecD

Definition at line 22 of file EBHitResponse.h.

Constructor & Destructor Documentation

◆ EBHitResponseImpl()

template<class constset >
EBHitResponseImpl< constset >::EBHitResponseImpl ( const CaloVSimParameterMap parameterMap,
const CaloVShape shape,
bool  apdOnly,
bool  doComponent,
const APDSimParameters apdPars = nullptr,
const CaloVShape apdShape = nullptr,
const ComponentSimParameterMap componentPars = nullptr,
const ComponentShapeCollection componentShapes = nullptr 
)

◆ ~EBHitResponseImpl()

template<class constset >
EBHitResponseImpl< constset >::~EBHitResponseImpl ( )
override

Member Function Documentation

◆ add()

template<class constset >
void EBHitResponseImpl< constset >::add ( const PCaloHit hit,
CLHEP::HepRandomEngine *   
)
overridevirtual

Reimplemented from EcalHitResponse.

Referenced by counter.Counter::register().

◆ apdParameters()

template<class constset >
const APDSimParameters* EBHitResponseImpl< constset >::apdParameters ( ) const
private

◆ apdShape()

template<class constset >
const CaloVShape* EBHitResponseImpl< constset >::apdShape ( ) const
private

◆ apdSignalAmplitude()

template<class constset >
double EBHitResponseImpl< constset >::apdSignalAmplitude ( const PCaloHit hit,
CLHEP::HepRandomEngine *   
) const
private

◆ componentParameters()

template<class constset >
const ComponentSimParameterMap* EBHitResponseImpl< constset >::componentParameters ( ) const
private

◆ finalizeHits()

template<class constset >
void EBHitResponseImpl< constset >::finalizeHits ( )
overridevirtual

Reimplemented from EcalHitResponse.

◆ findIntercalibConstant()

template<class constset >
void EBHitResponseImpl< constset >::findIntercalibConstant ( const DetId detId,
double &  icalconst 
) const
private

◆ initialize()

template<class constset >
void EBHitResponseImpl< constset >::initialize ( CLHEP::HepRandomEngine *  )

◆ initializeHits()

template<class constset >
void EBHitResponseImpl< constset >::initializeHits ( )
overridevirtual

Reimplemented from EcalHitResponse.

◆ keepBlank()

template<class constset >
virtual bool EBHitResponseImpl< constset >::keepBlank ( ) const
inlinevirtual

Definition at line 41 of file EBHitResponse.h.

41 { return false; }

◆ nonlFunc()

template<class constset >
const double EBHitResponseImpl< constset >::nonlFunc ( double  enr) const
inlineprivate

Definition at line 77 of file EBHitResponse.h.

References EBHitResponseImpl< constset >::nonlFunc1(), EBHitResponseImpl< constset >::pehi, EBHitResponseImpl< constset >::pelo, EBHitResponseImpl< constset >::pext, EBHitResponseImpl< constset >::pfac, and EBHitResponseImpl< constset >::poff.

77  {
78  return (pelo > enr ? pext : (pehi > enr ? nonlFunc1(enr) : pfac * atan(log10(enr - pehi + 0.00001)) + poff));
79  }
const double pext
const double pfac
const double nonlFunc1(double energy) const
Definition: EBHitResponse.h:81
const double pehi
const double poff
const double pelo

◆ nonlFunc1()

template<class constset >
const double EBHitResponseImpl< constset >::nonlFunc1 ( double  energy) const
inlineprivate

Definition at line 81 of file EBHitResponse.h.

References HBHEDarkening_cff::energy, EBHitResponseImpl< constset >::pcon, EBHitResponseImpl< constset >::pcub, EBHitResponseImpl< constset >::plin, and EBHitResponseImpl< constset >::pqua.

Referenced by EBHitResponseImpl< constset >::nonlFunc().

81  {
82  const double enr(log10(energy));
83  const double enr2(enr * enr);
84  const double enr3(enr2 * enr);
85  return (pcub * enr3 + pqua * enr2 + plin * enr + pcon);
86  }
const double pqua
const double pcon
const double plin
const double pcub

◆ offsets()

template<class constset >
const VecD& EBHitResponseImpl< constset >::offsets ( ) const
inlineprivate

Definition at line 75 of file EBHitResponse.h.

References EBHitResponseImpl< constset >::m_timeOffVec.

75 { return m_timeOffVec; }
std::vector< double > m_timeOffVec

◆ operator[]() [1/2]

template<class constset >
EcalSamples* EBHitResponseImpl< constset >::operator[] ( unsigned int  i)
overridevirtual

Implements EcalHitResponse.

◆ operator[]() [2/2]

template<class constset >
const EcalSamples* EBHitResponseImpl< constset >::operator[] ( unsigned int  i) const
overridevirtual

Implements EcalHitResponse.

◆ putAnalogSignal()

template<class constset >
void EBHitResponseImpl< constset >::putAnalogSignal ( const PCaloHit inputHit,
CLHEP::HepRandomEngine *   
)
overrideprotectedvirtual

Reimplemented from EcalHitResponse.

◆ putAPDSignal()

template<class constset >
void EBHitResponseImpl< constset >::putAPDSignal ( const DetId detId,
double  npe,
double  time 
)
protected

◆ putComponentSignal()

template<class constset >
void EBHitResponseImpl< constset >::putComponentSignal ( const DetId detId,
double  npe,
double  time 
)
protected

◆ run()

template<class constset >
void EBHitResponseImpl< constset >::run ( MixCollection< PCaloHit > &  hits,
CLHEP::HepRandomEngine *   
)
overridevirtual

Reimplemented from EcalHitResponse.

◆ samplesSize()

template<class constset >
unsigned int EBHitResponseImpl< constset >::samplesSize ( ) const
overridevirtual

Implements EcalHitResponse.

◆ samplesSizeAll()

template<class constset >
unsigned int EBHitResponseImpl< constset >::samplesSizeAll ( ) const
overrideprotectedvirtual

Implements EcalHitResponse.

◆ setIntercal()

template<class constset >
void EBHitResponseImpl< constset >::setIntercal ( const EcalIntercalibConstantsMC ical)

◆ shapes()

template<class constset >
const ComponentShapeCollection* EBHitResponseImpl< constset >::shapes ( ) const
private

◆ vSam()

template<class constset >
EcalSamples* EBHitResponseImpl< constset >::vSam ( unsigned int  i)
overrideprotectedvirtual

Implements EcalHitResponse.

◆ vSamAll() [1/2]

template<class constset >
EcalSamples* EBHitResponseImpl< constset >::vSamAll ( unsigned int  i)
overrideprotectedvirtual

Implements EcalHitResponse.

◆ vSamAll() [2/2]

template<class constset >
const EcalSamples* EBHitResponseImpl< constset >::vSamAll ( unsigned int  i) const
overrideprotectedvirtual

Implements EcalHitResponse.

Member Data Documentation

◆ kNOffsets

template<class constset >
constexpr size_t EBHitResponseImpl< constset >::kNOffsets = constset::kNOffsets
static

Definition at line 24 of file EBHitResponse.h.

◆ kSamplePeriod

template<class constset >
constexpr double EBHitResponseImpl< constset >::kSamplePeriod = constset::Samp_Period
static

Definition at line 26 of file EBHitResponse.h.

◆ m_apdNpeVec

template<class constset >
std::vector<double> EBHitResponseImpl< constset >::m_apdNpeVec
private

Definition at line 108 of file EBHitResponse.h.

◆ m_apdOnly

template<class constset >
const bool EBHitResponseImpl< constset >::m_apdOnly
private

Definition at line 98 of file EBHitResponse.h.

◆ m_apdPars

template<class constset >
const APDSimParameters* EBHitResponseImpl< constset >::m_apdPars
private

Definition at line 100 of file EBHitResponse.h.

◆ m_apdShape

template<class constset >
const CaloVShape* EBHitResponseImpl< constset >::m_apdShape
private

Definition at line 101 of file EBHitResponse.h.

◆ m_apdTimeVec

template<class constset >
std::vector<double> EBHitResponseImpl< constset >::m_apdTimeVec
private

Definition at line 109 of file EBHitResponse.h.

◆ m_componentPars

template<class constset >
const ComponentSimParameterMap* EBHitResponseImpl< constset >::m_componentPars
private

Definition at line 102 of file EBHitResponse.h.

◆ m_componentShapes

template<class constset >
const ComponentShapeCollection* EBHitResponseImpl< constset >::m_componentShapes
private

Definition at line 103 of file EBHitResponse.h.

◆ m_intercal

template<class constset >
const EcalIntercalibConstantsMC* EBHitResponseImpl< constset >::m_intercal
private

Definition at line 104 of file EBHitResponse.h.

◆ m_isComponentShapeBased

template<class constset >
const bool EBHitResponseImpl< constset >::m_isComponentShapeBased
private

Definition at line 99 of file EBHitResponse.h.

◆ m_isInitialized

template<class constset >
bool EBHitResponseImpl< constset >::m_isInitialized
private

Definition at line 115 of file EBHitResponse.h.

◆ m_timeOffVec

template<class constset >
std::vector<double> EBHitResponseImpl< constset >::m_timeOffVec
private

Definition at line 106 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::offsets().

◆ m_vSam

template<class constset >
std::vector<EBSamples> EBHitResponseImpl< constset >::m_vSam
private

Definition at line 113 of file EBHitResponse.h.

◆ pasy

template<class constset >
const double EBHitResponseImpl< constset >::pasy
private

Definition at line 111 of file EBHitResponse.h.

◆ pcon

template<class constset >
const double EBHitResponseImpl< constset >::pcon
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc1().

◆ pcub

template<class constset >
const double EBHitResponseImpl< constset >::pcub
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc1().

◆ pehi

template<class constset >
const double EBHitResponseImpl< constset >::pehi
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc().

◆ pelo

template<class constset >
const double EBHitResponseImpl< constset >::pelo
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc().

◆ pext

template<class constset >
const double EBHitResponseImpl< constset >::pext
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc().

◆ pfac

template<class constset >
const double EBHitResponseImpl< constset >::pfac
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc().

◆ plin

template<class constset >
const double EBHitResponseImpl< constset >::plin
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc1().

◆ poff

template<class constset >
const double EBHitResponseImpl< constset >::poff
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc().

◆ pqua

template<class constset >
const double EBHitResponseImpl< constset >::pqua
private

Definition at line 111 of file EBHitResponse.h.

Referenced by EBHitResponseImpl< constset >::nonlFunc1().