test
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 
8 
9 #include <map>
10 #include <set>
11 #include <vector>
12 
13 class HcalSiPM;
14 
15 namespace CLHEP {
16  class HepRandomEngine;
17 }
18 
20 public:
21  bool operator()(const PCaloHit * a,
22  const PCaloHit * b) const {
23  return a->time()<b->time();
24  }
25 };
26 
28 
29 public:
30  HcalSiPMHitResponse(const CaloVSimParameterMap * parameterMap,
31  const CaloShapes * shapes);
32 
33  virtual ~HcalSiPMHitResponse();
34 
35  typedef std::vector<unsigned int> photonTimeHist;
36  typedef std::map< DetId, photonTimeHist > photonTimeMap;
37 
38  virtual void initializeHits();
39 
40  virtual void finalizeHits(CLHEP::HepRandomEngine*) override;
41 
42  virtual void add(const PCaloHit& hit, CLHEP::HepRandomEngine*) override;
43 
44  virtual void add(const CaloSamples& signal);
45 
46  virtual void run(MixCollection<PCaloHit> & hits, CLHEP::HepRandomEngine*) override;
47 
48  virtual CaloSamples makeBlankSignal(const DetId & detId) const;
49 
50  static double Y11TimePDF( double t );
51 
52 protected:
53  typedef std::multiset <PCaloHit, PCaloHitCompareTimes> SortedHitSet;
54 
55  virtual CaloSamples makeSiPMSignal(const DetId& id, const PCaloHit& hit, int & integral, CLHEP::HepRandomEngine*) const;
56  virtual CaloSamples makeSiPMSignal(DetId const& id, photonTimeHist const& photons, CLHEP::HepRandomEngine*) const;
57 
58  virtual void differentiatePreciseSamples(CaloSamples& samples,
59  double diffNorm = 1.0) const;
60 
61  double generatePhotonTime(CLHEP::HepRandomEngine*) const;
62 
63 private:
66  int const TIMEMULT;
67  float const Y11RANGE;
68  float const Y11MAX;
69  float const Y11TIMETORISE;
70  float theDiffNorm;
71 
74 };
75 
76 #endif //HcalSimAlgos_HcalSiPMHitResponse_h
virtual void initializeHits()
Initialize hits.
A general implementation for the response of a SiPM.
Definition: HcalSiPM.h:20
double time() const
Definition: PCaloHit.h:36
virtual void finalizeHits(CLHEP::HepRandomEngine *) override
Finalize hits.
std::map< DetId, photonTimeHist > photonTimeMap
virtual CaloSamples makeSiPMSignal(const DetId &id, const PCaloHit &hit, int &integral, CLHEP::HepRandomEngine *) const
double generatePhotonTime(CLHEP::HepRandomEngine *) const
bool operator()(const PCaloHit *a, const PCaloHit *b) const
std::multiset< PCaloHit, PCaloHitCompareTimes > SortedHitSet
static double Y11TimePDF(double t)
Creates electronics signals from hits.
virtual void differentiatePreciseSamples(CaloSamples &samples, double diffNorm=1.0) const
virtual void add(const PCaloHit &hit, CLHEP::HepRandomEngine *) override
process a single SimHit
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
HcalTDCParameters theTDCParams
Definition: DetId.h:18
std::vector< unsigned int > photonTimeHist
virtual void run(MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *) override
Complete cell digitization.
virtual CaloSamples makeBlankSignal(const DetId &detId) const
double b
Definition: hdecay.h:120
HcalSiPMHitResponse(const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes)
double a
Definition: hdecay.h:121
photonTimeMap precisionTimedPhotons