Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WLSTrackingAction Class Reference

#include <WLSTrackingAction.hh>

Inheritance diagram for WLSTrackingAction:
Collaboration diagram for WLSTrackingAction:

Public Member Functions

 WLSTrackingAction ()
 
virtual ~WLSTrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
- Public Member Functions inherited from G4UserTrackingAction
 G4UserTrackingAction ()
 
virtual ~G4UserTrackingAction ()
 
virtual void SetTrackingManagerPointer (G4TrackingManager *pValue)
 
virtual void PostUserTrackingAction (const G4Track *)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserTrackingAction
G4TrackingManagerfpTrackingManager
 

Detailed Description

Definition at line 40 of file WLSTrackingAction.hh.

Constructor & Destructor Documentation

WLSTrackingAction::WLSTrackingAction ( )
inline

Definition at line 44 of file WLSTrackingAction.hh.

44 { };
virtual WLSTrackingAction::~WLSTrackingAction ( )
inlinevirtual

Definition at line 45 of file WLSTrackingAction.hh.

45 { };

Member Function Documentation

void WLSTrackingAction::PreUserTrackingAction ( const G4Track aTrack)
virtual

Reimplemented from G4UserTrackingAction.

Definition at line 47 of file WLSTrackingAction.cc.

48 {
49  //Let this be up to the user via vis.mac
50  // fpTrackingManager->SetStoreTrajectory(true);
51 
52  //Use custom trajectory class
54 
55  WLSUserTrackInformation* trackInformation = new WLSUserTrackInformation();
56 
57  if (aTrack->GetMomentumDirection().z()>0.0) {
58  trackInformation->AddStatusFlag(right);
59  } else {
60  trackInformation->AddStatusFlag(left);
61  }
62 
63  G4String PVName = aTrack->GetVolume()->GetName();
64 
65  if (PVName == "WLSFiber" || PVName == "Clad1" || PVName == "Clad2")
66  trackInformation->AddStatusFlag(InsideOfFiber);
67 
68  fpTrackingManager->SetUserTrackInformation(trackInformation);
69 }
G4TrackingManager * fpTrackingManager
G4bool AddStatusFlag(TrackStatus s)
double z() const
void SetUserTrackInformation(G4VUserTrackInformation *aValue)
const G4String & GetName() const
const G4ThreeVector & GetMomentumDirection() const
G4VPhysicalVolume * GetVolume() const
void SetTrajectory(G4VTrajectory *aTrajectory)

Here is the call graph for this function:


The documentation for this class was generated from the following files: