slic/src
diff -u -r1.48 -r1.49
--- TrajectoryManager.cc 15 Oct 2009 00:06:54 -0000 1.48
+++ TrajectoryManager.cc 15 Oct 2009 19:14:17 -0000 1.49
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/TrajectoryManager.cc,v 1.48 2009/10/15 00:06:54 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/TrajectoryManager.cc,v 1.49 2009/10/15 19:14:17 jeremy Exp $
// slic
#include "TrajectoryManager.hh"
@@ -97,6 +97,7 @@
{
#ifdef SLIC_LOG
log() << LOG::verbose << "TrajectoryManager::postTracking()" << LOG::endl;
+ log() << LOG::verbose << " store trj <" << m_trackingManager->GetStoreTrajectory() << ">" << LOG::done;
#endif
// Check if needs manual setup. This can happen if the track is flagged as
@@ -105,7 +106,7 @@
{
#ifdef SLIC_LOG
- log() << LOG::verbose << " needs manual trajectory setup" << LOG::done;
+ log() << LOG::verbose << " manual trajectory setup activated" << LOG::done;
#endif
// Setup trajectory in default way.
@@ -129,7 +130,7 @@
log() << LOG::verbose << " store trajectory <" << m_trackingManager->GetStoreTrajectory() << ">" << LOG::done;
#endif
- // Store endpoint energy.
+ // Store the endpoint energy.
Trajectory* trj = static_cast<Trajectory*>( m_trackingManager->GimmeTrajectory() );
if ( 0 != trj )
{
@@ -222,27 +223,35 @@
#endif
trkInfo->setBelowThreshold( true );
}
- // Above threshold and not backscatter, so requires a new trajectory and trkInfo.
- else if ( !isBelowThreshold( aTrack ))
+ // Track requires a new trajectory and trkInfo.
+ // FIXME: Using threshold causes missing mcp contribs due to breaking parentage chain.
+ //if ( !isBelowThreshold( aTrack ) )
+ else
{
#ifdef SLIC_LOG
log() << LOG::verbose << " setup up trajectory in tracking" << LOG::endl;
#endif
- // setup secondary track info
+
+ // Setup the secondary's track information.
setupSecondaryTrackInformation( aTrack );
- // create the secondary trajectory
+ // Create the trajectory for this secondary.
createSecondaryTrajectory( aTrack );
}
- else
- {
- log() << LOG::verbose << " below threshold in tracking" << LOG::endl;
- }
+// else
+// {
+// if ( isBelowThreshold( aTrack ) )
+// {
+// #ifdef SLIC_LOG
+// log() << LOG::debug << " WARNING: Track is below threshold!" << LOG::endl;
+// #endif
+// }
+// }
// Set flag for type of region. Need to get track info again, because it may have been recreated above.
TrackInformation::getTrackInformation( aTrack )->setTrackingStatus( TrackInformation::eInTrackingRegion );
}
- // Track starts in a non-tracking region and will not be stored.
+ // Track starts in a non-tracking region and will not be stored unless it makes a tracker hit.
else
{
#ifdef SLIC_LOG
@@ -586,7 +595,7 @@
}
#ifdef SLIC_LOG
- log() << LOG::debug << "found numSecoAtEnd <" << numSecoAtEnd << ">" << LOG::endl;
+ log() << LOG::debug << " numSecoAtEndp <" << numSecoAtEnd << ">" << LOG::endl;
#endif
return numSecoAtEnd;
@@ -645,7 +654,9 @@
{
// set current seco track ptr
G4Track* seco = (*secondaries)[i];
+#ifdef SLIC_LOG
log() << LOG::debug << "secondary track <" << i << ">" << LOG::endl;
+#endif
printTrack( seco, true );
}
}
@@ -653,9 +664,9 @@
// find trajectory by track ID
Trajectory* TrajectoryManager::findTrajectory(G4int trkID)
{
-#ifdef SLIC_LOG
- log() << LOG::debug << "findTrajectory() - trkID <" << trkID << ">" << LOG::endl;
-#endif
+//#ifdef SLIC_LOG
+// log() << LOG::debug << "findTrajectory() - trkID <" << trkID << ">" << LOG::endl;
+//#endif
Trajectory* trj = 0;
TrackIDToTrajectoryMap::iterator iter;
@@ -667,16 +678,16 @@
trj = iter->second;
}
-#ifdef SLIC_LOG
- if ( trj )
- {
- log() << LOG::debug << "found trajectory" << LOG::endl;
- }
- else
- {
- log() << LOG::debug << "no trajectory found" << LOG::endl;
- }
-#endif
+//#ifdef SLIC_LOG
+// if ( trj )
+// {
+// log() << LOG::debug << "found trajectory" << LOG::endl;
+// }
+// else
+// {
+// log() << LOG::debug << "no trajectory found" << LOG::endl;
+// }
+//#endif
return trj;
}