45 #include "RunAction.hh"
79 G4cout <<
"###RunAction::BeginOfRunAction Material:"
84 fAnalysis = G4AnalysisManager::Instance();
88 std::stringstream
tmp;
89 tmp <<
"testem6_" << aRun->
GetRunID();
94 fileName = fileName +
"." + extension;
99 fAnalysis->CreateH1(
"h1",
"1/(1+(theta+[g]+)**2)",100, 0 ,1.);
100 fAnalysis->CreateH1(
"h2",
"log10(theta+ [g]+)", 100,-3.,1.);
101 fAnalysis->CreateH1(
"h3",
"log10(theta- [g]-)", 100,-3.,1.);
102 fAnalysis->CreateH1(
"h4",
"log10(theta+ [g]+ -theta- [g]-)", 100,-3.,1.);
103 fAnalysis->CreateH1(
"h5",
"xPlus" ,100,0.,1.);
104 fAnalysis->CreateH1(
"h6",
"xMinus",100,0.,1.);
110 fAnalysis->CreateH1(
"h7",
"CrossSectionPerAtom of AnnihiToMuMu (microbarn)",
111 fnBin,minBin,maxBin);
113 "CrossSectionPerAtom of AnnihiToTwoGamma (microbarn)",
fnBin,minBin,maxBin);
114 fAnalysis->CreateH1(
"h9",
"CrossSectionPerAtom of AnnihiToHadrons (microbarn)",
115 fnBin,minBin,maxBin);
117 "Theoretical CrossSectionPerAtom of AnnihiToTwoGamma (microbarn)",
118 fnBin,minBin,maxBin);
120 "Theoretical CrossSectionPerAtom of AnnihiToMuMu (microbarn)",
121 fnBin,minBin,maxBin);
125 fAnalysis->CreateH1(
"h12",
"CrossSectionPerVol of Bremsstraulung (1/mm) ",
126 fnBin,minBin,maxBin);
127 fAnalysis->CreateH1(
"h13",
"CrossSectionPerVol of Ionization (1/mm)",
128 fnBin,minBin,maxBin);
129 fAnalysis->CreateH1(
"h14",
"CrossSectionPerVol of AnnihiToMuMu (1/mm)",
130 fnBin,minBin,maxBin);
131 fAnalysis->CreateH1(
"h15",
"CrossSectionPerVol of AnnihiToTwoGamma (1/mm)",
132 fnBin,minBin,maxBin);
133 fAnalysis->CreateH1(
"h16",
"CrossSectionPerVol of AnnihiToHadrons (1/mm)",
134 fnBin,minBin,maxBin);
137 fAnalysis->CreateH1(
"h17",
"R : eeToHadr/eeToMu",
fnBin,minBin,maxBin);
139 G4cout <<
"\n----> Histogram file is opened in " << fileName <<
G4endl;
150 while ((i<nbProc)&&((*
fProcCounter)[i]->GetName()!=procName)) i++;
153 (*fProcCounter)[i]->Count();
167 G4cout <<
"\n Number of process calls --->";
169 G4String procName = (*fProcCounter)[i]->GetName();
170 if (procName !=
"Transportation") {
171 G4int count = (*fProcCounter)[i]->GetCounter();
172 G4cout <<
"\t" << procName <<
" : " << count;
191 G4String annihiToMuName =
"AnnihiToMuPair";
192 G4String annihiToHadrName =
"ee2hadr";
204 G4double crs_annihil, crs_annihiToMu, crs_annihiToHadr;
205 G4double crsVol_annihil, crsVol_annihiToMu, crsVol_annihiToHadr,
206 crsVol_Brem, crsVol_Ioni;
207 G4double crs_annihil_theory, crs_annihiToMu_theory, RR;
238 for(
int i=0;i<
fnBin;i++){
240 energy=std::pow(10,x)*
GeV;
268 fAnalysis->FillH1(14,x,crsVol_annihiToMu*mm);
272 fAnalysis->FillH1(15,x,crsVol_annihil*mm);
274 crsVol_annihiToHadr =
276 fAnalysis->FillH1(16,x,crsVol_annihiToHadr*mm);
281 if(crsVol_annihiToMu != 0) RR = crsVol_annihiToHadr/crsVol_annihiToMu;
287 if(X1>1 && i%1000==0){
288 crs_annihil_theory = atomicZ*
pi*Re*Re*
289 ( (X1*X1+4*X1+1)*
G4Log(X1+std::sqrt(X1*X1-1))/(X1*X1-1)
290 -(X1+3)/std::sqrt(X1*X1-1) )/(X1+1);
295 if(X2<1 && i%1000==0){
296 crs_annihiToMu_theory = atomicZ*
pi*Ru*Ru/3*X2*(1+X2/2)*std::sqrt(1-X2);
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void EndOfRunAction(const G4Run *)
static G4ParticleTable * GetParticleTable()
G4AnalysisManager * fAnalysis
static constexpr double keV
static constexpr double mm
ProcessesCount * fProcCounter
std::vector< OneProcessCount * > ProcessesCount
static G4MuonMinus * MuonMinus()
G4double GetPDGMass() const
static constexpr double classic_electr_radius
G4VProcess * FindProcess(const G4ParticleDefinition *part, const G4String &processName)
G4double G4Log(G4double x)
void BeginOfRunAction(const G4Run *)
const G4String & GetName() const
void CountProcesses(G4String)
static constexpr double electron_mass_c2
G4double CrossSectionPerVolume(G4double PositronEnergy, const G4Material *)
G4double ComputeCrossSectionPerAtom(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, G4double Z, G4double A, G4double cut=0.0)
DetectorConstruction * fDetector
G4double ComputeCrossSectionPerAtom(G4double PositronEnergy, G4double AtomicZ)
static constexpr double microbarn
G4double ComputeCrossSectionPerVolume(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, G4double cut=0.0)
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
void SetVerbose(G4int val)
G4Material * GetMaterial()
static constexpr double GeV
Simple detector construction with a box volume placed in a world.