CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CMSGDMLWriteStructure Class Reference

#include <CMSGDMLWriteStructure.h>

Inheritance diagram for CMSGDMLWriteStructure:

Public Member Functions

void AddExtension (xercesc::DOMElement *volumeElement, const G4LogicalVolume *const glv) override
 
 CMSGDMLWriteStructure ()
 
 ~CMSGDMLWriteStructure () override
 

Private Attributes

G4VRangeToEnergyConverter * converter [4]
 

Detailed Description

Definition at line 10 of file CMSGDMLWriteStructure.h.

Constructor & Destructor Documentation

◆ CMSGDMLWriteStructure()

CMSGDMLWriteStructure::CMSGDMLWriteStructure ( )

Definition at line 13 of file CMSGDMLWriteStructure.cc.

13  {
14  converter[0] = new G4RToEConvForGamma();
15  converter[1] = new G4RToEConvForElectron();
16  converter[2] = new G4RToEConvForPositron();
17  converter[3] = new G4RToEConvForProton();
18 }

◆ ~CMSGDMLWriteStructure()

CMSGDMLWriteStructure::~CMSGDMLWriteStructure ( )
override

Definition at line 20 of file CMSGDMLWriteStructure.cc.

20 {}

Member Function Documentation

◆ AddExtension()

void CMSGDMLWriteStructure::AddExtension ( xercesc::DOMElement *  volumeElement,
const G4LogicalVolume *const  glv 
)
override

Definition at line 22 of file CMSGDMLWriteStructure.cc.

References ecalTB2006H4_GenSimDigiReco_cfg::G4cout, and contentValuesCheck::ss.

22  {
23  xercesc::DOMElement* auxiliaryElement = nullptr;
24  std::stringstream ss;
25  const char* cutnames[4] = {"pcutg", "pcutem", "pcutep", "pcutp"};
26 
27  auxiliaryElement = NewElement("auxiliary");
28  auxiliaryElement->setAttributeNode(NewAttribute("auxtype", "G4Region"));
29  auxiliaryElement->setAttributeNode(NewAttribute("auxvalue", glv->GetRegion()->GetName()));
30  volumeElement->appendChild(auxiliaryElement);
31 
32  auxiliaryElement = NewElement("auxiliary");
33  auxiliaryElement->setAttributeNode(NewAttribute("auxtype", "pcutunit"));
34  auxiliaryElement->setAttributeNode(NewAttribute("auxvalue", "GeV"));
35  volumeElement->appendChild(auxiliaryElement);
36 
37  // G4cout << "I have been called " << glv->GetName() << " in region "
38  // << glv->GetRegion()->GetName() << G4endl;
39  G4ProductionCuts* cuts = glv->GetRegion()->GetProductionCuts();
40 
41  for (G4int ic = 0; ic < 4; ++ic) {
42  G4cout << ic << ". " << cutnames[ic] << " converter: " << converter[ic] << " cuts: " << cuts << " glv: " << glv
43  << G4endl;
44  ss.clear();
45  ss.str("");
46  ss << converter[ic]->Convert(cuts->GetProductionCut(ic), glv->GetMaterial()) / CLHEP::GeV;
47  // G4cout << cutnames[ic] << " = " << ss.str() << G4endl;
48  auxiliaryElement = NewElement("auxiliary");
49  auxiliaryElement->setAttributeNode(NewAttribute("auxtype", cutnames[ic]));
50  auxiliaryElement->setAttributeNode(NewAttribute("auxvalue", ss.str()));
51  volumeElement->appendChild(auxiliaryElement);
52  }
53 }

Member Data Documentation

◆ converter

G4VRangeToEnergyConverter* CMSGDMLWriteStructure::converter[4]
private

Definition at line 19 of file CMSGDMLWriteStructure.h.