|
|
Go to the documentation of this file.
4 #include "G4Material.hh"
5 #include "G4EventManager.hh"
7 #include "DD4hep/Filter.h"
23 const G4ThreeVector&
dir = aTrack->GetMomentum();
123 theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
125 if (
dir.theta() != 0) {
132 theMass = aTrack->GetDefinition()->GetPDGMass();
136 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: [OVAL] MaterialBudget "
137 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
140 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData:" <<
theStepN <<
"Recorded steps ";
143 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Radiation Length "
144 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta"
149 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Interaction Length "
150 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta "
157 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Radiation Length "
158 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta "
167 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Interaction Length "
168 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta "
181 G4StepPoint* prePoint = aStep->GetPreStepPoint();
182 G4StepPoint* postPoint = aStep->GetPostStepPoint();
185 G4Material* theMaterialPre = prePoint->GetMaterial();
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 = static_cast<std::string>(dd4hep::dd::noNamespace(theMaterialPre->GetName()));
199 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Material " << materialName <<
" steplen " << steplen <<
" radlen "
200 << radlen <<
" mb " << steplen / radlen;
202 G4String volumeName = static_cast<std::string>(
203 dd4hep::dd::noNamespace(aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume()->GetName()));
205 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume " << volumeName <<
" Material " << materialName;
212 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume ID " << volumeID <<
" Material ID " << materialID;
224 if (materialName.compare(
"Air") == 0) {
230 edm::LogVerbatim(
"MaterialBudget") <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
231 <<
" in volume " << volumeName <<
". Check Categorization.";
244 <<
"MaterialBudgetData: Material found with no category: " << materialName <<
" in volume " << volumeName;
256 <<
"MaterialBudgetData: Material found with no category: " << materialName <<
" in volume " << volumeName;
263 if (isHGCalx0fractionEmpty && isHGCall0fractionEmpty) {
267 edm::LogVerbatim(
"MaterialBudget") <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
268 <<
" in volume " << volumeName;
287 std::cout <<
"MaterialBudgetData: Material found with no category: " << materialName <<
" in volume "
288 << volumeName << std::endl;
305 edm::LogVerbatim(
"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 <<
"\tMass " <<
theMass
324 <<
"\tPt = " <<
thePt <<
" MeV/c"
419 int preProcType = -99;
420 int postProcType = -99;
422 preProcType = interactionPre->GetProcessType();
425 postProcType = interactionPost->GetProcessType();
441 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Process Pre " << interactionPre->GetProcessName() <<
" type "
446 <<
"MaterialBudgetData: Process Post " << interactionPost->GetProcessName() <<
" type "
451 <<
" Polar Radius = " <<
sqrt(prePos.x() * prePos.x() + prePos.y() * prePos.y())
454 <<
" Polar Radius = " <<
sqrt(postPos.x() * postPos.x() + postPos.y() * postPos.y())
481 <<
" Secondaries" << std::endl;
483 for (G4TrackVector::const_iterator iSec = aStep->GetSecondary()->begin(); iSec != aStep->GetSecondary()->end();
485 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
486 <<
" created through process type " << (*iSec)->GetCreatorProcess()->GetProcessType()
487 << (*iSec)->GetCreatorProcess()->GetProcessTypeName(
488 G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()));
492 theTrkLen = aStep->GetTrack()->GetTrackLength();
493 thePVname = static_cast<std::string>(dd4hep::dd::noNamespace(
pv->GetName()));
std::array< float, MAXNUMBERSTEPS > theAirDmb
std::array< float, MAXNUMBERSTEPS > theMaterialLambda0
std::array< float, MAXNUMBERSTEPS > theStepInitialEnergy
std::array< float, MAXNUMBERSTEPS > theLeadDmb
std::array< float, MAXNUMBERSTEPS > theEpoxyDil
void dataEndTrack(const G4Track *aTrack)
float theKaptonFractionMB
std::array< float, MAXNUMBERSTEPS > theCablesDmb
float theStainlessSteelFractionIL
void dataPerStep(const G4Step *aStep)
std::array< float, MAXNUMBERSTEPS > theAluminiumDmb
std::array< float, MAXNUMBERSTEPS > theStepInitialMass
std::array< float, MAXNUMBERSTEPS > theDmb
float theSensitiveFractionIL
std::array< float, MAXNUMBERSTEPS > theVolumeZaxis2
float theH_ScintillatorFractionMB
float theSupportFractionMB
std::array< float, MAXNUMBERSTEPS > theKaptonDmb
std::array< float, MAXNUMBERSTEPS > theSensitiveDil
std::array< float, MAXNUMBERSTEPS > theCoolingDmb
std::array< float, MAXNUMBERSTEPS > theMaterialDensity
std::array< int, MAXNUMBERSTEPS > theVolumeID
std::array< float, MAXNUMBERSTEPS > theVolumeXaxis1
std::array< float, MAXNUMBERSTEPS > theStepInitialBeta
float theCopperFractionMB
float theH_ScintillatorIL
float theCablesFractionIL
std::array< std::string, MAXNUMBERSTEPS > theMaterialName
std::array< double, MAXNUMBERSTEPS > theInitialZ
std::array< float, MAXNUMBERSTEPS > theOtherDil
std::array< float, MAXNUMBERSTEPS > theOtherDmb
std::array< float, MAXNUMBERSTEPS > theStepFinalBeta
std::array< float, MAXNUMBERSTEPS > theStepFinalPy
std::array< float, MAXNUMBERSTEPS > theAluminiumDil
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis1
std::array< float, MAXNUMBERSTEPS > theCopperDil
float theStainlessSteelIL
float theSupportFractionIL
double densityConvertionFactor
std::unique_ptr< MaterialBudgetCategorizer > myMaterialBudgetCategorizer
std::array< float, MAXNUMBERSTEPS > theStepFinalEta
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis2
std::array< float, MAXNUMBERSTEPS > theVolumeX
std::array< int, MAXNUMBERSTEPS > theStepID
float theSensitiveFractionMB
std::array< int, MAXNUMBERSTEPS > theStepPostProcess
std::array< float, MAXNUMBERSTEPS > theStepFinalEnergy
std::array< float, MAXNUMBERSTEPS > theSiliconDmb
std::array< float, MAXNUMBERSTEPS > theCopperDmb
float theHGC_G10_FR4FractionIL
void dataStartTrack(const G4Track *aTrack)
std::array< float, MAXNUMBERSTEPS > theCablesDil
std::array< float, MAXNUMBERSTEPS > theWCuDil
std::array< int, MAXNUMBERSTEPS > theVolumeCopy
std::array< std::string, MAXNUMBERSTEPS > theVolumeName
std::array< float, MAXNUMBERSTEPS > theStepInitialPhi
float theSiliconFractionMB
std::array< double, MAXNUMBERSTEPS > theInitialX
float theCoolingFractionIL
float theCoolingFractionMB
std::array< float, MAXNUMBERSTEPS > theH_ScintillatorDmb
std::array< float, MAXNUMBERSTEPS > theStepInitialGamma
std::array< float, MAXNUMBERSTEPS > theElectronicsDil
std::array< float, MAXNUMBERSTEPS > theAirDil
std::array< float, MAXNUMBERSTEPS > theElectronicsDmb
std::array< float, MAXNUMBERSTEPS > theH_ScintillatorDil
std::array< float, MAXNUMBERSTEPS > theSensitiveDmb
std::array< float, MAXNUMBERSTEPS > theVolumeZ
std::array< float, MAXNUMBERSTEPS > theMaterialX0
float theCablesFractionMB
float theElectronicsFractionIL
std::array< float, MAXNUMBERSTEPS > theVolumeXaxis2
float theAluminiumFractionIL
std::array< int, MAXNUMBERSTEPS > theMaterialID
float theAluminiumFractionMB
float theStainlessSteelFractionMB
std::array< float, MAXNUMBERSTEPS > theStepFinalPt
float theStainlessSteelMB
std::array< float, MAXNUMBERSTEPS > theVolumeZaxis3
std::array< float, MAXNUMBERSTEPS > theVolumeY
std::array< float, MAXNUMBERSTEPS > theStainlessSteelDmb
float theH_ScintillatorMB
std::array< float, MAXNUMBERSTEPS > theStepInitialPy
std::array< float, MAXNUMBERSTEPS > theKaptonDil
std::array< float, MAXNUMBERSTEPS > theSupportDil
static constexpr int MAXNUMBERSTEPS
std::array< float, MAXNUMBERSTEPS > theHGC_G10_FR4Dmb
std::array< float, MAXNUMBERSTEPS > theEpoxyDmb
std::array< float, MAXNUMBERSTEPS > theHGC_G10_FR4Dil
float theCopperFractionIL
std::array< float, MAXNUMBERSTEPS > theVolumeZaxis1
std::array< float, MAXNUMBERSTEPS > theStepInitialPx
std::array< float, MAXNUMBERSTEPS > theStepInitialPt
std::array< float, MAXNUMBERSTEPS > theDil
float theKaptonFractionIL
std::array< float, MAXNUMBERSTEPS > theSupportDmb
Log< level::Info, true > LogVerbatim
std::array< float, MAXNUMBERSTEPS > theCoolingDil
std::array< float, MAXNUMBERSTEPS > theStepFinalPx
std::array< float, MAXNUMBERSTEPS > theLeadDil
std::array< float, MAXNUMBERSTEPS > theStepFinalPhi
std::array< float, MAXNUMBERSTEPS > theStepInitialPz
std::array< float, MAXNUMBERSTEPS > theStepFinalGamma
float theSiliconFractionIL
std::array< double, MAXNUMBERSTEPS > theInitialY
std::array< float, MAXNUMBERSTEPS > theStepFinalPz
std::array< float, MAXNUMBERSTEPS > theVolumeXaxis3
std::array< int, MAXNUMBERSTEPS > theStepPreProcess
std::array< double, MAXNUMBERSTEPS > theFinalZ
float theHGC_G10_FR4FractionMB
std::array< float, MAXNUMBERSTEPS > theStainlessSteelDil
std::array< double, MAXNUMBERSTEPS > theFinalY
std::array< float, MAXNUMBERSTEPS > theSiliconDil
std::array< float, MAXNUMBERSTEPS > theStepInitialEta
std::array< float, MAXNUMBERSTEPS > theStepFinalMass
std::array< float, MAXNUMBERSTEPS > theWCuDmb
std::array< double, MAXNUMBERSTEPS > theFinalX
float theH_ScintillatorFractionIL
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis3
float theElectronicsFractionMB