]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updates needed for move to geant4.6
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Jan 2004 16:27:56 +0000 (16:27 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Jan 2004 16:27:56 +0000 (16:27 +0000)
14 files changed:
Flugg/FGeometryInit.cxx
Flugg/FGeometryInit.hh
Flugg/FluggNavigator.cxx
Flugg/FluggNavigator.hh
Flugg/FlukaCompound.cxx
Flugg/FlukaCompound.hh
Flugg/FlukaLowMat.cxx
Flugg/FlukaLowMat.hh
Flugg/FlukaMaterial.cxx
Flugg/FlukaMaterial.hh
Flugg/WrapG1.cxx
Flugg/WrapNorml.cxx
Flugg/WrapUtils.cxx
Flugg/WrapUtils.hh

index 66b8795870a239b01560c199c2119aa4bc591e0a..65010044506193d060010d78e426ae30a45a109f 100644 (file)
@@ -77,7 +77,18 @@ FGeometryInit::~FGeometryInit() {
   G4cout << "<== Flugg FGeometryInit::FGeometryInit()" << G4endl;
 }
 
-
+void FGeometryInit::Init() {
+// Build and initialize G4 geometry
+   setDetector();
+   setMotherVolume(); 
+   closeGeometry();
+   InitHistories();   
+   InitJrLtGeantArray(); 
+   InitHistArray();
+   createFlukaMatFile();
+}   
+   
+     
 void FGeometryInit::closeGeometry() {
 #ifdef G4GEOMETRY_DEBUG
   G4cout << "==> Flugg FGeometryInit::closeGeometry()" << G4endl;
@@ -296,13 +307,13 @@ void FGeometryInit::createFlukaMatFile() {
 
   //Regions map
   BuildRegionsMap();
-  G4std::ofstream vos("Volumes_index.inp");
+  std::ofstream vos("Volumes_index.inp");
   PrintRegionsMap(vos);
   vos.close();
 
   //Materials and compounds
   BuildMaterialTables();
-  G4std::ofstream fos("flukaMat.inp");  
+  std::ofstream fos("flukaMat.inp");  
   PrintMaterialTables(fos);
   PrintAssignmat(fos);
   PrintMagneticField(fos);
@@ -342,7 +353,7 @@ void FGeometryInit::BuildRegionsMap() {
 #endif
 }
 
-void FGeometryInit::PrintRegionsMap(G4std::ostream& os) {
+void FGeometryInit::PrintRegionsMap(std::ostream& os) {
 #ifdef G4GEOMETRY_DEBUG
   G4cout << "==> Flugg FGeometryInit::PrintRegionsMap()" << G4endl;
 #endif
@@ -360,9 +371,9 @@ void FGeometryInit::PrintRegionsMap(G4std::ostream& os) {
     int index = (*i).second;
 
     //Print index and region name in some fixed format
-    os.setf(G4std::ios::left, G4std::ios::adjustfield);
+    os.setf(std::ios::left, std::ios::adjustfield);
     os << setw10 << index;
-    os << G4std::setw(20) << ptrVol->GetName() << G4std::setw(20) << "";
+    os << std::setw(20) << ptrVol->GetName() << std::setw(20) << "";
 
     //If volume is a replica... print some more stuff
     if(ptrVol->IsReplicated()) {
@@ -372,8 +383,8 @@ void FGeometryInit::PrintRegionsMap(G4std::ostream& os) {
       G4double offset = -1;
       G4bool consum = false;
       ptrVol->GetReplicationData(axis, nRep, width, offset, consum);
-      os.setf(G4std::ios::left, G4std::ios::adjustfield);
-      os << setw10 << "Repetion Nb: " << G4std::setw(3) << nRep;
+      os.setf(std::ios::left, std::ios::adjustfield);
+      os << setw10 << "Repetion Nb: " << std::setw(3) << nRep;
     }
     os << G4endl;
     
@@ -652,7 +663,7 @@ FGeometryInit::BuildFlukaCompoundFromElement(const G4Element* element,
 #endif
 }
 
-void FGeometryInit::PrintMaterialTables(G4std::ostream& os) {
+void FGeometryInit::PrintMaterialTables(std::ostream& os) {
 #ifdef G4GEOMETRY_DEBUG
   G4cout << "==> Flugg FGeometryInit::PrintMaterialTables()" << G4endl;
 #endif
@@ -684,7 +695,7 @@ void FGeometryInit::PrintMaterialTables(G4std::ostream& os) {
 
 ////////////////////////////////////////////////////////////////////////
 // 
-void FGeometryInit::PrintAssignmat(G4std::ostream& os) {
+void FGeometryInit::PrintAssignmat(std::ostream& os) {
 #ifdef G4GEOMETRY_DEBUG
   G4cout << "==> Flugg FGeometryInit::PrintAssignmat()" << G4endl;
 #endif
@@ -726,7 +737,7 @@ void FGeometryInit::PrintAssignmat(G4std::ostream& os) {
     
     //Print card
     os << setw10 << "ASSIGNMAT ";
-    os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+    os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
     os << setw10 << setfixed << G4double(matIndex);
     os << setw10 << setfixed << G4double(iFlukaRegion);
     os << setw10 << "0.0";
@@ -742,7 +753,7 @@ void FGeometryInit::PrintAssignmat(G4std::ostream& os) {
 }
 
 
-void FGeometryInit::PrintMagneticField(G4std::ostream& os) {
+void FGeometryInit::PrintMagneticField(std::ostream& os) {
 #ifdef G4GEOMETRY_DEBUG
   G4cout << "==> Flugg FGeometryInit::PrintMagneticField()" << G4endl;
 #endif
@@ -771,9 +782,9 @@ void FGeometryInit::PrintMagneticField(G4std::ostream& os) {
        os << setw10 << "";
        os << setw10 << "";
        os << setw10 << "";
-       os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+       os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
        os << setw10 << setfixed
-          << G4std::setprecision(4) << B[0]
+          << std::setprecision(4) << B[0]
           << setw10 << B[1]
           << setw10 << B[2]
           << G4endl;
@@ -811,11 +822,23 @@ int FGeometryInit::CurrentVolOffID(int ir, int off, int& copyNo)
     G4VPhysicalVolume*     physicalvol = (*pVolStore)[ir- 1];
     G4VPhysicalVolume*     mother = physicalvol; 
 
-    int level = off;
-    while (level > 0) { 
-       if (mother) mother = mother->GetMother();
-       level--;
-    }
+    int index;
+//============================================================================
+    if (mother) {
+  // Check touchable depth
+  //
+       if (ptrTouchHist->GetHistoryDepth() < off) {
+          mother = 0;
+       } else {                                                                                                                                                             
+          // Get the off-th mother
+          index = ptrTouchHist->GetHistoryDepth() - off;
+          // in the touchable history volumes are ordered
+          // from top volume up to mother volume;
+          // the touchable volume is not in the history                                                                                        
+          mother = ptrTouchHist->GetHistory()->GetVolume(index);
+       }
+    }  
+//============================================================================
     
     int id;
     
@@ -856,8 +879,10 @@ void  FGeometryInit::Gmtod(double* xm, double* xd, int iflag)
     
     if (iflag == 1) {
        pGlob *= 10.0; // in mm
-       pLoc = 
-           ptrNavig->ComputeLocalPoint(pGlob);
+// change because of geant 4 6.0
+//     pLoc = ptrNavig->ComputeLocalPoint(pGlob);
+        pLoc = ptrNavig->GetGlobalToLocalTransform().TransformPoint(pGlob);
+
        pLoc /= 10.0;  // in cm
     } else if (iflag == 2) {
        pLoc = 
index 832ab6df16c882188b70aeee6335509f5d6e921d..8abea8b2f3dd4679cfd9f9fdf8af7190539d4641 100644 (file)
@@ -66,6 +66,7 @@ public:
   inline G4int GetLttcFlagGeant();
   void SetLttcFlagGeant(G4int);
   void PrintJrLtGeant();
+  void Init();
 
   //Map access methods
   void  BuildMediaMap();
@@ -79,7 +80,7 @@ public:
 
 protected:
   void BuildRegionsMap();
-  void PrintRegionsMap(G4std::ostream& os);
+  void PrintRegionsMap(std::ostream& os);
   void BuildMaterialTables();
   FlukaMaterial* BuildFlukaMaterialFromElement(const G4Element* element, 
                                               G4double matDensity);
@@ -88,9 +89,9 @@ protected:
   FlukaCompound* BuildFlukaCompoundFromMaterial(const G4Material* material); 
   FlukaCompound* BuildFlukaCompoundFromElement(const G4Element* element,
                                               G4double matDensity);
-  void PrintMaterialTables(G4std::ostream& os);
-  void PrintAssignmat(G4std::ostream& os);
-  void PrintMagneticField(G4std::ostream& os);
+  void PrintMaterialTables(std::ostream& os);
+  void PrintAssignmat(std::ostream& os);
+  void PrintMagneticField(std::ostream& os);
 
 private:    
   FGeometryInit();     //costructor
@@ -111,17 +112,17 @@ private:
   G4int  fNRegions;
   int* fRegionMediumMap;
     
-  G4std::map<G4VPhysicalVolume*, int, G4std::less<G4VPhysicalVolume*> > fRegionVolumeMap;
-  G4std::map<G4VPhysicalVolume*, int, G4std::less<G4VPhysicalVolume*> > fMediumVolumeMap;
-  G4std::map<G4VPhysicalVolume*, int, G4std::less<G4VPhysicalVolume*> > fVolIdVolumeMap;
+  std::map<G4VPhysicalVolume*, int, std::less<G4VPhysicalVolume*> > fRegionVolumeMap;
+  std::map<G4VPhysicalVolume*, int, std::less<G4VPhysicalVolume*> > fMediumVolumeMap;
+  std::map<G4VPhysicalVolume*, int, std::less<G4VPhysicalVolume*> > fVolIdVolumeMap;
 
-  G4std::map<G4Material*, FlukaMaterial*, G4std::less<G4Material*> > G4FlukaMaterialMap;
-  G4std::map<G4Material*, FlukaCompound*, G4std::less<G4Material*> > G4FlukaCompoundMap;
+  std::map<G4Material*, FlukaMaterial*, std::less<G4Material*> > G4FlukaMaterialMap;
+  std::map<G4Material*, FlukaCompound*, std::less<G4Material*> > G4FlukaCompoundMap;
   //G4int NOfMaterials;
 };
 
-typedef  G4std::map<G4VPhysicalVolume*, int, G4std::less<G4VPhysicalVolume*> >::const_iterator RegionIterator;
-typedef  G4std::vector<G4Material*>::const_iterator MatTableIterator;
+typedef  std::map<G4VPhysicalVolume*, int, std::less<G4VPhysicalVolume*> >::const_iterator RegionIterator;
+typedef  std::vector<G4Material*>::const_iterator MatTableIterator;
 
 
 //Include the file with the inline methods
index 755e4dc6fac5b0428bc7befa25879335b83fd947..d19fbb4dc8b75687ff53b9db260a6365b32cf71a 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "FluggNavigator.hh"
 #include "G4ios.hh"
-#include "g4std/iomanip"
+#include <iomanip.h>
 
 #ifdef G4GEOMETRY_DEBUG
 # define G4DEBUG_NAVIGATION 1
index b104aeb2c092485eaede8067ce6f5bbd04ce20f3..f0f38d2ff9bacd6266175f6e9558783388d9538f 100644 (file)
@@ -11,7 +11,7 @@ class FluggNavigator : public G4Navigator
 {
   public:
 
-  friend G4std::ostream& operator << (G4std::ostream &os, const FluggNavigator &n);
+  friend std::ostream& operator << (std::ostream &os, const FluggNavigator &n);
 
   FluggNavigator();
     // Constructor - initialisers and setup.
index 401e9a58d1541fa906fc649e3bcd7d55200c89a7..00f2472c41d96e125f8d10f7cee5332afbc279c9 100644 (file)
@@ -49,7 +49,7 @@ void FlukaCompound::AddElement(G4int index, G4double fraction) {
   }
 }
 
-G4std::ostream& FlukaCompound::PrintCompounds(G4std::ostream& os) {
+std::ostream& FlukaCompound::PrintCompounds(std::ostream& os) {
   PrintHeader(os, "COMPOUNDS");  
   
   for (FlukaCompoundsIterator i = fFlukaCompounds.begin(); 
@@ -62,7 +62,7 @@ G4std::ostream& FlukaCompound::PrintCompounds(G4std::ostream& os) {
   return os;
 }
 
-G4std::ostream& operator<<(G4std::ostream& os, const FlukaCompound& flucomp) {
+std::ostream& operator<<(std::ostream& os, const FlukaCompound& flucomp) {
   G4int nmats = flucomp.GetNMaterials();
   G4String matName = flucomp.GetName();
   G4String matRealName = flucomp.GetRealName().substr(0,8);
@@ -76,15 +76,15 @@ G4std::ostream& operator<<(G4std::ostream& os, const FlukaCompound& flucomp) {
   G4int counttothree = 0;
   os << setw10 <<"COMPOUND  ";
   for (G4int i = 0; i < nmats; i++) {
-    os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+    os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
     os << setw10
        << setfixed
-       << G4std::setprecision(6)
+       << std::setprecision(6)
        << flucomp.GetMaterialFraction(i);
-    os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+    os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
     os << setw10
        << setfixed
-       << G4std::setprecision(1)
+       << std::setprecision(1)
        << G4double(flucomp.GetMaterialIndex(i));
     counttothree++;
     if (counttothree == 3 ) {
index ac5eebef5fc8d4c14b67796f7f05d6ef5daa504c..50d3e487f44943592445105b20dc40a8a2e786b5 100644 (file)
@@ -7,8 +7,8 @@
 #include <map>
 
 class FlukaCompound;
-typedef G4std::map<G4String, FlukaCompound*, G4std::less<G4String> > FlukaCompoundsTable;
-typedef G4std::map<G4String, FlukaCompound*, G4std::less<G4String> >::const_iterator FlukaCompoundsIterator;
+typedef std::map<G4String, FlukaCompound*, std::less<G4String> > FlukaCompoundsTable;
+typedef std::map<G4String, FlukaCompound*, std::less<G4String> >::const_iterator FlukaCompoundsIterator;
 
 class FlukaCompound {
 public:
@@ -45,7 +45,7 @@ public:
   //Static
   static inline const FlukaCompoundsTable* GetCompoundTable();
   static inline const FlukaCompound* GetFlukaCompound(const G4String& name);
-  static G4std::ostream& PrintCompounds(G4std::ostream& os);
+  static std::ostream& PrintCompounds(std::ostream& os);
 
 public:
   G4int     fNMaterials; //Number of elements in total
@@ -69,7 +69,7 @@ inline const FlukaCompound* FlukaCompound::GetFlukaCompound(const G4String& name
 
 
 //Ostream operator
-G4std::ostream& operator<<(G4std::ostream& os, const FlukaCompound& flucomp);
+std::ostream& operator<<(std::ostream& os, const FlukaCompound& flucomp);
 
 #endif
 
index 52a060f0f627130c89befcc6c4e4c89914f8a4f1..17fce0e081e0fcc9f4ac55182930dbc717394a1f 100644 (file)
@@ -6,10 +6,10 @@ FlukaLowMat::FlukaLowMat(const G4String& name, FlukaMaterial* fmat):
   fFlukaMaterial(fmat){
 }
 
-G4std::ostream& operator<<(G4std::ostream& os, const FlukaLowMat& flowmat){
+std::ostream& operator<<(std::ostream& os, const FlukaLowMat& flowmat){
   os << setw10 << "LOW-MAT   ";
-  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
-  os << setw10 << setfixed << G4std::setprecision(1) 
+  os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
+  os << setw10 << setfixed << std::setprecision(1) 
      << G4double(flowmat.GetIndex());
   os << setw10 << " " 
      << setw10 << " " 
index 88630f78e7c0cd7c4aaa44182456e8c750080a2d..a964cde519d2014b66ac1b99bca38504cff225c9 100644 (file)
@@ -27,7 +27,7 @@ public:
 
 inline G4int FlukaLowMat::GetIndex() const {return fFlukaMaterial->GetIndex();}
 
-G4std::ostream& operator<<(G4std::ostream& os, const FlukaLowMat& flowmat);
+std::ostream& operator<<(std::ostream& os, const FlukaLowMat& flowmat);
 
 #endif
 
index fd9cda12e174c40325df5b5d1ac30943764d98bc..4a33fd59a380cfb97d613c62f59f2f57431e275f 100644 (file)
@@ -65,7 +65,7 @@ G4String FlukaMaterial::GetRealName() const {
   return GetName();
 }
 
-G4std::ostream& FlukaMaterial::PrintMaterialsByName(G4std::ostream& os) {
+std::ostream& FlukaMaterial::PrintMaterialsByName(std::ostream& os) {
   PrintHeader(os, "MATERIALS");
   for (FlukaMaterialsIterator i = fFlukaMaterials.begin(); 
        i != fFlukaMaterials.end(); 
@@ -78,7 +78,7 @@ G4std::ostream& FlukaMaterial::PrintMaterialsByName(G4std::ostream& os) {
   return os;
 }
 
-G4std::ostream& FlukaMaterial::PrintMaterialsByIndex(G4std::ostream& os) {
+std::ostream& FlukaMaterial::PrintMaterialsByIndex(std::ostream& os) {
   PrintHeader(os, "MATERIALS");
   for (FlukaMaterialsIndexIterator i = fFlukaIndexMaterials.begin(); 
        i != fFlukaIndexMaterials.end(); 
@@ -91,39 +91,39 @@ G4std::ostream& FlukaMaterial::PrintMaterialsByIndex(G4std::ostream& os) {
   return os;
 }
 
-G4std::ostream& operator<<(G4std::ostream& os, const FlukaMaterial& material){
+std::ostream& operator<<(std::ostream& os, const FlukaMaterial& material){
   os << setw10 << "MATERIAL  ";
 
-  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+  os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
   G4double Z = G4double(material.GetZ());
   if (Z <= 0)
     os << setw10 << " ";
   else
     os << setw10 
        << setfixed
-       << G4std::setprecision(1) 
+       << std::setprecision(1) 
        << Z;
   
   G4double A = material.GetA();
   if (A <= 0)
     os << setw10 << " ";
   else
-    os << setw10 << G4std::setprecision(3)
+    os << setw10 << std::setprecision(3)
        << A;
 
   G4double density = material.GetDensity();
   if (density <=0)
     density = 0.999;
-  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+  os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
   os << setw10 
      << setscientific
-     << G4std::setprecision(3) 
+     << std::setprecision(3) 
      << density;
 
-  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
+  os.setf(static_cast<std::ios::fmtflags>(0),std::ios::floatfield);
   os << setw10 
      << setfixed
-     << G4std::setprecision(1) 
+     << std::setprecision(1) 
      << G4double(material.GetIndex());
 
   os << setw10 << " ";
index 625e1b781ef018b0abff2574eec87551ce027128..a6e1bb748349369eece9c6ca446fa30297a5aa76 100644 (file)
@@ -8,10 +8,10 @@ class FlukaLowMat;
 #include <map>
 
 class FlukaMaterial;
-typedef G4std::map<G4String, FlukaMaterial*, G4std::less<G4String> > FlukaMaterialsTable;
-typedef G4std::map<G4String, FlukaMaterial*, G4std::less<G4String> >::const_iterator FlukaMaterialsIterator;
-typedef G4std::map<G4int, FlukaMaterial*, G4std::less<G4int> > FlukaMaterialsIndexTable;
-typedef G4std::map<G4int, FlukaMaterial*, G4std::less<G4int> >::const_iterator FlukaMaterialsIndexIterator;
+typedef std::map<G4String, FlukaMaterial*, std::less<G4String> > FlukaMaterialsTable;
+typedef std::map<G4String, FlukaMaterial*, std::less<G4String> >::const_iterator FlukaMaterialsIterator;
+typedef std::map<G4int, FlukaMaterial*, std::less<G4int> > FlukaMaterialsIndexTable;
+typedef std::map<G4int, FlukaMaterial*, std::less<G4int> >::const_iterator FlukaMaterialsIndexIterator;
 
 class FlukaMaterial {
 public:
@@ -46,8 +46,8 @@ public:
     return &fFlukaMaterials;}
   static FlukaMaterial* GetFlukaMaterial(const G4String& name) { 
     return fFlukaMaterials[name];}
-  static G4std::ostream& PrintMaterialsByName(G4std::ostream& os);
-  static G4std::ostream& PrintMaterialsByIndex(G4std::ostream& os);
+  static std::ostream& PrintMaterialsByName(std::ostream& os);
+  static std::ostream& PrintMaterialsByIndex(std::ostream& os);
 
 protected:
   //Other
@@ -68,7 +68,7 @@ public:
 
 };
 
-G4std::ostream& operator<<(G4std::ostream& os, const FlukaMaterial& material);
+std::ostream& operator<<(std::ostream& os, const FlukaMaterial& material);
 
 
 #endif
index eb96394fdfbd1e75eee2b2a6f338fbdd608a2918..598e5fadaffaa2d6718b94ba3818c85488cccd45 100644 (file)
@@ -64,8 +64,12 @@ void g1wr(G4double& pSx, G4double& pSy, G4double& pSz, G4double* pV,
   G4ThreeVector partLoc(pSx,pSy,pSz);
   partLoc *= 10.0; // in millimeters!
   static G4ThreeVector partLocOld = partLoc;
-  static G4ThreeVector oldLocalPoint = 
-    ptrNavig->ComputeLocalPoint(partLocOld);
+
+// change because of geant4 6.0
+//static G4ThreeVector oldLocalPoint = 
+//  ptrNavig->ComputeLocalPoint(partLocOld);
+ static G4ThreeVector oldLocalPoint =
+    ptrNavig->GetGlobalToLocalTransform().TransformPoint(partLocOld);
   
   G4ThreeVector pVec(pV[0],pV[1],pV[2]);
   const G4double physStep=G4double(propStep*10.);
@@ -227,7 +231,14 @@ void g1wr(G4double& pSx, G4double& pSy, G4double& pSz, G4double* pV,
   //changed from last located point (otherwise troubles come 
   //when fluka changes location or particle because G4 computes 
   //from last located point).
-  G4ThreeVector newLocalPoint = ptrNavig->ComputeLocalPoint(partLoc);
+
+// change because of geant4 6.0
+//G4ThreeVector newLocalPoint = ptrNavig->ComputeLocalPoint(partLoc);
+  G4ThreeVector newLocalPoint =
+    ptrNavig->GetGlobalToLocalTransform().TransformPoint(partLoc);
+
+
+
   G4double moveLenSq = (newLocalPoint-oldLocalPoint).mag2();
   if(moveLenSq>=kCarTolerance*kCarTolerance) 
     ptrNavig->LocateGlobalPointWithinVolume(partLoc);
@@ -337,7 +348,9 @@ void g1wr(G4double& pSx, G4double& pSy, G4double& pSz, G4double* pV,
   }
   else if(newRegErr<0) 
     newReg=newRegErr;
-  
+//======================= Endre print ===================  
+printf("\nWrapG1 mreg=%d",newReg);
+//======================= Endre print ===================  
   
   //compute output variables (in cm.!)
   //final step
@@ -361,7 +374,11 @@ void g1wr(G4double& pSx, G4double& pSy, G4double& pSz, G4double* pV,
   ptrGeoInit->SetLttcFlagGeant(LttcFlagGeant);
   
   partLocOld=partLoc;
-  oldLocalPoint = ptrNavig->ComputeLocalPoint(partLocOld);
+
+// change because of geant4 6.0
+//oldLocalPoint = ptrNavig->ComputeLocalPoint(partLocOld);
+  oldLocalPoint =
+    ptrNavig->GetGlobalToLocalTransform().TransformPoint(partLocOld);
   
   //compute new position
   G4ThreeVector oldPos = G4ThreeVector(pSx,pSy,pSz);
index ed65fc3eef9bbaaa2580c8622da7b8f09776ff0f..891cbb85a94b5f7d8590c8a53da64bf490ff868f 100644 (file)
@@ -63,8 +63,9 @@ void nrmlwr(G4double& pSx, G4double& pSy, G4double& pSz,
   G4ThreeVector normalGlob;
   
   //normal computing
-  if(ptrNavig->IsExitNormalValid()) {
-    normalLoc=ptrNavig->GetLocalExitNormal();
+  G4bool* valid;
+  normalLoc=ptrNavig->GetLocalExitNormal(valid);
+  if(valid) {
     normalLoc *= -1;        
     
     //global cooordinates normal
index 9a0291e70b8559d46930ae9e79ce082dfe7dd5ba..a24a8b9523d25b5d9a985f5b41048b60e0010681 100644 (file)
@@ -169,7 +169,7 @@ bool EqualHistories(const G4NavigationHistory* ptrFirstHist,
 ////////////////////////////////////////////////////////////////////////
 // PrintHeader
 ////////////////////////////////////////////////////////////////////////
-G4std::ostream& PrintHeader(G4std::ostream& os, const char* title) {
+std::ostream& PrintHeader(std::ostream& os, const char* title) {
   os << "*\n" << "*\n" << "*\n";
   os << "*********************  " << title << " *********************\n"
      << "*\n";
index fe14ac6c4fba7d0e5fbd4b3f19994db9d6560ea4..c1283e91e76b56900b3dfb892cd23e26555e517f 100644 (file)
@@ -31,10 +31,10 @@ bool EqualHistories(const G4NavigationHistory*,
                    const G4NavigationHistory*);
 
 // Common print utilities used in FGeometryInit.cc
-inline G4std::ostream& setw10(G4std::ostream& os) { return os << G4std::setw(10);}
-inline G4std::ostream& setscientific(G4std::ostream& os) { return os << G4std::setiosflags(G4std::ios::scientific);}
-inline G4std::ostream& setfixed(G4std::ostream& os) { return os << G4std::setiosflags(G4std::ios::fixed);}
-G4std::ostream& PrintHeader(G4std::ostream& os, const char* title);
+inline std::ostream& setw10(std::ostream& os) { return os << std::setw(10);}
+inline std::ostream& setscientific(std::ostream& os) { return os << std::setiosflags(std::ios::scientific);}
+inline std::ostream& setfixed(std::ostream& os) { return os << std::setiosflags(std::ios::fixed);}
+std::ostream& PrintHeader(std::ostream& os, const char* title);
 G4String ToFlukaString(G4String str);
 
 #endif