23.11.2011 Kamil Sedlak

Three major changes in the photon simulation:
1) Added timeC1 ... timeC20
2) Added odet_nPhotPrim[odet_n]  (number of primary photons)
3) Added all individual photons:  phot_time[nOptPhotDet]
Documentation has not been updated yet.
This commit is contained in:
2011-11-23 15:35:49 +00:00
parent 4d069f990c
commit 455786e3fd
5 changed files with 326 additions and 78 deletions

View File

@@ -79,12 +79,14 @@ class musrRootOutput {
G4double ekVertex, G4double xVertex, G4double yVertex, G4double zVertex,
G4int idVolVertex, G4int idProcVertex, G4int idTrackVertex, G4int particleID) ;
void SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4double timeFirst, G4double timeSecond,
void SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4int nPhotPrim, G4double timeFirst, G4double timeSecond,
G4double timeThird, G4double timeA, G4double timeB, G4double timeC, G4double timeD,
G4double timeMean, G4double timeLast, G4double timeCFD, G4double amplCFD);
void SetCFDSpecialInfo (G4int n, G4double time);
void SetTimeC1SpecialInfo (G4double* time);
void SetSaveDetectorInfo (G4int ID, G4int particleID, G4double ke, G4double x, G4double y, G4double z, G4double time,
G4double px, G4double py, G4double pz, G4double polx, G4double poly, G4double polz) ;
@@ -114,6 +116,7 @@ class musrRootOutput {
void SetTimeInM2(G4double time) {muM2Time = time/microsecond;}
void SetInitialPositronMomentum(G4ThreeVector mom) {posIniMomx=mom.x(); posIniMomy=mom.y(); posIniMomz=mom.z();}
void SetNOptPhot(G4int value) {nOptPhot=value;}
void SetPhotDetTime(G4double time);
void SetDecayTime(G4double time) {muDecayTime=time/microsecond;}
void SetNrFieldNomVal(G4int n) {nFieldNomVal = n;}
void SetFieldNomVal(G4int i, G4double value);
@@ -179,6 +182,8 @@ class musrRootOutput {
static G4bool store_posIniMomY;
static G4bool store_posIniMomZ;
static G4bool store_nOptPhot;
static G4bool store_nOptPhotDet;
static G4bool store_phot_time;
static G4bool store_det_ID;
static G4bool store_det_edep;
static G4bool store_det_edep_el;
@@ -218,6 +223,7 @@ class musrRootOutput {
static G4bool store_fieldIntegralBz3;
static G4bool store_odet_ID;
static G4bool store_odet_nPhot;
static G4bool store_odet_nPhotPrim;
static G4bool store_odet_timeFirst;
static G4bool store_odet_timeSecond;
static G4bool store_odet_timeThird;
@@ -230,6 +236,7 @@ class musrRootOutput {
static G4bool store_odet_timeCFD;
static G4bool store_odet_amplCFD;
static G4bool store_odet_timeCFDarray;
static G4bool store_odet_timeC1;
static G4int oldEventNumberInG4EqEMFieldWithSpinFunction;
@@ -270,7 +277,9 @@ class musrRootOutput {
Double_t muDecayPosX, muDecayPosY, muDecayPosZ;
Double_t muDecayTime;
Double_t posIniMomx, posIniMomy, posIniMomz;
Int_t nOptPhot;
Int_t nOptPhot, nOptPhotDet;
static const Int_t maxNOptPhotDet=10000;
Double_t phot_time[maxNOptPhotDet];
public:
static const Int_t maxNFieldnNominalValues=30;
@@ -329,6 +338,7 @@ class musrRootOutput {
G4int odet_n;
G4int odet_ID[odet_nMax];
G4int odet_nPhot[odet_nMax];
G4int odet_nPhotPrim[odet_nMax];
G4double odet_timeFirst[odet_nMax];
G4double odet_timeSecond[odet_nMax];
G4double odet_timeThird[odet_nMax];
@@ -405,6 +415,26 @@ class musrRootOutput {
G4double odet_timeCFD510[odet_nMax];
G4double odet_timeCFD511[odet_nMax];
G4double odet_timeCFD512[odet_nMax];
G4double odet_timeC1[odet_nMax];
G4double odet_timeC2[odet_nMax];
G4double odet_timeC3[odet_nMax];
G4double odet_timeC4[odet_nMax];
G4double odet_timeC5[odet_nMax];
G4double odet_timeC6[odet_nMax];
G4double odet_timeC7[odet_nMax];
G4double odet_timeC8[odet_nMax];
G4double odet_timeC9[odet_nMax];
G4double odet_timeC10[odet_nMax];
G4double odet_timeC11[odet_nMax];
G4double odet_timeC12[odet_nMax];
G4double odet_timeC13[odet_nMax];
G4double odet_timeC14[odet_nMax];
G4double odet_timeC15[odet_nMax];
G4double odet_timeC16[odet_nMax];
G4double odet_timeC17[odet_nMax];
G4double odet_timeC18[odet_nMax];
G4double odet_timeC19[odet_nMax];
G4double odet_timeC20[odet_nMax];
public:
static const Int_t save_nMax=1000;

View File

@@ -31,32 +31,55 @@
class G4Step;
class G4HCofThisEvent;
class APDidClass {
public:
APDidClass(G4int xAPDcellID, G4int xAPDcellNphot) {
APDcellID = xAPDcellID;
APDcellNphot = xAPDcellNphot;
}
~APDidClass() {}
G4int GetAPDcellID() const {return APDcellID;}
G4int GetAPDcellNphot() const {return APDcellNphot;}
void IncreaseAPDcellNphot() {APDcellNphot++;}
private:
G4int APDcellID;
G4int APDcellNphot;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class signalInfo {
public:
signalInfo(G4int id, G4int nP, G4double tFirst, G4double tSecond, G4double tThird,
signalInfo(G4int id, G4int nP, G4int nPprim, G4double tFirst, G4double tSecond, G4double tThird,
G4double tA, G4double tB, G4double tC, G4double tD, G4double tE, G4double tLast,
G4double tCFD, G4double aCFD, G4double tCFDarray[1000])
G4double tCFD, G4double aCFD, G4double tCFDarray[1000], G4double tOPSAC1array[21])
{
detID=id; nPhot=nP; timeFirst=tFirst; timeSecond=tSecond; timeThird=tThird;
detID=id; nPhot=nP; nPhotPrim=nPprim; timeFirst=tFirst; timeSecond=tSecond; timeThird=tThird;
timeA=tA; timeB=tB; timeC=tC; timeD=tD; timeE=tE; timeLast=tLast;
timeCFD=tCFD; amplCFD=aCFD;
if (musrRootOutput::store_odet_timeCFDarray) {for(int i=0;i<1000;i++) {timeCFDarray[i]=tCFDarray[i];}}
if (musrRootOutput::store_odet_timeC1) {for(int i=1;i<21;i++) {timeC1array[i] =tOPSAC1array[i];}}
}
~signalInfo() {}
void transferDataToRoot(musrRootOutput* myRootOut, G4int nn) {
myRootOut->SetOPSAinfo(nn,detID,nPhot,timeFirst,timeSecond,timeThird,
myRootOut->SetOPSAinfo(nn,detID,nPhot,nPhotPrim,timeFirst,timeSecond,timeThird,
timeA,timeB,timeC,timeD,timeE,timeLast,timeCFD,amplCFD);
for (Int_t kk=0; kk<13; kk++) {
for (Int_t ll=0; ll<5; ll++) {
int index = (ll+1)*100+kk;
myRootOut -> SetCFDSpecialInfo(index,timeCFDarray[index]);
if (musrRootOutput::store_odet_timeCFDarray) {
for (Int_t kk=0; kk<13; kk++) {
for (Int_t ll=0; ll<5; ll++) {
int index = (ll+1)*100+kk;
myRootOut -> SetCFDSpecialInfo(index,timeCFDarray[index]);
}
}
}
if (musrRootOutput::store_odet_timeC1) myRootOut -> SetTimeC1SpecialInfo(timeC1array);
}
private:
G4int detID;
G4int nPhot;
G4int nPhotPrim;
G4int nPhot_abs;
G4int nPhot_refl;
G4int nPhot_other;
@@ -72,6 +95,7 @@ class signalInfo {
G4double timeCFD;
G4double amplCFD;
G4double timeCFDarray[1000];
G4double timeC1array[1000];
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -135,7 +159,8 @@ class musrScintSD : public G4VSensitiveDetector
musrRootOutput* myRootOutput;
// for optical photon counting
typedef std::multimap<G4double,Int_t> optHitDetectorMapType;
// typedef std::multimap<G4double,Int_t> optHitDetectorMapType;
typedef std::multimap<G4double,APDidClass> optHitDetectorMapType;
typedef std::map<Int_t,optHitDetectorMapType*> optHitMapType;
optHitMapType optHitMap;
// for optical photon signal analysis (OPSA)
@@ -175,8 +200,28 @@ class musrScintSD : public G4VSensitiveDetector
G4bool APDcrossTalkRequested;
G4double APDcrossTalkProb;
void FireAPDcell(optHitDetectorMapType* optHitDetectorMap, G4int APDcellID, G4double time);
void FireAPDcell(optHitDetectorMapType* optHitDetectorMap, G4int APDcellID, G4double time, G4int nTruePhe);
static const G4double OPSA_C1_threshold;
static const G4double OPSA_C2_threshold;
static const G4double OPSA_C3_threshold;
static const G4double OPSA_C4_threshold;
static const G4double OPSA_C5_threshold;
static const G4double OPSA_C6_threshold;
static const G4double OPSA_C7_threshold;
static const G4double OPSA_C8_threshold;
static const G4double OPSA_C9_threshold;
static const G4double OPSA_C10_threshold;
static const G4double OPSA_C11_threshold;
static const G4double OPSA_C12_threshold;
static const G4double OPSA_C13_threshold;
static const G4double OPSA_C14_threshold;
static const G4double OPSA_C15_threshold;
static const G4double OPSA_C16_threshold;
static const G4double OPSA_C17_threshold;
static const G4double OPSA_C18_threshold;
static const G4double OPSA_C19_threshold;
static const G4double OPSA_C20_threshold;
};