Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4GDMLWriteSolids.cc 103463 2017-04-11 07:22:55Z gcosmo $
// $Id: G4GDMLWriteSolids.cc 106194 2017-09-19 04:05:34Z gcosmo $
//
// class G4GDMLWriteSolids Implementation
//
@@ -991,12 +991,14 @@ TwistedtubsWrite(xercesc::DOMElement* solElement,
twistedtubsElement->setAttributeNode(NewAttribute("name",name));
twistedtubsElement->setAttributeNode(NewAttribute("twistedangle",
twistedtubs->GetPhiTwist()/degree));
twistedtubsElement->setAttributeNode(NewAttribute("endinnerrad",
twistedtubsElement->setAttributeNode(NewAttribute("midinnerrad",
twistedtubs->GetInnerRadius()/mm));
twistedtubsElement->setAttributeNode(NewAttribute("endouterrad",
twistedtubsElement->setAttributeNode(NewAttribute("midouterrad",
twistedtubs->GetOuterRadius()/mm));
twistedtubsElement->setAttributeNode(NewAttribute("zlen",
2.0*twistedtubs->GetZHalfLength()/mm));
twistedtubsElement->setAttributeNode(NewAttribute("negativeEndz",
twistedtubs->GetEndZ(0)/mm));
twistedtubsElement->setAttributeNode(NewAttribute("positiveEndz",
twistedtubs->GetEndZ(1)/mm));
twistedtubsElement->setAttributeNode(NewAttribute("phi",
twistedtubs->GetDPhi()/degree));
twistedtubsElement->setAttributeNode(NewAttribute("aunit","deg"));
@@ -1054,29 +1056,32 @@ void G4GDMLWriteSolids::PropertyWrite(xercesc::DOMElement* optElement,
{
xercesc::DOMElement* propElement;
G4MaterialPropertiesTable* ptable = surf->GetMaterialPropertiesTable();
const std::map< G4String, G4PhysicsOrderedFreeVector*,
std::less<G4String> >* pmap = ptable->GetPropertiesMap();
const std::map< G4String, G4double,
std::less<G4String> >* cmap = ptable->GetPropertiesCMap();
std::map< G4String, G4PhysicsOrderedFreeVector*,
std::less<G4String> >::const_iterator mpos;
std::map< G4String, G4double,
std::less<G4String> >::const_iterator cpos;
const std::map< G4MPindex, G4PhysicsOrderedFreeVector*,
std::less<G4MPindex> >* pmap = ptable->GetPropertyMap();
const std::map< G4MCPindex, G4double,
std::less<G4MCPindex> >* cmap = ptable->GetConstPropertyMap();
std::map< G4MPindex, G4PhysicsOrderedFreeVector*,
std::less<G4MPindex> >::const_iterator mpos;
std::map< G4MCPindex, G4double,
std::less<G4MCPindex> >::const_iterator cpos;
for (mpos=pmap->begin(); mpos!=pmap->end(); mpos++)
{
propElement = NewElement("property");
propElement->setAttributeNode(NewAttribute("name", mpos->first));
propElement->setAttributeNode(NewAttribute("name",
G4MaterialPropertyName[mpos->first]));
propElement->setAttributeNode(NewAttribute("ref",
GenerateName(mpos->first, mpos->second)));
GenerateName(G4MaterialPropertyName[mpos->first],
mpos->second)));
if (mpos->second)
{
PropertyVectorWrite(mpos->first, mpos->second);
PropertyVectorWrite(G4MaterialPropertyName[mpos->first], mpos->second);
optElement->appendChild(propElement);
}
else
{
G4String warn_message = "Null pointer for material property -"
+ mpos->first + "- of optical surface -" + surf->GetName() + "- !";
+ G4MaterialPropertyName[mpos->first]
+ "- of optical surface -" + surf->GetName() + "- !";
G4Exception("G4GDMLWriteSolids::PropertyWrite()", "NullPointer",
JustWarning, warn_message);
continue;
@@ -1085,10 +1090,13 @@ void G4GDMLWriteSolids::PropertyWrite(xercesc::DOMElement* optElement,
for (cpos=cmap->begin(); cpos!=cmap->end(); cpos++)
{
propElement = NewElement("property");
propElement->setAttributeNode(NewAttribute("name", cpos->first));
propElement->setAttributeNode(NewAttribute("ref", cpos->first));
propElement->setAttributeNode(NewAttribute("name",
G4MaterialConstPropertyName[cpos->first]));
propElement->setAttributeNode(NewAttribute("ref",
G4MaterialConstPropertyName[cpos->first]));
xercesc::DOMElement* constElement = NewElement("constant");
constElement->setAttributeNode(NewAttribute("name", cpos->first));
constElement->setAttributeNode(NewAttribute("name",
G4MaterialConstPropertyName[cpos->first]));
constElement->setAttributeNode(NewAttribute("value", cpos->second));
defineElement->appendChild(constElement);
optElement->appendChild(propElement);