21.1.2011 Kamil Sedlak
This version contains many changes! 1) Optical photon simulation is now possible - some work still may need to be done (e.g. the manual is not updated yet), but it should basically work already now. 2) Changes in the musrSimAna - correction of some bugs (mainly in the coincidence of coincidence and veto detectors) and some other improvements
This commit is contained in:
@ -31,26 +31,87 @@
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
|
||||
class signalInfo {
|
||||
public:
|
||||
signalInfo(G4int id, G4int nP, G4double tFirst,
|
||||
G4double tA, G4double tB, G4double tC, G4double tD, G4double tE, G4double tLast) {
|
||||
detID=id; nPhot=nP; timeFirst=tFirst;
|
||||
timeA=tA; timeB=tB; timeC=tC; timeD=tD; timeE=tE; timeLast=tLast;}
|
||||
~signalInfo() {}
|
||||
void transferDataToRoot(musrRootOutput* myRootOut, G4int nn) {
|
||||
myRootOut->SetOPSAinfo(nn,detID,nPhot,timeFirst,timeA,timeB,timeC,timeD,timeE,timeLast);
|
||||
}
|
||||
|
||||
private:
|
||||
G4int detID;
|
||||
G4int nPhot;
|
||||
G4int nPhot_abs;
|
||||
G4int nPhot_refl;
|
||||
G4int nPhot_other;
|
||||
G4double timeFirst;
|
||||
G4double timeA;
|
||||
G4double timeB;
|
||||
G4double timeC;
|
||||
G4double timeD;
|
||||
G4double timeE;
|
||||
G4double timeLast;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class musrScintSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
musrScintSD(G4String);
|
||||
~musrScintSD();
|
||||
static musrScintSD* GetInstance();
|
||||
musrScintSD(G4String);
|
||||
~musrScintSD();
|
||||
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*, G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*, G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
|
||||
// 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 ProcessOpticalPhoton(G4Step*);
|
||||
void EndOfEvent_OptiacalPhotons();
|
||||
|
||||
private:
|
||||
static musrScintSD* pointer;
|
||||
musrScintHitsCollection* scintCollection;
|
||||
G4bool myStoreOnlyEventsWithHits;
|
||||
G4int myStoreOnlyEventsWithHitInDetID;
|
||||
G4double mySignalSeparationTime;
|
||||
G4bool myStoreOnlyTheFirstTimeHit;
|
||||
G4bool boolIsVvvInfoRequested;
|
||||
musrRootOutput* myRootOutput;
|
||||
|
||||
// for optical photon counting
|
||||
typedef std::multimap<G4double,Int_t> optHitDetectorMapType;
|
||||
typedef std::map<Int_t,optHitDetectorMapType*> optHitMapType;
|
||||
optHitMapType optHitMap;
|
||||
// for optical photon signal analysis (OPSA)
|
||||
G4int OPSA_minNrOfDetectedPhotons;
|
||||
G4double OPSA_signalSeparationTime;
|
||||
G4double OPSA_fracA;
|
||||
G4double OPSA_fracB;
|
||||
G4double OPSA_fracC;
|
||||
G4double OPSA_fracD;
|
||||
G4double OPSA_fracE;
|
||||
typedef std::multimap<G4int,signalInfo*> OPSA_signal_MapType;
|
||||
OPSA_signal_MapType OPSA_signal_Map;
|
||||
|
||||
G4bool bool_multimapOfEventIDsForOPSAhistosEXISTS;
|
||||
typedef std::multimap<G4int,G4int> multimapOfEventIDsForOPSAhistos_Type;
|
||||
multimapOfEventIDsForOPSAhistos_Type multimapOfEventIDsForOPSAhistos;
|
||||
TH1D* OPSAhisto;
|
||||
Int_t OPSAhistoNbin;
|
||||
Double_t OPSAhistoMin, OPSAhistoMax;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
Reference in New Issue
Block a user