4 #include "G4Material.hh" 5 #include "G4EventManager.hh" 28 const G4ThreeVector&
dir = aTrack->GetMomentum() ;
114 theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
116 if( dir.theta() != 0 ) {
123 theMass = aTrack->GetDefinition()->GetPDGMass();
129 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: [OVAL] MaterialBudget " 130 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
133 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData:" <<
theStepN <<
"Recorded steps ";
137 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Radiation Length " 138 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
140 <<
" TotalMB" << theTotalMB
146 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Interaction Length " 147 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
153 <<
" Air " <<
theAirIL << std::endl;
157 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Radiation Length " 158 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
160 <<
" TotaLMB" << theTotalMB
167 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Interaction Length " 168 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
176 <<
" theWCuIL " <<
theWCuIL << std::endl;
183 G4StepPoint* prePoint = aStep->GetPreStepPoint();
184 G4StepPoint* postPoint = aStep->GetPostStepPoint();
187 G4Material * theMaterialPre = prePoint->GetMaterial();
188 assert(theMaterialPre);
190 CLHEP::Hep3Vector prePos = prePoint->GetPosition();
191 CLHEP::Hep3Vector postPos = postPoint->GetPosition();
193 G4double steplen = aStep->GetStepLength();
195 G4double radlen = theMaterialPre->GetRadlen();
196 G4double intlen = theMaterialPre->GetNuclearInterLength();
199 G4String materialName = theMaterialPre->GetName();
201 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Material " << materialName
202 <<
" steplen " << steplen
203 <<
" radlen " << radlen
204 <<
" mb " << steplen/radlen;
206 G4String volumeName = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume()->GetName();
208 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume " << volumeName
209 <<
" Material " << materialName;
216 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume ID " << volumeID
217 <<
" Material ID " << materialID;
231 if(materialName.compare(
"Air") == 0){
238 <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
239 <<
" in volume " << volumeName <<
". Check Categorization.";
253 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
254 <<
" in volume " << volumeName;
265 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
266 <<
" in volume " << volumeName;
273 if( isHGCalx0fractionEmpty && isHGCall0fractionEmpty ) {
277 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
278 <<
" in volume " << volumeName;
294 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category: " << materialName
295 <<
" in volume " << volumeName << std::endl;
310 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category " << materialName
311 <<
" in volume " << volumeName << std::endl;
315 float dmb = steplen/radlen;
316 float dil = steplen/intlen;
318 G4VPhysicalVolume*
pv = aStep->GetPreStepPoint()->GetPhysicalVolume();
319 const G4VTouchable*
t = aStep->GetPreStepPoint()->GetTouchable();
320 const G4ThreeVector& objectTranslation = t->GetTranslation();
321 const G4RotationMatrix* objectRotation = t->GetRotation();
322 const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep();
323 const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep();
325 G4Track*
track = aStep->GetTrack();
327 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Simulated Particle " <<
theID 328 <<
"\tMass " <<
theMass <<
" MeV/c2" 329 <<
"\tPt = " <<
thePt <<
" MeV/c" 419 int preProcType = -99;
420 int postProcType = -99;
421 if (interactionPre) preProcType = interactionPre->GetProcessType();
423 if (interactionPost) postProcType = interactionPost->GetProcessType();
427 <<
"MaterialBudgetData: Step " <<
theStepN 450 <<
"MaterialBudgetData: Process Pre " << interactionPre->GetProcessName()
455 <<
"MaterialBudgetData: Process Post " << interactionPost->GetProcessName()
457 <<
" name "<< interactionPost->GetProcessTypeName(G4ProcessType(
theStepPostProcess[theStepN]))
461 <<
" Polar Radius = " <<
sqrt(prePos.x()*prePos.x()+prePos.y()*prePos.y())
468 <<
" Polar Radius = " <<
sqrt(postPos.x()*postPos.x()+postPos.y()*postPos.y())
472 <<
" Volume " << volumeID <<
" name " <<
theVolumeName[theStepN]
497 <<
" Volume Centre x = " <<
theVolumeX[theStepN]
521 for(G4TrackVector::const_iterator iSec = aStep->GetSecondary()->begin(); iSec!=aStep->GetSecondary()->end(); iSec++) {
523 <<
"MaterialBudgetData: tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
524 <<
" created through process type " << (*iSec)->GetCreatorProcess()->GetProcessType()
525 << (*iSec)->GetCreatorProcess()->GetProcessTypeName(G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()));
529 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