Print

Print


Commit in slic on MAIN
include/TrajectoryManager.hh+13-11.26 -> 1.27
src/TrajectoryManager.cc+32-281.39 -> 1.40
+45-29
2 modified files


slic/include
TrajectoryManager.hh 1.26 -> 1.27
diff -u -r1.26 -r1.27
--- TrajectoryManager.hh	21 Sep 2005 00:11:44 -0000	1.26
+++ TrajectoryManager.hh	21 Sep 2005 21:16:03 -0000	1.27
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/include/TrajectoryManager.hh,v 1.26 2005/09/21 00:11:44 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/TrajectoryManager.hh,v 1.27 2005/09/21 21:16:03 jeremy Exp $
 #ifndef slic_TrajectoryManager_hh
 #define slic_TrajectoryManager_hh 1
 
@@ -234,6 +234,16 @@
       return m_currentTrajectory;
     }
 
+    inline const G4Track* getCurrentTrack() const
+    {
+      return m_currentTrack;
+    }
+
+    inline G4int getCurrentTrackID() const
+    {
+      return m_currentTrackID;
+    }
+
   protected:
     TrajectoryManager();
 
@@ -243,6 +253,8 @@
     G4TrackingManager* m_trackingManager;
     TrackIDToTrajectoryMap m_trackIDToTrajectory;
     Trajectory* m_currentTrajectory;
+    const G4Track* m_currentTrack;
+    G4int m_currentTrackID;
   };
 };
 

slic/src
TrajectoryManager.cc 1.39 -> 1.40
diff -u -r1.39 -r1.40
--- TrajectoryManager.cc	21 Sep 2005 00:11:43 -0000	1.39
+++ TrajectoryManager.cc	21 Sep 2005 21:16:03 -0000	1.40
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/TrajectoryManager.cc,v 1.39 2005/09/21 00:11:43 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/TrajectoryManager.cc,v 1.40 2005/09/21 21:16:03 jeremy Exp $
 
 // SLIC
 #include "TrajectoryManager.hh"
@@ -28,11 +28,16 @@
   TrajectoryManager::TrajectoryManager()
     : Module("TrajectoryManager"),
       m_trackingManager(0),
-      m_currentTrajectory(0)
+      m_currentTrajectory(0),
+      m_currentTrack(0),
+      m_currentTrackID(-1)
   {}
 
   void TrajectoryManager::preTracking(const G4Track* aTrack)
   {
+    m_currentTrack = aTrack;
+    m_currentTrackID = aTrack->GetTrackID();
+
     // DEBUG: print track ID
 #ifdef SLIC_VERBOSE
     if ( verbose() ) {
@@ -177,9 +182,9 @@
   }
 
   /*
-     Called in PreTracking to set status flags and
-     decide whether or not to create a trj for
-     this secondary particle.
+    Called in PreTracking to set status flags and
+    decide whether or not to create a trj for
+    this secondary particle.
   */
   void TrajectoryManager::handleSecondaryTrack(const G4Track* aTrack)
   {
@@ -201,8 +206,8 @@
 	}
 
 	/*
-	   Check if below threshold and continuous process creation,
-	   i.e. not an endp dau.
+	  Check if below threshold and continuous process creation,
+	  i.e. not an endp dau.
 	*/
 	else if ( isBelowThreshold( aTrack ) &&
 		  trkInfo->getVertexIsNotEndpointOfParent() ) {
@@ -210,8 +215,8 @@
 	}
 
 	/*
-	   Process of elimination: above threshold and not backscatter,
-	   so requires a new trajectory and trkInfo.
+	  Process of elimination: above threshold and not backscatter,
+	  so requires a new trajectory and trkInfo.
 	*/
 	else {
 
@@ -223,26 +228,25 @@
 	}
 
 
-	// DEBUG
 	/*
-	  if ( trkInfo != TrackInformation::getTrackInformation( aTrack ) ) {
-	  std::cout << "WARNING: track info was reset" << std::endl;
+	// DEBUG
+	if ( trkInfo != TrackInformation::getTrackInformation( aTrack ) ) {
+	std::cout << "WARNING: track info was reset" << std::endl;
 
-	  std::cout << std::endl;
-	  std::cout << "old flags" << std::endl;
-	  printStatusFlags( trkInfo );
-	  std::cout << std::endl;
-
-	  std::cout << "new flags" << std::endl;
-	  printStatusFlags( TrackInformation::getTrackInformation( aTrack ) );
-	  std::cout << std::endl;
-	  }
+	std::cout << std::endl;
+	std::cout << "old flags" << std::endl;
+	printStatusFlags( trkInfo );
+	std::cout << std::endl;
+
+	std::cout << "new flags" << std::endl;
+	printStatusFlags( TrackInformation::getTrackInformation( aTrack ) );
+	std::cout << std::endl;
+	}
 	*/
-	//
 
 	/*
-	   Set flag for in tracking region, re-getting track info,
-	   because may have been recreated above.
+	  Set flag for in tracking region, re-getting track info,
+	  because may have been recreated above.
 	*/
 	TrackInformation::getTrackInformation( aTrack )
 	  ->setTrackingStatus( TrackInformation::eInTrackingRegion );
@@ -278,16 +282,16 @@
     newTrkInfo->setVertexIsNotEndpointOfParent( oldTrkInfo->getVertexIsNotEndpointOfParent() );
 
     /*
-       Delete old track info to avoid mem leak.
+      Delete old track info to avoid mem leak.
     */
     delete oldTrkInfo;
     oldTrkInfo = 0;
     //}
 
     /*
-       Set original tracking status; it must be tracking, because otherwise
-       would not be calling this function.  (By definition, secondary tracks
-       do not get trajectories in non-tracking regions.)
+      Set original tracking status; it must be tracking, because otherwise
+      would not be calling this function.  (By definition, secondary tracks
+      do not get trajectories in non-tracking regions.)
     */
     newTrkInfo->setOriginalTrackingStatus( TrackInformation::eInTrackingRegion );
 
CVSspam 0.2.8