00001 // -*- C++ -*- 00002 #ifndef HcalSimAlgos_HcalSiPM_h 00003 #define HcalSimAlgos_HcalSiPM_h 00004 00013 #include <vector> 00014 00015 #include "CLHEP/Random/RandGaussQ.h" 00016 00017 class HcalSiPM { 00018 public: 00019 HcalSiPM(int nCells = 1); 00020 00021 virtual ~HcalSiPM(); 00022 00023 virtual int hitCells(int photons, int integral = 0) const; 00024 00025 int getNCells() const { return theCellCount; } 00026 void setNCells(int nCells); 00027 void initRandomEngine(CLHEP::HepRandomEngine& engine); 00028 00029 protected: 00030 virtual double errOnX(double x, double prehit = 0.) const; 00031 void getBeforeAndAfter(double val, int& before, int& after, 00032 const std::vector<double>& vec) const; 00033 00034 int theCellCount; 00035 mutable CLHEP::RandGaussQ *theRndGauss; 00036 00037 std::vector< double > theXSamples; 00038 std::vector< double > thePrehitSamples; 00039 std::vector< std::vector< double > > theErrSamples; 00040 00041 void defaultErrInit(); 00042 00043 }; 00044 00045 #endif //HcalSimAlgos_HcalSiPM_h