CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalSiPMHitResponse.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef HcalSimAlgos_HcalSiPMHitResponse_h
3 #define HcalSimAlgos_HcalSiPMHitResponse_h
4 
7 
8 #include <map>
9 #include <set>
10 #include <vector>
11 
12 namespace CLHEP {
13  class HepRandomEngine;
14 }
15 
17 public:
18  bool operator()(const PCaloHit * a,
19  const PCaloHit * b) const {
20  return a->time()<b->time();
21  }
22 };
23 
25 
26 public:
27  HcalSiPMHitResponse(const CaloVSimParameterMap * parameterMap,
28  const CaloShapes * shapes, bool PreMix1 = false);
29 
30  virtual ~HcalSiPMHitResponse();
31 
32  typedef std::vector<unsigned int> photonTimeHist;
33  typedef std::map< DetId, photonTimeHist > photonTimeMap;
34 
35  virtual void initializeHits() override;
36 
37  virtual void finalizeHits(CLHEP::HepRandomEngine*) override;
38 
39  virtual void add(const PCaloHit& hit, CLHEP::HepRandomEngine*) override;
40 
41  virtual void add(const CaloSamples& signal);
42 
43  virtual void addPEnoise(CLHEP::HepRandomEngine* engine);
44 
45  virtual CaloSamples makeBlankSignal(const DetId & detId) const;
46 
47  virtual void setDetIds(const std::vector<DetId> & detIds);
48 
49 protected:
50  virtual CaloSamples makeSiPMSignal(DetId const& id, photonTimeHist const& photons, CLHEP::HepRandomEngine*);
51 
52 private:
55  int nbins;
56  double dt, invdt;
57 
59 
60  const std::vector<DetId>* theDetIds;
61 };
62 
63 #endif //HcalSimAlgos_HcalSiPMHitResponse_h
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
virtual void finalizeHits(CLHEP::HepRandomEngine *) override
Finalize hits.
std::map< DetId, photonTimeHist > photonTimeMap
bool operator()(const PCaloHit *a, const PCaloHit *b) const
virtual void addPEnoise(CLHEP::HepRandomEngine *engine)
Creates electronics signals from hits.
virtual void add(const PCaloHit &hit, CLHEP::HepRandomEngine *) override
process a single SimHit
virtual void setDetIds(const std::vector< DetId > &detIds)
Definition: DetId.h:18
std::vector< unsigned int > photonTimeHist
virtual CaloSamples makeBlankSignal(const DetId &detId) const
double b
Definition: hdecay.h:120
virtual void initializeHits() override
Initialize hits.
virtual CaloSamples makeSiPMSignal(DetId const &id, photonTimeHist const &photons, CLHEP::HepRandomEngine *)
double a
Definition: hdecay.h:121
photonTimeMap precisionTimedPhotons
HcalSiPMHitResponse(const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes, bool PreMix1=false)