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

#include <TrackingAction.hh>

Inheritance diagram for TrackingAction:
Collaboration diagram for TrackingAction:

Public Member Functions

 TrackingAction (DetectorConstruction *)
 
 ~TrackingAction ()
 
void PreUserTrackingAction (const G4Track *)
 
void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (DetectorConstruction *detector=0)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
void SetDetector (DetectorConstruction *detector)
 
std::map< const
G4ParticleDefinition *, int > & 
GetNParticlesCreatedInTarget ()
 
std::map< const
G4ParticleDefinition *, int > & 
GetNParticlesCreatedInWorld ()
 
 TrackingAction (PrimaryGeneratorAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (DetectorConstruction *)
 
 ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (PrimaryGeneratorAction *)
 
 ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
virtual ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (DetectorConstruction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (DetectorConstruction *, EventAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (DetectorConstruction *, RunAction *)
 
virtual ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
virtual ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (PrimaryGeneratorAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (RunAction *)
 
 ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
void UpdateTrackInfo (G4double, G4double, G4double)
 
 TrackingAction (EventAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (EventAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
virtual ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
virtual ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
void Initialize ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
std::map< const
G4ParticleDefinition *, int > & 
GetNParticlesCreatedInTarget ()
 
std::map< const
G4ParticleDefinition *, int > & 
GetNParticlesCreatedInWorld ()
 
 TrackingAction (PrimaryGeneratorAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (PrimaryGeneratorAction *)
 
 ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (PrimaryGeneratorAction *)
 
 ~TrackingAction ()
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (DetectorConstruction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
void AddEdepCavity (G4double de)
 
 TrackingAction ()
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
void AddEdepCavity (G4double de)
 
 TrackingAction ()
 
virtual ~TrackingAction ()
 
void PreUserTrackingAction (const G4Track *)
 
void PostUserTrackingAction (const G4Track *)
 
 TrackingAction (EventAction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
void SetFullChain (G4bool flag)
 
void SetTimeWindow (G4double, G4double)
 
 TrackingAction (DetectorConstruction *)
 
 ~TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *)
 
virtual void PostUserTrackingAction (const G4Track *)
 
- Public Member Functions inherited from G4UserTrackingAction
 G4UserTrackingAction ()
 
virtual ~G4UserTrackingAction ()
 
virtual void SetTrackingManagerPointer (G4TrackingManager *pValue)
 
- Public Member Functions inherited from RunInitObserver
 RunInitObserver ()
 
virtual ~RunInitObserver ()
 
 RunInitObserver ()
 
virtual ~RunInitObserver ()
 
 RunInitObserver ()
 
virtual ~RunInitObserver ()
 

Additional Inherited Members

- Protected Attributes inherited from G4UserTrackingAction
G4TrackingManagerfpTrackingManager
 

Detailed Description

Definition at line 41 of file TrackingAction.hh.

Constructor & Destructor Documentation

TrackingAction::TrackingAction ( DetectorConstruction det)

Definition at line 47 of file TrackingAction.cc.

48 :G4UserTrackingAction(),detector(det)
49 { }
TrackingAction::~TrackingAction ( )
inline

Definition at line 46 of file TrackingAction.hh.

46 {};
TrackingAction::TrackingAction ( DetectorConstruction detector = 0)
TrackingAction::~TrackingAction ( )
TrackingAction::TrackingAction ( PrimaryGeneratorAction prim)

Definition at line 47 of file TrackingAction.cc.

48 :G4UserTrackingAction(),fPrimary(prim)
49 { }
TrackingAction::~TrackingAction ( )
inline

Definition at line 47 of file TrackingAction.hh.

47 {};
TrackingAction::TrackingAction ( DetectorConstruction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( PrimaryGeneratorAction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( )

Definition at line 42 of file TrackingAction.cc.

virtual TrackingAction::~TrackingAction ( )
inlinevirtual

Definition at line 45 of file TrackingAction.hh.

45 {};
TrackingAction::TrackingAction ( DetectorConstruction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( DetectorConstruction DET,
EventAction EA 
)

Definition at line 49 of file TrackingAction.cc.

50 :G4UserTrackingAction(),fDetector(DET), fEventAction(EA)
51 {
52  fXstartAbs = fXendAbs = fPrimaryCharge = fDirX = 0.0;
53 }
TrackingAction::~TrackingAction ( )
inline

Definition at line 49 of file TrackingAction.hh.

49 {};
TrackingAction::TrackingAction ( DetectorConstruction det,
RunAction run 
)

Definition at line 41 of file TrackingAction.cc.

42 :G4UserTrackingAction(),fDetector(det), fRunAction(run)
43 {}
virtual TrackingAction::~TrackingAction ( )
virtual
TrackingAction::TrackingAction ( )
virtual TrackingAction::~TrackingAction ( )
virtual
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
inline

Definition at line 47 of file TrackingAction.hh.

47 { };
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
inline

Definition at line 47 of file TrackingAction.hh.

47 {};
TrackingAction::TrackingAction ( PrimaryGeneratorAction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 50 of file TrackingAction.hh.

50 {};
TrackingAction::TrackingAction ( RunAction run)

Definition at line 40 of file TrackingAction.cc.

42  fRunAction(run)
43 {}
TrackingAction::~TrackingAction ( )
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
inline

Definition at line 46 of file TrackingAction.hh.

46 {};
TrackingAction::TrackingAction ( EventAction event)

Definition at line 50 of file TrackingAction.cc.

51 :G4UserTrackingAction(), fEventAction(event)
52 { }
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
inline

Definition at line 46 of file TrackingAction.hh.

46 {};
TrackingAction::TrackingAction ( EventAction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( )
virtual TrackingAction::~TrackingAction ( )
virtual
TrackingAction::TrackingAction ( )
virtual TrackingAction::~TrackingAction ( )
inlinevirtual

Definition at line 34 of file TrackingAction.hh.

34 {}
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
TrackingAction::TrackingAction ( PrimaryGeneratorAction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( PrimaryGeneratorAction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( PrimaryGeneratorAction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};
TrackingAction::TrackingAction ( DetectorConstruction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 49 of file TrackingAction.hh.

49 {};
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
TrackingAction::TrackingAction ( )
TrackingAction::~TrackingAction ( )
TrackingAction::TrackingAction ( )
virtual TrackingAction::~TrackingAction ( )
virtual
TrackingAction::TrackingAction ( EventAction )
TrackingAction::~TrackingAction ( )
TrackingAction::TrackingAction ( DetectorConstruction )
TrackingAction::~TrackingAction ( )
inline

Definition at line 48 of file TrackingAction.hh.

48 {};

Member Function Documentation

void TrackingAction::AddEdepCavity ( G4double  de)
inline

Definition at line 51 of file TrackingAction.hh.

51 { fEdepCavity += de;};
void TrackingAction::AddEdepCavity ( G4double  de)
inline

Definition at line 53 of file TrackingAction.hh.

53 { fEdepCavity += de;};
std::map<const G4ParticleDefinition*, int>& TrackingAction::GetNParticlesCreatedInTarget ( )
inline

Definition at line 53 of file TrackingAction.hh.

54  {
55  return fNParticleInTarget;
56  }
std::map<const G4ParticleDefinition*, int>& TrackingAction::GetNParticlesCreatedInTarget ( )
inline

Definition at line 56 of file TrackingAction.hh.

57  {
58  return fNParticleInTarget;
59  }
std::map<const G4ParticleDefinition*, int>& TrackingAction::GetNParticlesCreatedInWorld ( )
inline

Definition at line 58 of file TrackingAction.hh.

59  {
60  return fNParticleInWorld;
61  }
std::map<const G4ParticleDefinition*, int>& TrackingAction::GetNParticlesCreatedInWorld ( )
inline

Definition at line 61 of file TrackingAction.hh.

62  {
63  return fNParticleInWorld;
64  }
void TrackingAction::Initialize ( )
virtual

Implements RunInitObserver.

Definition at line 114 of file TrackingAction.cc.

115 {
116  fpTargetRegion = G4RegionStore::GetInstance()->GetRegion("Target");
117 }
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
static G4RegionStore * GetInstance()

Here is the call graph for this function:

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

void TrackingAction::PostUserTrackingAction ( const G4Track track)
virtual

Reimplemented from G4UserTrackingAction.

Definition at line 58 of file TrackingAction.cc.

59 {
60  //compute leakage
61  //
62  // if not at World boundaries, return
63  if (track->GetVolume() != detector->GetPvolWorld()) return;
64 
65  //get position
66  G4double x = (track->GetPosition()).x();
67  G4double xlimit = 0.5*(detector->GetCalorThickness());
68  G4int icase = 2;
69  if (x >= xlimit) icase = 0;
70  else if (x <= -xlimit) icase = 1;
71 
72  //get particle energy
73  G4double Eleak = track->GetKineticEnergy();
74  if (track->GetDefinition() == G4Positron::Positron())
75  Eleak += 2*electron_mass_c2;
76 
77  //sum leakage
78  Run* run = static_cast<Run*>(
80  run->DetailedLeakage(icase,Eleak);
81 }
G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetPosition() const
tuple x
Definition: test.py:50
G4VPhysicalVolume * GetPvolWorld()
int G4int
Definition: G4Types.hh:78
G4double GetKineticEnergy() const
float electron_mass_c2
Definition: hepunit.py:274
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
static G4Positron * Positron()
Definition: G4Positron.cc:94
void DetailedLeakage(G4int, G4double)
Definition: Run.cc:106
G4VPhysicalVolume * GetVolume() const
double G4double
Definition: G4Types.hh:76
Definition: Run.hh:46
G4Run * GetNonConstCurrentRun() const

Here is the call graph for this function:

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

void TrackingAction::PostUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

void TrackingAction::PreUserTrackingAction ( const G4Track track)
virtual

Reimplemented from G4UserTrackingAction.

Definition at line 53 of file TrackingAction.cc.

54 { }
virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

virtual void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

void TrackingAction::PreUserTrackingAction ( const G4Track )
virtual

Reimplemented from G4UserTrackingAction.

void TrackingAction::SetDetector ( DetectorConstruction detector)
inline

Definition at line 48 of file TrackingAction.hh.

49  {
50  fDetector = detector;
51  }
void TrackingAction::SetFullChain ( G4bool  flag)
inline

Definition at line 54 of file TrackingAction.hh.

54 { fFullChain = flag;};

Here is the caller graph for this function:

void TrackingAction::SetTimeWindow ( G4double  t1,
G4double  dt 
)

Definition at line 70 of file TrackingAction.cc.

71 {
72  fTimeWindow1 = t1;
73  fTimeWindow2 = fTimeWindow1 + dt;
74 }
tuple t1
Definition: plottest35.py:33

Here is the caller graph for this function:

void TrackingAction::UpdateTrackInfo ( G4double  ekin,
G4double  trackl,
G4double  time 
)

Definition at line 61 of file TrackingAction.cc.

63 {
64  const G4double thermal = 1*eV;
65  if (ekin > thermal) {
66  fNbStep1++; fTrackLen1 = trackl; fTime1 = time;
67  } else {
68  fNbStep2++; fTrackLen2 = trackl - fTrackLen1; fTime2 = time - fTime1;
69  }
70 }
static constexpr double eV
Definition: G4SIunits.hh:215
double G4double
Definition: G4Types.hh:76

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