54 #include "G4HCofThisEvent.hh"
55 #include "G4VHitsCollection.hh"
76 :trackerCollID(-1),calorimeterCollID(-1),
77 anticoincidenceCollID(-1), drawFlag(
"all")
99 if (trackerCollID==-1) {
102 if(anticoincidenceCollID==-1) {
103 anticoincidenceCollID =
106 if(calorimeterCollID==-1) {
138 G4cout <<
"Number of tracker hits in this event = " << n_hit <<
G4endl;
140 G4int NStrip, NPlane, IsX;
144 for (
int i=0;i<n_hit;i++)
148 ESil = (*THC)[i]->GetEdepSil();
149 NStrip = (*THC)[i]->GetNStrip();
150 NPlane = (*THC)[i]->GetNSilPlane();
151 IsX = (*THC)[i]->GetPlaneType();
154 outFile << std::setw(7) << event_id <<
" " <<
155 ESil/
keV <<
" " << NStrip <<
156 " " << NPlane <<
" " << IsX <<
" " <<
157 (*THC)[i]->GetPos().x()/
mm <<
" "<<
158 (*THC)[i]->GetPos().y()/
mm <<
" "<<
159 (*THC)[i]->GetPos().z()/
mm <<
" "<<
162 G4cout << std::setw(7) << event_id <<
" " <<
163 ESil/
keV <<
" " << NStrip <<
164 " " << NPlane <<
" " << IsX <<
" " <<
165 (*THC)[i]->GetPos().x()/
mm <<
" "<<
166 (*THC)[i]->GetPos().y()/
mm <<
" "<<
167 (*THC)[i]->GetPos().z()/
mm <<
" "<<
171 #ifdef G4ANALYSIS_USE
174 GammaRayTelAnalysis* analysis = GammaRayTelAnalysis::getInstance();
178 if (analysis->GetHisto2DMode()==
"position")
179 analysis->InsertPositionXZ((*THC)[i]->GetPos().x()/
mm,(*THC)[i]->GetPos().z()/
mm);
181 analysis->InsertPositionXZ(NStrip, NPlane);
182 if (NPlane == 0) analysis->InsertEnergy(ESil/
keV);
183 analysis->InsertHits(NPlane);
187 if (analysis->GetHisto2DMode()==
"position")
188 analysis->InsertPositionYZ((*THC)[i]->GetPos().y()/
mm,(*THC)[i]->GetPos().z()/
mm);
190 analysis->InsertPositionYZ(NStrip, NPlane);
191 if (NPlane == 0) analysis->InsertEnergy(ESil/
keV);
192 analysis->InsertHits(NPlane);
195 #ifdef G4ANALYSIS_USE
196 analysis->setNtuple( ESil/
keV, NPlane, (*THC)[i]->GetPos().
x()/
mm,
197 (*THC)[i]->GetPos().
y()/
mm,
198 (*THC)[i]->GetPos().
z()/
mm);
204 #ifdef G4ANALYSIS_USE
205 GammaRayTelAnalysis* analysis = GammaRayTelAnalysis::getInstance();
206 analysis->EndOfEvent(n_hit);
228 G4int NStrip, NPlane, IsX;
229 for (
G4int i=0;i<n_digi;i++) {
232 NStrip = (*DC)[i]->GetStripNumber();
233 NPlane = (*DC)[i]->GetPlaneNumber();
234 IsX = (*DC)[i]->GetPlaneType();
236 outFile << std::setw(7) << event_id <<
" " << NStrip <<
237 " " << NPlane <<
" " << IsX <<
" " <<
G4endl;
G4VHitsCollection * GetHC(G4int i)
G4int GetCollectionID(G4String colName)
static G4DigiManager * GetDMpointer()
G4GLOB_DLL std::ostream G4cout
virtual ~GammaRayTelEventAction()
virtual void BeginOfEventAction(const G4Event *)
void AddNewModule(G4VDigitizerModule *DM)
G4int GetDigiCollectionID(G4String DCname)
static G4SDManager * GetSDMpointer()
virtual void EndOfEventAction(const G4Event *)
const G4VDigiCollection * GetDigiCollection(G4int DCID, G4int eventID=0)
G4HCofThisEvent * GetHCofThisEvent() const
G4VDigitizerModule * FindDigitizerModule(G4String mName)