31 #ifndef PAR02_OUTPUT_H
32 #define PAR02_OUTPUT_H
static G4ThreadLocal G4int fCurrentNtupleId
Current ntuple Id.
void AppendName(G4bool app)
Sets fFileNameWithRunNo that indicates whether to add the run number to the file name.
G4String fFileName
A name of the output root file.
void EndAnalysis()
Calls the G4AnalysisManager::Instance(). It writes to the output file and close it.
CLHEP::Hep3Vector G4ThreeVector
static G4ThreadLocal G4int fCurrentID
A control value of particle ID to ensure that data saved to various ntuples match the same particle...
void CreateNtuples()
Creates Ntuples used to store information about particle (its ID, PDG code, energy deposits...
void CreateHistograms()
Creates histograms to combine information from all the events in the run. To be called for each run i...
const char * name(G4int ptype)
void FillHistogram(G4int HNo, G4double value) const
Fills the histogram.
Par02Output()
A default, protected constructor (due to singleton pattern).
Handling the saving to the file.
G4String GetFileName()
Gets the file name of the output root file.
SaveType
Indicates to which ntuple to save the information.
static Par02Output * Instance()
Allows the access to the unique Par02Output object.
void SaveTrack(SaveType aWhatToSave, G4int aPartID, G4int aPDG, G4ThreeVector aVector, G4double aResolution=0, G4double aEfficiency=1, G4double aEnergy=0)
Saves the information about the particle (track).
void StartAnalysis(G4int runID)
Calls the G4AnalysisManager::Instance(). It sets the file name of the output file based on fFileName ...
static Par02Output * fPar02Output
The pointer to the only Par02Output class object.
G4bool fFileNameWithRunNo
If true, a run number should be added to the file. Default: false.
void SetFileName(G4String name)
Sets the file name of the output root file.