23.6.2009 - Kamil Sedlak
The implementation of "muIniTime" has been finalised (i.e. the time, when the initial muons are generated). This variable is now stored in the root tree. The documentation of the musrSim has been updated accordingly. Simple test of the upgraded program was done, the implementation seems to be OK.
This commit is contained in:
parent
464ce6f895
commit
d05e77dbe5
BIN
doc/musrSim.pdf
BIN
doc/musrSim.pdf
Binary file not shown.
@ -137,7 +137,7 @@ are summarised in table~\ref{tab:units}.
|
|||||||
\lower 1mm \hbox{\textbf{Quantity}} && \lower 1mm \hbox{\textbf{Default unit}} \\[5pt]
|
\lower 1mm \hbox{\textbf{Quantity}} && \lower 1mm \hbox{\textbf{Default unit}} \\[5pt]
|
||||||
\hline
|
\hline
|
||||||
Length && mm \\
|
Length && mm \\
|
||||||
Time && ns \\
|
Time && $\mu$s \\
|
||||||
Energy && MeV \\
|
Energy && MeV \\
|
||||||
Momentum && MeV/c\\
|
Momentum && MeV/c\\
|
||||||
Magnetic field && tesla \\
|
Magnetic field && tesla \\
|
||||||
@ -430,6 +430,15 @@ Three special volumes ``Target, M0, M1 and M2''.
|
|||||||
Similar is true for {\it ySigma} and {\it zSigma}. \\
|
Similar is true for {\it ySigma} and {\it zSigma}. \\
|
||||||
(Ignored by the TURTLE input).
|
(Ignored by the TURTLE input).
|
||||||
|
|
||||||
|
\item{\bf /gun/starttime \emph{t0} \emph{unit}}\\
|
||||||
|
By default, muons are generated at time = 0. The time of generation of muons can be
|
||||||
|
set randomly according to the Gaussian or uniform distribution using variables
|
||||||
|
``/gun/starttime'' and ``/gun/starttimesigma''. See the description of the
|
||||||
|
``/gun/vertexsigma'' to understand how the choice is done.
|
||||||
|
|
||||||
|
\item{\bf /gun/starttimesigma \emph{t0} \emph{unit}}\\
|
||||||
|
See the description of ``/gun/starttime'' command.
|
||||||
|
|
||||||
\item{\bf /gun/vertexboundary \emph{R\_max} \emph{z\_min} \emph{z\_max} \emph{unit}}\\
|
\item{\bf /gun/vertexboundary \emph{R\_max} \emph{z\_min} \emph{z\_max} \emph{unit}}\\
|
||||||
Set maximum allowed radius, and minimum and maximum z coordinate of the generated particles (muons).
|
Set maximum allowed radius, and minimum and maximum z coordinate of the generated particles (muons).
|
||||||
This command might be useful especially if the user wants to restrict the
|
This command might be useful especially if the user wants to restrict the
|
||||||
@ -738,6 +747,7 @@ The list of variables that can be stored in the Root tree:
|
|||||||
value of the 6 coordinates of the electromagnetic field at the position and time where and when the muon decayed.
|
value of the 6 coordinates of the electromagnetic field at the position and time where and when the muon decayed.
|
||||||
The first three coordinates correspond to the magnetic field (in tesla), the last three to the electric field
|
The first three coordinates correspond to the magnetic field (in tesla), the last three to the electric field
|
||||||
(in kV/mm).
|
(in kV/mm).
|
||||||
|
\item{\bf muIniTime} (Double\_t) -- time when the initial muon was generated (in $\mu$s).
|
||||||
\item{\bf muIniPosX, muIniPosY, muIniPosZ} (Double\_t) -- initial position where muon was generated (in mm).
|
\item{\bf muIniPosX, muIniPosY, muIniPosZ} (Double\_t) -- initial position where muon was generated (in mm).
|
||||||
\item{\bf muIniMomX, muIniMomY, muIniMomZ} (Double\_t) -- initial momentum of the muon when it was generated (in MeV/c).
|
\item{\bf muIniMomX, muIniMomY, muIniMomZ} (Double\_t) -- initial momentum of the muon when it was generated (in MeV/c).
|
||||||
\item{\bf muIniPolX, muIniPolY, muIniPolZ} (Double\_t) -- initial polarisation of the muon when it was generated.
|
\item{\bf muIniPolX, muIniPolY, muIniPolZ} (Double\_t) -- initial polarisation of the muon when it was generated.
|
||||||
|
@ -82,7 +82,8 @@ class musrRootOutput {
|
|||||||
G4double px, G4double py, G4double pz) ;
|
G4double px, G4double py, G4double pz) ;
|
||||||
|
|
||||||
void SetInitialMuonParameters(G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz,
|
void SetInitialMuonParameters(G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz,
|
||||||
G4double xpolaris, G4double ypolaris, G4double zpolaris) {
|
G4double xpolaris, G4double ypolaris, G4double zpolaris, G4double particleTime) {
|
||||||
|
muIniTime_t=particleTime/microsecond;
|
||||||
muIniPosX_t=x; muIniPosY_t=y; muIniPosZ_t=z;
|
muIniPosX_t=x; muIniPosY_t=y; muIniPosZ_t=z;
|
||||||
muIniMomX_t=px; muIniMomY_t=py; muIniMomZ_t=pz;
|
muIniMomX_t=px; muIniMomY_t=py; muIniMomZ_t=pz;
|
||||||
muIniPolX_t=xpolaris; muIniPolY_t=ypolaris; muIniPolZ_t=zpolaris;
|
muIniPolX_t=xpolaris; muIniPolY_t=ypolaris; muIniPolZ_t=zpolaris;
|
||||||
@ -91,6 +92,7 @@ class musrRootOutput {
|
|||||||
G4cout<<"musrRootOutput.hh: Initial muon parameters: x="<<muIniPosX_t<<", y="<<muIniPosY_t<<", z="<<muIniPosZ_t
|
G4cout<<"musrRootOutput.hh: Initial muon parameters: x="<<muIniPosX_t<<", y="<<muIniPosY_t<<", z="<<muIniPosZ_t
|
||||||
<<", px="<<muIniMomX_t << ", py="<<muIniMomY_t<<", pz="<<muIniMomZ_t<<G4endl;
|
<<", px="<<muIniMomX_t << ", py="<<muIniMomY_t<<", pz="<<muIniMomZ_t<<G4endl;
|
||||||
G4cout<<" polx="<<muIniPolX_t<<", poly="<<muIniPolY_t<<", polz="<<muIniPolZ_t<<G4endl;
|
G4cout<<" polx="<<muIniPolX_t<<", poly="<<muIniPolY_t<<", polz="<<muIniPolZ_t<<G4endl;
|
||||||
|
G4cout<<" time at which muon was generated = "<<muIniTime_t<<G4endl;
|
||||||
G4cout<<" numberOfGeneratedEvents = "<<GeantParametersD[7]<<G4endl;
|
G4cout<<" numberOfGeneratedEvents = "<<GeantParametersD[7]<<G4endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,6 +128,7 @@ class musrRootOutput {
|
|||||||
static G4bool store_eventID;
|
static G4bool store_eventID;
|
||||||
static G4bool store_weight;
|
static G4bool store_weight;
|
||||||
static G4bool store_BFieldAtDecay;
|
static G4bool store_BFieldAtDecay;
|
||||||
|
static G4bool store_muIniTime;
|
||||||
static G4bool store_muIniPosX;
|
static G4bool store_muIniPosX;
|
||||||
static G4bool store_muIniPosY;
|
static G4bool store_muIniPosY;
|
||||||
static G4bool store_muIniPosZ;
|
static G4bool store_muIniPosZ;
|
||||||
@ -224,6 +227,7 @@ class musrRootOutput {
|
|||||||
Int_t eventID_t;
|
Int_t eventID_t;
|
||||||
Double_t weight_t;
|
Double_t weight_t;
|
||||||
Double_t B_t[6];
|
Double_t B_t[6];
|
||||||
|
Double_t muIniTime_t;
|
||||||
Double_t muIniPosX_t, muIniPosY_t, muIniPosZ_t;
|
Double_t muIniPosX_t, muIniPosY_t, muIniPosZ_t;
|
||||||
Double_t muIniMomX_t, muIniMomY_t, muIniMomZ_t;
|
Double_t muIniMomX_t, muIniMomY_t, muIniMomZ_t;
|
||||||
Double_t muIniPolX_t, muIniPolY_t, muIniPolZ_t;
|
Double_t muIniPolX_t, muIniPolY_t, muIniPolZ_t;
|
||||||
|
@ -849,6 +849,7 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
|
|||||||
if (strcmp(tmpString2,"eventID")==0) {musrRootOutput::store_eventID = false;}
|
if (strcmp(tmpString2,"eventID")==0) {musrRootOutput::store_eventID = false;}
|
||||||
if (strcmp(tmpString2,"weight")==0) {musrRootOutput::store_weight = false;}
|
if (strcmp(tmpString2,"weight")==0) {musrRootOutput::store_weight = false;}
|
||||||
if (strcmp(tmpString2,"BFieldAtDecay")==0){musrRootOutput::store_BFieldAtDecay = false;}
|
if (strcmp(tmpString2,"BFieldAtDecay")==0){musrRootOutput::store_BFieldAtDecay = false;}
|
||||||
|
if (strcmp(tmpString2,"muIniTime")==0) {musrRootOutput::store_muIniTime = false;}
|
||||||
if (strcmp(tmpString2,"muIniPosX")==0) {musrRootOutput::store_muIniPosX = false;}
|
if (strcmp(tmpString2,"muIniPosX")==0) {musrRootOutput::store_muIniPosX = false;}
|
||||||
if (strcmp(tmpString2,"muIniPosY")==0) {musrRootOutput::store_muIniPosY = false;}
|
if (strcmp(tmpString2,"muIniPosY")==0) {musrRootOutput::store_muIniPosY = false;}
|
||||||
if (strcmp(tmpString2,"muIniPosZ")==0) {musrRootOutput::store_muIniPosZ = false;}
|
if (strcmp(tmpString2,"muIniPosZ")==0) {musrRootOutput::store_muIniPosZ = false;}
|
||||||
|
@ -335,7 +335,7 @@ void musrPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save variables into ROOT output file:
|
// Save variables into ROOT output file:
|
||||||
myRootOutput->SetInitialMuonParameters(x,y,z,px,py,pz,xpolaris,ypolaris,zpolaris);
|
myRootOutput->SetInitialMuonParameters(x,y,z,px,py,pz,xpolaris,ypolaris,zpolaris,ParticleTime);
|
||||||
myRootOutput->StoreGeantParameter(7,float(numberOfGeneratedEvents));
|
myRootOutput->StoreGeantParameter(7,float(numberOfGeneratedEvents));
|
||||||
if (boolPrintInfoAboutGeneratedParticles) {
|
if (boolPrintInfoAboutGeneratedParticles) {
|
||||||
G4cout<<"musrPrimaryGeneratorAction::GeneratePrimaries: x="<<x<<", y="<<y<<", z="<<z<<G4endl;
|
G4cout<<"musrPrimaryGeneratorAction::GeneratePrimaries: x="<<x<<", y="<<y<<", z="<<z<<G4endl;
|
||||||
|
@ -65,6 +65,7 @@ G4bool musrRootOutput::store_runID = true;
|
|||||||
G4bool musrRootOutput::store_eventID = true;
|
G4bool musrRootOutput::store_eventID = true;
|
||||||
G4bool musrRootOutput::store_weight = true;
|
G4bool musrRootOutput::store_weight = true;
|
||||||
G4bool musrRootOutput::store_BFieldAtDecay = true;
|
G4bool musrRootOutput::store_BFieldAtDecay = true;
|
||||||
|
G4bool musrRootOutput::store_muIniTime = true;
|
||||||
G4bool musrRootOutput::store_muIniPosX = true;
|
G4bool musrRootOutput::store_muIniPosX = true;
|
||||||
G4bool musrRootOutput::store_muIniPosY = true;
|
G4bool musrRootOutput::store_muIniPosY = true;
|
||||||
G4bool musrRootOutput::store_muIniPosZ = true;
|
G4bool musrRootOutput::store_muIniPosZ = true;
|
||||||
@ -154,6 +155,7 @@ void musrRootOutput::BeginOfRunAction() {
|
|||||||
if (store_eventID) {rootTree->Branch("eventID",&eventID_t,"eventID/I");}
|
if (store_eventID) {rootTree->Branch("eventID",&eventID_t,"eventID/I");}
|
||||||
if (store_weight) {rootTree->Branch("weight",&weight_t,"weight/D");}
|
if (store_weight) {rootTree->Branch("weight",&weight_t,"weight/D");}
|
||||||
if (store_BFieldAtDecay) {rootTree->Branch("BFieldAtDecay",&B_t,"Bx/D:By:Bz:B3:B4:B5");}
|
if (store_BFieldAtDecay) {rootTree->Branch("BFieldAtDecay",&B_t,"Bx/D:By:Bz:B3:B4:B5");}
|
||||||
|
if (store_muIniTime) {rootTree->Branch("muIniTime",&muIniTime_t,"muIniTime/D");}
|
||||||
if (store_muIniPosX) {rootTree->Branch("muIniPosX",&muIniPosX_t,"muIniPosX/D");}
|
if (store_muIniPosX) {rootTree->Branch("muIniPosX",&muIniPosX_t,"muIniPosX/D");}
|
||||||
if (store_muIniPosY) {rootTree->Branch("muIniPosY",&muIniPosY_t,"muIniPosY/D");}
|
if (store_muIniPosY) {rootTree->Branch("muIniPosY",&muIniPosY_t,"muIniPosY/D");}
|
||||||
if (store_muIniPosZ) {rootTree->Branch("muIniPosZ",&muIniPosZ_t,"muIniPosZ/D");}
|
if (store_muIniPosZ) {rootTree->Branch("muIniPosZ",&muIniPosZ_t,"muIniPosZ/D");}
|
||||||
@ -304,6 +306,7 @@ void musrRootOutput::ClearAllRootVariables() {
|
|||||||
eventID_t=-1000;
|
eventID_t=-1000;
|
||||||
weight_t=1.;
|
weight_t=1.;
|
||||||
B_t[0]=-1000.;B_t[1]=-1000.;B_t[2]=-1000.;B_t[3]=-1000.;B_t[4]=-1000.;B_t[5]=-1000.;
|
B_t[0]=-1000.;B_t[1]=-1000.;B_t[2]=-1000.;B_t[3]=-1000.;B_t[4]=-1000.;B_t[5]=-1000.;
|
||||||
|
muIniTime_t=-1000;
|
||||||
muIniPosX_t=-1000; muIniPosY_t=-1000; muIniPosZ_t=-1000;
|
muIniPosX_t=-1000; muIniPosY_t=-1000; muIniPosZ_t=-1000;
|
||||||
muIniMomX_t=-1000; muIniMomY_t=-1000; muIniMomZ_t=-1000;
|
muIniMomX_t=-1000; muIniMomY_t=-1000; muIniMomZ_t=-1000;
|
||||||
muIniPolX_t=-1000; muIniPolY_t=-1000; muIniPolZ_t=-1000;
|
muIniPolX_t=-1000; muIniPolY_t=-1000; muIniPolZ_t=-1000;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user