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 #include "CLHEP/Random/RandFlat.h"
14 
15 class HcalSiPM;
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);
30 
31  virtual ~HcalSiPMHitResponse();
32 
33  typedef std::vector<unsigned int> photonTimeHist;
34  typedef std::map< DetId, photonTimeHist > photonTimeMap;
35 
36  virtual void initializeHits();
37 
38  virtual void finalizeHits();
39 
40  virtual void add(const PCaloHit& hit);
41 
42  virtual void add(const CaloSamples& signal);
43 
44  virtual void run(MixCollection<PCaloHit> & hits);
45 
46  virtual void setRandomEngine(CLHEP::HepRandomEngine & engine);
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) const;
56  virtual CaloSamples makeSiPMSignal(DetId const& id, photonTimeHist const& photons) const;
57 
58  virtual void differentiatePreciseSamples(CaloSamples& samples,
59  double diffNorm = 1.0) const;
60 
61  double generatePhotonTime() 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  CLHEP::RandFlat * theRndFlat;
76 
77 };
78 
79 #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
std::map< DetId, photonTimeHist > photonTimeMap
bool operator()(const PCaloHit *a, const PCaloHit *b) const
std::multiset< PCaloHit, PCaloHitCompareTimes > SortedHitSet
static double Y11TimePDF(double t)
CLHEP::RandFlat * theRndFlat
Creates electronics signals from hits.
virtual void differentiatePreciseSamples(CaloSamples &samples, double diffNorm=1.0) const
double generatePhotonTime() const
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
HcalTDCParameters theTDCParams
Definition: DetId.h:18
std::vector< unsigned int > photonTimeHist
virtual CaloSamples makeBlankSignal(const DetId &detId) const
virtual void setRandomEngine(CLHEP::HepRandomEngine &engine)
double b
Definition: hdecay.h:120
HcalSiPMHitResponse(const CaloVSimParameterMap *parameterMap, const CaloShapes *shapes)
double a
Definition: hdecay.h:121
virtual void run(MixCollection< PCaloHit > &hits)
Complete cell digitization.
virtual void finalizeHits()
Finalize hits.
virtual void add(const PCaloHit &hit)
process a single SimHit
photonTimeMap precisionTimedPhotons
virtual CaloSamples makeSiPMSignal(const DetId &id, const PCaloHit &hit, int &integral) const