CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
A general implementation for the response of a SiPM.
Definition: HcalSiPM.h:22
double time() const
Definition: PCaloHit.h:30
const std::vector< DetId > * theDetIds
void finalizeHits(CLHEP::HepRandomEngine *) override
Finalize hits.
bool operator()(const PCaloHit *a, const PCaloHit *b) const
virtual void addPEnoise(CLHEP::HepRandomEngine *engine)
Creates electronics signals from hits.
void add(const PCaloHit &hit, CLHEP::HepRandomEngine *) override
process a single SimHit
virtual void setDetIds(const std::vector< DetId > &detIds)
virtual int getReadoutFrameSize(const DetId &id) const
Definition: DetId.h:17
std::vector< unsigned int > photonTimeHist
virtual CaloSamples makeBlankSignal(const DetId &detId) const
double b
Definition: hdecay.h:118
void initializeHits() override
Initialize hits.
std::map< DetId, photonTimeHist > photonTimeMap
virtual CaloSamples makeSiPMSignal(DetId const &id, photonTimeHist const &photons, CLHEP::HepRandomEngine *)
double a
Definition: hdecay.h:119
std::map< int, HcalSiPMShape > shapeMap
HcalSiPMHitResponse(const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes, bool PreMix1=false, bool HighFidelity=true)
photonTimeMap precisionTimedPhotons