3 #include "G4LogicalVolume.hh" 4 #include "G4ProductionCuts.hh" 5 #include "G4GDMLParser.hh" 6 #include "G4VRangeToEnergyConverter.hh" 7 #include "G4RToEConvForGamma.hh" 8 #include "G4RToEConvForElectron.hh" 9 #include "G4RToEConvForPositron.hh" 10 #include "G4RToEConvForProton.hh" 11 #include <CLHEP/Units/SystemOfUnits.h> 15 converter[1] =
new G4RToEConvForElectron();
16 converter[2] =
new G4RToEConvForPositron();
23 xercesc::DOMElement* auxiliaryElement =
nullptr;
25 const char* cutnames[4] = {
"pcutg",
"pcutem",
"pcutep",
"pcutp"};
27 auxiliaryElement = NewElement(
"auxiliary");
28 auxiliaryElement->setAttributeNode(NewAttribute(
"auxtype",
"G4Region"));
29 auxiliaryElement->setAttributeNode(NewAttribute(
"auxvalue", glv->GetRegion()->GetName()));
30 volumeElement->appendChild(auxiliaryElement);
32 auxiliaryElement = NewElement(
"auxiliary");
33 auxiliaryElement->setAttributeNode(NewAttribute(
"auxtype",
"pcutunit"));
34 auxiliaryElement->setAttributeNode(NewAttribute(
"auxvalue",
"GeV"));
35 volumeElement->appendChild(auxiliaryElement);
39 G4ProductionCuts*
cuts = glv->GetRegion()->GetProductionCuts();
41 for (G4int ic = 0; ic < 4; ++ic) {
42 G4cout << ic <<
". " << cutnames[ic] <<
" converter: " <<
converter[ic] <<
" cuts: " <<
cuts <<
" glv: " << glv
46 ss <<
converter[ic]->Convert(
cuts->GetProductionCut(ic), glv->GetMaterial()) / CLHEP::GeV;
48 auxiliaryElement = NewElement(
"auxiliary");
49 auxiliaryElement->setAttributeNode(NewAttribute(
"auxtype", cutnames[ic]));
50 auxiliaryElement->setAttributeNode(NewAttribute(
"auxvalue",
ss.str()));
51 volumeElement->appendChild(auxiliaryElement);
~CMSGDMLWriteStructure() override
void AddExtension(xercesc::DOMElement *volumeElement, const G4LogicalVolume *const glv) override