|
|
Go to the documentation of this file.
4 #include "G4Material.hh"
5 #include "G4EventManager.hh"
22 const G4ThreeVector&
dir = aTrack->GetMomentum();
122 theID = (
int)(aTrack->GetDefinition()->GetPDGEncoding());
124 if (
dir.theta() != 0) {
131 theMass = aTrack->GetDefinition()->GetPDGMass();
135 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: [OVAL] MaterialBudget "
136 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
139 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData:" <<
theStepN <<
"Recorded steps ";
142 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Radiation Length "
143 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta"
148 LogDebug(
"Material Budget") <<
"MaterialBudgetData: Interaction Length "
149 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta "
156 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Radiation Length "
157 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta "
166 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: HGCal Material Budget: Interaction Length "
167 << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() <<
" Eta "
180 G4StepPoint* prePoint = aStep->GetPreStepPoint();
181 G4StepPoint* postPoint = aStep->GetPostStepPoint();
184 G4Material* theMaterialPre = prePoint->GetMaterial();
187 CLHEP::Hep3Vector prePos = prePoint->GetPosition();
188 CLHEP::Hep3Vector postPos = postPoint->GetPosition();
190 G4double steplen = aStep->GetStepLength();
192 G4double radlen = theMaterialPre->GetRadlen();
193 G4double intlen = theMaterialPre->GetNuclearInterLength();
196 G4String materialName = theMaterialPre->GetName();
198 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Material " << materialName <<
" steplen " << steplen <<
" radlen "
199 << radlen <<
" mb " << steplen / radlen;
201 G4String volumeName = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume()->GetName();
203 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume " << volumeName <<
" Material " << materialName;
210 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Volume ID " << volumeID <<
" Material ID " << materialID;
222 if (materialName.compare(
"Air") == 0) {
228 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
229 <<
" in volume " << volumeName <<
". Check Categorization.";
242 <<
"MaterialBudgetData: Material found with no category: " << materialName <<
" in volume " << volumeName;
254 <<
"MaterialBudgetData: Material found with no category: " << materialName <<
" in volume " << volumeName;
261 if (isHGCalx0fractionEmpty && isHGCall0fractionEmpty) {
265 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material forced to 'Other': " << materialName
266 <<
" in volume " << volumeName;
285 std::cout <<
"MaterialBudgetData: Material found with no category: " << materialName <<
" in volume "
286 << volumeName << std::endl;
303 edm::LogWarning(
"MaterialBudget") <<
"MaterialBudgetData: Material found with no category " << materialName
304 <<
" in volume " << volumeName << std::endl;
308 float dmb = steplen / radlen;
309 float dil = steplen / intlen;
311 G4VPhysicalVolume*
pv = aStep->GetPreStepPoint()->GetPhysicalVolume();
312 const G4VTouchable*
t = aStep->GetPreStepPoint()->GetTouchable();
313 const G4ThreeVector& objectTranslation =
t->GetTranslation();
314 const G4RotationMatrix* objectRotation =
t->GetRotation();
315 const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep();
316 const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep();
318 G4Track*
track = aStep->GetTrack();
320 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Simulated Particle " <<
theID <<
"\tMass " <<
theMass
322 <<
"\tPt = " <<
thePt <<
" MeV/c"
417 int preProcType = -99;
418 int postProcType = -99;
420 preProcType = interactionPre->GetProcessType();
423 postProcType = interactionPost->GetProcessType();
439 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: Process Pre " << interactionPre->GetProcessName() <<
" type "
444 <<
"MaterialBudgetData: Process Post " << interactionPost->GetProcessName() <<
" type "
449 <<
" Polar Radius = " <<
sqrt(prePos.x() * prePos.x() + prePos.y() * prePos.y())
452 <<
" Polar Radius = " <<
sqrt(postPos.x() * postPos.x() + postPos.y() * postPos.y())
479 <<
" Secondaries" << std::endl;
481 for (G4TrackVector::const_iterator iSec = aStep->GetSecondary()->begin(); iSec != aStep->GetSecondary()->end();
483 LogDebug(
"MaterialBudget") <<
"MaterialBudgetData: tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
484 <<
" created through process type " << (*iSec)->GetCreatorProcess()->GetProcessType()
485 << (*iSec)->GetCreatorProcess()->GetProcessTypeName(
486 G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()));
490 theTrkLen = aStep->GetTrack()->GetTrackLength();
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
Log< level::Warning, false > LogWarning
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
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