53 XrayTelAnalysis::XrayTelAnalysis() :
56 histFileName =
"xraytel";
59 asciiFileName=
"xraytel.out";
60 asciiFile =
new std::ofstream(asciiFileName);
62 if(asciiFile->is_open())
63 (*asciiFile) <<
"Energy (keV) x (mm) y (mm) z (mm)" <<
G4endl <<
G4endl;
86 G4cout <<
"Opening output file " << histFileName <<
" ... ";
92 man->
CreateH1(
"1",
"Energy, all /keV", 100,0.,100.);
93 man->
CreateH1(
"2",
"Energy, entering detector /keV", 500,0.,500.);
96 man->
CreateH2(
"1",
"y-z, all /mm", 100,-500.,500.,100,-500.,500.);
97 man->
CreateH2(
"2",
"y-z, entering detector /mm", 200,-50.,50.,200,-50.,50.);
121 delete G4AnalysisManager::Instance();
159 if(asciiFile->is_open()) {
160 (*asciiFile) << std::setiosflags(std::ios::fixed)
161 << std::setprecision(3)
164 (*asciiFile) << eKin;
165 (*asciiFile) << std::setiosflags(std::ios::fixed)
166 << std::setprecision(3)
170 (*asciiFile) << std::setiosflags(std::ios::fixed)
171 << std::setprecision(3)
175 (*asciiFile) << std::setiosflags(std::ios::fixed)
176 << std::setprecision(3)
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")
const G4ThreeVector & GetPosition() const
G4int CreateNtuple(const G4String &name, const G4String &title)
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
G4bool FillNtupleDColumn(G4int id, G4double value)
const G4ThreeVector & GetMomentumDirection() const
G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
void analyseStepping(const G4Track &track, G4bool entering)
G4int CreateNtupleDColumn(const G4String &name)
static XrayTelAnalysis * getInstance()
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")