CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
ESHitResponse Class Reference

#include <ESHitResponse.h>

Inheritance diagram for ESHitResponse:
EcalHitResponse

Public Types

typedef CaloTSamples< float, 3 > ESSamples
 
- 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

 ESHitResponse (const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
 
virtual bool keepBlank () const
 
const EcalSamplesoperator[] (unsigned int i) const override
 
EcalSamplesoperator[] (unsigned int i) override
 
unsigned int samplesSize () const override
 
 ~ESHitResponse () override
 
- Public Member Functions inherited from EcalHitResponse
virtual void add (const CaloSamples &hit)
 
void add (const EcalSamples *pSam)
 
virtual void add (const PCaloHit &hit, CLHEP::HepRandomEngine *)
 
 EcalHitResponse (const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
 
virtual void finalizeHits ()
 
const EcalSamplesfindDetId (const DetId &detId) const
 
virtual void initializeHits ()
 
virtual void run (MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
 
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 ()
 

Protected Member Functions

unsigned int samplesSizeAll () const override
 
EcalSamplesvSam (unsigned int i) override
 
const EcalSamplesvSamAll (unsigned int i) const override
 
EcalSamplesvSamAll (unsigned int i) 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
 
virtual void putAnalogSignal (const PCaloHit &inputHit, CLHEP::HepRandomEngine *)
 
const CaloVShapeshape () const
 
double timeOfFlight (const DetId &detId) const
 

Private Attributes

std::vector< ESSamplesm_vSam
 

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

Definition at line 7 of file ESHitResponse.h.

Member Typedef Documentation

◆ ESSamples

Definition at line 9 of file ESHitResponse.h.

Constructor & Destructor Documentation

◆ ESHitResponse()

ESHitResponse::ESHitResponse ( const CaloVSimParameterMap parameterMap,
const CaloVShape shape 
)

Definition at line 9 of file ESHitResponse.cc.

10  : EcalHitResponse(parameterMap, shape) {
11  assert(nullptr != parameterMap);
12  assert(nullptr != shape);
13  const ESDetId detId(ESDetId::detIdFromDenseIndex(0));
14  const CaloSimParameters& parameters(parameterMap->simParameters(detId));
15 
16  const unsigned int rSize(parameters.readoutFrameSize());
17  const unsigned int nPre(parameters.binOfMaximum() - 1);
18 
19  const unsigned int size(ESDetId::kSizeForDenseIndexing);
20 
21  m_vSam.reserve(size);
22 
23  for (unsigned int i(0); i != size; ++i) {
24  m_vSam.emplace_back(CaloGenericDetId(detId.det(), detId.subdetId(), i), rSize, nPre);
25  }
26 }

References cms::cuda::assert(), DetId::det(), ESDetId::detIdFromDenseIndex(), mps_fire::i, ESDetId::kSizeForDenseIndexing, m_vSam, EcalHitResponse::shape(), CaloVSimParameterMap::simParameters(), findQualityFiles::size, and DetId::subdetId().

◆ ~ESHitResponse()

ESHitResponse::~ESHitResponse ( )
override

Definition at line 28 of file ESHitResponse.cc.

28 {}

Member Function Documentation

◆ keepBlank()

virtual bool ESHitResponse::keepBlank ( ) const
inlinevirtual

Definition at line 15 of file ESHitResponse.h.

15 { return false; }

◆ operator[]() [1/2]

const EcalHitResponse::EcalSamples * ESHitResponse::operator[] ( unsigned int  i) const
overridevirtual

Implements EcalHitResponse.

Definition at line 34 of file ESHitResponse.cc.

34 { return &m_vSam[index()[i]]; }

References mps_fire::i, EcalHitResponse::index(), and m_vSam.

◆ operator[]() [2/2]

EcalHitResponse::EcalSamples * ESHitResponse::operator[] ( unsigned int  i)
overridevirtual

Implements EcalHitResponse.

Definition at line 36 of file ESHitResponse.cc.

36 { return &m_vSam[index()[i]]; }

References mps_fire::i, EcalHitResponse::index(), and m_vSam.

◆ samplesSize()

unsigned int ESHitResponse::samplesSize ( ) const
overridevirtual

Implements EcalHitResponse.

Definition at line 30 of file ESHitResponse.cc.

30 { return index().size(); }

References EcalHitResponse::index().

◆ samplesSizeAll()

unsigned int ESHitResponse::samplesSizeAll ( ) const
overrideprotectedvirtual

Implements EcalHitResponse.

Definition at line 32 of file ESHitResponse.cc.

References ESDetId::kSizeForDenseIndexing.

◆ vSam()

EcalHitResponse::EcalSamples * ESHitResponse::vSam ( unsigned int  i)
overrideprotectedvirtual

Implements EcalHitResponse.

Definition at line 38 of file ESHitResponse.cc.

38 { return &m_vSam[index()[i]]; }

References mps_fire::i, EcalHitResponse::index(), and m_vSam.

◆ vSamAll() [1/2]

const EcalHitResponse::EcalSamples * ESHitResponse::vSamAll ( unsigned int  i) const
overrideprotectedvirtual

Implements EcalHitResponse.

Definition at line 42 of file ESHitResponse.cc.

42 { return &m_vSam[i]; }

References mps_fire::i, and m_vSam.

◆ vSamAll() [2/2]

EcalHitResponse::EcalSamples * ESHitResponse::vSamAll ( unsigned int  i)
overrideprotectedvirtual

Implements EcalHitResponse.

Definition at line 40 of file ESHitResponse.cc.

40 { return &m_vSam[i]; }

References mps_fire::i, and m_vSam.

Member Data Documentation

◆ m_vSam

std::vector<ESSamples> ESHitResponse::m_vSam
private

Definition at line 33 of file ESHitResponse.h.

Referenced by ESHitResponse(), operator[](), vSam(), and vSamAll().

BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
mps_fire.i
i
Definition: mps_fire.py:428
CaloGenericDetId
Definition: CaloGenericDetId.h:12
ESDetId::kSizeForDenseIndexing
Definition: ESDetId.h:102
cms::cuda::assert
assert(be >=bs)
ESDetId
Definition: ESDetId.h:15
ESHitResponse::m_vSam
std::vector< ESSamples > m_vSam
Definition: ESHitResponse.h:33
CaloSimParameters
Main class for Parameters in different subdetectors.
Definition: CaloSimParameters.h:14
CaloVSimParameterMap::simParameters
virtual const CaloSimParameters & simParameters(const DetId &id) const =0
EcalHitResponse::index
VecInd & index()
Definition: EcalHitResponse.cc:218
ESDetId::detIdFromDenseIndex
static ESDetId detIdFromDenseIndex(uint32_t din)
Definition: ESDetId.h:55
EcalHitResponse::EcalHitResponse
EcalHitResponse(const CaloVSimParameterMap *parameterMap, const CaloVShape *shape)
Definition: EcalHitResponse.cc:20
EcalHitResponse::shape
const CaloVShape * shape() const
Definition: EcalHitResponse.cc:41
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443