43 fMinpos(-10.),fMaxpos(10),fMineng(0.),fMaxeng(1000.),
44 fEnerHisto(0),fPosiXY(0),fPosiZX(0),fPosiYZ(0),fAnglCTP(0),fAnglTP(0)
46 fFileName[0] =
"expGPS";
66 fFileName[1] = fFileName[0] +
"." + extension;
76 G4cout <<
"\n---> exGPSHistoManager::book(): cannot open " << fFileName[1]
86 G4int id = analysisManager->
CreateH1(
"1",
"Ekin primary",100,fMineng,fMaxeng);
87 fEnerHisto= analysisManager->
GetH1(
id);
89 id = analysisManager->
CreateH2(
"2",
"Position XY",100,fMinpos,fMaxpos,
91 fPosiXY= analysisManager->
GetH2(
id);
93 id = analysisManager->
CreateH2(
"3",
"Position YZ",100,fMinpos,fMaxpos,
95 fPosiYZ= analysisManager->
GetH2(
id);
97 id = analysisManager->
CreateH2(
"4",
"Position ZX",100,fMinpos,fMaxpos,
99 fPosiZX= analysisManager->
GetH2(
id);
101 id =analysisManager->
CreateH2(
"5",
"Source phi-std::cos(theta) distribution",
102 360,0,360,100, -1, 1);
103 fAnglCTP =analysisManager->
GetH2(
id);
105 id =analysisManager->
CreateH2(
"6",
"Source phi-theta distribution",
106 360,0,360,180,0,180);
107 fAnglTP = analysisManager->
GetH2(
id);
111 analysisManager->
CreateNtuple(
"MyTuple",
"Primary Particle Tuple");
123 G4cout <<
"\n----> Histogram Tree is opened in " << fFileName[1] <<
G4endl;
132 analysisManager->
Write();
134 G4cout <<
"\n----> Histogram Tree is saved in " << fFileName[1] <<
G4endl;
136 delete G4AnalysisManager::Instance();
145 fEnerHisto->fill(e, w);
146 fEnerHisto->fill(e/
MeV,w);
147 fPosiXY->fill(x/
cm,y/
cm,w);
148 fPosiZX->fill(z/
cm,x/
cm,w);
149 fPosiYZ->fill(y/
cm,z/
cm,w);
150 fAnglCTP->fill(p/
deg,std::cos(t),w);
151 fAnglTP->fill(p/
deg,t/
deg,w);
170 G4cout <<
"\n ----> print histograms statistic \n" <<
G4endl;
G4bool SetHistoDirectoryName(const G4String &dirName)
Definition of the exGPSHistoMessenger class.
G4int CreateNtupleIColumn(const G4String &name)
G4bool SetFirstHistoId(G4int firstId)
G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
void SetVerboseLevel(G4int verboseLevel)
G4int CreateNtuple(const G4String &name, const G4String &title)
G4bool SetNtupleDirectoryName(const G4String &dirName)
G4bool FillNtupleIColumn(G4int id, G4int value)
void Fill(G4int PDGid, G4double e, G4double x, G4double y, G4double z, G4double t, G4double p, G4double w)
G4GLOB_DLL std::ostream G4cout
G4bool FillNtupleDColumn(G4int id, G4double value)
G4String GetFileType() const
Definition of the exGPSHistoManager class.
G4bool SetFirstNtupleId(G4int firstId)
G4int CreateNtupleDColumn(const G4String &name)
tools::histo::h1d * GetH1(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
tools::histo::h2d * GetH2(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
G4int CreateH2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")