37 #include "Analysis.hh" 
   57 Analysis::Analysis() :
 
   58   fincident_x_hist(0), fincident_map(0), fdose_hist(0), fdose_map(0),
 
   59       fdose_prof(0), fdose_map_prof(0), fdose_map3d(0)
 
   69   fincident_x_hist = mgr->
CreateH1(
"incident_x", 
"Incident X", 100, -5 * 
cm,
 
   71   fincident_map = mgr->
CreateH2(
"incident_map", 
"Incident Map", 50, -5 * 
cm,
 
   72       5 * 
cm, 50, -5 * 
cm, 5 * 
cm, 
"cm", 
"cm");
 
   74       = mgr->
CreateH1(
"dose", 
"Dose distribution", 500, 0, 50 * 
cm, 
"cm");
 
   75   fdose_map = mgr->
CreateH2(
"dose_map", 
"Dose distribution", 500, 0, 50 * 
cm,
 
   76       200, -10 * 
cm, 10 * 
cm, 
"cm", 
"cm");
 
   77   fdose_map3d = mgr->
CreateH3(
"dose_map_3d", 
"Dose distribution", 30, 0,
 
   78       50 * 
cm, 20, -10 * 
cm, 10 * 
cm, 20, -10 * 
cm, 10 * 
cm, 
"cm", 
"cm", 
"cm");
 
   79   fdose_prof = mgr->
CreateP1(
"dose_prof", 
"Dose distribution", 300, 0, 30 * 
cm,
 
   80       0, 100 * 
MeV, 
"cm", 
"MeV");
 
   81   fdose_map_prof = mgr->
CreateP2(
"dose_map_prof", 
"Dose distribution", 300, 0,
 
   82       30 * 
cm, 80, -4 * 
cm, 4 * 
cm, 0, 100 * 
MeV, 
"cm", 
"cm", 
"MeV");
 
  131       mgr->
FillH2(fincident_map, p.
x(), p.
y());
 
  132       mgr->
FillH1(fincident_x_hist, p.
x());
 
  133       fincidentFlag = 
true;
 
  142   if (std::abs(p.
y()) < dxy)
 
  147       mgr->
FillH2(fdose_map, p.
z() + Z0, p.
x(), dedx / 
GeV);
 
  148       mgr->
FillP2(fdose_map_prof, p.
z() + Z0, p.
x(), dedx);
 
  149       mgr->
FillH3(fdose_map3d, p.
z() + Z0, p.
x(), p.
y(), dedx / 
GeV);
 
  150       if (std::abs(p.
x()) < dxy)
 
  152           mgr->
FillH1(fdose_hist, p.
z() + Z0, dedx / 
GeV);
 
  153           mgr->
FillP1(fdose_prof, p.
z() + Z0, dedx);
 
G4int CreateH3(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
 
static constexpr double mm
 
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 FillDose(const G4ThreeVector &p, G4double dedx)
 
G4bool FillP2(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
 
G4int CreateP1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear")
 
G4bool FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
 
G4bool OpenFile(const G4String &fileName="")
 
static Analysis * GetAnalysis()
 
static constexpr double cm
 
void Save(const G4String &fname)
 
G4int CreateP2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
 
G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
 
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
 
void FillIncident(const G4ThreeVector &p)
 
static constexpr double GeV
 
static constexpr double MeV
 
G4ThreadLocal Analysis * the_analysis
 
G4bool FillH3(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
 
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 &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")