7.2.2011 Kamil Sedlak

1) Constant fraction discriminator added to the analysis of the 
     optical photon signal. 
  2) Bug fixes in the optical photon simulation.
  3) A few other small improvements.
This commit is contained in:
2011-02-07 16:07:38 +00:00
parent d11e19a7d8
commit a5e99ed164
10 changed files with 10389 additions and 73 deletions

View File

@ -34,12 +34,14 @@ class G4HCofThisEvent;
class signalInfo {
public:
signalInfo(G4int id, G4int nP, G4double tFirst,
G4double tA, G4double tB, G4double tC, G4double tD, G4double tE, G4double tLast) {
G4double tA, G4double tB, G4double tC, G4double tD, G4double tE, G4double tLast,
G4double tCFD, G4double aCFD) {
detID=id; nPhot=nP; timeFirst=tFirst;
timeA=tA; timeB=tB; timeC=tC; timeD=tD; timeE=tE; timeLast=tLast;}
timeA=tA; timeB=tB; timeC=tC; timeD=tD; timeE=tE; timeLast=tLast;
timeCFD=tCFD; amplCFD=aCFD;}
~signalInfo() {}
void transferDataToRoot(musrRootOutput* myRootOut, G4int nn) {
myRootOut->SetOPSAinfo(nn,detID,nPhot,timeFirst,timeA,timeB,timeC,timeD,timeE,timeLast);
myRootOut->SetOPSAinfo(nn,detID,nPhot,timeFirst,timeA,timeB,timeC,timeD,timeE,timeLast,timeCFD,amplCFD);
}
private:
@ -55,6 +57,8 @@ class signalInfo {
G4double timeD;
G4double timeE;
G4double timeLast;
G4double timeCFD;
G4double amplCFD;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@ -69,17 +73,26 @@ class musrScintSD : public G4VSensitiveDetector
void Initialize(G4HCofThisEvent*);
G4bool ProcessHits(G4Step*, G4TouchableHistory*);
void EndOfEvent(G4HCofThisEvent*);
void EndOfRun();
// Optical Photon Signal Analysis (OPSA)
void Set_OPSA_minNrOfDetectedPhotons(G4int val) {OPSA_minNrOfDetectedPhotons=val;}
void Set_OPSA_SignalSeparationTime(G4double val) {OPSA_signalSeparationTime=val;}
void Set_OPSA_frac(G4double a, G4double b, G4double c, G4double d, G4double e)
{OPSA_fracA=a; OPSA_fracB=b; OPSA_fracC=c; OPSA_fracD=d; OPSA_fracE=e;}
void AddEventIDToMultimapOfEventIDsForOPSAhistos (G4int ev_ID, G4int detector_ID)
{bool_multimapOfEventIDsForOPSAhistosEXISTS=true; multimapOfEventIDsForOPSAhistos.insert(std::pair<G4int,G4int>(ev_ID,detector_ID));}
void SetOPSAhistoBinning(Int_t nBins, Double_t min, Double_t max) {OPSAhistoNbin=nBins; OPSAhistoMin=min; OPSAhistoMax=max;}
void Set_OPSA_CFD(G4double a1, G4double delay, G4double timeShiftOffset)
{OPSA_CFD_a1=a1; OPSA_CFD_delay=delay; OPSA_CFD_timeShiftOffset = timeShiftOffset;}
void AddEventIDToMultimapOfEventIDsForOPSAhistos (G4int ev_ID, G4int detector_ID) {
bool_multimapOfEventIDsForOPSAhistosEXISTS=true;
multimapOfEventIDsForOPSAhistos.insert(std::pair<G4int,G4int>(ev_ID,detector_ID));
}
void SetOPSAhistoBinning(Int_t nBins, Double_t min, Double_t max) {
OPSAhistoNbin=nBins; OPSAhistoMin=min; OPSAhistoMax=max;
OPSAhistoBinWidth=(max-min)/nBins; OPSAhistoBinWidth1000=OPSAhistoBinWidth*1000;
}
void ProcessOpticalPhoton(G4Step*);
void EndOfEvent_OptiacalPhotons();
void ReadInPulseShapeArray(const char* filename);
private:
static musrScintSD* pointer;
@ -111,7 +124,19 @@ class musrScintSD : public G4VSensitiveDetector
multimapOfEventIDsForOPSAhistos_Type multimapOfEventIDsForOPSAhistos;
TH1D* OPSAhisto;
Int_t OPSAhistoNbin;
Double_t OPSAhistoMin, OPSAhistoMax;
Double_t OPSAhistoMin, OPSAhistoMax, OPSAhistoBinWidth, OPSAhistoBinWidth1000;
typedef std::map<std::string,TH1D*> mapOfOPSAsumHistograms_Type;
mapOfOPSAsumHistograms_Type mapOfOPSAsumHistograms;
mapOfOPSAsumHistograms_Type mapOfOPSAsum0Histograms;
TH1D* OPSAhistoSUM;
TH1D* OPSAhistoSUM0;
TH1D* OPSAshape;
G4bool bool_pulseShapeExists;
G4int iPSmax;
G4double pulseShapeArray[10001];
TH1D* OPSA_CFD;
G4double OPSA_CFD_a1,OPSA_CFD_delay, OPSA_CFD_timeShiftOffset;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......