24.3.2010 Kamil Sedlak

New variable "timeToNextEvent" added in order to simulate time differences between subsequent events.
	1)  /gun/meanarrivaltime meanArrivalTime (defines the mean time difference betweent 
                                                  the subsequent events).
        2)  timeToNextEvent - new variable written out to the root tree.

   This new variable is needed for the pile-up studies
This commit is contained in:
2010-03-24 16:21:08 +00:00
parent 29e49736ea
commit d308d597bd
9 changed files with 48 additions and 17 deletions

View File

@ -55,6 +55,7 @@ class musrPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
void SetvertexRelativeR(G4double val) {relativeRMaxAllowed=val;}
void SetboxBoundary(G4ThreeVector v) {xMaxSource=v[0]; yMaxSource=v[1]; zMaxSource=v[2];} //P.B. 15 Dec 2009
void SetboxBoundaryCentre(G4ThreeVector v) {xMaxSource0=v[0]; yMaxSource0=v[1]; zMaxSource0=v[2];} //P.B. 15 Dec 2009
void SetMeanArrivalTime(G4double val) {meanArrivalTime=val;}
void SetMuonTime(G4double val) {t0=val;} //P.B. 13 May 2009
void SetMuonTimeSigma(G4double val) {tSigma=val;} //P.B. 13 May 2009
void SetKEnergy(G4double val);
@ -101,6 +102,7 @@ class musrPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
static G4String thePrimaryParticleName ;
G4double x0, y0, z0, xSigma, ySigma, zSigma, rMaxAllowed, zMinAllowed, zMaxAllowed;
G4double meanArrivalTime;
G4double t0, tSigma; //P.B. 13 May 2009
G4double relativeRMaxAllowed;
G4double xMaxSource0, yMaxSource0, zMaxSource0; //P.B. 15 Dec 2009

View File

@ -52,6 +52,7 @@ class musrPrimaryGeneratorMessenger: public G4UImessenger
G4UIcmdWith3VectorAndUnit* setvertexSigmaCmd;
G4UIcmdWith3VectorAndUnit* setvertexBoundaryCmd;
G4UIcmdWithADoubleAndUnit* setvertexRelativeRCmd;
G4UIcmdWithADoubleAndUnit* setMeanArrivalTimeCmd;
G4UIcmdWithADoubleAndUnit* setStarttimeCmd; //P.B. 13 May 2009
G4UIcmdWithADoubleAndUnit* setStarttimeSigmaCmd; //P.B. 13 May 2009
G4UIcmdWith3VectorAndUnit* setboxBoundaryCmd; //P.B. 15 Dec 2009

View File

@ -60,6 +60,7 @@ class musrRootOutput {
// Setting variables common to the whole event:
void SetRunID (G4int id) {runID_t = id;};
void SetEventID (G4int id) {eventID_t = id;};
void SetTimeToNextEvent(G4double deltaT) {timeToNextEvent_t = deltaT/microsecond;}
void SetDecayDetectorID (std::string detectorName) {muDecayDetID_t = SensDetectorMapping[detectorName];};
void SetBField (G4double F[6]) {B_t[0]=F[0]/tesla; B_t[1]=F[1]/tesla; B_t[2]=F[2]/tesla;
B_t[3]=F[3]/tesla; B_t[4]=F[4]/tesla; B_t[5]=F[5]/tesla;};
@ -128,6 +129,7 @@ class musrRootOutput {
static G4bool store_runID;
static G4bool store_eventID;
static G4bool store_weight;
static G4bool store_timeToNextEvent;
static G4bool store_BFieldAtDecay;
static G4bool store_muIniTime;
static G4bool store_muIniPosX;
@ -230,6 +232,7 @@ class musrRootOutput {
Int_t runID_t;
Int_t eventID_t;
Double_t weight_t;
Double_t timeToNextEvent_t;
Double_t B_t[6];
Double_t muIniTime_t;
Double_t muIniPosX_t, muIniPosY_t, muIniPosZ_t;