CMS 3D CMS Logo

MaterialBudgetData.cc
Go to the documentation of this file.
2 
3 #include "G4Step.hh"
4 #include "G4Material.hh"
5 #include "G4EventManager.hh"
6 #include "G4Event.hh"
7 
9 {
10  //instantiate categorizer to assign an ID to volumes and materials
12  allStepsToTree = false;
13  isHGCal = false;
14  densityConvertionFactor = 6.24E18;
15 }
16 
18 
20 {
21  allStepsToTree = true;
22 }
23 
24 
25 void MaterialBudgetData::dataStartTrack( const G4Track* aTrack )
26 {
27 
28  const G4ThreeVector& dir = aTrack->GetMomentum() ;
29 
30  if( myMaterialBudgetCategorizer == nullptr){
31  if(isHGCal){
32  myMaterialBudgetCategorizer = std::make_unique<MaterialBudgetCategorizer>("HGCal");
33  } else {
34  myMaterialBudgetCategorizer = std::make_unique<MaterialBudgetCategorizer>("Tracker");
35  }
36  }
37 
38  theStepN=0;
39  theTotalMB=0;
40  theTotalIL=0;
41  theEta=0;
42  thePhi=0;
43  theID=0;
44  thePt=0;
45  theEnergy=0;
46  theMass=0;
47 
48  theSupportMB = 0.f;
49  theSensitiveMB = 0.f;
50  theCoolingMB = 0.f;
51  theElectronicsMB = 0.f;
52  theOtherMB = 0.f;
53 
54  //HGCal
55  theAirMB = 0.f;
56  theCablesMB = 0.f;
57  theCopperMB = 0.f;
58  theH_ScintillatorMB = 0.f;
59  theLeadMB = 0.f;
61  theSiliconMB = 0.f;
62  theStainlessSteelMB = 0.f;
63  theWCuMB = 0.f;
64 
65  theSupportIL = 0.f;
66  theSensitiveIL = 0.f;
67  theCoolingIL = 0.f;
68  theElectronicsIL = 0.f;
69  theOtherIL = 0.f;
70 
71  //HGCal
72  theAirIL = 0.f;
73  theCablesIL = 0.f;
74  theCopperIL = 0.f;
75  theH_ScintillatorIL = 0.f;
76  theLeadIL = 0.f;
78  theSiliconIL = 0.f;
79  theStainlessSteelIL = 0.f;
80  theWCuIL = 0.f;
81 
86  theOtherFractionMB = 0.f;
87  //HGCal
88  theAirFractionMB = 0.f;
89  theCablesFractionMB = 0.f;
90  theCopperFractionMB = 0.f;
92  theLeadFractionMB = 0.f;
96  theWCuFractionMB = 0.f;
97 
100  theCoolingFractionIL = 0.f;
102  theOtherFractionIL = 0.f;
103  //HGCal
104  theAirFractionIL = 0.f;
105  theCablesFractionIL = 0.f;
106  theCopperFractionIL = 0.f;
108  theLeadFractionIL = 0.f;
110  theSiliconFractionIL = 0.f;
112  theWCuFractionIL = 0.f;
113 
114  theID = (int)(aTrack->GetDefinition()->GetPDGEncoding());
115  thePt = dir.perp();
116  if( dir.theta() != 0 ) {
117  theEta = dir.eta();
118  } else {
119  theEta = -99;
120  }
121  thePhi = dir.phi();
122  theEnergy = aTrack->GetTotalEnergy();
123  theMass = aTrack->GetDefinition()->GetPDGMass();
124 }
125 
126 
127 void MaterialBudgetData::dataEndTrack( const G4Track* aTrack )
128 {
129  LogDebug("MaterialBudget") << "MaterialBudgetData: [OVAL] MaterialBudget "
130  << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
131  << " Eta:" << theEta << " Phi:" << thePhi << " TotalMB" << theTotalMB;
132 
133  LogDebug("MaterialBudget") << "MaterialBudgetData:" << theStepN << "Recorded steps ";
134 
135  if (!isHGCal){
136 
137  LogDebug("Material Budget") <<"MaterialBudgetData: Radiation Length "
138  << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
139  << " Eta" << theEta << " Phi" << thePhi
140  << " TotalMB" << theTotalMB
141  << " SUP " << theSupportMB << " SEN " << theSensitiveMB
142  << " CAB " << theCablesMB << " COL " << theCoolingMB
143  << " ELE " << theElectronicsMB << " other " << theOtherMB
144  << " Air " << theAirMB;
145 
146  LogDebug("Material Budget") << "MaterialBudgetData: Interaction Length "
147  << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
148  << " Eta " << theEta << " Phi " << thePhi
149  << " TotalIL " << theTotalIL
150  << " SUP " << theSupportIL << " SEN " << theSensitiveIL
151  << " CAB " << theCablesIL << " COL " << theCoolingIL
152  << " ELE " << theElectronicsIL << " other " << theOtherIL
153  << " Air " << theAirIL << std::endl;
154 
155  } else {
156 
157  LogDebug("MaterialBudget") << "MaterialBudgetData: HGCal Material Budget: Radiation Length "
158  << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
159  << " Eta " << theEta << " Phi " << thePhi
160  << " TotaLMB" << theTotalMB
161  << " theCopperMB " << theCopperMB << " theH_ScintillatorMB " << theH_ScintillatorMB
162  << " CAB " << theCablesMB << " theLeadMB " << theLeadMB << " theM_NEMA_FR4_plateMB "
163  << theM_NEMA_FR4_plateMB << " theSiliconMB " << theSiliconMB
164  << " theAirMB " << theAirMB << " theStainlessSteelMB " << theStainlessSteelMB
165  << " theWCuMB " << theWCuMB;
166 
167  LogDebug("MaterialBudget") << "MaterialBudgetData: HGCal Material Budget: Interaction Length "
168  << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID()
169  << " Eta " << theEta << " Phi " << thePhi
170  << " TotalIL " << theTotalIL << " theCopperIL " << theCopperIL
171  << " theH_ScintillatorIL " << theH_ScintillatorIL
172  << " CAB " << theCablesIL << " theLeadIL " << theLeadIL
173  << " theM_NEMA_FR4_plateIL " << theM_NEMA_FR4_plateIL
174  << " theSiliconIL " << theSiliconIL << " Air "
175  << theAirIL << " theStainlessSteelIL " << theStainlessSteelIL
176  << " theWCuIL " << theWCuIL << std::endl;
177  }
178 }
179 
180 void MaterialBudgetData::dataPerStep( const G4Step* aStep )
181 {
182  assert(aStep);
183  G4StepPoint* prePoint = aStep->GetPreStepPoint();
184  G4StepPoint* postPoint = aStep->GetPostStepPoint();
185  assert(prePoint);
186  assert(postPoint);
187  G4Material * theMaterialPre = prePoint->GetMaterial();
188  assert(theMaterialPre);
189 
190  CLHEP::Hep3Vector prePos = prePoint->GetPosition();
191  CLHEP::Hep3Vector postPos = postPoint->GetPosition();
192 
193  G4double steplen = aStep->GetStepLength();
194 
195  G4double radlen = theMaterialPre->GetRadlen();
196  G4double intlen = theMaterialPre->GetNuclearInterLength();
197  G4double density = theMaterialPre->GetDensity() / densityConvertionFactor; // always g/cm3
198 
199  G4String materialName = theMaterialPre->GetName();
200 
201  LogDebug("MaterialBudget") << "MaterialBudgetData: Material " << materialName
202  << " steplen " << steplen
203  << " radlen " << radlen
204  << " mb " << steplen/radlen;
205 
206  G4String volumeName = aStep->GetPreStepPoint()->GetTouchable()->GetVolume(0)->GetLogicalVolume()->GetName();
207 
208  LogDebug("MaterialBudget") << "MaterialBudgetData: Volume " << volumeName
209  << " Material " << materialName;
210 
211  // instantiate the categorizer
213  int volumeID = myMaterialBudgetCategorizer->volume( volumeName );
214  int materialID = myMaterialBudgetCategorizer->material( materialName );
215 
216  LogDebug("MaterialBudget") << "MaterialBudgetData: Volume ID " << volumeID
217  << " Material ID " << materialID;
218 
219  // FIXME: Both volume ID and material ID are zeros, so this part is not executed leaving all
220  // values as zeros.
221 
222  if (!isHGCal){
223 
224  bool isCtgOk = !myMaterialBudgetCategorizer->x0fraction(materialName).empty()
225  && !myMaterialBudgetCategorizer->l0fraction(materialName).empty()
226  && (myMaterialBudgetCategorizer->x0fraction(materialName).size() == 7) /*7 Categories*/
227  && (myMaterialBudgetCategorizer->l0fraction(materialName).size() == 7);
228 
229  if(!isCtgOk)
230  {
231  if(materialName.compare("Air") == 0){
232  theAirFractionMB = 1.f;
233  theAirFractionIL = 1.f;
234  } else {
235  theOtherFractionMB = 1.f;
236  theOtherFractionIL = 1.f;
237  edm::LogWarning("MaterialBudget")
238  << "MaterialBudgetData: Material forced to 'Other': " << materialName
239  << " in volume " << volumeName << ". Check Categorization.";
240  }
241  }
242  else
243  {
244  theSupportFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[0];
245  theSensitiveFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[1];
246  theCablesFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[2];
247  theCoolingFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[3];
248  theElectronicsFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[4];
249  theOtherFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[5];
250  theAirFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName)[6];
251 
252  if(theOtherFractionMB > 0.f)
253  edm::LogWarning("MaterialBudget") << "MaterialBudgetData: Material found with no category: " << materialName
254  << " in volume " << volumeName;
255 
256  theSupportFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[0];
257  theSensitiveFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[1];
258  theCablesFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[2];
259  theCoolingFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[3];
260  theElectronicsFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[4];
261  theOtherFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[5];
262  theAirFractionIL = myMaterialBudgetCategorizer->l0fraction(materialName)[6];
263 
264  if(theOtherFractionIL > 0.f)
265  edm::LogWarning("MaterialBudget") << "MaterialBudgetData: Material found with no category: " << materialName
266  << " in volume " << volumeName;
267  }
268  } else { // isHGCal
269 
270  bool isHGCalx0fractionEmpty = myMaterialBudgetCategorizer->HGCalx0fraction(materialName).empty();
271  bool isHGCall0fractionEmpty = myMaterialBudgetCategorizer->HGCall0fraction(materialName).empty();
272 
273  if( isHGCalx0fractionEmpty && isHGCall0fractionEmpty ) {
274  theOtherFractionMB = 1.f;
275  theOtherFractionIL = 1.f;
276 
277  edm::LogWarning("MaterialBudget") << "MaterialBudgetData: Material forced to 'Other': " << materialName
278  << " in volume " << volumeName;
279  } else{
280 
281  theAirFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[0];
282  theCablesFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[1];
283  theCopperFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[2];
284  theH_ScintillatorFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[3];
285  theLeadFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[4];
286  theM_NEMA_FR4_plateFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[5];
287  theSiliconFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[6];
288  theStainlessSteelFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[7];
289  theWCuFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[8];
290  theOtherFractionMB = myMaterialBudgetCategorizer->HGCalx0fraction(materialName)[9];
291 
292 
293  if(theOtherFractionMB!=0)
294  edm::LogWarning("MaterialBudget") << "MaterialBudgetData: Material found with no category: " << materialName
295  << " in volume " << volumeName << std::endl;
296 
297  theAirFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[0];
298  theCablesFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[1];
299  theCopperFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[2];
300  theH_ScintillatorFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[3];
301  theLeadFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[4];
302  theM_NEMA_FR4_plateFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[5];
303  theSiliconFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[6];
304  theStainlessSteelFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[7];
305  theWCuFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[8];
306  theOtherFractionIL = myMaterialBudgetCategorizer->HGCall0fraction(materialName)[9];
307 
308 
309  if(theOtherFractionIL!=0)
310  edm::LogWarning("MaterialBudget") << "MaterialBudgetData: Material found with no category " << materialName
311  << " in volume " << volumeName << std::endl;
312  }
313  }
314 
315  float dmb = steplen/radlen;
316  float dil = steplen/intlen;
317 
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();
324 
325  G4Track* track = aStep->GetTrack();
326  if(theStepN==0)
327  LogDebug("MaterialBudget") << "MaterialBudgetData: Simulated Particle " << theID
328  << "\tMass " << theMass << " MeV/c2"
329  << "\tPt = " << thePt << " MeV/c"
330  << "\tEta = " << theEta
331  << "\tPhi = " << thePhi
332  << "\tEnergy = " << theEnergy << " MeV";
333 
334  //fill data per step
335  if( allStepsToTree ){
336  assert(theStepN < MAXNUMBERSTEPS);
338  theDmb[theStepN] = dmb;
339  theDil[theStepN] = dil;
345  //HGCal
354  theWCuDmb[theStepN] = (dmb * theWCuFractionMB);
355 
361  //HGCal
370  theWCuDil[theStepN] = (dil * theWCuFractionIL);
371 
372  theInitialX[theStepN] = prePos.x();
373  theInitialY[theStepN] = prePos.y();
374  theInitialZ[theStepN] = prePos.z();
375  theFinalX[theStepN] = postPos.x();
376  theFinalY[theStepN] = postPos.y();
377  theFinalZ[theStepN] = postPos.z();
378  theVolumeID[theStepN] = volumeID;
379  theVolumeName[theStepN] = volumeName;
380  theVolumeCopy[theStepN] = pv->GetCopyNo();
381  theVolumeX[theStepN] = objectTranslation.x();
382  theVolumeY[theStepN] = objectTranslation.y();
383  theVolumeZ[theStepN] = objectTranslation.z();
384  theVolumeXaxis1[theStepN] = objectRotation->xx();
385  theVolumeXaxis2[theStepN] = objectRotation->xy();
386  theVolumeXaxis3[theStepN] = objectRotation->xz();
387  theVolumeYaxis1[theStepN] = objectRotation->yx();
388  theVolumeYaxis2[theStepN] = objectRotation->yy();
389  theVolumeYaxis3[theStepN] = objectRotation->yz();
390  theVolumeZaxis1[theStepN] = objectRotation->zx();
391  theVolumeZaxis2[theStepN] = objectRotation->zy();
392  theVolumeZaxis3[theStepN] = objectRotation->zz();
393  theMaterialID[theStepN] = materialID;
394  theMaterialName[theStepN] = materialName;
395  theMaterialX0[theStepN] = radlen;
396  theMaterialLambda0[theStepN] = intlen;
397  theMaterialDensity[theStepN] = density;
398  theStepID[theStepN] = track->GetDefinition()->GetPDGEncoding();
399  theStepInitialPt[theStepN] = prePoint->GetMomentum().perp();
400  theStepInitialEta[theStepN] = prePoint->GetMomentum().eta();
401  theStepInitialPhi[theStepN] = prePoint->GetMomentum().phi();
402  theStepInitialEnergy[theStepN] = prePoint->GetTotalEnergy();
403  theStepInitialPx[theStepN] = prePoint->GetMomentum().x();
404  theStepInitialPy[theStepN] = prePoint->GetMomentum().y();
405  theStepInitialPz[theStepN] = prePoint->GetMomentum().z();
406  theStepInitialBeta[theStepN] = prePoint->GetBeta();
407  theStepInitialGamma[theStepN] = prePoint->GetGamma();
408  theStepInitialMass[theStepN] = prePoint->GetMass();
409  theStepFinalPt[theStepN] = postPoint->GetMomentum().perp();
410  theStepFinalEta[theStepN] = postPoint->GetMomentum().eta();
411  theStepFinalPhi[theStepN] = postPoint->GetMomentum().phi();
412  theStepFinalEnergy[theStepN] = postPoint->GetTotalEnergy();
413  theStepFinalPx[theStepN] = postPoint->GetMomentum().x();
414  theStepFinalPy[theStepN] = postPoint->GetMomentum().y();
415  theStepFinalPz[theStepN] = postPoint->GetMomentum().z();
416  theStepFinalBeta[theStepN] = postPoint->GetBeta();
417  theStepFinalGamma[theStepN] = postPoint->GetGamma();
418  theStepFinalMass[theStepN] = postPoint->GetMass();
419  int preProcType = -99;
420  int postProcType = -99;
421  if (interactionPre) preProcType = interactionPre->GetProcessType();
422  theStepPreProcess[theStepN] = preProcType;
423  if (interactionPost) postProcType = interactionPost->GetProcessType();
424  theStepPostProcess[theStepN] = postProcType;
425 
426  LogDebug("MaterialBudget")
427  << "MaterialBudgetData: Step " << theStepN
428  << "\tDelta MB = " << theDmb[theStepN]
429  << std::endl
430  << " Support " << theSupportDmb[theStepN]
431  << " Sensitive " << theSensitiveDmb[theStepN]
432  << " Cables " << theCablesDmb[theStepN]
433  << " Cooling " << theCoolingDmb[theStepN]
434  << " Electronics " << theElectronicsDmb[theStepN]
435  << " Other " << theOtherDmb[theStepN]
436  << " Air " << theAirDmb[theStepN]
437  << std::endl
438  << "\tDelta IL = " << theDil[theStepN]
439  << std::endl
440  << " Support " << theSupportDil[theStepN]
441  << " Sensitive " << theSensitiveDil[theStepN]
442  << " Cables " << theCablesDil[theStepN]
443  << " Cooling " << theCoolingDil[theStepN]
444  << " Electronics " << theElectronicsDil[theStepN]
445  << " Other " << theOtherDil[theStepN]
446  << " Air " << theAirDil[theStepN];
447 
448  if (interactionPre)
449  LogDebug("MaterialBudget")
450  << "MaterialBudgetData: Process Pre " << interactionPre->GetProcessName()
451  << " type " << theStepPreProcess[theStepN]
452  << " name " << interactionPre->GetProcessTypeName(G4ProcessType(theStepPreProcess[theStepN]));
453  if (interactionPost)
454  LogDebug("MaterialBudget")
455  << "MaterialBudgetData: Process Post " << interactionPost->GetProcessName()
456  << " type " << theStepPostProcess[theStepN]
457  << " name "<< interactionPost->GetProcessTypeName(G4ProcessType(theStepPostProcess[theStepN]))
458  << " Pre x = " << theInitialX[theStepN]
459  << " y = " << theInitialY[theStepN]
460  << " z = " << theInitialZ[theStepN]
461  << " Polar Radius = " << sqrt(prePos.x()*prePos.x()+prePos.y()*prePos.y())
462  << " Pt = " << theStepInitialPt[theStepN]
463  << " Energy = " << theStepInitialEnergy[theStepN]
464  << " Final: "
465  << " Post x = " << theFinalX[theStepN]
466  << " y = " << theFinalY[theStepN]
467  << " z = " << theFinalZ[theStepN]
468  << " Polar Radius = " << sqrt(postPos.x()*postPos.x()+postPos.y()*postPos.y())
469  << " Pt = " << theStepFinalPt[theStepN]
470  << " Energy = " << theStepFinalEnergy[theStepN]
471  << std::endl
472  << " Volume " << volumeID << " name " << theVolumeName[theStepN]
473  << " copy number " << theVolumeCopy[theStepN]
474  << " material " << theMaterialID[theStepN] << " " << theMaterialName[theStepN]
475  << " Density = " << theMaterialDensity[theStepN] << " g/cm3"
476  << " X0 = " << theMaterialX0[theStepN] << " mm"
477  << " Lambda0 = " << theMaterialLambda0[theStepN] << " mm"
478  << std::endl
479  << " Particle " << theStepID[theStepN]
480  << " Initial Pt = " << theStepInitialPt[theStepN] << " MeV/c"
481  << " eta = " << theStepInitialEta[theStepN]
482  << " phi = " << theStepInitialPhi[theStepN]
483  << " Energy = " << theStepInitialEnergy[theStepN] << " MeV"
484  << " Mass = " << theStepInitialMass[theStepN] << " MeV/c2"
485  << " Beta = " << theStepInitialBeta[theStepN]
486  << " Gamma = " << theStepInitialGamma[theStepN]
487  << std::endl
488  << " Particle " << theStepID[theStepN]
489  << " Final Pt = " << theStepFinalPt[theStepN] << " MeV/c"
490  << " eta = " << theStepFinalEta[theStepN]
491  << " phi = " << theStepFinalPhi[theStepN]
492  << " Energy = " << theStepFinalEnergy[theStepN] << " MeV"
493  << " Mass = " << theStepFinalMass[theStepN] << " MeV/c2"
494  << " Beta = " << theStepFinalBeta[theStepN]
495  << " Gamma = " << theStepFinalGamma[theStepN]
496  << std::endl
497  << " Volume Centre x = " << theVolumeX[theStepN]
498  << " y = " << theVolumeY[theStepN]
499  << " z = " << theVolumeZ[theStepN]
500  << "Polar Radius = " << sqrt( theVolumeX[theStepN]*theVolumeX[theStepN] +
501  theVolumeY[theStepN]*theVolumeY[theStepN] )
502  << std::endl
503  << " x axis = ("
504  << theVolumeXaxis1[theStepN] << ","
505  << theVolumeXaxis2[theStepN] << ","
506  << theVolumeXaxis3[theStepN] << ")"
507  << std::endl
508  << " y axis = ("
509  << theVolumeYaxis1[theStepN] << ","
510  << theVolumeYaxis2[theStepN] << ","
511  << theVolumeYaxis3[theStepN] << ")"
512  << std::endl
513  << " z axis = ("
514  << theVolumeZaxis1[theStepN] << ","
515  << theVolumeZaxis2[theStepN] << ","
516  << theVolumeZaxis3[theStepN] << ")"
517  << std::endl
518  << " Secondaries"
519  << std::endl;
520 
521  for(G4TrackVector::const_iterator iSec = aStep->GetSecondary()->begin(); iSec!=aStep->GetSecondary()->end(); iSec++) {
522  LogDebug("MaterialBudget")
523  << "MaterialBudgetData: tid " << (*iSec)->GetDefinition()->GetPDGEncoding()
524  << " created through process type " << (*iSec)->GetCreatorProcess()->GetProcessType()
525  << (*iSec)->GetCreatorProcess()->GetProcessTypeName(G4ProcessType((*iSec)->GetCreatorProcess()->GetProcessType()));
526  }
527  }
528 
529  theTrkLen = aStep->GetTrack()->GetTrackLength();
530  thePVname = pv->GetName();
531  thePVcopyNo = pv->GetCopyNo();
532  theRadLen = radlen;
533  theIntLen = intlen;
534  theTotalMB += dmb;
535  theTotalIL += dil;
536 
541  theOtherMB += (dmb * theOtherFractionMB);
542 
543  //HGCal
544  theAirMB += (dmb * theAirFractionMB);
545  theCablesMB += (dmb * theCablesFractionMB);
546  theCopperMB += (dmb * theCopperFractionMB);
548  theLeadMB += (dmb * theLeadFractionMB);
552  theWCuMB += (dmb * theWCuFractionMB);
553 
558  theOtherIL += (dil * theOtherFractionIL);
559  //HGCal
560  theAirIL += (dil * theAirFractionIL);
561  theCablesIL += (dil * theCablesFractionIL);
562  theCopperIL += (dil * theCopperFractionIL);
564  theLeadIL += (dil * theLeadFractionIL);
568  theWCuIL += (dil * theWCuFractionIL);
569 
570 
571 
572  // rr
573 
574  theStepN++;
575 
576 }
577 
578 
#define LogDebug(id)
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
std::array< float, MAXNUMBERSTEPS > theStepInitialBeta
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
std::array< int, MAXNUMBERSTEPS > theStepPostProcess
std::array< float, MAXNUMBERSTEPS > theSiliconDil
std::array< float, MAXNUMBERSTEPS > theCopperDmb
std::array< double, MAXNUMBERSTEPS > theFinalX
std::array< float, MAXNUMBERSTEPS > theStepFinalBeta
std::array< float, MAXNUMBERSTEPS > theAirDmb
std::array< float, MAXNUMBERSTEPS > theStepInitialPt
std::array< float, MAXNUMBERSTEPS > theWCuDmb
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
std::unique_ptr< MaterialBudgetCategorizer > myMaterialBudgetCategorizer
std::array< float, MAXNUMBERSTEPS > theSiliconDmb
std::array< int, MAXNUMBERSTEPS > theVolumeCopy
std::array< float, MAXNUMBERSTEPS > theLeadDmb
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
T sqrt(T t)
Definition: SSEVec.h:18
void dataEndTrack(const G4Track *aTrack)
std::array< float, MAXNUMBERSTEPS > theSensitiveDil
std::array< double, MAXNUMBERSTEPS > theFinalY
def pv(vc)
Definition: MetAnalyzer.py:7
void dataPerStep(const G4Step *aStep)
double f[11][100]
std::array< float, MAXNUMBERSTEPS > theStepFinalPx
std::array< float, MAXNUMBERSTEPS > theStepInitialEta
std::array< float, MAXNUMBERSTEPS > theStepInitialPhi
std::array< float, MAXNUMBERSTEPS > theCoolingDmb
std::array< float, MAXNUMBERSTEPS > theVolumeX
std::array< float, MAXNUMBERSTEPS > theLeadDil
std::array< float, MAXNUMBERSTEPS > theCablesDil
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
std::array< double, MAXNUMBERSTEPS > theFinalZ
std::array< float, MAXNUMBERSTEPS > theVolumeZ
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
std::array< int, MAXNUMBERSTEPS > theMaterialID
std::array< float, MAXNUMBERSTEPS > theElectronicsDmb
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis3
std::array< float, MAXNUMBERSTEPS > theVolumeYaxis2
std::array< float, MAXNUMBERSTEPS > theCoolingDil
std::array< float, MAXNUMBERSTEPS > theH_ScintillatorDil
std::array< float, MAXNUMBERSTEPS > theOtherDil
std::array< float, MAXNUMBERSTEPS > theStepInitialEnergy
std::array< float, MAXNUMBERSTEPS > theElectronicsDil
dbl *** dir
Definition: mlp_gen.cc:35
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