/home/cern/BDSIM_new/src/BDSUserTrackingAction.cc

00001 /* BDSIM code.    Version 1.0
00002    Author: Grahame A. Blair, Royal Holloway, Univ. of London.
00003    Last modified 24.7.2002
00004    Copyright (c) 2002 by G.A.Blair.  ALL RIGHTS RESERVED. 
00005 */
00006 
00007 const int DEBUG = 0;
00008 
00009 #include "BDSGlobalConstants.hh"
00010 
00011 #include "BDSUserTrackingAction.hh"
00012 #include "G4TrackingManager.hh"
00013 #include "G4Track.hh"
00014 
00015 //#include "BDSNeutronTrackInfo.hh"
00016 
00017 void BDSUserTrackingAction::PreUserTrackingAction(const G4Track* aTrack)
00018 {
00019   
00020   // store muon trajectories
00021   if(BDSGlobals->GetStoreMuonTrajectories())
00022     {
00023       if (DEBUG) G4cout<<"STORING MUON TRAJECTORIES"<<G4endl;
00024 
00025       if( abs(aTrack->GetDefinition()->GetPDGEncoding())==13)
00026         { fpTrackingManager->SetStoreTrajectory(true); }
00027       else
00028         { fpTrackingManager->SetStoreTrajectory(false); }
00029     }
00030 
00031   // store neutron trajectories
00032   if(BDSGlobals->GetStoreNeutronTrajectories())
00033     {
00034       if (DEBUG) G4cout<<"STORING NEUTRON TRAJECTORIES"<<G4endl;
00035         
00036       if( abs(aTrack->GetDefinition()->GetPDGEncoding())==2112)
00037         { fpTrackingManager->SetStoreTrajectory(true); }
00038       else
00039         { fpTrackingManager->SetStoreTrajectory(false); }
00040     }
00041     
00042     
00043   // store trajectories for primaries
00044   if(BDSGlobals->GetStoreTrajectory())
00045     { 
00046       if (DEBUG) G4cout<<"STORING PRIMARY TRAJECTORIES"<<G4endl;
00047 
00048       if(aTrack->GetParentID()==0)
00049         { fpTrackingManager->SetStoreTrajectory(true); }
00050       else
00051         { fpTrackingManager->SetStoreTrajectory(false); }
00052     }
00053  
00054 
00055   /*
00056     if(aTrack->GetDefinition()->GetParticleName()=="neutron")
00057     {
00058     BDSNeutronTrackInfo* Info= new BDSNeutronTrackInfo();
00059     Info->SetIsLogged(false);
00060     fpTrackingManager->SetUserTrackInformation(Info);
00061     }
00062   */
00063   
00064 }
00065 
00066 BDSUserTrackingAction::~BDSUserTrackingAction()
00067 {;}
00068 
00069 

Generated on Wed Mar 5 17:25:23 2008 for BDSIM by  doxygen 1.5.3