5 #include "G4UImanager.hh"
6 #include "G4VVisManager.hh"
11 #ifdef REFLEX_DICTIONARY
12 #include "Cintex/Cintex.h"
18 #include "TStreamerInfo.h"
29 : wcsimrandomparameters(rand), useTimer(false)
57 #ifdef REFLEX_DICTIONARY
58 ROOT::Cintex::Cintex::Enable();
62 WCSimRootEvent::Class()->GetStreamerInfo()->Optimize(kFALSE);
64 WCSimRootTrigger::Class()->GetStreamerInfo()->Optimize(kFALSE);
71 TFile* hfile =
new TFile(rootname.c_str(),
"RECREATE",
"WCSim ROOT file");
72 hfile->SetCompressionLevel(2);
75 WCSimTree =
new TTree(
"wcsimT",
"WCSim Tree");
82 Int_t branchStyle = 1;
83 TTree::SetBranchStyle(branchStyle);
84 Int_t bufsize = 64000;
93 geoTree =
new TTree(
"wcsimGeoT",
"WCSim Geometry Tree");
95 TBranch *geoBranch =
geoTree->Branch(
"wcsimrootgeom",
"WCSimRootGeom", &
wcsimrootgeom, bufsize,0);
100 optionsTree =
new TTree(
"wcsimRootOptionsT",
"WCSim Options Tree");
123 G4cout <<
"EndOfRunAction" << G4endl;
129 TFile* hfile =
WCSimTree->GetCurrentFile();
131 hfile->Write(
"",TObject::kOverwrite);
143 G4cout <<
"WCSimRunAction ran from BeginOfRunAction() to EndOfRunAction() in:"
144 <<
"\t" <<
timer.CpuTime() <<
" seconds (CPU)"
145 <<
"\t" <<
timer.RealTime() <<
" seconds (real)" << G4endl;
154 G4double pmtradiusOD;
195 offset[0] = offset1[0];
196 offset[1] = offset1[1];
197 offset[2] = offset1[2];
202 for (
unsigned int i=0;i!=fpmts->size();i++){
214 if (fpmts->size() != (
unsigned int)numpmt) {
215 G4cout <<
"Mismatch between number of ID pmts and pmt list in geofile.txt!!"<<G4endl;
216 G4cout << fpmts->size() <<
" vs. "<< numpmt <<G4endl;
220 for (
unsigned int i=0;i!=fODpmts->size();i++){
232 if (fpmts->size() != (
unsigned int)numpmt) {
233 G4cout <<
"Mismatch between number of OD pmts and pmt list in geofile.txt!!"<<G4endl;
234 G4cout << fODpmts->size() <<
" vs. "<< numpmt <<G4endl;
bool useTimer
Use the timer? Set by Messenger.
TBranch * wcsimrooteventbranch
G4int GetTotalNumODPmts()
WCSimRootOptions * wcsimrootoptions
G4bool GetIsEggShapedHyperK()
WCSimRootEvent * wcsimrootsuperevent
WCSimRunAction(WCSimDetectorConstruction *, WCSimRandomParameters *)
void SaveOptionsToOutput(WCSimRootOptions *wcopt)
WCSimDetectorConstruction * wcsimdetector
WCSimRunActionMessenger * messenger
int numberOfEventsGenerated
TBranch * wcsimrooteventbranch_OD
WCSimRootGeom * wcsimrootgeom
int numberOfTimesCatcherHit
int numberOfTimesWaterTubeHit
TStopwatch timer
A timer for runtime analysis.
WCSimRandomParameters * wcsimrandomparameters
void SaveOptionsToOutput(WCSimRootOptions *wcopt)
WCSimRootEvent * wcsimrootsuperevent_OD
std::vector< WCSimPmtInfo * > * Get_Pmts()
G4String GetRootFileName()
G4double GetGeo_Dm(G4int)
std::vector< WCSimPmtInfo * > * Get_ODPmts()
struct ntupleStruct jhfNtuple
G4ThreeVector GetWCOffset()
void EndOfRunAction(const G4Run *)
void BeginOfRunAction(const G4Run *)