34 #include "SteppingAction.hh" 35 #include "DetectorConstruction.hh" 36 #include "TrackingAction.hh" 37 #include "HistoManager.hh" 49 :fDetector(det), fTrackAction(TrAct),
74 Run* run =
static_cast<Run*
>(
82 G4StepPoint* point1 = step->GetPreStepPoint();
87 G4StepPoint* point2 = step->GetPostStepPoint();
88 const G4VProcess* process = point2->GetProcessDefinedStep();
100 if (step->GetTrack()->GetDefinition() ==
G4Gamma::Gamma())
return;
105 G4double steplen = step->GetStepLength();
108 analysisManager->FillH1(
id,steplen);
112 if ((volume ==
fWall) && (point2->GetStepStatus() == fGeomBoundary)) {
118 if (volume ==
fWall)
return;
120 G4double ekin1 = point1->GetKineticEnergy();
121 G4double ekin2 = point2->GetKineticEnergy();
125 if (point1->GetStepStatus() == fGeomBoundary) {
127 G4ThreeVector vertex = step->GetTrack()->GetVertexPosition();
128 analysisManager->FillH1(4,vertex.
z());
130 analysisManager->FillH1(5,ekin1);
133 (point2->GetPosition() - point1->GetPosition()).unit();
135 ->SurfaceNormal(point1->GetPosition());
136 analysisManager->FillH1(6,std::acos(-
fDirectionIn*normal));
137 analysisManager->FillH1(7,std::acos(-directionOut*normal));
143 if (step->GetTrack()->GetCurrentStepNumber() == 1)
fTrackSegm = 0.;
152 if (point2->GetStepStatus() == fGeomBoundary) {
void AddTrakCavity(G4double dt)
G4Run * GetNonConstCurrentRun() const
G4VPhysicalVolume * GetWall()
void CountProcesses(G4String procName)
CLHEP::Hep3Vector G4ThreeVector
void StepInCavity(G4double s)
G4ThreeVector fDirectionIn
void UserSteppingAction(const G4Step *)
G4VPhysicalVolume * fWall
static double normal(HepRandomEngine *eptr)
G4VPhysicalVolume * fCavity
TrackingAction * fTrackAction
const G4String & GetProcessName() const
ExG4HbookAnalysisManager G4AnalysisManager
DetectorConstruction * fDetector
G4VPhysicalVolume * GetCavity()
static G4RunManager * GetRunManager()
void StepInWall(G4double s)
void FlowInCavity(G4int k, G4double e)
Detector construction class to define materials and geometry.
void AddEdepCavity(G4double de)