File indexing completed on 2025-08-05 08:18:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #ifndef _PHG4GDMLWRITEDEFINE_INCLUDED_
0041 #define _PHG4GDMLWRITEDEFINE_INCLUDED_
0042
0043 #include <Geant4/G4Types.hh>
0044 #include <Geant4/G4ThreeVector.hh>
0045 #include <Geant4/G4RotationMatrix.hh>
0046
0047 #include "PHG4GDMLWrite.hh"
0048
0049 class PHG4GDMLWriteDefine : public PHG4GDMLWrite
0050 {
0051
0052 public:
0053
0054 G4ThreeVector GetAngles(const G4RotationMatrix&);
0055 void ScaleWrite(xercesc::DOMElement* element,
0056 const G4String& name, const G4ThreeVector& scl)
0057 { Scale_vectorWrite(element,"scale",name,scl); }
0058 void RotationWrite(xercesc::DOMElement* element,
0059 const G4String& name, const G4ThreeVector& rot)
0060 { Rotation_vectorWrite(element,"rotation",name,rot); }
0061 void PositionWrite(xercesc::DOMElement* element,
0062 const G4String& name, const G4ThreeVector& pos)
0063 { Position_vectorWrite(element,"position",name,pos); }
0064 void FirstrotationWrite(xercesc::DOMElement* element,
0065 const G4String& name, const G4ThreeVector& rot)
0066 { Rotation_vectorWrite(element,"firstrotation",name,rot); }
0067 void FirstpositionWrite(xercesc::DOMElement* element,
0068 const G4String& name, const G4ThreeVector& pos)
0069 { Position_vectorWrite(element,"firstposition",name,pos); }
0070 void AddPosition(const G4String& name, const G4ThreeVector& pos)
0071 { Position_vectorWrite(defineElement,"position",name,pos); }
0072
0073 virtual void DefineWrite(xercesc::DOMElement*);
0074
0075 protected:
0076
0077 PHG4GDMLWriteDefine();
0078 virtual ~PHG4GDMLWriteDefine();
0079
0080 void Scale_vectorWrite(xercesc::DOMElement*, const G4String&,
0081 const G4String&, const G4ThreeVector&);
0082 void Rotation_vectorWrite(xercesc::DOMElement*, const G4String&,
0083 const G4String&, const G4ThreeVector&);
0084 void Position_vectorWrite(xercesc::DOMElement*, const G4String&,
0085 const G4String&, const G4ThreeVector&);
0086
0087 protected:
0088
0089 static const G4double kRelativePrecision;
0090 static const G4double kAngularPrecision;
0091 static const G4double kLinearPrecision;
0092
0093 xercesc::DOMElement* defineElement;
0094
0095 };
0096
0097 #endif