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,
20  const PCaloHit * b) const {
21  return a->time()<b->time();
22  }
23 };
24 
26 
27 public:
28  HcalSiPMHitResponse(const CaloVSimParameterMap * parameterMap,
29  const CaloShapes * shapes, bool PreMix1 = false, bool HighFidelity = true);
30 
31  ~HcalSiPMHitResponse() override;
32 
33  typedef std::vector<unsigned int> photonTimeHist;
34  typedef std::map< DetId, photonTimeHist > photonTimeMap;
35 
36  void initializeHits() override;
37 
38  void finalizeHits(CLHEP::HepRandomEngine*) override;
39 
40  void add(const PCaloHit& hit, CLHEP::HepRandomEngine*) override;
41 
42  void add(const CaloSamples& signal) override;
43 
44  virtual void addPEnoise(CLHEP::HepRandomEngine* engine);
45 
46  virtual CaloSamples makeBlankSignal(const DetId & detId) const;
47 
48  virtual void setDetIds(const std::vector<DetId> & detIds);
49 
50  virtual int getReadoutFrameSize(const DetId& id) const;
51 
52 protected:
53  virtual CaloSamples makeSiPMSignal(DetId const& id, photonTimeHist const& photons, CLHEP::HepRandomEngine*);
54 
55 private:
59  int nbins;
60  double dt, invdt;
61 
62  photonTimeMap precisionTimedPhotons;
63 
64  const std::vector<DetId>* theDetIds;
65 
66  std::map<int,HcalSiPMShape> shapeMap;
67 };
68 
69 #endif //HcalSimAlgos_HcalSiPMHitResponse_h
float dt
Definition: AMPTWrapper.h:126
A general implementation for the response of a SiPM.
Definition: HcalSiPM.h:22
double time() const
Definition: PCaloHit.h:36
const std::vector< DetId > * theDetIds
std::map< DetId, photonTimeHist > photonTimeMap
bool operator()(const PCaloHit *a, const PCaloHit *b) const
Creates electronics signals from hits.
Definition: DetId.h:18
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
std::vector< unsigned int > photonTimeHist
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
photonTimeMap precisionTimedPhotons
std::map< int, HcalSiPMShape > shapeMap