34 #include "SteppingAction.hh"
35 #include "DetectorConstruction.hh"
36 #include "RunAction.hh"
37 #include "HistoManager.hh"
77 if (procName ==
"msc" || procName ==
"muMsc" || procName ==
"stepMax") {
86 G4double ratio = geomPathLength/truePathLength;
89 analysisManager->FillH1(1,truePathLength);
90 analysisManager->FillH1(2,geomPathLength);
91 analysisManager->FillH1(3,ratio);
93 G4double yend = position.
y(), zend = position.
z();
94 G4double lateralDisplacement = std::sqrt(yend*yend + zend*zend);
96 analysisManager->FillH1(4,lateralDisplacement);
98 G4double psi = std::atan(lateralDisplacement/geomPathLength);
100 analysisManager->FillH1(5,psi);
102 G4double xdir = direction.
x(), ydir = direction.
y(), zdir = direction.
z();
103 G4double tetaPlane = std::atan2(ydir, xdir);
105 analysisManager->FillH1(6,tetaPlane);
106 tetaPlane = std::atan2(zdir, xdir);
108 analysisManager->FillH1(6,tetaPlane);
110 G4double phiPos = std::atan2(zend, yend);
111 analysisManager->FillH1(7,phiPos);
112 G4double phiDir = std::atan2(zdir, ydir);
113 analysisManager->FillH1(8,phiDir);
116 if (lateralDisplacement > 0.)
117 phiCorrel = (yend*ydir + zend*zdir)/lateralDisplacement;
119 analysisManager->FillH1(9,phiCorrel);
120 }
else if (procName ==
"conv" ) {
137 for (
size_t lp=0; lp<
std::min((*secondary).size(),size_t(2) ); lp++) {
140 Pminus = (*secondary)[lp]->GetMomentum();
143 Eplus = (*secondary)[lp]->GetTotalEnergy();
144 Pplus = (*secondary)[lp]->GetMomentum();
148 if ( (*secondary).size() >= 3 ) {
150 Precoil = (*secondary)[2]->GetMomentum();
168 if ( PolaGamma.
mag() != 0.0 ) {
169 x = PolaGamma.
unit();
173 if (
x.howOrthogonal(z) != 0) {
174 x =
x -
x.dot(z) *
z;
176 if (
x.mag() != 0.0 ) {
191 analysisManager->FillH1(10,angleE);
193 analysisManager->FillH1(11,std::log10(Precoil.
mag()));
195 analysisManager->FillH1(12,Precoil.
transform(WtoG).
phi());
201 analysisManager->FillH1(13,phiPlus);
202 analysisManager->FillH1(14,std::cos(phiPlus + phiMinus) * -2.0);
203 analysisManager->FillH1(15,Eplus/EGamma);
207 analysisManager->FillH1(16, phiPola);
Hep3Vector & transform(const HepRotation &)
G4double GetTotalEnergy() const
static G4RunManager * GetRunManager()
const DetectorConstruction * fDetector
CLHEP::Hep3Vector G4ThreeVector
G4StepPoint * GetPreStepPoint() const
void SumPsi(G4double psi)
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
void SumPathLength(G4double truepl, G4double geompl)
void SumLateralDisplacement(G4double displa)
const G4TouchableHandle & GetTouchableHandle() const
double angle(const Hep3Vector &) const
const G4VPhysicalVolume * GetWorld()
void CountProcesses(G4String)
G4double GetStepLength() const
const G4ThreeVector & GetPosition() const
const G4TrackVector * GetSecondary() const
const G4String & GetProcessName() const
const G4ThreeVector & GetMomentumDirection() const
G4CsvAnalysisManager G4AnalysisManager
HepBoost inverseOf(const HepBoost <)
G4StepPoint * GetPostStepPoint() const
void UserSteppingAction(const G4Step *)
static G4Electron * ElectronDefinition()
Hep3Vector cross(const Hep3Vector &) const
void SumPhiCorrel(G4double correl)
const G4ThreeVector & GetPolarization() const
G4SteppingManager * fpSteppingManager
std::vector< G4Track * > G4TrackVector
void SumTetaPlane(G4double teta)
virtual void AbortEvent()
static G4Positron * PositronDefinition()
G4ThreeVector GetMomentum() const
const G4VProcess * GetProcessDefinedStep() const
Simple detector construction with a box volume placed in a world.
T min(const T t1, const T t2)
brief Return the smallest of the two arguments