#include <CMSGDMLWriteStructure.h>
Definition at line 9 of file CMSGDMLWriteStructure.h.
CMSGDMLWriteStructure::CMSGDMLWriteStructure |
( |
| ) |
|
CMSGDMLWriteStructure::~CMSGDMLWriteStructure |
( |
| ) |
|
|
virtual |
void CMSGDMLWriteStructure::AddExtension |
( |
xercesc::DOMElement * |
volumeElement, |
|
|
const G4LogicalVolume *const |
glv |
|
) |
| |
|
virtual |
Definition at line 20 of file CMSGDMLWriteStructure.cc.
References ParticleFlowFastSim_cff::cuts, GeV, and contentValuesCheck::ss.
23 xercesc::DOMElement* auxiliaryElement = 0;
25 const char* cutnames[4] = {
"pcutg",
"pcutem",
"pcutep",
"pcutp"};
26 static G4VRangeToEnergyConverter *converter[4];
27 static G4bool ifirst =
true;
29 converter[0] =
new G4RToEConvForGamma();
30 converter[1] =
new G4RToEConvForElectron();
31 converter[2] =
new G4RToEConvForPositron();
32 converter[3] =
new G4RToEConvForProton();
36 auxiliaryElement = NewElement(
"auxiliary");
37 auxiliaryElement->setAttributeNode(NewAttribute(
"auxtype",
"G4Region"));
38 auxiliaryElement->setAttributeNode(NewAttribute(
"auxvalue",glv->GetRegion()->GetName()));
39 volumeElement->appendChild(auxiliaryElement);
41 auxiliaryElement = NewElement(
"auxiliary");
42 auxiliaryElement->setAttributeNode(NewAttribute(
"auxtype",
"pcutunit"));
43 auxiliaryElement->setAttributeNode(NewAttribute(
"auxvalue",
"GeV"));
44 volumeElement->appendChild(auxiliaryElement);
48 G4ProductionCuts *
cuts = glv->GetRegion()->GetProductionCuts();
50 for(G4int ic=0; ic<4; ++ic) {
51 G4cout << ic <<
". " << cutnames[ic] <<
" converter: " << converter[ic]
52 <<
" cuts: " << cuts <<
" glv: " << glv << G4endl;
53 ss.clear(); ss.str(
"");
54 ss << converter[ic]->Convert(cuts->GetProductionCut(ic),glv->GetMaterial())/
CLHEP::GeV;
56 auxiliaryElement = NewElement(
"auxiliary");
57 auxiliaryElement->setAttributeNode(NewAttribute(
"auxtype",cutnames[ic]));
58 auxiliaryElement->setAttributeNode(NewAttribute(
"auxvalue",ss.str()));
59 volumeElement->appendChild(auxiliaryElement);