Loading...
Searching...
No Matches
Par02TrackingAction.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27/// \file Par02TrackingAction.cc
28/// \brief Implementation of the Par02TrackingAction class
29
33#include "Par02Output.hh"
34
35#include "G4ThreeVector.hh"
36#include "G4EventManager.hh"
37#include "G4RunManager.hh"
38
39#include "Randomize.hh"
40#include "G4SystemOfUnits.hh"
41#include "G4TrackingManager.hh"
42#include <iomanip>
43#include <vector>
44
45//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
48
49//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50
52
53//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54
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}
63
64//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
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}
97
98//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99
Definition of the Par02EventInformation class.
Definition of the Par02Output class.
Definition of the Par02PrimaryParticleInformation class.
Definition of the Par02TrackingAction class.
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.
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.
Par02TrackingAction()
A default constructor.

Applications | User Support | Publications | Collaboration