CMS 3D CMS Logo

HcalSiPMHitResponse.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef HcalSimAlgos_HcalSiPMHitResponse_h
3 #define HcalSimAlgos_HcalSiPMHitResponse_h
4 
8 
9 #include <map>
10 #include <set>
11 #include <vector>
12 
13 namespace CLHEP {
14  class HepRandomEngine;
15 }
16 
18 public:
19  bool operator()(const PCaloHit* a, const PCaloHit* b) const { return a->time() < b->time(); }
20 };
21 
23 public:
24  HcalSiPMHitResponse(const CaloVSimParameterMap* parameterMap,
25  const CaloShapes* shapes,
26  bool PreMix1 = false,
27  bool HighFidelity = true);
28 
29  ~HcalSiPMHitResponse() override;
30 
31  typedef std::vector<unsigned int> photonTimeHist;
32  typedef std::map<DetId, photonTimeHist> photonTimeMap;
33 
34  void initializeHits() override;
35 
36  void finalizeHits(CLHEP::HepRandomEngine*) override;
37 
38  void add(const PCaloHit& hit, CLHEP::HepRandomEngine*) override;
39 
40  void add(const CaloSamples& signal) override;
41 
42  virtual void addPEnoise(CLHEP::HepRandomEngine* engine);
43 
44  virtual CaloSamples makeBlankSignal(const DetId& detId) const;
45 
46  virtual void setDetIds(const std::vector<DetId>& detIds);
47 
48  virtual int getReadoutFrameSize(const DetId& id) const;
49 
50 protected:
51  virtual CaloSamples makeSiPMSignal(DetId const& id, photonTimeHist const& photons, CLHEP::HepRandomEngine*);
52 
53 private:
57  int nbins;
58  double dt, invdt;
59 
61 
62  const std::vector<DetId>* theDetIds;
63 
64  std::map<int, HcalSiPMShape> shapeMap;
65 };
66 
67 #endif //HcalSimAlgos_HcalSiPMHitResponse_h
HcalSiPMHitResponse::dt
double dt
Definition: HcalSiPMHitResponse.h:58
HcalSiPM.h
CaloVSimParameterMap
Definition: CaloVSimParameterMap.h:7
HcalSiPMHitResponse::shapeMap
std::map< int, HcalSiPMShape > shapeMap
Definition: HcalSiPMHitResponse.h:64
HcalSiPMHitResponse::setDetIds
virtual void setDetIds(const std::vector< DetId > &detIds)
Definition: HcalSiPMHitResponse.cc:271
HcalSiPMHitResponse::nbins
int nbins
Definition: HcalSiPMHitResponse.h:57
HcalSiPMHitResponse::makeBlankSignal
virtual CaloSamples makeBlankSignal(const DetId &detId) const
Definition: HcalSiPMHitResponse.cc:184
HcalSiPMHitResponse::theDetIds
const std::vector< DetId > * theDetIds
Definition: HcalSiPMHitResponse.h:62
HcalSiPMHitResponse::theSiPM
HcalSiPM theSiPM
Definition: HcalSiPMHitResponse.h:54
HcalSiPMHitResponse::add
void add(const PCaloHit &hit, CLHEP::HepRandomEngine *) override
process a single SimHit
Definition: HcalSiPMHitResponse.cc:100
HcalSiPMHitResponse::getReadoutFrameSize
virtual int getReadoutFrameSize(const DetId &id) const
Definition: HcalSiPMHitResponse.cc:41
DetId
Definition: DetId.h:17
HcalSiPMHitResponse::photonTimeHist
std::vector< unsigned int > photonTimeHist
Definition: HcalSiPMHitResponse.h:31
HcalSiPMHitResponse::makeSiPMSignal
virtual CaloSamples makeSiPMSignal(DetId const &id, photonTimeHist const &photons, CLHEP::HepRandomEngine *)
Definition: HcalSiPMHitResponse.cc:194
b
double b
Definition: hdecay.h:118
CLHEP
Definition: CocoaGlobals.h:27
a
double a
Definition: hdecay.h:119
HcalSiPMHitResponse::PreMixDigis
bool PreMixDigis
Definition: HcalSiPMHitResponse.h:55
PCaloHitCompareTimes::operator()
bool operator()(const PCaloHit *a, const PCaloHit *b) const
Definition: HcalSiPMHitResponse.h:19
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
HcalSiPM
A general implementation for the response of a SiPM.
Definition: HcalSiPM.h:22
PCaloHitCompareTimes
Definition: HcalSiPMHitResponse.h:17
HcalSiPMHitResponse::addPEnoise
virtual void addPEnoise(CLHEP::HepRandomEngine *engine)
Definition: HcalSiPMHitResponse.cc:144
BPHMonitor_cfi.photons
photons
Definition: BPHMonitor_cfi.py:91
CaloSamples
Definition: CaloSamples.h:14
PCaloHit
Definition: PCaloHit.h:8
CaloHitResponse.h
HcalSiPMHitResponse
Definition: HcalSiPMHitResponse.h:22
CaloShapes
Definition: CaloShapes.h:9
HcalSiPMShape.h
HcalSiPMHitResponse::~HcalSiPMHitResponse
~HcalSiPMHitResponse() override
Definition: HcalSiPMHitResponse.cc:37
HcalSiPMHitResponse::photonTimeMap
std::map< DetId, photonTimeHist > photonTimeMap
Definition: HcalSiPMHitResponse.h:32
HcalSiPMHitResponse::finalizeHits
void finalizeHits(CLHEP::HepRandomEngine *) override
Finalize hits.
Definition: HcalSiPMHitResponse.cc:51
HcalSiPMHitResponse::initializeHits
void initializeHits() override
Initialize hits.
Definition: HcalSiPMHitResponse.cc:39
HcalSiPMHitResponse::HighFidelityPreMix
bool HighFidelityPreMix
Definition: HcalSiPMHitResponse.h:56
HcalSiPMHitResponse::invdt
double invdt
Definition: HcalSiPMHitResponse.h:58
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HcalSiPMHitResponse::precisionTimedPhotons
photonTimeMap precisionTimedPhotons
Definition: HcalSiPMHitResponse.h:60
HcalSiPMHitResponse::HcalSiPMHitResponse
HcalSiPMHitResponse(const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes, bool PreMix1=false, bool HighFidelity=true)
Definition: HcalSiPMHitResponse.cc:19