55 delete G4AnalysisManager::Instance();
102 analysisManager->
Write();
115 analysisManager->CreateNtupleIColumn(
"particleID" );
116 analysisManager->CreateNtupleIColumn(
"PID" );
117 analysisManager->CreateNtupleDColumn(
"MC_pX" );
118 analysisManager->CreateNtupleDColumn(
"MC_pY" );
119 analysisManager->CreateNtupleDColumn(
"MC_pZ" );
121 analysisManager->CreateNtupleDColumn(
"tracker_res" );
122 analysisManager->CreateNtupleDColumn(
"tracker_eff" );
123 analysisManager->CreateNtupleDColumn(
"tracker_pX" );
124 analysisManager->CreateNtupleDColumn(
"tracker_pY" );
125 analysisManager->CreateNtupleDColumn(
"tracker_pZ" );
127 analysisManager->CreateNtupleDColumn(
"emcal_res" );
128 analysisManager->CreateNtupleDColumn(
"emcal_eff" );
129 analysisManager->CreateNtupleDColumn(
"emcal_X" );
130 analysisManager->CreateNtupleDColumn(
"emcal_Y" );
131 analysisManager->CreateNtupleDColumn(
"emcal_Z" );
132 analysisManager->CreateNtupleDColumn(
"emcal_E" );
134 analysisManager->CreateNtupleDColumn(
"hcal_res" );
135 analysisManager->CreateNtupleDColumn(
"hcal_eff" );
136 analysisManager->CreateNtupleDColumn(
"hcal_X" );
137 analysisManager->CreateNtupleDColumn(
"hcal_Y" );
138 analysisManager->CreateNtupleDColumn(
"hcal_Z" );
139 analysisManager->CreateNtupleDColumn(
"hcal_E" );
149 analysisManager->
CreateH1(
"Pdiff",
"momentum smeared in tracker", 100, 0.8, 1.2 );
152 analysisManager->
CreateH1(
"EMCalEdiff",
"energy smeared in EMCal", 100, 0.8, 1.2 );
155 analysisManager->
CreateH1(
"HCalEdiff",
"energy smeared in HCal", 100, 0.0, 2.0 );
166 switch( aWhatToSave ) {
180 " Wrong particle - trying to save Tracker information of different particle"
191 " Wrong particle - trying to save EMCal information of different particle"
203 " Wrong particle - trying to save HCal information of different particle"
221 analysisManager->
FillH1( aHistNo, aValue );
static G4RunManager * GetRunManager()
SaveType
Indicates to which ntuple to save the information.
G4bool SetH1YAxisTitle(G4int id, const G4String &title)
void SaveTrack(SaveType aWhatToSave, G4int aPartID, G4int aPDG, G4ThreeVector aVector, G4double aResolution=0, G4double aEfficiency=1, G4double aEnergy=0)
G4bool SetH1XAxisTitle(G4int id, const G4String &title)
G4bool SetFileName(const G4String &fileName)
G4bool fFileNameWithRunNo
If true, a run number should be added to the file. Default: false.
static G4ThreadLocal G4int fCurrentID
G4bool OpenFile(const G4String &fileName="")
G4bool FillNtupleIColumn(G4int id, G4int value)
void StartAnalysis(G4int runID)
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 FillHistogram(G4int HNo, G4double value) const
G4bool FillNtupleDColumn(G4int id, G4double value)
static Par02Output * fPar02Output
The pointer to the only Par02Output class object.
G4String fFileName
A name of the output root file.
static G4ThreadLocal G4int fCurrentNtupleId
Current ntuple Id.
Definition of the Par02Output class.
void AppendName(G4bool app)
Par02Output()
A default, protected constructor (due to singleton pattern).
void SetFileName(G4String name)
const G4Event * GetCurrentEvent() const
static G4String ConvertToString(G4bool boolVal)
void SetVerboseLevel(G4int verboseLevel)
G4GLOB_DLL std::ostream G4cout
static Par02Output * Instance()
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)