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 #include "CLHEP/Random/RandGaussQ.h"
17 #include "CLHEP/Random/RandPoissonQ.h"
18 #include "CLHEP/Random/RandFlat.h"
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(unsigned int photons, unsigned int integral = 0) const;
28  virtual double hitCells(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  void initRandomEngine(CLHEP::HepRandomEngine& engine);
47 
48 
49  protected:
50 
51  // void expRecover(double dt);
52 
53  double cellCharge(double deltaTime) const;
54 
55  unsigned int theCellCount;
56  std::vector< double > theSiPM;
57  double theTauInv;
58  double theCrossTalk;
59  double theTempDep;
61 
62  mutable CLHEP::RandGaussQ *theRndGauss;
63  mutable CLHEP::RandPoissonQ *theRndPoisson;
64  mutable CLHEP::RandFlat *theRndFlat;
65 
66 };
67 
68 #endif //HcalSimAlgos_HcalSiPM_h
double getTempDep() const
Definition: HcalSiPM.h:39
double theTempDep
Definition: HcalSiPM.h:59
A general implementation for the response of a SiPM.
Definition: HcalSiPM.h:20
string fill
Definition: lumiContext.py:319
virtual ~HcalSiPM()
Definition: HcalSiPM.cc:18
double cellCharge(double deltaTime) const
Definition: HcalSiPM.cc:180
virtual double totalCharge() const
Definition: HcalSiPM.h:32
double theTauInv
Definition: HcalSiPM.h:57
void resetSiPM()
Definition: HcalSiPM.h:26
CLHEP::RandGaussQ * theRndGauss
Definition: HcalSiPM.h:62
double getCrossTalk() const
Definition: HcalSiPM.h:38
double theCrossTalk
Definition: HcalSiPM.h:58
std::vector< double > theSiPM
Definition: HcalSiPM.h:56
int getNCells() const
Definition: HcalSiPM.h:36
void setNCells(int nCells)
Definition: HcalSiPM.cc:136
void setTau(double tau)
Definition: HcalSiPM.h:42
double theLastHitTime
Definition: HcalSiPM.h:60
void setCrossTalk(double xtalk)
Definition: HcalSiPM.cc:143
void initRandomEngine(CLHEP::HepRandomEngine &engine)
Definition: HcalSiPM.cc:159
double getTau() const
Definition: HcalSiPM.h:37
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
CLHEP::RandFlat * theRndFlat
Definition: HcalSiPM.h:64
CLHEP::RandPoissonQ * theRndPoisson
Definition: HcalSiPM.h:63
virtual int hitCells(unsigned int photons, unsigned int integral=0) const
Definition: HcalSiPM.cc:24
unsigned int theCellCount
Definition: HcalSiPM.h:55
HcalSiPM(int nCells=1, double tau=15.)
Definition: HcalSiPM.cc:9
void setTemperatureDependence(double tempDep)
Definition: HcalSiPM.cc:154