35 #include "TrackingAction.hh"
37 #include "DetectorConstruction.hh"
39 #include "HistoManager.hh"
69 if (charge == 0.0)
return;
70 if (position.z() <
fZend)
return;
71 if (direction.z() <= 0.)
return;
78 G4double ux = direction.x(), uy = direction.y(), uz = direction.z();
81 analysisManager->FillH1(ih, thetax);
82 analysisManager->FillH1(ih, thetay);
86 G4double x = position.x(), y = position.y();
89 dr = analysisManager->GetH1Width(ih);
90 rmin = ((int)(r/dr))*dr;
91 ds = twopi*(rmin + 0.5*dr)*dr;
92 analysisManager->FillH1(ih, r, 1/ds);
97 dr = analysisManager->GetH1Width(ih);
98 rmin = ((int)(r/dr))*dr;
99 ds = twopi*(rmin + 0.5*dr)*dr;
100 analysisManager->FillH1(ih, r, 1/(uz*ds));
104 Run* run =
static_cast<Run*
>(
114 G4double dtheta = analysisManager->GetH1Width(ih);
115 G4double unit = analysisManager->GetH1Unit(ih);
117 G4double weight = unit*unit/(twopi*std::sin(theta)*dtheta);
118 analysisManager->FillH1(ih, theta, weight);
126 G4double thetam = std::atan(r/dist);
128 G4double dtheta = analysisManager->GetH1Width(ih);
129 G4double unit = analysisManager->GetH1Unit(ih);
131 G4double weight = unit*unit/(twopi*std::sin(thetam)*dtheta);
132 analysisManager->FillH1(ih, thetam, weight);
G4ParticleDefinition * GetDefinition() const
CLHEP::Hep3Vector G4ThreeVector
const G4ThreeVector & GetPosition() const
G4double GetThicknessWorld()
void PreUserTrackingAction(const G4Track *)
ExG4HbookAnalysisManager G4AnalysisManager
void PostUserTrackingAction(const G4Track *)
static G4RunManager * GetRunManager()
const G4ThreeVector & GetMomentumDirection() const
Detector construction class to demonstrate various ways of placement.
G4double GetZdist_foil_detector()
void SumFluence(G4double, G4double)
G4double GetPDGCharge() const
G4Run * GetNonConstCurrentRun() const
DetectorConstruction * fDetector