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 
60  photonTimeMap precisionTimedPhotons;
61 
62  const std::vector<DetId>* theDetIds;
63 
64  std::map<int, HcalSiPMShape> shapeMap;
65 };
66 
67 #endif //HcalSimAlgos_HcalSiPMHitResponse_h
float dt
Definition: AMPTWrapper.h:136
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
bool operator()(const PCaloHit *a, const PCaloHit *b) const
Creates electronics signals from hits.
Definition: DetId.h:17
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
std::vector< unsigned int > photonTimeHist
double b
Definition: hdecay.h:118
std::map< DetId, photonTimeHist > photonTimeMap
double a
Definition: hdecay.h:119
std::map< int, HcalSiPMShape > shapeMap
photonTimeMap precisionTimedPhotons