60 #include "G4HCofThisEvent.hh"
61 #include "G4VHitsCollection.hh"
76 : runAct(DMXRun),genAction(DMXGenerator)
197 G4cout <<
" Number of hits in LXe: " << S_hits <<
G4endl;
232 G4cout <<
" Total energy in LXe: "
253 G4cout <<
" Average light collection time: "
255 G4cout <<
" Number of PMT hits (photoelectron equivalent): "
289 std::ofstream hitsfile(filename, std::ios::app);
291 std::ofstream hitsfileInit(filename);
292 hitsfileInit <<
"Evt Eprim Etot LXe LXeTime PMT PMTTime Seed1 Seed2 First Flags"
294 hitsfileInit <<
"# MeV MeV hits ns hits ns hit"
301 if(hitsfile.is_open()) {
304 hitsfile << std::setiosflags(std::ios::fixed)
305 << std::setprecision(4)
312 << std::setiosflags(std::ios::scientific)
313 << std::setprecision(2)
316 << std::setiosflags(std::ios::fixed)
317 << std::setprecision(4)
320 << *(
seeds+1) <<
"\t"
330 G4cout <<
" Event summary in file " << filename <<
G4endl;
335 G4int firstparticleIndex = 0;
341 firstparticleIndex = 5;
353 long seed2 = *(
seeds+1);
384 std::ofstream pmtfile(filename, std::ios::app);
388 if(pmtfile.is_open()) {
389 pmtfile <<
"Hit# X, mm Y, mm Z, mm" <<
G4endl;
390 pmtfile << std::setiosflags(std::ios::fixed)
391 << std::setprecision(3)
396 x = ((*hits)[i]->GetPos()).x()/
mm;
397 y = ((*hits)[i]->GetPos()).y()/
mm;
398 z = ((*hits)[i]->GetPos()).
z()/
mm;
419 G4cout <<
" " << P_hits <<
" PMT hits in " << filename <<
G4endl;
433 G4int n_trajectories = 0;
435 if(trajContainer) n_trajectories = trajContainer->
entries();
436 for (
G4int i=0; i<n_trajectories; i++) {
G4double totEnergyNeutrons
virtual void BeginOfEventAction(const G4Event *)
G4VHitsCollection * GetHC(G4int i)
G4int GetCollectionID(G4String colName)
static G4VVisManager * GetConcreteInstance()
G4double GetCharge() const
virtual ~DMXEventAction()
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4TrajectoryContainer * GetTrajectoryContainer() const
static G4UImanager * GetUIpointer()
void writeScintHitsToFile(void)
G4GLOB_DLL std::ostream G4cout
G4bool FillNtupleDColumn(G4int id, G4double value)
virtual void EndOfEventAction(const G4Event *)
G4String firstParticleName
G4String GetsavehitsFile()
const long * GetEventSeeds()
void drawTracks(const G4Event *)
static const double nanosecond
virtual void DrawTrajectory() const
G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
static G4SDManager * GetSDMpointer()
virtual void DrawAllHits()
DMXEventAction(DMXRunAction *, DMXPrimaryGeneratorAction *)
G4HCofThisEvent * GetHCofThisEvent() const
G4String GetsavepmtFile()
DMXPrimaryGeneratorAction * genAction
G4double GetEnergyPrimary()
G4String GetParticleName() const
void writePmtHitsToFile(const DMXPmtHitsCollection *)
G4int ApplyCommand(const char *aCommand)
DMXEventActionMessenger * eventMessenger