1 #ifndef WCSimWCDigitizer_h
2 #define WCSimWCDigitizer_h 1
9 #include "G4VDigitizerModule.hh"
13 #include "Randomize.hh"
30 bool AddNewDigit(
int tube,
int gate,
double digihittime,
double peSmeared, std::vector<int> digi_comp);
41 double Truncate(
double value,
double precision) {
42 if(precision < 1E-10)
return value;
43 double ratio=value / precision;
45 if(ratio>std::numeric_limits<int64_t>::max() || ratio<std::numeric_limits<int64_t>::min() )
return value;
46 return precision * (int64_t)(value / precision);
107 double x = pe+0.1; iflag=0;
108 double thr;
double RDUMMY,err;
111 -0.06374+x*(3.748+x*(-63.23+x*(452.0+x*(-1449.0+x*(2513.0
112 +x*(-2529.+x*(1472.0+x*(-452.2+x*(51.34+x*2.370))))))))));
116 RDUMMY = G4UniformRand();
122 err = G4RandGauss::shoot(0.0,0.03);
130 #endif //WCSimWCDigitizer_h
WCSimDetectorConstruction * myDetector
Get the geometry information.
WCSimWCDAQMessenger * DAQMessenger
Get the /DAQ/ .mac options.
double DigitizerPEPrecision
Digitizer charge precision (p.e.)
double Truncate(double value, double precision)
Override the default digitizer charge resolution (p.e.)
DigitizerType_t DigitizerType
Enumeration to say which digitizer we've constructed.
virtual double GetDefaultPEPrecision()=0
Set the default digitizer-specific charge resolution (in p.e.) (overridden by .mac) ...
double GetDefaultTimingPrecision()
SKI digitizer timing precision is 0.4 ns (SK NIM Sec 5.1)
static void Threshold(double &pe, int &iflag)
WCSimWCDigitizerBase(G4String name, WCSimDetectorConstruction *, WCSimWCDAQMessenger *, DigitizerType_t, G4String detectorElement)
void DigitizeGate(WCSimWCDigitsCollection *WCHC, G4int G)
virtual int GetDefaultIntegrationWindow()=0
Set the default digitizer-specific integration window (in ns) (overridden by .mac) ...
int GetDefaultDeadTime()
SKI digitizer deadtime is 0 ns.
bool AddNewDigit(int tube, int gate, double digihittime, double peSmeared, std::vector< int > digi_comp)
WCSimWCDigitsCollection * DigiStore
G4TDigiCollection< WCSimWCDigi > WCSimWCDigitsCollection
enum EDigitizerType DigitizerType_t
void SetDigitizerPEPrecision(double precision)
Override the default digitizer timing resolution (ns)
virtual double GetDefaultTimingPrecision()=0
Set the default digitizer-specific timing resolution (in ns) (overridden by .mac) ...
double DigitizerTimingPrecision
Digitizer time precision (ns)
double GetDefaultPEPrecision()
SKI digitizer charge precision is 0.2 pC (SK NIM Sec 5.1), but conversion to PE not specified...
virtual int GetDefaultDeadTime()=0
Set the default digitizer-specific deadtime (in ns) (overridden by .mac)
std::map< int, int > DigiStoreHitMap
Used to check if a digit has already been created on a PMT.
int DigitizerIntegrationWindow
Digitizer integration window (ns)
void SaveOptionsToOutput(WCSimRootOptions *wcopt)
Save current values of options.
int DigitizerDeadTime
Digitizer deadtime (ns)
void SetDigitizerIntegrationWindow(int inttime)
Override the default digitizer deadtime (ns)
void GetVariables()
Get the default deadtime, etc. from the derived class, and override with read from the ...
virtual ~WCSimWCDigitizerBase()
void SetDigitizerTimingPrecision(double precision)
Override the default digitizer integration window (ns)
G4String DigitizerClassName
Name of the digitizer class being run.
virtual void DigitizeHits(WCSimWCDigitsCollection *WCHCPMT)=0
WCSimWCDigitizerSKI(G4String name, WCSimDetectorConstruction *, WCSimWCDAQMessenger *, G4String detectorElement)
int GetDefaultIntegrationWindow()
Set the default digitizer-specific integration window (in ns) (overridden by .mac) ...
void DigitizeHits(WCSimWCDigitsCollection *WCHCPMT)
void SetDigitizerDeadTime(int deadtime)