Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
/*! \page Examplegflasha Example gflasha
|
||||
|
||||
This example demonstrates usage 'gflash' shower parameterisation
|
||||
in homogeneous calorimeter. Compare with glash1,2,3 in this
|
||||
example histograms was added. This makes it possible to use this
|
||||
This example demonstrating usage 'gflash' shower parameterisation
|
||||
in homogeneous calorimeter. Compare with glash1,2,3 the histograms
|
||||
have been added in this example. This makes it possible to use this
|
||||
example for fine tuning of GFLASH parameters.
|
||||
|
||||
This example allows to compare the shower profiles from fast simulation
|
||||
@@ -23,12 +23,12 @@ in this example.
|
||||
|
||||
The Physics list factory is used in this example.
|
||||
The default physics list is FTFP_BERT which has EM opt0.
|
||||
Additionally the G4FastSimulationPhysics physics
|
||||
Additionally, the G4FastSimulationPhysics physics
|
||||
constructor was created to insert the G4FastSimulationManagerProcess
|
||||
that is making the interface between the fast simulation and the tracking.
|
||||
|
||||
THe default PHYSICS list may be changed via setting of the PHYSLIST environment
|
||||
variable, e.g:
|
||||
The default PHYSICS list may be changed via setting of the PHYSLIST environment
|
||||
variable, e.g.:
|
||||
|
||||
\verbatim
|
||||
export PHYSLIST=FTFP_BERT_EMZ # for FTFP_BERT with opt 4 EM physics
|
||||
@@ -44,8 +44,16 @@ Geometry, sensitive detector and hits are defined respectively in:
|
||||
- ExGflashSensitiveDetector
|
||||
- ExGflashHit
|
||||
|
||||
Materials can be choosen from Nist Materials: G4_Air G4_WATER ...
|
||||
eg:
|
||||
The geometry can be redefined in PreInit state via commands:
|
||||
|
||||
\verbatim
|
||||
/exgflash/det/setNbCrys ncrys
|
||||
/exgflash/det/setCrysWidth width [cm]
|
||||
/exgflash/det/setCrysLength length [cm]
|
||||
\endverbatim
|
||||
|
||||
Materials can be chosen from Nist Materials: G4_Air G4_WATER ...
|
||||
e.g.:
|
||||
\verbatim
|
||||
/exgflash/det/setMat G4_PbWO4
|
||||
\endverbatim
|
||||
@@ -55,23 +63,24 @@ see also: csi1.mac
|
||||
|
||||
The virtual cylinder sliced longitudinally (slice) and radially (ring) was used.
|
||||
The size of the slices and rings are expressed in radiation
|
||||
length units and can be changed.
|
||||
eg:
|
||||
length units and Moliere radius (Rm) units for rings. The number
|
||||
of division and division size in fraction of units and can be changed.
|
||||
e.g.:
|
||||
\verbatim
|
||||
/exgflash/det/setLbin 20 1. ---> 20 slices of 1. radl
|
||||
/exgflash/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
|
||||
/exgflash/det/setRbin 5 0.25 ---> 5 rings of 0.25 Rm
|
||||
(MaxBin = 500 in both directions)
|
||||
\endverbatim
|
||||
|
||||
In ExGflashEventAction class the arrays corresponded slices and rings was
|
||||
created and filled with hists information. This arrays was use to fill
|
||||
created and filled with hists information. These arrays where use to fill
|
||||
histograms later.
|
||||
|
||||
\section gflasha_s3 Visualization
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialization of the drawing is done via the commands /vis/...
|
||||
in the macro vis.mac. To get visualization:
|
||||
in the macro vis.mac. To get visualization use:
|
||||
\verbatim
|
||||
/control/execute vis.mac
|
||||
\endverbatim
|
||||
@@ -123,13 +132,20 @@ To define the output file name with histograms, use the UI command :
|
||||
|
||||
The macros to run in batch mode:
|
||||
|
||||
- test.mac - default macro for example testing
|
||||
- test.mac - default macro for example testing, it show how to use different application commands: redefine the histograms and profiles, change the geometry and material, etc
|
||||
|
||||
- run01.mac - show how redefine the histograms
|
||||
- csi.mac - like test.mac but produce profiles in CsI Material
|
||||
|
||||
- csi1.mac - macro which produce profiles in CsI Material
|
||||
- testLong.mac - make the runs with more statistics using default geometry and histograms setting, the material is G4_PbWO4
|
||||
|
||||
- test0.mac - profile caparison, long run without GFLASH
|
||||
- test1.mac - profile comprising, long run with GFLASH on
|
||||
- csiLong.mac - show how to run testLong.mac with different material (CsI)
|
||||
|
||||
Each macro executes two runs with fast simulation flag ON (the output file
|
||||
name is set to gflash01.root ) and OFF (the output file name is set to gflash00.root )
|
||||
|
||||
In addition, the ROOT macros cmpL.C, cmpR.C and cmpE.C file are provided,
|
||||
which can be used to draw superimposed full and fast histograms for radial
|
||||
and lateral profiles and also the normalized total energy deposition
|
||||
in calorimeter.
|
||||
|
||||
*/
|
||||
|
||||
@@ -40,7 +40,8 @@ target_link_libraries(ExGflasha ${Geant4_LIBRARIES} )
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(gflash_SCRIPTS
|
||||
test.mac test0.mac test1.mac vis.mac csi1.mac run01.mac cmpL.C cmpR.C cmpE.C
|
||||
test.mac testLong.mac vis.mac csi.mac csiLong.mac
|
||||
cmpL.C cmpR.C cmpE.C
|
||||
)
|
||||
|
||||
foreach(_script ${gflash_SCRIPTS})
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
/// \file ExGflasha.cc
|
||||
/// \brief Main program of the parameterisations/gflash/gflasha example
|
||||
//
|
||||
// Created by Joanna Weng 26.11.2004
|
||||
|
||||
// G4 includes
|
||||
#include "G4PhysListFactory.hh"
|
||||
@@ -110,9 +109,6 @@ int main(int argc, char** argv)
|
||||
visManager->Initialize();
|
||||
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
UImanager->ApplyCommand("/run/verbose 0");
|
||||
runManager->Initialize();
|
||||
UImanager->ApplyCommand("/Step/Verbose 0");
|
||||
|
||||
if (ui != nullptr) // Define UI terminal for interactive mode
|
||||
{
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Example gflash History
|
||||
|
||||
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
## 2024-10-28 I. Semeniouk (exgflasha-V11-02-02)
|
||||
- ExGflashHistoManager - fix fVerbose used but uninitialised
|
||||
|
||||
## 2024-10-21 I. Semeniouk (exgflasha-V11-02-01)
|
||||
- Code cleanup
|
||||
- Restore setMat functionality, added geometry commands
|
||||
- New commands documented in README
|
||||
- Event generator defaults moved from vis.mac to PrimaryGenerator code
|
||||
- Macro files updated
|
||||
|
||||
## 2024-10-02 I. Semeniouk (exgflasha-V11-02-00)
|
||||
- Added dedicated History
|
||||
- Bigger calo length, radial histos in fraction of radius Moliere,
|
||||
fix index range.
|
||||
|
||||
---
|
||||
|
||||
# History entries prior to 11.0
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
GFLASHa Example
|
||||
---------------
|
||||
|
||||
The Example demonstrating usage 'gflash' shower parameterisation
|
||||
in homogeneous calorimeter.Compare with glash1,2,3 in this
|
||||
example histograms was added. This makes it possible to use this
|
||||
This example demonstrating usage 'gflash' shower parameterisation
|
||||
in homogeneous calorimeter. Compare with glash1,2,3 the histograms
|
||||
have been added in this example. This makes it possible to use this
|
||||
example for fine tuning of GFLASH parameters.
|
||||
This example allow compare the shower profiles from fast simulation
|
||||
This example allows to compare the shower profiles from fast simulation
|
||||
with full simulation by histograming of longitudinal (slice)
|
||||
and radial profiles with different "binning".
|
||||
Then GFlash fast simulation can be "tuned" via modification
|
||||
@@ -24,12 +24,12 @@ PHYSICS LIST
|
||||
|
||||
The Physics list factory is used in this example.
|
||||
The default physics list is FTFP_BERT which has EM opt0.
|
||||
Additionally the G4FastSimulationPhysics physics
|
||||
Additionally, the G4FastSimulationPhysics physics
|
||||
constructor was created to insert the G4FastSimulationManager Process
|
||||
that is making the interface between the fast simulation and the tracking.
|
||||
|
||||
THe default PHYSICS list may be changed via setting of the PHYSLIST environment
|
||||
variable, e.g:
|
||||
The default PHYSICS list may be changed via setting of the PHYSLIST environment
|
||||
variable, e.g.:
|
||||
|
||||
export PHYSLIST=FTFP_BERT_EMZ # for FTFP_BERT with opt 4 EM physics
|
||||
|
||||
@@ -45,22 +45,29 @@ Geometry, sensitive detector and hits are defined respectively in:
|
||||
ExGflashSensitiveDetector
|
||||
ExGflashHit
|
||||
|
||||
Materials can be choosen from Nist Materials: G4_Air G4_WATER ...
|
||||
eg: /exgflash/det/setMat G4_PbWO4 see also: csi1.mac
|
||||
The geometry can be redefined in PreInit state via commands:
|
||||
|
||||
/exgflash/det/setNbCrys ncrys
|
||||
/exgflash/det/setCrysWidth width [cm]
|
||||
/exgflash/det/setCrysLength length [cm]
|
||||
|
||||
Materials can be chosen from Nist Materials: G4_Air G4_WATER ...
|
||||
e.g.: /exgflash/det/setMat G4_PbWO4 see also: csi.mac
|
||||
|
||||
HIT SCORING
|
||||
-----------
|
||||
|
||||
The virtual cylinder sliced longitudinally (slice) and radially (ring) was used.
|
||||
The size of the slices and rings are expressed in radiation
|
||||
length units and can be changed.
|
||||
eg: /exgflash/det/setLbin 20 1. ---> 20 slices of 1. radl
|
||||
/exgflash/det/setRbin 5 0.25 ---> 5 rings of 0.25 radl
|
||||
length units and Moliere radius (Rm) units for rings. The number
|
||||
of division and division size in fraction of units and can be changed.
|
||||
e.g.: /exgflash/det/setLbin 20 1. ---> 20 slices of 1. radl
|
||||
/exgflash/det/setRbin 5 0.25 ---> 5 rings of 0.25 Rm
|
||||
|
||||
(MaxBin = 500 in both directions)
|
||||
|
||||
In ExGflashEventAction class the arrays corresponded slices and rings was
|
||||
created and filled with hists information. This arrays was use to fill
|
||||
created and filled with hists information. These arrays where use to fill
|
||||
histograms later.
|
||||
|
||||
VISUALIZATION
|
||||
@@ -68,7 +75,7 @@ VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialization of the drawing is done via the commands /vis/...
|
||||
in the macro vis.mac. To get visualization:
|
||||
in the macro vis.mac. To get visualization use:
|
||||
/control/execute vis.mac
|
||||
|
||||
|
||||
@@ -115,11 +122,18 @@ MACROS
|
||||
------
|
||||
The macros to run in batch mode:
|
||||
|
||||
test.mac - default macro for example testing
|
||||
test.mac - default macro for example testing, it show how to use different application commands: redefine the histograms and profiles, change the geometry and material, etc
|
||||
|
||||
run01.mac - show how redefine the histograms
|
||||
csi.mac - like test.mac but produce profiles in CsI Material
|
||||
|
||||
csi1.mac - macro which produce profiles in CsI Material
|
||||
testLong.mac - make the runs with more statistics using default geometry and histograms setting, the material is G4_PbWO4
|
||||
|
||||
test0.mac - profile comparison, long run without GFLASH
|
||||
test1.mac - profile comparison, long run with GFLASH on
|
||||
csiLong.mac - show how to run testLong.mac with different material (CsI)
|
||||
|
||||
Each macro executes two runs with fast simulation flag ON (the output file
|
||||
name is set to gflash01.root ) and OFF (the output file name is set to gflash00.root )
|
||||
|
||||
In addition, the ROOT macros cmpL.C, cmpR.C and cmpE.C file are provided,
|
||||
which can be used to draw superimposed full and fast histograms for radial
|
||||
and lateral profiles and also the normalized total energy deposition
|
||||
in calorimeter.
|
||||
|
||||
@@ -1,74 +1,72 @@
|
||||
// Draw Longitudinal Shower Profile
|
||||
|
||||
#include "TH1D.h"
|
||||
#include "TFile.h"
|
||||
#include "THStack.h"
|
||||
#include "TCanvas.h"
|
||||
#include "TString.h"
|
||||
#include "TFile.h"
|
||||
#include "TH1D.h"
|
||||
#include "THStack.h"
|
||||
#include "TLegend.h"
|
||||
#include "TString.h"
|
||||
|
||||
|
||||
TCanvas *cmpL() {
|
||||
|
||||
//TString dataDir("/net/llrdata1.in2p3.fr/data/DATA/data.harpo/BH5D/");
|
||||
TCanvas* cmpL()
|
||||
{
|
||||
// TString dataDir("/net/llrdata1.in2p3.fr/data/DATA/data.harpo/BH5D/");
|
||||
TString dataDir("./");
|
||||
|
||||
TString dataFile[2];
|
||||
dataFile[0] = "gflash00.root";
|
||||
dataFile[1] = "gflash01.root";
|
||||
dataFile[0] = "gflash00.root";
|
||||
dataFile[1] = "gflash01.root";
|
||||
|
||||
|
||||
TFile *f[2];
|
||||
TProfile *p[2];
|
||||
TFile* f[2];
|
||||
TProfile* p[2];
|
||||
// UInt_t col[] = { kRed, kBlue, kGreen, kViolet };
|
||||
UInt_t col[] = { kRed, kGreen, kBlue, kViolet };
|
||||
UInt_t col[] = {kRed, kGreen, kBlue, kViolet};
|
||||
// UInt_t mark[] = { 20, 32, 21, 22};
|
||||
UInt_t mark[] = { 20, 21, 32, 22};
|
||||
//
|
||||
THStack *hs = new THStack("hs","");
|
||||
UInt_t mark[] = {20, 21, 32, 22};
|
||||
//
|
||||
THStack* hs = new THStack("hs", "");
|
||||
|
||||
for (UInt_t i = 0; i < 2; i++) {
|
||||
TString tmp = dataDir + dataFile[i];
|
||||
f[i] = TFile::Open(tmp);
|
||||
if (!f[i]) return 0;
|
||||
p[i] = (TProfile *) (f[i])->Get("p0");
|
||||
//ShiftUp(p[i],0.0);
|
||||
// histogram
|
||||
p[i]->SetFillColor(col[i]);
|
||||
p[i]->SetLineStyle(i+2);
|
||||
p[i]->SetLineColor(col[i]);
|
||||
p[i]->SetLineWidth(2);
|
||||
p[i]->SetMarkerStyle(mark[i]);
|
||||
p[i]->SetMarkerColor(col[i]);
|
||||
p[i]->SetMarkerSize(1.5);
|
||||
hs->Add(p[i]);
|
||||
}
|
||||
TCanvas *cst = new TCanvas("cst","stacked hists",10,10,800,700);
|
||||
//gPad->SetGrid();
|
||||
hs->Draw("p,nostack");
|
||||
hs->SetTitle("Longitudinal Profile");
|
||||
hs->GetXaxis()->SetTitle("Depth (RadLen)");
|
||||
hs->GetYaxis()->SetTitle("E/E_{tot} (%/RadLen)");
|
||||
for (UInt_t i = 0; i < 2; i++) {
|
||||
TString tmp = dataDir + dataFile[i];
|
||||
f[i] = TFile::Open(tmp);
|
||||
if (!f[i]) return 0;
|
||||
p[i] = (TProfile*)(f[i])->Get("p0");
|
||||
// ShiftUp(p[i],0.0);
|
||||
// histogram
|
||||
p[i]->SetFillColor(col[i]);
|
||||
p[i]->SetLineStyle(i + 2);
|
||||
p[i]->SetLineColor(col[i]);
|
||||
p[i]->SetLineWidth(2);
|
||||
p[i]->SetMarkerStyle(mark[i]);
|
||||
p[i]->SetMarkerColor(col[i]);
|
||||
p[i]->SetMarkerSize(1.5);
|
||||
hs->Add(p[i]);
|
||||
}
|
||||
TCanvas* cst = new TCanvas("cst", "stacked hists", 10, 10, 800, 700);
|
||||
// gPad->SetGrid();
|
||||
hs->Draw("p,nostack");
|
||||
hs->SetTitle("Longitudinal Profile");
|
||||
hs->GetXaxis()->SetTitle("Depth (RadLen)");
|
||||
hs->GetYaxis()->SetTitle("E/E_{tot} (%) / RadLen");
|
||||
|
||||
cst->RedrawAxis();
|
||||
cst->Update();
|
||||
cst->RedrawAxis();
|
||||
cst->Update();
|
||||
|
||||
TLegend* legend = new TLegend(0.79,0.84,0.94,0.94);
|
||||
legend->AddEntry(p[0],"full ","p");
|
||||
legend->AddEntry(p[1],"gflash","p");
|
||||
legend->Draw();
|
||||
cst->Update();
|
||||
TLegend* legend = new TLegend(0.79, 0.84, 0.94, 0.94);
|
||||
legend->AddEntry(p[0], "full ", "p");
|
||||
legend->AddEntry(p[1], "gflash", "p");
|
||||
legend->Draw();
|
||||
cst->Update();
|
||||
|
||||
//img->FromPad(c, 10, 10, 300, 200);
|
||||
// img->FromPad(c, 10, 10, 300, 200);
|
||||
|
||||
// TImage *img = TImage::Create();
|
||||
// TImage *img = TImage::Create();
|
||||
|
||||
// img->FromPad(cst);
|
||||
// img->FromPad(cst);
|
||||
|
||||
// img->WriteImage("hist0-640MeV-p.png");
|
||||
// img->WriteImage("hist0-640MeV-p.png");
|
||||
|
||||
// for (UInt_t i = 0; i < 4; i++) {
|
||||
// f[i]->Close();
|
||||
// }
|
||||
return cst;
|
||||
// for (UInt_t i = 0; i < 4; i++) {
|
||||
// f[i]->Close();
|
||||
// }
|
||||
return cst;
|
||||
}
|
||||
|
||||
@@ -1,74 +1,72 @@
|
||||
// Draw Radial Shower Profile
|
||||
|
||||
#include "TH1D.h"
|
||||
#include "TFile.h"
|
||||
#include "THStack.h"
|
||||
#include "TCanvas.h"
|
||||
#include "TString.h"
|
||||
#include "TFile.h"
|
||||
#include "TH1D.h"
|
||||
#include "THStack.h"
|
||||
#include "TLegend.h"
|
||||
#include "TString.h"
|
||||
|
||||
|
||||
TCanvas *cmpR() {
|
||||
|
||||
//TString dataDir("/net/llrdata1.in2p3.fr/data/DATA/data.harpo/BH5D/");
|
||||
TCanvas* cmpR()
|
||||
{
|
||||
// TString dataDir("/net/llrdata1.in2p3.fr/data/DATA/data.harpo/BH5D/");
|
||||
TString dataDir("./");
|
||||
|
||||
TString dataFile[2];
|
||||
dataFile[0] = "gflash00.root";
|
||||
dataFile[1] = "gflash01.root";
|
||||
dataFile[0] = "gflash00.root";
|
||||
dataFile[1] = "gflash01.root";
|
||||
|
||||
|
||||
TFile *f[2];
|
||||
TProfile *p[2];
|
||||
TFile* f[2];
|
||||
TProfile* p[2];
|
||||
// UInt_t col[] = { kRed, kBlue, kGreen, kViolet };
|
||||
UInt_t col[] = { kRed, kGreen, kBlue, kViolet };
|
||||
UInt_t col[] = {kRed, kGreen, kBlue, kViolet};
|
||||
// UInt_t mark[] = { 20, 32, 21, 22};
|
||||
UInt_t mark[] = { 20, 21, 32, 22};
|
||||
//
|
||||
THStack *hs = new THStack("hs","");
|
||||
UInt_t mark[] = {20, 21, 32, 22};
|
||||
//
|
||||
THStack* hs = new THStack("hs", "");
|
||||
|
||||
for (UInt_t i = 0; i < 2; i++) {
|
||||
TString tmp = dataDir + dataFile[i];
|
||||
f[i] = TFile::Open(tmp);
|
||||
if (!f[i]) return 0;
|
||||
p[i] = (TProfile *) (f[i])->Get("p1");
|
||||
//ShiftUp(p[i],0.0);
|
||||
// histogram
|
||||
p[i]->SetFillColor(col[i]);
|
||||
p[i]->SetLineStyle(i+2);
|
||||
p[i]->SetLineColor(col[i]);
|
||||
p[i]->SetLineWidth(2);
|
||||
p[i]->SetMarkerStyle(mark[i]);
|
||||
p[i]->SetMarkerColor(col[i]);
|
||||
p[i]->SetMarkerSize(1.5);
|
||||
hs->Add(p[i]);
|
||||
}
|
||||
TCanvas *cst = new TCanvas("cst","stacked hists",10,10,800,700);
|
||||
//gPad->SetGrid();
|
||||
hs->Draw("p,nostack");
|
||||
hs->SetTitle("Radial Profile");
|
||||
hs->GetXaxis()->SetTitle("Radius (RadLen)");
|
||||
hs->GetYaxis()->SetTitle("E/E_{tot} (%/RadLen)");
|
||||
for (UInt_t i = 0; i < 2; i++) {
|
||||
TString tmp = dataDir + dataFile[i];
|
||||
f[i] = TFile::Open(tmp);
|
||||
if (!f[i]) return 0;
|
||||
p[i] = (TProfile*)(f[i])->Get("p1");
|
||||
// ShiftUp(p[i],0.0);
|
||||
// histogram
|
||||
p[i]->SetFillColor(col[i]);
|
||||
p[i]->SetLineStyle(i + 2);
|
||||
p[i]->SetLineColor(col[i]);
|
||||
p[i]->SetLineWidth(2);
|
||||
p[i]->SetMarkerStyle(mark[i]);
|
||||
p[i]->SetMarkerColor(col[i]);
|
||||
p[i]->SetMarkerSize(1.5);
|
||||
hs->Add(p[i]);
|
||||
}
|
||||
TCanvas* cst = new TCanvas("cst", "stacked hists", 10, 10, 800, 700);
|
||||
// gPad->SetGrid();
|
||||
hs->Draw("p,nostack");
|
||||
hs->SetTitle("Radial Profile");
|
||||
hs->GetXaxis()->SetTitle("Radius (Rm)");
|
||||
hs->GetYaxis()->SetTitle("E/E_{tot} (%) / Rm");
|
||||
|
||||
cst->RedrawAxis();
|
||||
cst->Update();
|
||||
cst->RedrawAxis();
|
||||
cst->Update();
|
||||
|
||||
TLegend* legend = new TLegend(0.79,0.84,0.94,0.94);
|
||||
legend->AddEntry(p[0],"full ","p");
|
||||
legend->AddEntry(p[1],"gflash","p");
|
||||
legend->Draw();
|
||||
cst->Update();
|
||||
TLegend* legend = new TLegend(0.79, 0.84, 0.94, 0.94);
|
||||
legend->AddEntry(p[0], "full ", "p");
|
||||
legend->AddEntry(p[1], "gflash", "p");
|
||||
legend->Draw();
|
||||
cst->Update();
|
||||
|
||||
//img->FromPad(c, 10, 10, 300, 200);
|
||||
// img->FromPad(c, 10, 10, 300, 200);
|
||||
|
||||
// TImage *img = TImage::Create();
|
||||
// TImage *img = TImage::Create();
|
||||
|
||||
// img->FromPad(cst);
|
||||
// img->FromPad(cst);
|
||||
|
||||
// img->WriteImage("hist0-640MeV-p.png");
|
||||
// img->WriteImage("hist0-640MeV-p.png");
|
||||
|
||||
// for (UInt_t i = 0; i < 4; i++) {
|
||||
// f[i]->Close();
|
||||
// }
|
||||
return cst;
|
||||
// for (UInt_t i = 0; i < 4; i++) {
|
||||
// f[i]->Close();
|
||||
// }
|
||||
return cst;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
#
|
||||
# set calo material
|
||||
/exgflash/det/setMat G4_CESIUM_IODIDE
|
||||
|
||||
#detector geometry 3 x 3 cristal ~5 Rm and ~30 X0
|
||||
|
||||
/exgflash/det/setNbCrys 3
|
||||
/exgflash/det/setCrysWidth 5.2 cm
|
||||
/exgflash/det/setCrysLength 56.0 cm
|
||||
|
||||
/exgflash/det/setLbin 60 0.5
|
||||
/exgflash/det/setRbin 50 0.1
|
||||
|
||||
/run/initialize
|
||||
|
||||
#/gps/pos/centre 0 0 0
|
||||
#/gps/particle e-
|
||||
#/gps/energy 50 GeV
|
||||
#/gps/direction 0. 0. 1.0
|
||||
|
||||
# Paramatrisation on
|
||||
/GFlash/flag 1
|
||||
|
||||
|
||||
# for drawing the tracks
|
||||
# (if too many tracks cause core dump => storeTrajectory 0)
|
||||
#/tracking/storeTrajectory 1
|
||||
|
||||
#/vis/scene/endOfEventAction accumulate
|
||||
/tracking/verbose 0
|
||||
|
||||
/run/beamOn 100
|
||||
|
||||
# Paramatrisation off
|
||||
/GFlash/flag 0
|
||||
/analysis/setFileName gflash00
|
||||
|
||||
|
||||
/run/beamOn 100
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
#
|
||||
|
||||
|
||||
# set calo material
|
||||
/exgflash/det/setMat G4_CESIUM_IODIDE
|
||||
|
||||
/gps/pos/centre 0 0 0
|
||||
/gps/particle e-
|
||||
/gps/energy 50 GeV
|
||||
/gps/direction 0. 0. 1.0
|
||||
|
||||
/run/initialize
|
||||
# Paramatrisation on
|
||||
/GFlash/flag 1
|
||||
/analysis/setFileName gfl_CsI01
|
||||
|
||||
|
||||
# for drawing the tracks
|
||||
# (if too many tracks cause core dump => storeTrajectory 0)
|
||||
/tracking/storeTrajectory 0
|
||||
|
||||
#/vis/scene/endOfEventAction accumulate
|
||||
/tracking/verbose 0
|
||||
|
||||
/run/beamOn 10
|
||||
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
#
|
||||
|
||||
# set calo material
|
||||
/exgflash/det/setMat G4_CESIUM_IODIDE
|
||||
|
||||
/control/execute testLong.mac
|
||||
+23
-5
@@ -58,6 +58,7 @@ class ExGflashDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
void SetLBining(G4ThreeVector);
|
||||
void SetRBining(G4ThreeVector);
|
||||
|
||||
void SetVerbose(G4int val) { fVerbose = val; }
|
||||
|
||||
void SetMaterial(G4String mat);
|
||||
@@ -70,8 +71,21 @@ class ExGflashDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4double GetdRradl() const { return fDRradl; }
|
||||
|
||||
G4double GetSDRadLen() const { return fSDRadLen; }
|
||||
G4double GetSDRm() const { return fSDRm; }
|
||||
|
||||
G4int GetNbOfCrystals() const { return fNbOfCrystals; }
|
||||
|
||||
G4double GetCrystalWidth() const { return fCrystalWidth; }
|
||||
G4double GetCrystalLength() const { return fCrystalLength; }
|
||||
|
||||
void SetNbOfCrystals(G4int n) { fNbOfCrystals = n; }
|
||||
|
||||
void SetCrystalWidth(G4double cw) { fCrystalWidth = cw; }
|
||||
void SetCrystalLength(G4double cl) { fCrystalLength = cl; }
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
|
||||
G4int fNbOfCrystals{10}; // cube of nb x nb crystals
|
||||
|
||||
G4double fCrystalWidth; // x,y size
|
||||
@@ -79,15 +93,19 @@ class ExGflashDetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
G4LogicalVolume* fCrystal_log{nullptr};
|
||||
G4Material* fDetMat{nullptr};
|
||||
G4Material* fHallMat{nullptr};
|
||||
|
||||
G4Region* fRegion{nullptr};
|
||||
|
||||
G4double fSDRadLen; // SD material Rad Lenght
|
||||
G4double fSDRadLen{1.0}; // SD material Rad Length
|
||||
G4double fSDRm{1.0}; // SD material Moliere Radius
|
||||
|
||||
G4int fVerbose{0};
|
||||
G4int fNLtot{40}, fNRtot{50}; // nb of bins: longitudinal and radial
|
||||
G4double fDLradl{0.5}, fDRradl{0.1}; // bin thickness (in radl unit)
|
||||
G4int fVerbose{1};
|
||||
|
||||
ExGflashMessenger* fGflashMessenger;
|
||||
G4int fNLtot{112}, fNRtot{80}; // nb of bins: longitudinal and radial
|
||||
G4double fDLradl{0.25}, fDRradl{0.05}; // bin thickness (in fraction of radl)
|
||||
|
||||
ExGflashMessenger* fGflashMessenger{nullptr};
|
||||
|
||||
inline static G4ThreadLocal GFlashShowerModel* fFastShowerModel = nullptr;
|
||||
inline static G4ThreadLocal GFlashHomoShowerParameterisation* fParameterisation = nullptr;
|
||||
|
||||
@@ -46,6 +46,7 @@ class ExGflashEventAction : public G4UserEventAction
|
||||
|
||||
private:
|
||||
G4int fCalorimeterCollectionId{-1};
|
||||
ExGflashDetectorConstruction* fDet;
|
||||
ExGflashDetectorConstruction* fDet{nullptr};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,10 +44,7 @@ class ExGflashHistoManager
|
||||
~ExGflashHistoManager();
|
||||
|
||||
void InitializePerEvent();
|
||||
// void FillPerEvent();
|
||||
|
||||
// inline void FillPerTrack(G4double, G4double);
|
||||
// inline void FillPerStep(G4double, G4int, G4int);
|
||||
void SetBinning();
|
||||
|
||||
private:
|
||||
void Book();
|
||||
@@ -55,9 +52,7 @@ class ExGflashHistoManager
|
||||
|
||||
ExGflashDetectorConstruction* fDet;
|
||||
|
||||
G4int fVerbose;
|
||||
G4int fVerbose{1};
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,6 +50,7 @@ class ExGflashHit : public G4VHit
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
void* operator new(size_t, void* p) { return p; }
|
||||
|
||||
#ifndef G4NOT_ISO_DELETES
|
||||
void operator delete(void*, void*) {}
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,7 @@ class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWith3Vector;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -61,8 +62,9 @@ class ExGflashMessenger : public G4UImessenger
|
||||
G4UIcmdWithAString* fMaterCmd;
|
||||
G4UIcmdWith3Vector* fLBinCmd;
|
||||
G4UIcmdWith3Vector* fRBinCmd;
|
||||
G4UIcmdWithAnInteger* fNbCrysCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWCrysCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fLCrysCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
#
|
||||
/control/verbose 2
|
||||
/run/verbose 2
|
||||
#
|
||||
/exgflash/det/setLbin 60 0.25
|
||||
/exgflash/det/setRbin 100 0.05
|
||||
#
|
||||
/run/setCut 100 um
|
||||
#
|
||||
/gps/pos/centre 0 0 0
|
||||
/gps/particle e-
|
||||
/gps/energy 50 GeV
|
||||
/gps/direction 0. 0. 1.0
|
||||
|
||||
# Paramatrisation on
|
||||
/GFlash/flag 1
|
||||
|
||||
# Histograms
|
||||
/analysis/setFileName run01
|
||||
|
||||
/analysis/h1/set 0 110 0. 110. none # total energy deposit(percent of Einc)
|
||||
/analysis/h1/set 1 100 0. 1.0e6 none # The number of Hits per event
|
||||
/analysis/h1/set 2 100 0. 20. MeV # The energy of Hit
|
||||
#
|
||||
|
||||
# for drawing the tracks
|
||||
# (if too many tracks cause core dump => storeTrajectory 0)
|
||||
#/tracking/storeTrajectory 1
|
||||
|
||||
#/vis/scene/endOfEventAction accumulate
|
||||
/tracking/verbose 0
|
||||
|
||||
/run/beamOn 100
|
||||
+64
-47
@@ -70,12 +70,15 @@ const G4int kMaxBin = 500;
|
||||
|
||||
ExGflashDetectorConstruction::ExGflashDetectorConstruction()
|
||||
{
|
||||
G4cout << "ExGflashDetectorConstruction::Detector constructor" << G4endl;
|
||||
if (fVerbose > 3) G4cout << "ExGflashDetectorConstruction::Detector constructor" << G4endl;
|
||||
fGflashMessenger = new ExGflashMessenger(this);
|
||||
|
||||
// Crystall
|
||||
fCrystalWidth = 3 * cm;
|
||||
fCrystalLength = 24 * cm;
|
||||
fCrystalLength = 140 * cm;
|
||||
|
||||
DefineMaterials();
|
||||
SetMaterial("G4_PbWO4");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -91,25 +94,28 @@ ExGflashDetectorConstruction::~ExGflashDetectorConstruction()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
void ExGflashDetectorConstruction::DefineMaterials()
|
||||
{
|
||||
//--------- Definitions of Solids, Logical Volumes, Physical Volumes ---------
|
||||
G4cout << "Defining the materials" << G4endl;
|
||||
if (fVerbose > 3) G4cout << "Defining the materials" << G4endl;
|
||||
// Get nist material manager
|
||||
G4NistManager* nistManager = G4NistManager::Instance();
|
||||
// Build materials
|
||||
G4Material* air = nistManager->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* pbWO4 = nistManager->FindOrBuildMaterial("G4_PbWO4");
|
||||
fHallMat = nistManager->FindOrBuildMaterial("G4_AIR");
|
||||
fDetMat = nistManager->FindOrBuildMaterial("G4_PbWO4");
|
||||
nistManager->FindOrBuildMaterial("G4_CESIUM_IODIDE");
|
||||
}
|
||||
|
||||
fDetMat = pbWO4;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
{
|
||||
//--------- Definitions of Solids, Logical Volumes, Physical Volumes ---------
|
||||
|
||||
//------------------------------
|
||||
// Calorimeter segments
|
||||
//------------------------------
|
||||
// Simplified `CMS-like` PbWO4 crystal calorimeter
|
||||
|
||||
// Simplified `CMS-like` PbWO4 crystal calorimeter
|
||||
|
||||
// Calorimeter
|
||||
G4double calo_xside = (fCrystalWidth * fNbOfCrystals);
|
||||
G4double calo_yside = (fCrystalWidth * fNbOfCrystals);
|
||||
@@ -125,7 +131,7 @@ G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
experimentalHall_y, // y size
|
||||
experimentalHall_z); // z size
|
||||
|
||||
auto experimentalHall_log = new G4LogicalVolume(experimentalHall_box, air, "expHall_log",
|
||||
auto experimentalHall_log = new G4LogicalVolume(experimentalHall_box, fHallMat, "expHall_log",
|
||||
nullptr, // opt: fieldManager
|
||||
nullptr, // opt: SensitiveDetector
|
||||
nullptr); // opt: UserLimits
|
||||
@@ -138,7 +144,7 @@ G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
calo_xside / 2., // size
|
||||
calo_yside / 2., calo_zside / 2.);
|
||||
auto calo_log = new G4LogicalVolume(calo_box, // its solid
|
||||
air, // its material
|
||||
fHallMat, // its material
|
||||
"calo_log", // its name
|
||||
nullptr, // opt: fieldManager
|
||||
nullptr, // opt: SensitiveDetector
|
||||
@@ -173,11 +179,11 @@ G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
}
|
||||
G4cout << "There are " << fNbOfCrystals << " crystals per row in the calorimeter, so in total "
|
||||
<< fNbOfCrystals * fNbOfCrystals << " crystals" << G4endl;
|
||||
G4cout << "Total Calorimeter size" << calo_xside / cm << " cm x " << calo_yside / cm << " cm x "
|
||||
<< calo_zside / cm << " cm" << G4endl;
|
||||
G4cout << "They have width of " << fCrystalWidth / cm << " cm and a length of "
|
||||
<< fCrystalLength / cm << " cm. The Material is " << fDetMat
|
||||
<< " Total: " << fCrystalLength / fDetMat->GetRadlen() << " X0" << G4endl;
|
||||
<< fCrystalLength / cm << " cm." << G4endl;
|
||||
G4cout << fDetMat << G4endl;
|
||||
G4cout << "Total Calorimeter size " << calo_xside / cm << " cm x " << calo_yside / cm << " cm x "
|
||||
<< calo_zside / cm << " cm" << G4endl;
|
||||
|
||||
experimentalHall_log->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
auto caloVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
|
||||
@@ -186,7 +192,7 @@ G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
fCrystal_log->SetVisAttributes(crystalVisAtt);
|
||||
|
||||
// define the fParameterisation region
|
||||
G4cout << "\n ---> DetectorConstruction Region Definition" << G4endl;
|
||||
// G4cout << "\n ---> DetectorConstruction Region Definition" << G4endl;
|
||||
fRegion = new G4Region("crystals");
|
||||
calo_log->SetRegion(fRegion);
|
||||
fRegion->AddRootLogicalVolume(calo_log);
|
||||
@@ -198,35 +204,52 @@ G4VPhysicalVolume* ExGflashDetectorConstruction::Construct()
|
||||
|
||||
void ExGflashDetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
// -- sensitive detectors:
|
||||
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
|
||||
auto SD = new ExGflashSensitiveDetector("Calorimeter", this);
|
||||
|
||||
SDman->AddNewDetector(SD);
|
||||
if (fCrystal_log != nullptr) {
|
||||
fCrystal_log->SetSensitiveDetector(SD);
|
||||
}
|
||||
|
||||
// -- fast simulation models:
|
||||
// **********************************************
|
||||
// * Initializing shower modell
|
||||
// ***********************************************
|
||||
G4cout << "\n--> Creating shower parameterization models" << G4endl;
|
||||
fFastShowerModel = new GFlashShowerModel("fFastShowerModel", fRegion);
|
||||
fParameterisation = new GFlashHomoShowerParameterisation(fDetMat, new ExGflashHomoShowerTuning());
|
||||
fFastShowerModel->SetParameterisation(*fParameterisation);
|
||||
// Energy Cuts to kill particles:
|
||||
fParticleBounds = new GFlashParticleBounds();
|
||||
fFastShowerModel->SetParticleBounds(*fParticleBounds);
|
||||
// Makes the EnergieSpots
|
||||
fHitMaker = new GFlashHitMaker();
|
||||
fFastShowerModel->SetHitMaker(*fHitMaker);
|
||||
G4cout << "end shower parameterization." << G4endl;
|
||||
if (fParameterisation != nullptr) {
|
||||
fParameterisation->SetMaterial(fDetMat);
|
||||
if (fVerbose > 3) G4cout << "Info " << __func__ << " Param Mat " << fDetMat << G4endl;
|
||||
fParameterisation->PrintMaterial(fDetMat);
|
||||
}
|
||||
else {
|
||||
// -- sensitive detectors:
|
||||
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
|
||||
auto SD = new ExGflashSensitiveDetector("Calorimeter", this);
|
||||
|
||||
SDman->AddNewDetector(SD);
|
||||
if (fCrystal_log != nullptr) {
|
||||
fCrystal_log->SetSensitiveDetector(SD);
|
||||
}
|
||||
|
||||
if (fVerbose > 3) G4cout << "\n--> Creating shower parameterization models" << G4endl;
|
||||
fFastShowerModel = new GFlashShowerModel("fFastShowerModel", fRegion);
|
||||
fParameterisation =
|
||||
new GFlashHomoShowerParameterisation(fDetMat, new ExGflashHomoShowerTuning());
|
||||
fFastShowerModel->SetParameterisation(*fParameterisation);
|
||||
// Energy Cuts to kill particles:
|
||||
fParticleBounds = new GFlashParticleBounds();
|
||||
fFastShowerModel->SetParticleBounds(*fParticleBounds);
|
||||
// Makes the EnergieSpots
|
||||
fHitMaker = new GFlashHitMaker();
|
||||
fFastShowerModel->SetHitMaker(*fHitMaker);
|
||||
if (fVerbose > 3) G4cout << "end shower parameterization." << G4endl;
|
||||
}
|
||||
// **********************************************
|
||||
// Get Rad Len and R molere ?
|
||||
fSDRadLen = fDetMat->GetRadlen();
|
||||
// Get Rad Len and R moliere from parameterisation
|
||||
fSDRadLen = fParameterisation->GetX0();
|
||||
fSDRm = fParameterisation->GetRm();
|
||||
if (fVerbose > 2) {
|
||||
G4cout << "Info " << __func__ << "Total Calorimeter size" << G4endl;
|
||||
auto calo_xyside = fCrystalWidth * fNbOfCrystals;
|
||||
G4cout << "Info Z " << __func__ << " " << fCrystalLength / cm << " cm "
|
||||
<< fCrystalLength / fSDRadLen << " RadLen " << G4endl;
|
||||
G4cout << "Info XY " << __func__ << " " << calo_xyside / cm << " cm " << calo_xyside / fSDRm
|
||||
<< " Rm " << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -267,12 +290,6 @@ void ExGflashDetectorConstruction::SetMaterial(G4String mat)
|
||||
if (fCrystal_log != nullptr) {
|
||||
fCrystal_log->SetMaterial(fDetMat);
|
||||
}
|
||||
if (fParameterisation != nullptr) {
|
||||
fParameterisation->SetMaterial(fDetMat);
|
||||
fParameterisation->PrintMaterial(fDetMat);
|
||||
// Get Rad Len and R molere ?
|
||||
fSDRadLen = fDetMat->GetRadlen();
|
||||
}
|
||||
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,7 @@ void ExGflashEventAction::EndOfEventAction(const G4Event* evt)
|
||||
if (THC != nullptr) {
|
||||
/// Hits in sensitive Detector
|
||||
int n_hit = THC->entries();
|
||||
// G4cout<<" " << n_hit<< " hits are stored in ExGflashHitsCollection
|
||||
// "<<G4endl;
|
||||
|
||||
G4PrimaryVertex* pvertex = evt->GetPrimaryVertex();
|
||||
// Computing (x,y,z) of vertex of initial particles
|
||||
G4ThreeVector vtx = pvertex->GetPosition();
|
||||
@@ -101,7 +100,9 @@ void ExGflashEventAction::EndOfEventAction(const G4Event* evt)
|
||||
G4double dLradl = fDet->GetdLradl();
|
||||
G4double dRradl = fDet->GetdRradl();
|
||||
|
||||
G4double SDRadl = fDet->GetSDRadLen(); // SD matrial
|
||||
G4double SDRadl = fDet->GetSDRadLen(); // SD matrial rad len
|
||||
G4double SDRm = fDet->GetSDRm(); // SD Radius Moliere
|
||||
|
||||
// init to to 0.0
|
||||
MyVector dEdL(nLbin, 0.0);
|
||||
MyVector dEdR(nRbin, 0.0);
|
||||
@@ -128,10 +129,12 @@ void ExGflashEventAction::EndOfEventAction(const G4Event* evt)
|
||||
G4ThreeVector radial = l - longitudinal;
|
||||
|
||||
auto SlideNb = G4int((longitudinal.mag() / SDRadl) / dLradl);
|
||||
auto RingNb = G4int((radial.mag() / SDRadl) / dRradl);
|
||||
auto RingNb = G4int((radial.mag() / SDRm) / dRradl);
|
||||
|
||||
if (SlideNb >= 0 && SlideNb < nLbin) dEdL[SlideNb] += estep;
|
||||
if (RingNb >= 0 && RingNb < nLbin) dEdR[RingNb] += estep;
|
||||
if ((SlideNb >= 0 && SlideNb < nLbin) && (RingNb >= 0 && RingNb < nRbin)) {
|
||||
dEdL[SlideNb] += estep;
|
||||
dEdR[RingNb] += estep;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,25 +61,18 @@ void ExGflashHistoManager::Book()
|
||||
//
|
||||
// Creating histograms
|
||||
//
|
||||
// const G4int kMaxHisto = 9;
|
||||
// const G4int kMaxProf = 2;
|
||||
G4int nLbin = fDet->GetnLtot();
|
||||
G4int nRbin = fDet->GetnRtot();
|
||||
G4double dLradl = fDet->GetdLradl();
|
||||
G4double dRradl = fDet->GetdRradl();
|
||||
fVerbose = fDet->GetVerbose();
|
||||
|
||||
fAnalysisManager->CreateH1("h0", "total energy deposit(percent of Einc)", 100, 95., 105.);
|
||||
fAnalysisManager->CreateH1("h0", "total energy deposit(percent of Einc)", 100, 85., 105.);
|
||||
|
||||
fAnalysisManager->CreateH1("h1", "The number of Hits per event", 200, 0., 4.0e5);
|
||||
|
||||
fAnalysisManager->CreateH1("h2", "The energy of Hit (in MeV)", 200, 0., 10.);
|
||||
|
||||
// fAnalysisManager->CreateH1( "h3","longit energy profile (% of E inc)",
|
||||
// nLbin,0.,nLbin*dLradl);
|
||||
|
||||
// fAnalysisManager->CreateH1( "h4","radial energy profile (% of E inc)",
|
||||
// nRbin,0.,nRbin*dRradl);
|
||||
|
||||
fAnalysisManager->CreateP1("p0", "longit energy profile (% of E inc)", nLbin, 0., nLbin * dLradl,
|
||||
0., 2000.);
|
||||
|
||||
@@ -92,12 +85,24 @@ void ExGflashHistoManager::Book()
|
||||
fAnalysisManager->CreateP1("p3", "Cuml radial energy profile (% of E inc)", nRbin, 0.,
|
||||
nRbin * dRradl, 0., 20000.);
|
||||
|
||||
// Create all histograms as inactivated
|
||||
// for (G4int k=0; k<kMaxHisto; k++) {
|
||||
// fAnalysisManager->SetH1Activation(k, false);
|
||||
// }
|
||||
// for (G4int k=0; k<kMaxProf; k++) {
|
||||
// fAnalysisManager->SetP1Activation(k, false);
|
||||
// }
|
||||
G4cout << "\n----> Histogram file " << fFileName << G4endl;
|
||||
if (fVerbose > 1) G4cout << "\n----> Histogram file " << fFileName << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void ExGflashHistoManager::SetBinning()
|
||||
{
|
||||
G4int nLbin = fDet->GetnLtot();
|
||||
G4int nRbin = fDet->GetnRtot();
|
||||
G4double dLradl = fDet->GetdLradl();
|
||||
G4double dRradl = fDet->GetdRradl();
|
||||
|
||||
// Get analysis manager
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
// Redifine profiles
|
||||
analysisManager->SetP1(0, nLbin, 0., nLbin * dLradl, 0., 2000.);
|
||||
analysisManager->SetP1(1, nRbin, 0., nRbin * dRradl, 0., 2000.);
|
||||
analysisManager->SetP1(2, nLbin, 0., nLbin * dLradl, 0., 2000.);
|
||||
analysisManager->SetP1(3, nRbin, 0., nRbin * dRradl, 0., 2000.);
|
||||
}
|
||||
|
||||
@@ -60,12 +60,6 @@ ExGflashHit::ExGflashHit(const ExGflashHit& right) : G4VHit(right)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ExGflashHit& ExGflashHit::operator=(const ExGflashHit& right) = default;
|
||||
// {
|
||||
// G4VHit::operator=(right);
|
||||
// fEdep = right.fEdep;
|
||||
// fPos = right.fPos;
|
||||
// return *this;
|
||||
// }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ ExGflashMessenger::ExGflashMessenger(ExGflashDetectorConstruction* Det) : fDetec
|
||||
|
||||
fVerbose = new G4UIcmdWithAnInteger("/exgflash/verbose", this);
|
||||
fVerbose->SetGuidance("set exglash verbosity");
|
||||
fVerbose->SetGuidance("0- silent, 1 - on exit, 2 - run , 3 - event");
|
||||
fVerbose->SetGuidance("0- silent, 1 - init, 2 - run, 3 - event");
|
||||
fVerbose->SetParameterName("ver", false);
|
||||
fVerbose->SetRange("ver >= 0");
|
||||
fVerbose->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
@@ -59,37 +59,73 @@ ExGflashMessenger::ExGflashMessenger(ExGflashDetectorConstruction* Det) : fDetec
|
||||
fDetDir = new G4UIdirectory("/exgflash/det/");
|
||||
fDetDir->SetGuidance("detector construction commands");
|
||||
|
||||
fMaterCmd = new G4UIcmdWithAString("/exgflash/det/setMat", this);
|
||||
fMaterCmd->SetGuidance("Select Material.");
|
||||
fMaterCmd->SetParameterName("material", false);
|
||||
fMaterCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
fMaterCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fLBinCmd = new G4UIcmdWith3Vector("/exgflash/det/setLbin", this);
|
||||
fLBinCmd->SetGuidance("set longitudinal bining");
|
||||
fLBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
|
||||
// must have omitable==true we use 2 values only
|
||||
fLBinCmd->SetParameterName("nLtot", "dLradl", " ", true);
|
||||
fLBinCmd->SetGuidance("nLtot - nb of bins; bin thickness (in Radl)");
|
||||
fLBinCmd->SetGuidance("dLradl - bin thickness (in fraction of Radl)");
|
||||
fLBinCmd->SetGuidance("LStart - dummy");
|
||||
fLBinCmd->SetParameterName("nLtot", "dLradl", "LStart", true);
|
||||
fLBinCmd->SetDefaultValue(G4ThreeVector{100.0, 0.25, 0.0});
|
||||
fLBinCmd->SetRange("nLtot>=1 && dLradl>0");
|
||||
fLBinCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
fLBinCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fRBinCmd = new G4UIcmdWith3Vector("/exgflash/det/setRbin", this);
|
||||
fRBinCmd->SetGuidance("set radial bining");
|
||||
fRBinCmd->SetGuidance("nb of bins; bin thickness (in radl)");
|
||||
fRBinCmd->SetParameterName("nRtot", "dRradl", " ", true);
|
||||
fRBinCmd->SetGuidance("nRtot - nb of bins; bin thickness (in Rm)");
|
||||
fRBinCmd->SetGuidance("dRradl - bin thickness (in fraction of Rm)");
|
||||
fRBinCmd->SetGuidance("RStart - dummy");
|
||||
fRBinCmd->SetParameterName("nRtot", "dRradl", "RStart", true);
|
||||
fRBinCmd->SetDefaultValue(G4ThreeVector{80.0, 0.05, 0.0});
|
||||
fRBinCmd->SetRange("nRtot>=1 && dRradl>0");
|
||||
fRBinCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
|
||||
fRBinCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fMaterCmd = new G4UIcmdWithAString("/exgflash/det/setMat", this);
|
||||
fMaterCmd->SetGuidance("Select Material.");
|
||||
fMaterCmd->SetParameterName("material", false);
|
||||
fMaterCmd->AvailableForStates(G4State_PreInit);
|
||||
fMaterCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fNbCrysCmd = new G4UIcmdWithAnInteger("/exgflash/det/setNbCrys", this);
|
||||
fNbCrysCmd->SetGuidance("set numbber of crystals in row/col");
|
||||
fNbCrysCmd->SetGuidance("ncrys - number of crystals ");
|
||||
fNbCrysCmd->SetParameterName("ncrys", false);
|
||||
fNbCrysCmd->SetRange("ncrys > 0");
|
||||
fNbCrysCmd->AvailableForStates(G4State_PreInit);
|
||||
fNbCrysCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fWCrysCmd = new G4UIcmdWithADoubleAndUnit("/exgflash/det/setCrysWidth", this);
|
||||
fWCrysCmd->SetGuidance("set crystal width (cm)");
|
||||
fWCrysCmd->SetGuidance("wcrys - width of crystal ");
|
||||
fWCrysCmd->SetParameterName("wcrys", false);
|
||||
fWCrysCmd->SetRange("wcrys > 0");
|
||||
fWCrysCmd->SetUnitCategory("Length");
|
||||
fWCrysCmd->SetDefaultUnit("cm");
|
||||
fWCrysCmd->AvailableForStates(G4State_PreInit);
|
||||
fWCrysCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fLCrysCmd = new G4UIcmdWithADoubleAndUnit("/exgflash/det/setCrysLength", this);
|
||||
fLCrysCmd->SetGuidance("set crystal length (cm)");
|
||||
fLCrysCmd->SetGuidance("lcrys - crystal length ");
|
||||
fLCrysCmd->SetParameterName("lcrys", false);
|
||||
fLCrysCmd->SetRange("lcrys > 0");
|
||||
fLCrysCmd->SetUnitCategory("Length");
|
||||
fLCrysCmd->SetDefaultUnit("cm");
|
||||
fLCrysCmd->AvailableForStates(G4State_PreInit);
|
||||
fLCrysCmd->SetToBeBroadcasted(false);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ExGflashMessenger::~ExGflashMessenger()
|
||||
{
|
||||
delete fLCrysCmd;
|
||||
delete fWCrysCmd;
|
||||
delete fNbCrysCmd;
|
||||
delete fMaterCmd;
|
||||
delete fRBinCmd;
|
||||
delete fLBinCmd;
|
||||
delete fMaterCmd;
|
||||
delete fDetDir;
|
||||
delete fVerbose;
|
||||
delete fExGflashDir;
|
||||
@@ -103,6 +139,18 @@ void ExGflashMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
fDetector->SetMaterial(newValue);
|
||||
}
|
||||
|
||||
if (command == fNbCrysCmd) {
|
||||
fDetector->SetNbOfCrystals(fNbCrysCmd->GetNewIntValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fWCrysCmd) {
|
||||
fDetector->SetCrystalWidth(fWCrysCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fLCrysCmd) {
|
||||
fDetector->SetCrystalLength(fLCrysCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if (command == fVerbose) {
|
||||
fDetector->SetVerbose(fVerbose->GetNewIntValue(newValue));
|
||||
}
|
||||
|
||||
+8
@@ -28,14 +28,22 @@
|
||||
//
|
||||
#include "ExGflashPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4GeneralParticleSource.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
ExGflashPrimaryGeneratorAction::ExGflashPrimaryGeneratorAction()
|
||||
{
|
||||
fParticleGun = new G4GeneralParticleSource;
|
||||
// fParticleGun->SetVerbosity(2);
|
||||
auto cursrc = fParticleGun->GetCurrentSource();
|
||||
cursrc->SetParticleDefinition(G4Electron::Definition());
|
||||
cursrc->GetAngDist()->SetParticleMomentumDirection(G4ParticleMomentum(0., 0., 1.));
|
||||
cursrc->GetEneDist()->SetMonoEnergy(50.0 * GeV);
|
||||
// fParticleGun->ListSource();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -54,6 +54,7 @@ void ExGflashRunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
// histograms file
|
||||
G4AnalysisManager* analysis = G4AnalysisManager::Instance();
|
||||
if (analysis->IsActive()) {
|
||||
fHistoManager->SetBinning();
|
||||
analysis->OpenFile();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,6 @@ G4bool ExGflashSensitiveDetector::ProcessHits(G4GFlashSpot* aSpot, G4TouchableHi
|
||||
caloHit->SetEdep(e);
|
||||
caloHit->SetPos(aSpot->GetEnergySpot()->GetPosition());
|
||||
fCaloHitsCollection->insert(caloHit);
|
||||
// if (ROhist){;}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,24 @@
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
#
|
||||
/exgflash/verbose 1
|
||||
|
||||
/exgflash/det/setLbin 40 0.5
|
||||
# set calo material
|
||||
/exgflash/det/setMat G4_PbWO4
|
||||
|
||||
#detector geometry 5 x 5 cristal ~5 Rm and ~28 X0
|
||||
|
||||
/exgflash/det/setNbCrys 5
|
||||
/exgflash/det/setCrysWidth 3.52 cm
|
||||
/exgflash/det/setCrysLength 25.0 cm
|
||||
|
||||
/exgflash/det/setLbin 56 0.5
|
||||
/exgflash/det/setRbin 50 0.1
|
||||
|
||||
/analysis/h1/set 0 100 90. 110. none # total energy deposit(percent of Einc)
|
||||
|
||||
/run/initialize
|
||||
|
||||
/gps/pos/centre 0 0 0
|
||||
/gps/particle e-
|
||||
/gps/energy 50 GeV
|
||||
|
||||
@@ -16,7 +16,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
|
||||
Geant4 version Name: geant4-11-03-ref-00 (6-December-2024)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -24,13 +24,10 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
WWW : http://geant4.org/
|
||||
**************************************************************
|
||||
|
||||
ExGflashDetectorConstruction::Detector constructor
|
||||
G4PhysListFactory::GetReferencePhysList <FTFP_BERT> EMoption= 0
|
||||
<<< Geant4 Physics List simulation engine: FTFP_BERT
|
||||
|
||||
|
||||
|
||||
----> Histogram file gflash01
|
||||
Visualization Manager instantiating with verbosity "warnings (3)"...
|
||||
Visualization Manager initialising...
|
||||
Registering graphics systems...
|
||||
@@ -43,7 +40,6 @@ Registered graphics systems are:
|
||||
RayTracer (RayTracer)
|
||||
VRML2FILE (VRML2FILE)
|
||||
gMocrenFile (gMocrenFile)
|
||||
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN)
|
||||
TOOLSSG_OFFSCREEN (TSG_OFFSCREEN, TSG_FILE)
|
||||
OpenGLImmediateQt (OGLIQt, OGLI)
|
||||
OpenGLStoredQt (OGLSQt, OGL, OGLS)
|
||||
@@ -101,10 +97,9 @@ End of Run User Vis Actions: none
|
||||
|
||||
Some /vis commands (optionally) take a string to specify colour.
|
||||
"/vis/list" to see available colours.
|
||||
Defining the materials
|
||||
There are 10 crystals per row in the calorimeter, so in total 100 crystals
|
||||
Total Calorimeter size30 cm x 30 cm x 24 cm
|
||||
They have width of 3 cm and a length of 24 cm. The Material is Material: G4_PbWO4 density: 8.280 g/cm3 RadL: 8.925 mm Nucl.Int.Length: 20.740 cm
|
||||
There are 5 crystals per row in the calorimeter, so in total 25 crystals
|
||||
They have width of 3.52 cm and a length of 25 cm.
|
||||
Material: G4_PbWO4 density: 8.280 g/cm3 RadL: 8.925 mm Nucl.Int.Length: 20.740 cm
|
||||
Imean: 542.741 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: O (O) Z = 8.0 N = 16 A = 15.999 g/mole
|
||||
@@ -127,24 +122,20 @@ They have width of 3 cm and a length of 24 cm. The Material is Material: G4_
|
||||
---> Isotope: W184 Z = 74 N = 184 A = 183.95 g/mole abundance: 30.640 %
|
||||
---> Isotope: W186 Z = 74 N = 186 A = 185.95 g/mole abundance: 28.430 %
|
||||
ElmMassFraction: 40.40 % ElmAbundance 16.67 %
|
||||
Total: 26.8922 X0
|
||||
|
||||
---> DetectorConstruction Region Definition
|
||||
|
||||
--> Creating shower parameterization models
|
||||
Total Calorimeter size 17.6 cm x 17.6 cm x 25 cm
|
||||
/********************************************/
|
||||
- GVFlashShowerParameterisation::Material -
|
||||
Material : G4_PbWO4
|
||||
Z = 68.3609
|
||||
A = 170.881
|
||||
X0 = 0.892453 cm
|
||||
Rm = 1.73762 cm
|
||||
Rm = 1.75417 cm
|
||||
Ec = 10.7858 MeV
|
||||
/********************************************/
|
||||
/********************************************/
|
||||
- GFlashHomoShowerParameterisation::Constructor -
|
||||
/********************************************/
|
||||
end shower parameterization.
|
||||
|
||||
hInelastic FTFP_BERT : threshold between BERT and FTFP is over the interval
|
||||
for pions : 3 to 6 GeV
|
||||
@@ -174,10 +165,13 @@ Bremsstrahlung energy threshold above which
|
||||
primary e+- is added to the list of secondary 100 TeV
|
||||
Bremsstrahlung energy threshold above which primary
|
||||
muon/hadron is added to the list of secondary 100 TeV
|
||||
Positron annihilation at rest model SimplePositronium
|
||||
Enable 3 gamma annihilation on fly 0
|
||||
Lowest triplet kinetic energy 1 MeV
|
||||
Enable sampling of gamma linear polarisation 0
|
||||
5D gamma conversion model type 0
|
||||
5D gamma conversion model on isolated ion 0
|
||||
Use Ricardo-Gerardo pair production model 0
|
||||
Livermore data directory epics_2017
|
||||
=======================================================================
|
||||
====== Ionisation Parameters ========
|
||||
@@ -348,7 +342,7 @@ ionIoni: for GenericIon XStype:3 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 7 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.1 mm), integ: 3, fluct: 1, linLossLim= 0.02
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 eV Emax= 2 MeV
|
||||
Bragg : Emin= 0 eV Emax= 2 MeV
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV
|
||||
|
||||
msc: for alpha SubType= 10
|
||||
@@ -830,7 +824,7 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
=======================================================================
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
Type of pre-compound inverse x-section 3
|
||||
Type of pre-compound inverse x-section 1
|
||||
Pre-compound model active 1
|
||||
Pre-compound excitation low energy 100 keV
|
||||
Pre-compound excitation high energy 30 MeV
|
||||
@@ -855,12 +849,10 @@ Use discrete excitation energy of the residual 0
|
||||
Time limit for long lived isomeres 1 ns
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
Store e- internal conversion data 0
|
||||
Store e- internal conversion data 1
|
||||
Correlated gamma emission flag 0
|
||||
Max 2J for sampling of angular correlations 10
|
||||
=======================================================================
|
||||
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
|
||||
See commands in /vis/modeling/trajectories/ for other options.
|
||||
### Run 0 start.
|
||||
... set ntuple merging row mode : row-wise - done
|
||||
... create file : gflash01.root - done
|
||||
@@ -868,45 +860,31 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
... open analysis file : gflash01.root - done
|
||||
|
||||
******************************************
|
||||
Run Real Elapsed Time is: 0.861834
|
||||
Run System Elapsed Time: 0.01
|
||||
Run GetUserElapsed Time: 0.85
|
||||
Run Real Elapsed Time is: 0.574205
|
||||
Run System Elapsed Time: 0
|
||||
Run GetUserElapsed Time: 0.56
|
||||
******************************************
|
||||
number of event = 100
|
||||
... write file : gflash01.root - done
|
||||
... close file : gflash01.root - done
|
||||
There are histograms that can be viewed with visualization:
|
||||
3 h1 histograms(s)
|
||||
List them with "/analysis/list".
|
||||
View them immediately with "/vis/plot" or "/vis/reviewPlots".
|
||||
But...there are no entries. To make your histograms available for
|
||||
plotting in this UI session, use CloseFile(false) in your
|
||||
EndOfRunAction and Reset() in your BeginOfRunAction.
|
||||
### Run 1 start.
|
||||
... create file : gflash00.root - done
|
||||
... open analysis file : gflash00.root - done
|
||||
... open analysis file : gflash00.root - done
|
||||
|
||||
******************************************
|
||||
Run Real Elapsed Time is: 57.7755
|
||||
Run System Elapsed Time: 0.36
|
||||
Run GetUserElapsed Time: 55.67
|
||||
Run Real Elapsed Time is: 35.7097
|
||||
Run System Elapsed Time: 0.03
|
||||
Run GetUserElapsed Time: 34.36
|
||||
******************************************
|
||||
number of event = 100
|
||||
... write file : gflash00.root - done
|
||||
... close file : gflash00.root - done
|
||||
There are histograms that can be viewed with visualization:
|
||||
3 h1 histograms(s)
|
||||
List them with "/analysis/list".
|
||||
View them immediately with "/vis/plot" or "/vis/reviewPlots".
|
||||
But...there are no entries. To make your histograms available for
|
||||
plotting in this UI session, use CloseFile(false) in your
|
||||
EndOfRunAction and Reset() in your BeginOfRunAction.
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
|
||||
******************************************
|
||||
Total Real Elapsed Time is: 62.5078
|
||||
Total System Elapsed Time: 0.62
|
||||
Total GetUserElapsed Time: 59.08
|
||||
Total Real Elapsed Time is: 39.9502
|
||||
Total System Elapsed Time: 0.24
|
||||
Total GetUserElapsed Time: 37.73
|
||||
******************************************
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
# GFLASH off
|
||||
#
|
||||
|
||||
/gps/pos/centre 0 0 0
|
||||
/gps/particle e-
|
||||
/gps/energy 50 GeV
|
||||
/gps/direction 0. 0. 1.0
|
||||
|
||||
|
||||
# Paramatrisation off
|
||||
/GFlash/flag 0
|
||||
/analysis/setFileName gflash00
|
||||
|
||||
|
||||
# for drawing the tracks
|
||||
# (if too many tracks cause core dump => storeTrajectory 0)
|
||||
#/tracking/storeTrajectory 1
|
||||
|
||||
#/vis/scene/endOfEventAction accumulate
|
||||
/tracking/verbose 0
|
||||
#/analysys/setFileName gflash00
|
||||
|
||||
/run/beamOn 500
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
# GFLASH off
|
||||
#
|
||||
|
||||
/gps/pos/centre 0 0 0
|
||||
/gps/particle e-
|
||||
/gps/energy 50 GeV
|
||||
/gps/direction 0. 0. 1.0
|
||||
|
||||
|
||||
# Paramatrisation on
|
||||
/GFlash/flag 1
|
||||
|
||||
|
||||
# for drawing the tracks
|
||||
# (if too many tracks cause core dump => storeTrajectory 0)
|
||||
#/tracking/storeTrajectory 1
|
||||
|
||||
#/vis/scene/endOfEventAction accumulate
|
||||
/tracking/verbose 0
|
||||
|
||||
/run/beamOn 500
|
||||
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Macro file gflasha example
|
||||
# when runing in batch mode
|
||||
# GFLASH off
|
||||
#
|
||||
/run/initialize
|
||||
|
||||
#/gps/pos/centre 0 0 0
|
||||
#/gps/particle e-
|
||||
#/gps/energy 50 GeV
|
||||
#/gps/direction 0. 0. 1.0
|
||||
|
||||
/tracking/verbose 0
|
||||
|
||||
# Paramatrisation on (default file name)
|
||||
/GFlash/flag 1
|
||||
#/analysis/setFileName gflash01
|
||||
|
||||
/run/beamOn 500
|
||||
|
||||
# Paramatrisation off
|
||||
/GFlash/flag 0
|
||||
/analysis/setFileName gflash00
|
||||
|
||||
/run/beamOn 500
|
||||
@@ -2,12 +2,8 @@
|
||||
# Macro file for the initialization phase of gflash example
|
||||
# when runing in interactive mode
|
||||
#
|
||||
# Sets some default verbose
|
||||
/gps/position 0 0 0
|
||||
/gps/particle e+
|
||||
/gps/energy 2.0 GeV
|
||||
/gps/direction 0. 0. 1.0
|
||||
#
|
||||
# Initialize kernel
|
||||
/run/initialize
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
@@ -66,9 +62,3 @@
|
||||
#
|
||||
# For file-based drivers, use this to create an empty detector view:
|
||||
#/vis/viewer/flush
|
||||
#
|
||||
#/tracking/verbose 0
|
||||
#/GFlash/flag 1
|
||||
#/run/beamOn 2
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user