Index: trunk/source/tracking/History
===================================================================
--- trunk/source/tracking/History	(revision 1202)
+++ trunk/source/tracking/History	(revision 1228)
@@ -1,4 +1,4 @@
-$Id: History,v 1.126 2008/12/09 01:37:25 asaim Exp $
-$Name: geant4-09-02-ref-02 $ 
+$Id: History,v 1.137 2009/11/24 10:04:14 perl Exp $
+$Name: geant4-09-03 $ 
 -------------------------------------------------------------------
 
@@ -18,4 +18,47 @@
      * Reverse chronological order (last date on top), please *
      ----------------------------------------------------------
+
+24 Nov 2009 Joseph Perl (tracking-V09-02-07)
+- G4RichTrajectory: add additional attributes
+- G4RichTrajectoryPoint: add additional attributes
+
+20 Nov 2009 L.Desorgher (tracking-V09-02-06)
+- Small correction in G4AdjointSteppingAction to stop the reverse tracking
+  when adjoint particles reenter the adjoint source. 
+  Reput the Nan test removed in  tracking-V09-02-05 but now as (x<0 && x>=0).
+  This Nan test is still needed in very rare case where the weight of a
+  particle goes to Nan. As such the code is stable! The reason for the Nan
+  weight is till under investigation.
+
+18 Nov 2009 G.Cosmo (tracking-V09-02-05)
+- Fixes to "Adjoint" classes to allow build of DLLs on Windows: renamed all
+  methods and data holding "External" as keyword to "Ext".
+  Cleanup of the code: use "const G4String&" instead of "G4String" wherever
+  possible; use G4 types in consistent way; avoid usage of "isNan"; code
+  formatting cleanup; added Geant4 disclaimer.
+
+12 Nov 2009 J.Allison (tracking-V09-02-04)
+- G4Trajectory, G4SmoothTrajectory, G4RichTrajectory:
+  o Added initial kinetic energy.
+- G4RichTrajectory:
+  o Added final kinetic energy.
+- G4RichTrajectoryPoint:
+  o Added "remaining energy" at each step.
+
+10 Nov 2009 L. Desorgher(tracking-V09-02-03)
+- First commit of Adjoint classes in the tracking category
+  New classes are: - G4AdjointCrossSurfChecker and G4AdjointSteppingAction
+
+24 Sep 2009 P.Gumplinger (tracking-V09-02-02)
+- Correction to G4SteppingManager::InvokeAtRestDoItProcs so G4Scintillation
+  process (with an AtRestDoIt and 'Forced') will not be set to 'NotForced' when
+  NofInactiveProc<MAXofAtRestLoops and when the user inactivated it on the fly.
+
+21 Sep 2009 T.Sasaki (tracking-V09-02-01)
+- Takashi's first iteration of the above
+
+27 Feb 2009 T.Sasaki(tracking-V09-02-00)
+- Fixing the problem in the the special cases of skipping voxel boundaries in
+G4RegularNavigation
 
 08 Doc 2008  M.Asai (tracking-V09-01-04)
Index: trunk/source/tracking/include/G4AdjointCrossSurfChecker.hh
===================================================================
--- trunk/source/tracking/include/G4AdjointCrossSurfChecker.hh	(revision 1202)
+++ trunk/source/tracking/include/G4AdjointCrossSurfChecker.hh	(revision 1228)
@@ -25,5 +25,5 @@
 //
 // $Id: G4AdjointCrossSurfChecker.hh,v 1.2 2009/11/18 18:04:11 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 /////////////////////////////////////////////////////////////////////////////////
Index: trunk/source/tracking/include/G4AdjointSteppingAction.hh
===================================================================
--- trunk/source/tracking/include/G4AdjointSteppingAction.hh	(revision 1202)
+++ trunk/source/tracking/include/G4AdjointSteppingAction.hh	(revision 1228)
@@ -25,5 +25,5 @@
 //
 // $Id: G4AdjointSteppingAction.hh,v 1.3 2009/11/20 14:24:34 ldesorgh Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 /////////////////////////////////////////////////////////////////////////////////
Index: trunk/source/tracking/include/G4RichTrajectory.hh
===================================================================
--- trunk/source/tracking/include/G4RichTrajectory.hh	(revision 1202)
+++ trunk/source/tracking/include/G4RichTrajectory.hh	(revision 1228)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4RichTrajectory.hh,v 1.5 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: G4RichTrajectory.hh,v 1.6 2009/11/24 10:04:14 perl Exp $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
@@ -42,4 +42,5 @@
 //     4) physical volume and next physical volume;
 //     5) creator process;
+//   ...and much more.
 //
 // Contact:
@@ -58,4 +59,6 @@
 
 #include "G4Trajectory.hh"
+
+#include "G4TouchableHandle.hh"
 
 typedef std::vector<G4VTrajectoryPoint*>  RichTrajectoryPointsContainer;
@@ -92,8 +95,11 @@
   // Extended information (only publicly accessible through AttValues)...
   RichTrajectoryPointsContainer* fpRichPointsContainer;
-  G4VPhysicalVolume* fpInitialVolume;
-  G4VPhysicalVolume* fpInitialNextVolume;
-  const G4VProcess*  fpCreatorProcess;
-  G4double           fFinalKineticEnergy;
+  G4TouchableHandle fpInitialVolume;
+  G4TouchableHandle fpInitialNextVolume;
+  const G4VProcess* fpCreatorProcess;
+  G4TouchableHandle fpFinalVolume;
+  G4TouchableHandle fpFinalNextVolume;
+  const G4VProcess* fpEndingProcess;
+  G4double          fFinalKineticEnergy;
 
 };
Index: trunk/source/tracking/include/G4RichTrajectoryPoint.hh
===================================================================
--- trunk/source/tracking/include/G4RichTrajectoryPoint.hh	(revision 1202)
+++ trunk/source/tracking/include/G4RichTrajectoryPoint.hh	(revision 1228)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4RichTrajectoryPoint.hh,v 1.6 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: G4RichTrajectoryPoint.hh,v 1.7 2009/11/24 10:04:14 perl Exp $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
@@ -40,6 +40,8 @@
 //     2) Auxiliary points, as in G4SmoothTrajectory.
 //     3) Total energy deposit.
-//     4) Procees defining end of step.
-//     5) Global time (from start of event) at pre- amd post-step.
+//     4) Remaining energy.
+//     5) Process defining end of step.
+//     6) Global time (from start of event) at pre- amd post-step.
+//   ...and more.
 //
 // Contact:
@@ -59,4 +61,5 @@
 #include "G4TrajectoryPoint.hh"
 
+#include "G4TouchableHandle.hh"
 #include "G4ThreeVector.hh"
 #include <vector>
@@ -101,4 +104,6 @@
   G4double fPreStepPointGlobalTime;
   G4double fPostStepPointGlobalTime;
+  G4TouchableHandle fpPreStepPointVolume;
+  G4TouchableHandle fpPostStepPointVolume;
 };
 
Index: trunk/source/tracking/include/G4SmoothTrajectory.hh
===================================================================
--- trunk/source/tracking/include/G4SmoothTrajectory.hh	(revision 1202)
+++ trunk/source/tracking/include/G4SmoothTrajectory.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SmoothTrajectory.hh,v 1.12 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4SmoothTrajectoryPoint.hh
===================================================================
--- trunk/source/tracking/include/G4SmoothTrajectoryPoint.hh	(revision 1202)
+++ trunk/source/tracking/include/G4SmoothTrajectoryPoint.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SmoothTrajectoryPoint.hh,v 1.13 2006/06/29 21:15:29 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4SteppingManager.hh
===================================================================
--- trunk/source/tracking/include/G4SteppingManager.hh	(revision 1202)
+++ trunk/source/tracking/include/G4SteppingManager.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SteppingManager.hh,v 1.31 2007/10/09 03:51:06 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 // 
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4SteppingVerbose.hh
===================================================================
--- trunk/source/tracking/include/G4SteppingVerbose.hh	(revision 1202)
+++ trunk/source/tracking/include/G4SteppingVerbose.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SteppingVerbose.hh,v 1.12 2006/06/29 21:15:33 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4TrackingManager.hh
===================================================================
--- trunk/source/tracking/include/G4TrackingManager.hh	(revision 1202)
+++ trunk/source/tracking/include/G4TrackingManager.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4TrackingManager.hh,v 1.21 2006/11/14 10:58:47 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4TrackingMessenger.hh
===================================================================
--- trunk/source/tracking/include/G4TrackingMessenger.hh	(revision 1202)
+++ trunk/source/tracking/include/G4TrackingMessenger.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4TrackingMessenger.hh,v 1.10 2006/06/29 21:15:39 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4Trajectory.hh
===================================================================
--- trunk/source/tracking/include/G4Trajectory.hh	(revision 1202)
+++ trunk/source/tracking/include/G4Trajectory.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4Trajectory.hh,v 1.25 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4TrajectoryPoint.hh
===================================================================
--- trunk/source/tracking/include/G4TrajectoryPoint.hh	(revision 1202)
+++ trunk/source/tracking/include/G4TrajectoryPoint.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4TrajectoryPoint.hh,v 1.17 2006/06/29 21:15:43 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4UserSteppingAction.hh
===================================================================
--- trunk/source/tracking/include/G4UserSteppingAction.hh	(revision 1202)
+++ trunk/source/tracking/include/G4UserSteppingAction.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4UserSteppingAction.hh,v 1.12 2006/06/29 21:15:45 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4UserTrackingAction.hh
===================================================================
--- trunk/source/tracking/include/G4UserTrackingAction.hh	(revision 1202)
+++ trunk/source/tracking/include/G4UserTrackingAction.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4UserTrackingAction.hh,v 1.11 2006/06/29 21:15:47 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //
Index: trunk/source/tracking/include/G4VSteppingVerbose.hh
===================================================================
--- trunk/source/tracking/include/G4VSteppingVerbose.hh	(revision 1202)
+++ trunk/source/tracking/include/G4VSteppingVerbose.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VSteppingVerbose.hh,v 1.24 2006/11/14 10:58:47 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4VTrajectory.hh
===================================================================
--- trunk/source/tracking/include/G4VTrajectory.hh	(revision 1202)
+++ trunk/source/tracking/include/G4VTrajectory.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VTrajectory.hh,v 1.17 2006/06/29 21:15:51 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/include/G4VTrajectoryPoint.hh
===================================================================
--- trunk/source/tracking/include/G4VTrajectoryPoint.hh	(revision 1202)
+++ trunk/source/tracking/include/G4VTrajectoryPoint.hh	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VTrajectoryPoint.hh,v 1.15 2006/06/29 21:15:53 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4AdjointCrossSurfChecker.cc
===================================================================
--- trunk/source/tracking/src/G4AdjointCrossSurfChecker.cc	(revision 1202)
+++ trunk/source/tracking/src/G4AdjointCrossSurfChecker.cc	(revision 1228)
@@ -25,5 +25,5 @@
 //
 // $Id: G4AdjointCrossSurfChecker.cc,v 1.2 2009/11/18 18:04:11 gcosmo Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 /////////////////////////////////////////////////////////////////////////////
Index: trunk/source/tracking/src/G4AdjointSteppingAction.cc
===================================================================
--- trunk/source/tracking/src/G4AdjointSteppingAction.cc	(revision 1202)
+++ trunk/source/tracking/src/G4AdjointSteppingAction.cc	(revision 1228)
@@ -25,5 +25,5 @@
 //
 // $Id: G4AdjointSteppingAction.cc,v 1.3 2009/11/20 14:24:34 ldesorgh Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 /////////////////////////////////////////////////////////////////////////////
Index: trunk/source/tracking/src/G4RichTrajectory.cc
===================================================================
--- trunk/source/tracking/src/G4RichTrajectory.cc	(revision 1202)
+++ trunk/source/tracking/src/G4RichTrajectory.cc	(revision 1228)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4RichTrajectory.cc,v 1.7 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: G4RichTrajectory.cc,v 1.8 2009/11/24 10:04:14 perl Exp $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 // ---------------------------------------------------------------
@@ -57,11 +57,12 @@
 #endif
 
+#include <sstream>
+
 G4Allocator<G4RichTrajectory> aRichTrajectoryAllocator;
 
 G4RichTrajectory::G4RichTrajectory():
   fpRichPointsContainer(0),
-  fpInitialVolume(0),
-  fpInitialNextVolume(0),
   fpCreatorProcess(0),
+  fpEndingProcess(0),
   fFinalKineticEnergy(0.)
 {}
@@ -77,13 +78,16 @@
 			// RichTrajectoryPointsContainer
 {
-  fpInitialVolume = aTrack->GetVolume();
-  fpInitialNextVolume = aTrack->GetNextVolume();
+  fpInitialVolume = aTrack->GetTouchableHandle();
+  fpInitialNextVolume = aTrack->GetNextTouchableHandle();
   fpCreatorProcess = aTrack->GetCreatorProcess();
+  // On construction, set final values to initial values.
+  // Final values are updated at the addition of every step - see AppendStep.
+  fpFinalVolume = aTrack->GetTouchableHandle();
+  fpFinalNextVolume = aTrack->GetNextTouchableHandle();
+  fpEndingProcess = aTrack->GetCreatorProcess();
+  fFinalKineticEnergy = aTrack->GetKineticEnergy();
+  // Insert the first rich trajectory point (see note above)...
   fpRichPointsContainer = new RichTrajectoryPointsContainer;
-  // Insert the first rich trajectory point (see note above)...
   fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(aTrack));
-  // On construction, set final KE to initial KE.
-  // Final KE is updated at the addition of every step - see AppendStep.
-  fFinalKineticEnergy = aTrack->GetKineticEnergy();
 }
 
@@ -94,6 +98,9 @@
   fpInitialNextVolume = right.fpInitialNextVolume;
   fpCreatorProcess = right.fpCreatorProcess;
+  fpFinalVolume = right.fpFinalVolume;
+  fpFinalNextVolume = right.fpFinalNextVolume;
+  fpEndingProcess = right.fpEndingProcess;
+  fFinalKineticEnergy = right.fFinalKineticEnergy;
   fpRichPointsContainer = new RichTrajectoryPointsContainer;
-  fFinalKineticEnergy = right.fFinalKineticEnergy;
   for(size_t i=0;i<right.fpRichPointsContainer->size();i++)
   {
@@ -121,6 +128,11 @@
   fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(aStep));
   // Except for first step, which is a sort of virtual step to start
-  // the track, compute the final energy.
-  if (aStep->GetTrack()->GetCurrentStepNumber() > 0) {
+  // the track, compute the final values...
+  const G4Track* track = aStep->GetTrack();
+  const G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
+  if (track->GetCurrentStepNumber() > 0) {
+    fpFinalVolume = track->GetTouchableHandle();
+    fpFinalNextVolume = track->GetNextTouchableHandle();
+    fpEndingProcess = postStepPoint->GetProcessDefinedStep();
     fFinalKineticEnergy =
       aStep->GetPreStepPoint()->GetKineticEnergy() -
@@ -158,10 +170,10 @@
     G4String ID;
 
-    ID = "IVN";
-    (*store)[ID] = G4AttDef(ID,"Initial Volume Name",
-			    "Physics","","G4String");
-
-    ID = "INVN";
-    (*store)[ID] = G4AttDef(ID,"Initial Next Volume Name",
+    ID = "IVPath";
+    (*store)[ID] = G4AttDef(ID,"Initial Volume Path",
+			    "Physics","","G4String");
+
+    ID = "INVPath";
+    (*store)[ID] = G4AttDef(ID,"Initial Next Volume Path",
 			    "Physics","","G4String");
 
@@ -172,4 +184,20 @@
     ID = "CPTN";
     (*store)[ID] = G4AttDef(ID,"Creator Process Type Name",
+			    "Physics","","G4String");
+
+    ID = "FVPath";
+    (*store)[ID] = G4AttDef(ID,"Final Volume Path",
+			    "Physics","","G4String");
+
+    ID = "FNVPath";
+    (*store)[ID] = G4AttDef(ID,"Final Next Volume Path",
+			    "Physics","","G4String");
+
+    ID = "EPN";
+    (*store)[ID] = G4AttDef(ID,"Ending Process Name",
+			    "Physics","","G4String");
+
+    ID = "EPTN";
+    (*store)[ID] = G4AttDef(ID,"Ending Process Type Name",
 			    "Physics","","G4String");
 
@@ -183,4 +211,16 @@
 }
 
+static G4String Path(const G4TouchableHandle& th)
+{
+  std::ostringstream oss;
+  G4int depth = th->GetHistoryDepth();
+  for (G4int i = depth; i >= 0; --i) {
+    oss << th->GetVolume(i)->GetName()
+	<< ':' << th->GetCopyNumber(i);
+    if (i != 0) oss << '/';
+  }
+  return oss.str();
+}
+
 std::vector<G4AttValue>* G4RichTrajectory::CreateAttValues() const
 {
@@ -188,7 +228,15 @@
   std::vector<G4AttValue>* values = G4Trajectory::CreateAttValues();
 
-  values->push_back(G4AttValue("IVN",fpInitialVolume->GetName(),""));
-
-  values->push_back(G4AttValue("INVN",fpInitialNextVolume->GetName(),""));
+  if (fpInitialVolume && fpInitialVolume->GetVolume()) {
+    values->push_back(G4AttValue("IVPath",Path(fpInitialVolume),""));
+  } else {
+    values->push_back(G4AttValue("IVPath","None",""));
+  }
+
+  if (fpInitialNextVolume && fpInitialNextVolume->GetVolume()) {
+    values->push_back(G4AttValue("INVPath",Path(fpInitialNextVolume),""));
+  } else {
+    values->push_back(G4AttValue("INVPath","None",""));
+  }
 
   if (fpCreatorProcess) {
@@ -201,4 +249,25 @@
   }
 
+  if (fpFinalVolume && fpFinalVolume->GetVolume()) {
+    values->push_back(G4AttValue("FVPath",Path(fpFinalVolume),""));
+  } else {
+    values->push_back(G4AttValue("FVPath","None",""));
+  }
+
+  if (fpFinalNextVolume && fpFinalNextVolume->GetVolume()) {
+    values->push_back(G4AttValue("FNVPath",Path(fpFinalNextVolume),""));
+  } else {
+    values->push_back(G4AttValue("FNVPath","None",""));
+  }
+
+  if (fpEndingProcess) {
+    values->push_back(G4AttValue("EPN",fpEndingProcess->GetProcessName(),""));
+    G4ProcessType type = fpEndingProcess->GetProcessType();
+    values->push_back(G4AttValue("EPTN",G4VProcess::GetProcessTypeName(type),""));
+  } else {
+    values->push_back(G4AttValue("EPN","User Defined",""));
+    values->push_back(G4AttValue("EPTN","User",""));
+  }
+
   values->push_back
     (G4AttValue("FKE",G4BestUnit(fFinalKineticEnergy,"Energy"),""));
Index: trunk/source/tracking/src/G4RichTrajectoryPoint.cc
===================================================================
--- trunk/source/tracking/src/G4RichTrajectoryPoint.cc	(revision 1202)
+++ trunk/source/tracking/src/G4RichTrajectoryPoint.cc	(revision 1228)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4RichTrajectoryPoint.cc,v 1.4 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// $Id: G4RichTrajectoryPoint.cc,v 1.5 2009/11/24 10:04:14 perl Exp $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //
@@ -61,4 +61,6 @@
 #endif
 
+#include <sstream>
+
 G4Allocator<G4RichTrajectoryPoint> aRichTrajectoryPointAllocator;
 
@@ -79,5 +81,7 @@
   fpProcess(0),
   fPreStepPointGlobalTime(aTrack->GetGlobalTime()),
-  fPostStepPointGlobalTime(aTrack->GetGlobalTime())
+  fPostStepPointGlobalTime(aTrack->GetGlobalTime()),
+  fpPreStepPointVolume(aTrack->GetTouchableHandle()),
+  fpPostStepPointVolume(aTrack->GetNextTouchableHandle())
 {}
 
@@ -97,4 +101,6 @@
   fPreStepPointGlobalTime = preStepPoint->GetGlobalTime();
   fPostStepPointGlobalTime = postStepPoint->GetGlobalTime();
+  fpPreStepPointVolume = preStepPoint->GetTouchableHandle();
+  fpPostStepPointVolume = postStepPoint->GetTouchableHandle();
 
   /*
@@ -183,6 +189,24 @@
     (*store)[ID] = G4AttDef(ID,"Post-step-point global time",
 			    "Physics","G4BestUnit","G4double");
+    ID = "PreVPath";
+    (*store)[ID] = G4AttDef(ID,"Pre-step Volume Path",
+                            "Physics","","G4String");
+    ID = "PostVPath";
+    (*store)[ID] = G4AttDef(ID,"Post-step Volume Path",
+                            "Physics","","G4String");
   }
   return store;
+}
+
+static G4String Path(const G4TouchableHandle& th)
+{
+  std::ostringstream oss;
+  G4int depth = th->GetHistoryDepth();
+  for (G4int i = depth; i >= 0; --i) {
+    oss << th->GetVolume(i)->GetName()
+	<< ':' << th->GetCopyNumber(i);
+    if (i != 0) oss << '/';
+  }
+  return oss.str();
 }
 
@@ -223,4 +247,16 @@
     (G4AttValue("PostT",G4BestUnit(fPostStepPointGlobalTime,"Time"),""));
 
+  if (fpPreStepPointVolume && fpPreStepPointVolume->GetVolume()) {
+    values->push_back(G4AttValue("PreVPath",Path(fpPreStepPointVolume),""));
+  } else {
+    values->push_back(G4AttValue("PreVPath","None",""));
+  }
+
+  if (fpPostStepPointVolume && fpPostStepPointVolume->GetVolume()) {
+    values->push_back(G4AttValue("PostVPath",Path(fpPostStepPointVolume),""));
+  } else {
+    values->push_back(G4AttValue("PostVPath","None",""));
+  }
+
 #ifdef G4ATTDEBUG
   G4cout << G4AttCheck(values,GetAttDefs());
Index: trunk/source/tracking/src/G4SmoothTrajectory.cc
===================================================================
--- trunk/source/tracking/src/G4SmoothTrajectory.cc	(revision 1202)
+++ trunk/source/tracking/src/G4SmoothTrajectory.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SmoothTrajectory.cc,v 1.19 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //
Index: trunk/source/tracking/src/G4SmoothTrajectoryPoint.cc
===================================================================
--- trunk/source/tracking/src/G4SmoothTrajectoryPoint.cc	(revision 1202)
+++ trunk/source/tracking/src/G4SmoothTrajectoryPoint.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SmoothTrajectoryPoint.cc,v 1.15 2006/06/29 21:16:01 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //
Index: trunk/source/tracking/src/G4SteppingManager.cc
===================================================================
--- trunk/source/tracking/src/G4SteppingManager.cc	(revision 1202)
+++ trunk/source/tracking/src/G4SteppingManager.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SteppingManager.cc,v 1.50 2009/02/27 08:09:50 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4SteppingManager2.cc
===================================================================
--- trunk/source/tracking/src/G4SteppingManager2.cc	(revision 1202)
+++ trunk/source/tracking/src/G4SteppingManager2.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SteppingManager2.cc,v 1.37 2009/09/25 00:23:41 gum Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4SteppingVerbose.cc
===================================================================
--- trunk/source/tracking/src/G4SteppingVerbose.cc	(revision 1202)
+++ trunk/source/tracking/src/G4SteppingVerbose.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4SteppingVerbose.cc,v 1.23 2006/07/14 14:13:57 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4TrackingManager.cc
===================================================================
--- trunk/source/tracking/src/G4TrackingManager.cc	(revision 1202)
+++ trunk/source/tracking/src/G4TrackingManager.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4TrackingManager.cc,v 1.22 2006/11/14 10:58:47 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4TrackingMessenger.cc
===================================================================
--- trunk/source/tracking/src/G4TrackingMessenger.cc	(revision 1202)
+++ trunk/source/tracking/src/G4TrackingMessenger.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4TrackingMessenger.cc,v 1.15 2006/11/03 11:13:38 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4Trajectory.cc
===================================================================
--- trunk/source/tracking/src/G4Trajectory.cc	(revision 1202)
+++ trunk/source/tracking/src/G4Trajectory.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4Trajectory.cc,v 1.33 2009/11/12 09:09:56 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 // ---------------------------------------------------------------
Index: trunk/source/tracking/src/G4TrajectoryPoint.cc
===================================================================
--- trunk/source/tracking/src/G4TrajectoryPoint.cc	(revision 1202)
+++ trunk/source/tracking/src/G4TrajectoryPoint.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4TrajectoryPoint.cc,v 1.19 2006/06/29 21:16:15 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 // ---------------------------------------------------------------
Index: trunk/source/tracking/src/G4UserSteppingAction.cc
===================================================================
--- trunk/source/tracking/src/G4UserSteppingAction.cc	(revision 1202)
+++ trunk/source/tracking/src/G4UserSteppingAction.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4UserSteppingAction.cc,v 1.10 2006/06/29 21:16:17 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 // ---------------------------------------------------------------
Index: trunk/source/tracking/src/G4UserTrackingAction.cc
===================================================================
--- trunk/source/tracking/src/G4UserTrackingAction.cc	(revision 1202)
+++ trunk/source/tracking/src/G4UserTrackingAction.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4UserTrackingAction.cc,v 1.10 2006/06/29 21:16:19 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 // ---------------------------------------------------------------
Index: trunk/source/tracking/src/G4VSteppingVerbose.cc
===================================================================
--- trunk/source/tracking/src/G4VSteppingVerbose.cc	(revision 1202)
+++ trunk/source/tracking/src/G4VSteppingVerbose.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VSteppingVerbose.cc,v 1.18 2006/11/14 10:58:47 tsasaki Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
Index: trunk/source/tracking/src/G4VTrajectory.cc
===================================================================
--- trunk/source/tracking/src/G4VTrajectory.cc	(revision 1202)
+++ trunk/source/tracking/src/G4VTrajectory.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VTrajectory.cc,v 1.12 2006/10/16 13:45:01 allison Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 // ---------------------------------------------------------------
Index: trunk/source/tracking/src/G4VTrajectoryPoint.cc
===================================================================
--- trunk/source/tracking/src/G4VTrajectoryPoint.cc	(revision 1202)
+++ trunk/source/tracking/src/G4VTrajectoryPoint.cc	(revision 1228)
@@ -26,5 +26,5 @@
 //
 // $Id: G4VTrajectoryPoint.cc,v 1.4 2006/06/29 21:16:26 gunter Exp $
-// GEANT4 tag $Name: geant4-09-03-cand-01 $
+// GEANT4 tag $Name: geant4-09-03 $
 //
 //---------------------------------------------------------------
