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;
233 <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
234 <<
" in volume " << volumeName <<
". Check Categorization.";
248 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
249 <<
" in volume " << volumeName;
260 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
261 <<
" in volume " << volumeName;
268 if( isHGCalx0fractionEmpty && isHGCall0fractionEmpty ) {
272 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
273 <<
" in volume " << volumeName;
289 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
290 <<
" in volume " << volumeName << std::endl;
305 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category " << materialName
306 <<
" in volume " << volumeName << std::endl;
310 float dmb = steplen/radlen;
311 float dil = steplen/intlen;
313 G4VPhysicalVolume*
pv = aStep->GetPreStepPoint()->GetPhysicalVolume();
314 const G4VTouchable*
t = aStep->GetPreStepPoint()->GetTouchable();
315 const G4ThreeVector& objectTranslation = t->GetTranslation();
316 const G4RotationMatrix* objectRotation = t->GetRotation();
317 const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep();
318 const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep();
320 G4Track*
track = aStep->GetTrack();
322 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Simulated Particle " <<
theID 323 <<
"\tMass " <<
theMass <<
" MeV/c2" 324 <<
"\tPt = " <<
thePt <<
" MeV/c" 414 int preProcType = -99;
415 int postProcType = -99;
416 if (interactionPre) preProcType = interactionPre->GetProcessType();
418 if (interactionPost) postProcType = interactionPost->GetProcessType();
422 <<
"MaterialBudgetData: Step " <<
theStepN 445 <<
"MaterialBudgetData: Process Pre " << interactionPre->GetProcessName()
450 <<
"MaterialBudgetData: Process Post " << interactionPost->GetProcessName()
452 <<
" name "<< interactionPost->GetProcessTypeName(G4ProcessType(
theStepPostProcess[theStepN]))
456 <<
" Polar Radius = " <<
sqrt(prePos.x()*prePos.x()+prePos.y()*prePos.y())
463 <<
" Polar Radius = " <<
sqrt(postPos.x()*postPos.x()+postPos.y()*postPos.y())
467 <<
" Volume " << volumeID <<
" name " <<
theVolumeName[theStepN]
492 <<
" Volume Centre x = " <<
theVolumeX[theStepN]
516 for(G4TrackVector::const_iterator iSec = aStep->GetSecondary()->begin(); iSec!=aStep->GetSecondary()->end(); iSec++) {
518 <<
"MaterialBudgetData: tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
519 <<
" created through process type " << (*iSec)->GetCreatorProcess()->GetProcessType()
520 << (*iSec)->GetCreatorProcess()->GetProcessTypeName(G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()));
524 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