#include <MollerSteppingVerbose.hh>
Public Member Functions | |
MollerSteppingVerbose () | |
~MollerSteppingVerbose () | |
void | StepInfo () |
void | TrackingStarted () |
Data Fields | |
ofstream | textfile |
Definition at line 14 of file MollerSteppingVerbose.hh.
MollerSteppingVerbose::MollerSteppingVerbose | ( | ) |
Definition at line 9 of file MollerSteppingVerbose.cc.
References textfile.
00010 { 00011 textfile.open("results_geant.txt"); 00012 }
MollerSteppingVerbose::~MollerSteppingVerbose | ( | ) |
Definition at line 15 of file MollerSteppingVerbose.cc.
References textfile.
00016 { 00017 textfile.close(); 00018 }
void MollerSteppingVerbose::StepInfo | ( | ) |
Definition at line 21 of file MollerSteppingVerbose.cc.
00022 { 00023 CopyState(); 00024 00025 00026 G4int prec = G4cout.precision(6); 00027 G4int parent = fTrack->GetParentID(); 00028 G4int ID = fTrack->GetTrackID(); 00029 G4int step = fTrack->GetCurrentStepNumber(); 00030 00031 G4String volume = fTrack->GetVolume()->GetName(); 00032 G4String particle = fTrack->GetDefinition()->GetParticleName(); 00033 00034 00035 G4StepPoint* thePrePoint = fStep->GetPreStepPoint(); 00036 G4StepPoint* thePostPoint = fStep->GetPostStepPoint(); 00037 00038 const G4VProcess* creatorProcess = fTrack->GetCreatorProcess(); 00039 G4String process; 00040 if (creatorProcess!=0) process = creatorProcess->GetProcessName(); 00041 00042 const G4VProcess* stepProcess = thePostPoint->GetProcessDefinedStep(); 00043 G4String process1; 00044 if (stepProcess!=0) process1 = stepProcess->GetProcessName(); 00045 00046 G4int ion = process.contains("eIoni"); 00047 00048 G4ThreeVector loc = fTrack->GetPosition(); 00049 G4ThreeVector p_loc = fTrack->GetMomentumDirection(); 00050 G4double kineE = fTrack->GetKineticEnergy(); 00051 00052 G4ThreeVector init = fTrack->GetVertexPosition(); 00053 00054 G4double kineE0 = thePrePoint->GetKineticEnergy(); 00055 G4double kineE1 = thePostPoint->GetKineticEnergy(); 00056 G4double kineE2 = fTrack->GetVertexKineticEnergy(); 00057 00058 G4ThreeVector p0 = thePrePoint->GetMomentumDirection(); 00059 G4ThreeVector p1 = thePostPoint->GetMomentumDirection(); 00060 G4ThreeVector p2 = fTrack->GetVertexMomentumDirection(); 00061 00062 G4double theta2 = sqrt(p2.x()*p2.x() + p2.y()*p2.y()); 00063 00064 00065 if( (particle == "e-") && 00066 (kineE2==11*GeV) && 00067 ((kineE0-kineE1)>1.0*GeV) && 00068 (process1=="eIoni") 00069 ){ 00070 00071 G4cout << std::setw(8) << particle << ", " 00072 << std::setw(9) << parent << ", " 00073 << std::setw(9) << ID << ", " 00074 << std::setw(9) << kineE0 << ", " 00075 << std::setw(9) << kineE1 << ", " 00076 << std::setw(9) << kineE2 << ", " 00077 << std::setw(9) << volume << ", " 00078 << std::setw(9) << process << ", " 00079 << std::setw(9) << process1 << ", " 00080 << std::setw(9) << step << ", " 00081 << " " << G4endl; 00082 00083 } 00084 00085 if( (init.z() > -75.0*cm) && 00086 (init.z() < 75.0*cm) && 00087 (particle == "e-") && 00088 (kineE > 2.75*GeV) && 00089 (kineE < 5.5*GeV) && 00090 (theta2 > 0.0096295) && 00091 (theta2 < 0.016679) && ion 00092 ){ 00093 00094 G4cout << std::setw(8) << particle << ", " 00095 << std::setw(9) << parent << ", " 00096 << std::setw(9) << ID << ", " 00097 << std::setw(9) << kineE0 << ", " 00098 << std::setw(9) << kineE1 << ", " 00099 << std::setw(9) << kineE2 << ", " 00100 << std::setw(9) << volume << ", " 00101 << std::setw(9) << process << ", " 00102 << std::setw(9) << process1 << ", " 00103 << std::setw(9) << step << ", " 00104 << " " << G4endl; 00105 } 00106 00107 G4cout.precision(prec); 00108 }
void MollerSteppingVerbose::TrackingStarted | ( | ) |
Definition at line 111 of file MollerSteppingVerbose.cc.
ofstream MollerSteppingVerbose::textfile |
Definition at line 24 of file MollerSteppingVerbose.hh.
Referenced by MollerSteppingVerbose(), and ~MollerSteppingVerbose().