Loading...
Searching...
No Matches
Public Member Functions | List of all members
Par02TrackingAction Class Reference

Tracking action (before/after track processing). More...

#include <Doxymodules_parameterisations.h>

Inheritance diagram for Par02TrackingAction:
G4UserTrackingAction

Public Member Functions

 Par02TrackingAction ()
 A default constructor.
 
virtual ~Par02TrackingAction ()
 
virtual void PreUserTrackingAction (const G4Track *track)
 Defines the actions at the start of processing the track.
 
virtual void PostUserTrackingAction (const G4Track *track)
 Defines the actions at the end of processing the track.
 

Detailed Description

Tracking action (before/after track processing).

Defines the action at the start and at the end of processing of each track. The class needs to be set in G4RunManager::SetUserAction().

Author
Anna Zaborowska

Definition at line 50 of file Doxymodules_parameterisations.h.

Constructor & Destructor Documentation

◆ Par02TrackingAction()

Par02TrackingAction::Par02TrackingAction ( )

A default constructor.

Definition at line 47 of file Par02TrackingAction.cc.

◆ ~Par02TrackingAction()

Par02TrackingAction::~Par02TrackingAction ( )
virtualdefault

Member Function Documentation

◆ PreUserTrackingAction()

void Par02TrackingAction::PreUserTrackingAction ( const G4Track track)
virtual

Defines the actions at the start of processing the track.

It checks the pseudorapidity range and if the particle is a primary.

Definition at line 55 of file Par02TrackingAction.cc.

55 {
56 // Kill the tracks that have a small transverse momentum or that are not
57 // in the central region.
58 if ( aTrack->GetMomentum().perp() < 1.0*MeV ||
59 std::abs( aTrack->GetMomentum().pseudoRapidity() ) > 5.5 ) {
60 ( (G4Track*) aTrack )->SetTrackStatus( fStopAndKill );
61 }
62}

◆ PostUserTrackingAction()

void Par02TrackingAction::PostUserTrackingAction ( const G4Track track)
virtual

Defines the actions at the end of processing the track.

It saves the information of MC data (PDG code, initial momentum), tracker (momentum), EMCal and HCal (energy deposit and its position) as well as resolution and efficiency for all the detectors.

Definition at line 66 of file Par02TrackingAction.cc.

66 {
67 if ( aTrack->GetTrackStatus() == fStopAndKill && aTrack->GetParentID() == 0 ) {
69 aTrack->GetDynamicParticle()->GetPrimaryParticle()->GetUserInformation();
70 //info->Print();
72 info->GetPartID(),
73 info->GetPDG(),
74 info->GetMCMomentum()/MeV );
76 info->GetPartID(),
77 info->GetPDG(),
78 info->GetTrackerMomentum()/MeV,
79 info->GetTrackerResolution(),
80 info->GetTrackerEfficiency() );
82 info->GetPartID(),
83 info->GetPDG(),
84 info->GetEMCalPosition()/mm,
85 info->GetEMCalResolution(),
86 info->GetEMCalEfficiency(),
87 info->GetEMCalEnergy()/MeV );
89 info->GetPartID(),
90 info->GetPDG(),
91 info->GetHCalPosition()/mm,
92 info->GetHCalResolution(),
93 info->GetHCalEfficiency(),
94 info->GetHCalEnergy()/MeV );
95 }
96}
void SaveTrack(SaveType aWhatToSave, G4int aPartID, G4int aPDG, G4ThreeVector aVector, G4double aResolution=0, G4double aEfficiency=1, G4double aEnergy=0)
Saves the information about the particle (track).
static Par02Output * Instance()
Allows the access to the unique Par02Output object.

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

Applications | User Support | Publications | Collaboration