4 #include "G4Material.hh" 5 #include "G4EventManager.hh" 30 const G4ThreeVector&
dir = aTrack->GetMomentum() ;
112 theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
114 if( dir.theta() != 0 ) {
121 theMass = aTrack->GetDefinition()->GetPDGMass();
127 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: [OVAL] MaterialBudget " 128 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
131 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData:" <<
theStepN <<
"Recorded steps ";
135 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Radiation Length " 136 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
138 <<
" TotalMB" << theTotalMB
144 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Interaction Length " 145 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
151 <<
" Air " <<
theAirIL << std::endl;
155 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Radiation Length " 156 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
158 <<
" TotaLMB" << theTotalMB
165 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Interaction Length " 166 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
174 <<
" theWCuIL " <<
theWCuIL << std::endl;
181 G4StepPoint* prePoint = aStep->GetPreStepPoint();
182 G4StepPoint* postPoint = aStep->GetPostStepPoint();
185 G4Material * theMaterialPre = prePoint->GetMaterial();
186 assert(theMaterialPre);
188 CLHEP::Hep3Vector prePos = prePoint->GetPosition();
189 CLHEP::Hep3Vector postPos = postPoint->GetPosition();
191 G4double steplen = aStep->GetStepLength();
193 G4double radlen = theMaterialPre->GetRadlen();
194 G4double intlen = theMaterialPre->GetNuclearInterLength();
197 G4String materialName = theMaterialPre->GetName();
199 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Material " << materialName
200 <<
" steplen " << steplen
201 <<
" radlen " << radlen
202 <<
" mb " << steplen/radlen;
204 G4String volumeName = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume()->GetName();
206 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume " << volumeName
207 <<
" Material " << materialName;
214 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume ID " << volumeID
215 <<
" Material ID " << materialID;
230 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
231 <<
" in volume " << volumeName;
242 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
243 <<
" in volume " << volumeName;
266 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
267 <<
" in volume " << volumeName << std::endl;
282 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category " << materialName
283 <<
" in volume " << volumeName << std::endl;
291 float dmb = steplen/radlen;
292 float dil = steplen/intlen;
294 G4VPhysicalVolume*
pv = aStep->GetPreStepPoint()->GetPhysicalVolume();
295 const G4VTouchable*
t = aStep->GetPreStepPoint()->GetTouchable();
296 const G4ThreeVector& objectTranslation = t->GetTranslation();
297 const G4RotationMatrix* objectRotation = t->GetRotation();
298 const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep();
299 const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep();
301 G4Track*
track = aStep->GetTrack();
303 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Simulated Particle " <<
theID 304 <<
"\tMass " <<
theMass <<
" MeV/c2" 305 <<
"\tPt = " <<
thePt <<
" MeV/c" 395 int preProcType = -99;
396 int postProcType = -99;
397 if (interactionPre) preProcType = interactionPre->GetProcessType();
399 if (interactionPost) postProcType = interactionPost->GetProcessType();
403 <<
"MaterialBudgetData: Step " <<
theStepN 426 <<
"MaterialBudgetData: Process Pre " << interactionPre->GetProcessName()
431 <<
"MaterialBudgetData: Process Post " << interactionPost->GetProcessName()
433 <<
" name "<< interactionPost->GetProcessTypeName(G4ProcessType(
theStepPostProcess[theStepN]))
437 <<
" Polar Radius = " <<
sqrt(prePos.x()*prePos.x()+prePos.y()*prePos.y())
444 <<
" Polar Radius = " <<
sqrt(postPos.x()*postPos.x()+postPos.y()*postPos.y())
448 <<
" Volume " << volumeID <<
" name " <<
theVolumeName[theStepN]
473 <<
" Volume Centre x = " <<
theVolumeX[theStepN]
497 for(G4TrackVector::const_iterator iSec = aStep->GetSecondary()->begin(); iSec!=aStep->GetSecondary()->end(); iSec++) {
499 <<
"MaterialBudgetData: tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
500 <<
" created through process type " << (*iSec)->GetCreatorProcess()->GetProcessType()
501 << (*iSec)->GetCreatorProcess()->GetProcessTypeName(G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()));
505 theTrkLen = aStep->GetTrack()->GetTrackLength();
std::array< float, MAXNUMBERSTEPS > theStepInitialMass
std::array< float, MAXNUMBERSTEPS > theWCuDil
std::array< float, MAXNUMBERSTEPS > theMaterialX0
std::array< float, MAXNUMBERSTEPS > theVolumeZaxis1
std::array< float, MAXNUMBERSTEPS > theAirDil
float theSensitiveFractionIL
float theM_NEMA_FR4_plateFractionMB
float theM_NEMA_FR4_plateIL
float theStainlessSteelMB
std::array< float, MAXNUMBERSTEPS > theStepInitialBeta
float theCoolingFractionIL
float theM_NEMA_FR4_plateMB
std::array< float, MAXNUMBERSTEPS > theSupportDmb
std::array< float, MAXNUMBERSTEPS > theStepFinalEta
std::array< float, MAXNUMBERSTEPS > theM_NEMA_FR4_plateDmb
std::array< int, MAXNUMBERSTEPS > theStepPreProcess
std::array< float, MAXNUMBERSTEPS > theStainlessSteelDil
float theElectronicsFractionMB
std::array< int, MAXNUMBERSTEPS > theStepPostProcess
std::array< float, MAXNUMBERSTEPS > theSiliconDil
float theCopperFractionIL
std::array< float, MAXNUMBERSTEPS > theCopperDmb
std::array< double, MAXNUMBERSTEPS > theFinalX
float theElectronicsFractionIL
std::array< float, MAXNUMBERSTEPS > theStepFinalBeta
float theH_ScintillatorIL
float theCoolingFractionMB
std::array< float, MAXNUMBERSTEPS > theAirDmb
std::array< float, MAXNUMBERSTEPS > theStepInitialPt
std::array< float, MAXNUMBERSTEPS > theWCuDmb
float theM_NEMA_FR4_plateFractionIL
std::array< float, MAXNUMBERSTEPS > theStepInitialPz
std::array< float, MAXNUMBERSTEPS > theStepInitialPx
std::array< float, MAXNUMBERSTEPS > theStepFinalPhi
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis1
std::array< float, MAXNUMBERSTEPS > theM_NEMA_FR4_plateDil
std::array< double, MAXNUMBERSTEPS > theInitialY
std::array< float, MAXNUMBERSTEPS > theStepFinalGamma
std::array< float, MAXNUMBERSTEPS > theVolumeZaxis2
std::array< float, MAXNUMBERSTEPS > theStepFinalMass
float theH_ScintillatorFractionMB
float theSensitiveFractionMB
static int MAXNUMBERSTEPS
std::unique_ptr< MaterialBudgetCategorizer > myMaterialBudgetCategorizer
std::array< float, MAXNUMBERSTEPS > theSiliconDmb
std::array< int, MAXNUMBERSTEPS > theVolumeCopy
std::array< float, MAXNUMBERSTEPS > theLeadDmb
float theStainlessSteelFractionIL
float theSupportFractionIL
std::array< double, MAXNUMBERSTEPS > theInitialZ
std::array< float, MAXNUMBERSTEPS > theMaterialDensity
std::array< float, MAXNUMBERSTEPS > theVolumeXaxis1
std::array< float, MAXNUMBERSTEPS > theOtherDmb
std::array< int, MAXNUMBERSTEPS > theStepID
void dataEndTrack(const G4Track *aTrack)
std::array< float, MAXNUMBERSTEPS > theSensitiveDil
std::array< double, MAXNUMBERSTEPS > theFinalY
void dataPerStep(const G4Step *aStep)
float theH_ScintillatorMB
float theH_ScintillatorFractionIL
std::array< float, MAXNUMBERSTEPS > theStepFinalPx
std::array< float, MAXNUMBERSTEPS > theStepInitialEta
std::array< float, MAXNUMBERSTEPS > theStepInitialPhi
std::array< float, MAXNUMBERSTEPS > theCoolingDmb
float theCablesFractionMB
std::array< float, MAXNUMBERSTEPS > theVolumeX
std::array< float, MAXNUMBERSTEPS > theLeadDil
std::array< float, MAXNUMBERSTEPS > theCablesDil
float theCablesFractionIL
float theStainlessSteelIL
std::array< float, MAXNUMBERSTEPS > theVolumeXaxis2
std::array< float, MAXNUMBERSTEPS > theSupportDil
std::array< float, MAXNUMBERSTEPS > theVolumeXaxis3
std::array< float, MAXNUMBERSTEPS > theStepFinalPt
std::array< float, MAXNUMBERSTEPS > theStepFinalPy
std::array< float, MAXNUMBERSTEPS > theDil
std::array< float, MAXNUMBERSTEPS > theMaterialLambda0
double densityConvertionFactor
std::array< double, MAXNUMBERSTEPS > theFinalZ
std::array< float, MAXNUMBERSTEPS > theVolumeZ
float theCopperFractionMB
std::array< int, MAXNUMBERSTEPS > theVolumeID
std::array< float, MAXNUMBERSTEPS > theVolumeY
std::array< float, MAXNUMBERSTEPS > theDmb
std::array< std::string, MAXNUMBERSTEPS > theVolumeName
void dataStartTrack(const G4Track *aTrack)
std::array< float, MAXNUMBERSTEPS > theStepFinalEnergy
std::array< float, MAXNUMBERSTEPS > theH_ScintillatorDmb
std::array< float, MAXNUMBERSTEPS > theStepInitialGamma
std::array< float, MAXNUMBERSTEPS > theSensitiveDmb
float theSiliconFractionMB
std::array< int, MAXNUMBERSTEPS > theMaterialID
std::array< float, MAXNUMBERSTEPS > theElectronicsDmb
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis3
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis2
float theStainlessSteelFractionMB
std::array< float, MAXNUMBERSTEPS > theCoolingDil
std::array< float, MAXNUMBERSTEPS > theH_ScintillatorDil
float theSupportFractionMB
std::array< float, MAXNUMBERSTEPS > theOtherDil
std::array< float, MAXNUMBERSTEPS > theStepInitialEnergy
std::array< float, MAXNUMBERSTEPS > theElectronicsDil
std::array< float, MAXNUMBERSTEPS > theStainlessSteelDmb
std::array< float, MAXNUMBERSTEPS > theCablesDmb
std::array< float, MAXNUMBERSTEPS > theCopperDil
std::array< std::string, MAXNUMBERSTEPS > theMaterialName
std::array< float, MAXNUMBERSTEPS > theVolumeZaxis3
std::array< float, MAXNUMBERSTEPS > theStepInitialPy
std::array< float, MAXNUMBERSTEPS > theStepFinalPz
std::array< double, MAXNUMBERSTEPS > theInitialX
float theSiliconFractionIL