ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
LXeTrackingAction.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file LXeTrackingAction.cc
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
//
29
//
30
//
31
#include "
LXeTrajectory.hh
"
32
#include "
LXeTrackingAction.hh
"
33
#include "
LXeUserTrackInformation.hh
"
34
#include "
LXeDetectorConstruction.hh
"
35
36
#include "
G4TrackingManager.hh
"
37
#include "
G4Track.hh
"
38
#include "
G4ParticleTypes.hh
"
39
40
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42
LXeTrackingAction::LXeTrackingAction
()
43
{}
44
45
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
47
void
LXeTrackingAction::PreUserTrackingAction
(
const
G4Track
* aTrack)
48
{
49
//Let this be up to the user via vis.mac
50
// fpTrackingManager->SetStoreTrajectory(true);
51
52
//Use custom trajectory class
53
fpTrackingManager
->
SetTrajectory
(
new
LXeTrajectory
(aTrack));
54
55
//This user track information is only relevant to the photons
56
fpTrackingManager
->
SetUserTrackInformation
(
new
LXeUserTrackInformation
);
57
58
/* const G4VProcess* creator = aTrack->GetCreatorProcess();
59
if(creator)
60
G4cout<<creator->GetProcessName()<<G4endl;
61
*/
62
}
63
64
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
66
void
LXeTrackingAction::PostUserTrackingAction
(
const
G4Track
* aTrack){
67
LXeTrajectory
* trajectory =
68
(
LXeTrajectory
*)
fpTrackingManager
->
GimmeTrajectory
();
69
LXeUserTrackInformation
*
70
trackInformation=(
LXeUserTrackInformation
*)aTrack->
GetUserInformation
();
71
72
//Lets choose to draw only the photons that hit the sphere and a pmt
73
if
(aTrack->
GetDefinition
()==
G4OpticalPhoton::OpticalPhotonDefinition
()){
74
75
const
G4VProcess
* creator=aTrack->
GetCreatorProcess
();
76
if
(creator && creator->
GetProcessName
()==
"OpWLS"
){
77
trajectory->
WLS
();
78
trajectory->
SetDrawTrajectory
(
true
);
79
}
80
81
if
(
LXeDetectorConstruction::GetSphereOn
()){
82
if
((trackInformation->
GetTrackStatus
()&
hitPMT
)&&
83
(trackInformation->
GetTrackStatus
()&
hitSphere
)){
84
trajectory->
SetDrawTrajectory
(
true
);
85
}
86
}
87
else
{
88
if
(trackInformation->
GetTrackStatus
()&
hitPMT
)
89
trajectory->
SetDrawTrajectory
(
true
);
90
}
91
}
92
else
//draw all other trajectories
93
trajectory->
SetDrawTrajectory
(
true
);
94
95
if
(trackInformation->
GetForceDrawTrajectory
())
96
trajectory->
SetDrawTrajectory
(
true
);
97
}
geant4
tree
geant4-10.6-release
examples
extended
optical
LXe
src
LXeTrackingAction.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:08
using
1.8.2 with
ECCE GitHub integration