52 #include "G4HCofThisEvent.hh"
53 #include "G4VHitsCollection.hh"
70 :trackerCollID(-1),calorimeterCollID(-1),
71 anticoincidenceCollID(-1), drawFlag(
"all"),
72 theRunAction(runAction)
113 G4Exception(
"GammaRayTelEventAction::BeginOfEventAction()",
114 "GTR0001",
FatalException,
"Null pointer to Run Action: this should not be");
141 G4cout <<
"Number of tracker hits in this event = " << n_hit <<
G4endl;
143 G4int NStrip, NPlane, IsX;
147 for (
int i=0;i<n_hit;i++)
151 ESil = (*THC)[i]->GetEdepSil();
152 NStrip = (*THC)[i]->GetNStrip();
153 NPlane = (*THC)[i]->GetNSilPlane();
154 IsX = (*THC)[i]->GetPlaneType();
159 (*outFile) << std::setw(7) << event_id <<
" " <<
160 ESil/
keV <<
" " << NStrip <<
161 " " << NPlane <<
" " << IsX <<
" " <<
162 (*THC)[i]->GetPos().x()/
mm <<
" "<<
163 (*THC)[i]->GetPos().y()/
mm <<
" "<<
164 (*THC)[i]->GetPos().z()/
mm <<
" "<<
167 G4cout << std::setw(7) << event_id <<
" " <<
168 ESil/
keV <<
" " << NStrip <<
169 " " << NPlane <<
" " << IsX <<
" " <<
170 (*THC)[i]->GetPos().x()/
mm <<
" "<<
171 (*THC)[i]->GetPos().y()/
mm <<
" "<<
172 (*THC)[i]->GetPos().z()/
mm <<
" "<<
198 (*THC)[i]->GetPos().
y()/
mm,
199 (*THC)[i]->GetPos().
z()/
mm);
222 G4int NStrip, NPlane, IsX;
223 for (
G4int i=0;i<n_digi;i++) {
226 NStrip = (*DC)[i]->GetStripNumber();
227 NPlane = (*DC)[i]->GetPlaneNumber();
228 IsX = (*DC)[i]->GetPlaneType();
230 (*outFile) << std::setw(7) << event_id <<
" " << NStrip <<
231 " " << NPlane <<
" " << IsX <<
" " <<
G4endl;
static G4DigiManager * GetDMpointer()
G4int GetCollectionID(G4String colName)
void EndOfEvent(G4int flag)
G4int anticoincidenceCollID
G4int GetDigiCollectionID(G4String DCname)
static constexpr double keV
static constexpr double mm
void InsertPositionXZ(double x, double z)
void InsertHits(int nplane)
void InsertPositionYZ(double y, double z)
static GammaRayTelAnalysis * getInstance()
G4HCofThisEvent * GetHCofThisEvent() const
void InsertEnergy(double en)
void AddNewModule(G4VDigitizerModule *DM)
virtual void EndOfEventAction(const G4Event *)
GammaRayTelRunAction * theRunAction
const G4VDigiCollection * GetDigiCollection(G4int DCID, G4int eventID=0)
void setNtuple(float E, float p, float x, float y, float z)
G4String GetHisto2DMode()
G4VHitsCollection * GetHC(G4int i)
std::ofstream * GetOutputFile()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static G4SDManager * GetSDMpointer()
G4GLOB_DLL std::ostream G4cout
virtual void BeginOfEventAction(const G4Event *)
virtual ~GammaRayTelEventAction()
G4VDigitizerModule * FindDigitizerModule(G4String mName)
GammaRayTelEventAction(GammaRayTelRunAction *runAction=0)