27 #include "EventAction.hh"
33 #include "G4HCofThisEvent.hh"
34 #include "G4VHitsCollection.hh"
43 #include "SensitiveDetectorHit.hh"
45 #include "Analysis.hh"
89 for(
int i2=0;i2<3;i2++){
90 for(
int i1=0;i1<n_hit_sd;i1++)
103 G4double angXin = (ssd[1].
x() - ssd[0].
x()) / (ssd[1].
z() - ssd[0].
z());
104 G4double angYin = (ssd[1].
y() - ssd[0].
y()) / (ssd[1].
z() - ssd[0].
z());
106 analysisManager->FillNtupleDColumn(0, angXin * 1.E6 *
CLHEP::rad);
107 analysisManager->FillNtupleDColumn(1, angYin * 1.E6 * CLHEP::rad);
109 double posXin = ssd[1].
x() - angXin * ssd[1].
z();
110 double posYin = ssd[1].
y() - angYin * ssd[1].
z();
112 analysisManager->FillNtupleDColumn(2, posXin /
CLHEP::mm);
113 analysisManager->FillNtupleDColumn(3, posYin /
CLHEP::mm);
115 G4double angXout = (ssd[2].
x() - posXin) / (ssd[2].
z());
116 G4double angYout = (ssd[2].
y() - posYin) / (ssd[2].
z());
117 analysisManager->FillNtupleDColumn(4, angXout * 1.E6 * CLHEP::rad);
118 analysisManager->FillNtupleDColumn(5, angYout * 1.E6 * CLHEP::rad);
120 analysisManager->AddNtupleRow();
G4int GetCollectionID(G4String colName)
void EndOfEventAction(const G4Event *)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetWorldPos() const
G4VSensitiveDetector * FindSensitiveDetector(G4String dName, G4bool warning=true)
void BeginOfEventAction(const G4Event *)
G4HCofThisEvent * GetHCofThisEvent() const
G4CsvAnalysisManager G4AnalysisManager
G4VHitsCollection * GetHC(G4int i)
static G4SDManager * GetSDMpointer()
static constexpr double mm
static constexpr double rad