![]() |
![]() |
00001 #ifndef EcalSimAlgos_ESDigitizer_h 00002 #define EcalSimAlgos_ESDigitizer_h 00003 00004 #include "SimCalorimetry/EcalSimAlgos/interface/EcalTDigitizer.h" 00005 #include "SimCalorimetry/EcalSimAlgos/interface/EcalDigitizerTraits.h" 00006 00007 namespace CLHEP { 00008 class RandGeneral ; 00009 class RandPoissonQ ; 00010 class RandFlat ; 00011 class HepRandomEngine ; } 00012 00013 #include <vector> 00014 00015 class ESDigitizer : public EcalTDigitizer< ESDigitizerTraits > 00016 { 00017 public: 00018 00019 typedef ESDigitizerTraits::ElectronicsSim ElectronicsSim ; 00020 00021 ESDigitizer( EcalHitResponse* hitResponse , 00022 ElectronicsSim* electronicsSim , 00023 bool addNoise ) ; 00024 00025 virtual ~ESDigitizer() ; 00026 00027 virtual void run( ESDigiCollection& output ) ; 00028 00029 void setDetIds( const std::vector<DetId>& detIds ) ; 00030 00031 void setGain( const int gain ) ; 00032 00033 private: 00034 00035 void createNoisyList( std::vector<DetId>& abThreshCh ) ; 00036 00037 const std::vector<DetId>* m_detIds ; 00038 CLHEP::HepRandomEngine* m_engine ; 00039 CLHEP::RandGeneral* m_ranGeneral ; 00040 CLHEP::RandPoissonQ* m_ranPois ; 00041 CLHEP::RandFlat* m_ranFlat ; 00042 int m_ESGain ; 00043 double m_histoBin ; 00044 double m_histoInf ; 00045 double m_histoWid ; 00046 double m_meanNoisy ; 00047 00048 class Triplet 00049 { 00050 public: 00051 Triplet() : first ( 0 ), second ( 0 ), third ( 0 ) {} 00052 Triplet( uint32_t a0 , 00053 uint32_t a1 , 00054 uint32_t a2 ) : 00055 first ( a0 ), second ( a1 ), third ( a2 ) {} 00056 ~Triplet() {} ; 00057 uint32_t first ; 00058 uint32_t second ; 00059 uint32_t third ; 00060 }; 00061 00062 std::vector<Triplet> m_trip ; 00063 }; 00064 00065 #endif 00066