CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalSiPM.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef HcalSimAlgos_HcalSiPM_h
3 #define HcalSimAlgos_HcalSiPM_h
4 
13 #include <vector>
14 #include <algorithm>
15 
16 namespace CLHEP {
17  class HepRandomEngine;
18 }
19 
20 class HcalSiPM {
21  public:
22  HcalSiPM(int nCells = 1, double tau = 15.);
23 
24  virtual ~HcalSiPM();
25 
26  void resetSiPM() { std::fill(theSiPM.begin(), theSiPM.end(), -999.); }
27  virtual int hitCells(CLHEP::HepRandomEngine*, unsigned int photons, unsigned int integral = 0) const;
28  virtual double hitCells(CLHEP::HepRandomEngine* , unsigned int pes, double tempDiff = 0.,
29  double photonTime = 0.);
30 
31 
32  virtual double totalCharge() const { return totalCharge(theLastHitTime); }
33  virtual double totalCharge(double time) const;
34  // virtual void recoverForTime(double time, double dt = 0.);
35 
36  int getNCells() const { return theCellCount; }
37  double getTau() const { return 1.0/theTauInv; }
38  double getCrossTalk() const { return theCrossTalk; }
39  double getTempDep() const { return theTempDep; }
40 
41  void setNCells(int nCells);
42  void setTau(double tau) {theTauInv=1.0/tau;}
43  void setCrossTalk(double xtalk);
44  void setTemperatureDependence(double tempDep);
45 
46  protected:
47 
48  // void expRecover(double dt);
49 
50  double cellCharge(double deltaTime) const;
51 
52  unsigned int theCellCount;
53  std::vector< double > theSiPM;
54  double theTauInv;
55  double theCrossTalk;
56  double theTempDep;
58 };
59 
60 #endif //HcalSimAlgos_HcalSiPM_h
double getTempDep() const
Definition: HcalSiPM.h:39
double theTempDep
Definition: HcalSiPM.h:56
A general implementation for the response of a SiPM.
Definition: HcalSiPM.h:20
string fill
Definition: lumiContext.py:319
virtual ~HcalSiPM()
Definition: HcalSiPM.cc:20
double cellCharge(double deltaTime) const
Definition: HcalSiPM.cc:140
virtual double totalCharge() const
Definition: HcalSiPM.h:32
double theTauInv
Definition: HcalSiPM.h:54
void resetSiPM()
Definition: HcalSiPM.h:26
double getCrossTalk() const
Definition: HcalSiPM.h:38
double theCrossTalk
Definition: HcalSiPM.h:55
std::vector< double > theSiPM
Definition: HcalSiPM.h:53
int getNCells() const
Definition: HcalSiPM.h:36
void setNCells(int nCells)
Definition: HcalSiPM.cc:105
void setTau(double tau)
Definition: HcalSiPM.h:42
double theLastHitTime
Definition: HcalSiPM.h:57
void setCrossTalk(double xtalk)
Definition: HcalSiPM.cc:112
double getTau() const
Definition: HcalSiPM.h:37
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
virtual int hitCells(CLHEP::HepRandomEngine *, unsigned int photons, unsigned int integral=0) const
Definition: HcalSiPM.cc:23
unsigned int theCellCount
Definition: HcalSiPM.h:52
HcalSiPM(int nCells=1, double tau=15.)
Definition: HcalSiPM.cc:12
void setTemperatureDependence(double tempDep)
Definition: HcalSiPM.cc:123