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;
233 float dmb = steplen/radlen;
234 float dil = steplen/intlen;
236 G4VPhysicalVolume*
pv = aStep->GetPreStepPoint()->GetPhysicalVolume();
237 const G4VTouchable*
t = aStep->GetPreStepPoint()->GetTouchable();
238 G4ThreeVector objectTranslation = t->GetTranslation();
239 const G4RotationMatrix* objectRotation = t->GetRotation();
240 const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep();
241 const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep();
243 G4Track* track = aStep->GetTrack();
245 <<
"\tPt = " <<
thePt <<
" MeV/c" <<
"\tEta = " <<
theEta <<
"\tPhi = " <<
thePhi
317 int preProcType = -99;
318 int postProcType = -99;
319 if (interactionPre) preProcType = interactionPre->GetProcessType();
321 if (interactionPost) postProcType = interactionPost->GetProcessType();
346 std::cout <<
"\tProcess Pre " << interactionPre->GetProcessName()
350 std::cout <<
"\tProcess Post " << interactionPost->GetProcessName()
357 <<
"\tPolar Radius = " <<
sqrt(prePos.x()*prePos.x()+prePos.y()*prePos.y())
366 <<
"\tPolar Radius = " <<
sqrt(postPos.x()*postPos.x()+postPos.y()*postPos.y())
418 for(G4TrackVector::iterator iSec = aStep->GetSecondary()->begin(); iSec!=aStep->GetSecondary()->end(); iSec++) {
419 std::cout <<
"\t\tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
420 <<
" created through process "
421 <<
" type " << (*iSec)->GetCreatorProcess()->GetProcessType()
422 <<
" " << (*iSec)->GetCreatorProcess()->GetProcessTypeName(G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()))
428 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