00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef BesTofDigitizerBrV2_h
00012 #define BesTofDigitizerBrV2_h 1
00013
00014 #include "GaudiKernel/NTuple.h"
00015
00016 #include "BesTofDigitizerV.hh"
00017 #include "BesTofDigi.hh"
00018 #include "ScintSingle.hh"
00019 #include "globals.hh"
00020 #include "G4ThreeVector.hh"
00021 #include <vector>
00022 #include "RealizationSvc/RealizationSvc.h"
00023 #include "RealizationSvc/IRealizationSvc.h"
00024
00025 using namespace std;
00026
00027 class BesTofHit;
00028 class BesRunAction;
00029 class G4Svc;
00030
00031 const G4int m_profBinN = 30000;
00032 const G4int m_snpeBinN = 3000;
00033
00034 class BesTofDigitizerBrV2 : public BesTofDigitizerV
00035 {
00036 public:
00037 BesTofDigitizerBrV2();
00038 ~BesTofDigitizerBrV2();
00039
00040 virtual void Digitize(ScintSingle*, BesTofDigitsCollection*);
00041 void ReadData();
00042 void TofPmtInit();
00043 void TofPmtAccum(BesTofHit*, G4int);
00044 void DirectPh(G4int, G4ThreeVector, G4double &, G4int&);
00045 G4double Scintillation(G4int);
00046
00047 G4double TransitTime();
00048 void AccuSignal(G4double, G4int);
00049 void TofPmtRspns(G4int);
00050 G4double Reflectivity(G4double n1,G4double n2,G4double theta);
00051 G4double Reflectivity(G4double n1,G4double n2,G4double n3,G4double theta);
00052 G4double BirksLaw(BesTofHit* hit);
00053
00054 private:
00055
00056 G4double m_scinLength;
00057
00058 G4double m_tau1;
00059 G4double m_tau2;
00060 G4double m_tau3;
00061 G4double m_tauRatio;
00062 G4double m_refIndex;
00063 G4double m_phNConst;
00064 G4double m_Cpe2pmt;
00065 G4double m_rAngle;
00066 G4double m_QE;
00067 G4double m_CE;
00068 G4double m_peCorFac;
00069
00070 G4double m_ttsMean;
00071 G4double m_ttsSigma;
00072 G4double m_Ce;
00073
00074
00075
00076
00077 G4double m_LLthresh;
00078 G4double m_HLthresh;
00079 G4double m_preGain;
00080 G4double m_noiseSigma;
00081
00082 G4double m_t1st[2];
00083 G4double m_tLast[2];
00084 G4double m_timeBinSize;
00085 G4int m_totalPhot[2];
00086 G4int m_nPhot[m_profBinN][2];
00087
00088
00089 G4Svc* m_G4Svc;
00090 G4double m_beamTime;
00091 RealizationSvc* m_RealizationSvc;
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138 };
00139
00140 #endif
00141