6 #include "G4Material.hh" 7 #include "G4EventManager.hh" 102 const G4ThreeVector&
dir = aTrack->GetMomentum() ;
148 theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
150 if( dir.theta() != 0 ) {
158 theMass = aTrack->GetDefinition()->GetPDGMass();
176 G4StepPoint* prePoint = aStep->GetPreStepPoint();
177 G4StepPoint* postPoint = aStep->GetPostStepPoint();
180 G4Material * theMaterialPre = prePoint->GetMaterial();
181 assert(theMaterialPre);
183 CLHEP::Hep3Vector prePos = prePoint->GetPosition();
184 CLHEP::Hep3Vector postPos = postPoint->GetPosition();
186 G4double steplen = aStep->GetStepLength();
188 G4double radlen = theMaterialPre->GetRadlen();
189 G4double intlen = theMaterialPre->GetNuclearInterLength();
192 G4String materialName = theMaterialPre->GetName();
193 std::cout <<
" steplen " << steplen <<
" radlen " << radlen <<
" mb " << steplen/radlen <<
" mate " << theMaterialPre->GetName() << std::endl;
195 G4String volumeName = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume()->GetName();
196 std::cout <<
" Volume " << volumeName <<
"\n";
197 std::cout <<
" Material " << materialName <<
"\n";
203 std::cout <<
"Volume ID " << volumeID <<
" and material ID " << materialID <<
"\n";
218 <<
" in volume " << volumeName << std::endl;
227 <<
" in volume " << volumeName << std::endl;
238 float dmb = steplen/radlen;
239 float dil = steplen/intlen;
241 G4VPhysicalVolume*
pv = aStep->GetPreStepPoint()->GetPhysicalVolume();
242 const G4VTouchable*
t = aStep->GetPreStepPoint()->GetTouchable();
243 G4ThreeVector objectTranslation = t->GetTranslation();
244 const G4RotationMatrix* objectRotation = t->GetRotation();
245 const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep();
246 const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep();
248 G4Track*
track = aStep->GetTrack();
250 <<
"\tPt = " <<
thePt <<
" MeV/c" <<
"\tEta = " <<
theEta <<
"\tPhi = " <<
thePhi 322 int preProcType = -99;
323 int postProcType = -99;
324 if (interactionPre) preProcType = interactionPre->GetProcessType();
326 if (interactionPost) postProcType = interactionPost->GetProcessType();
351 std::cout <<
"\tProcess Pre " << interactionPre->GetProcessName()
355 std::cout <<
"\tProcess Post " << interactionPost->GetProcessName()
362 <<
"\tPolar Radius = " <<
sqrt(prePos.x()*prePos.x()+prePos.y()*prePos.y())
371 <<
"\tPolar Radius = " <<
sqrt(postPos.x()*postPos.x()+postPos.y()*postPos.y())
423 for(G4TrackVector::iterator iSec = aStep->GetSecondary()->begin(); iSec!=aStep->GetSecondary()->end(); iSec++) {
424 std::cout <<
"\t\tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
425 <<
" created through process " 426 <<
" type " << (*iSec)->GetCreatorProcess()->GetProcessType()
427 <<
" " << (*iSec)->GetCreatorProcess()->GetProcessTypeName(G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()))
433 theTrkLen = aStep->GetTrack()->GetTrackLength();
float * theStepInitialEnergy
float theSensitiveFractionIL
float theCoolingFractionIL
int material(std::string s)
std::vector< float > x0fraction(std::string s)
float theElectronicsFractionMB
float theElectronicsFractionIL
float theCoolingFractionMB
int volume(std::string s)
float * theStepFinalGamma
float * theElectronicsDil
std::string * theMaterialName
float theSensitiveFractionMB
float * theElectronicsDmb
float * theStepFinalEnergy
float * theStepInitialBeta
float theSupportFractionIL
void dataEndTrack(const G4Track *aTrack)
void dataPerStep(const G4Step *aStep)
float * theMaterialDensity
float * theStepInitialEta
float theCablesFractionMB
MaterialBudgetCategorizer * myMaterialBudgetCategorizer
float theCablesFractionIL
float * theStepInitialMass
float * theStepInitialGamma
double densityConvertionFactor
void dataStartTrack(const G4Track *aTrack)
float * theStepInitialPhi
std::string * theVolumeName
std::vector< float > l0fraction(std::string s)
float theSupportFractionMB
float * theMaterialLambda0