ATLAS Offline Software
Loading...
Searching...
No Matches
GeantFollowerMSHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// GeantFollowerMSHelper.h, (c) ATLAS Detector software
8#ifndef GeantFollowerMSHelper_H
9#define GeantFollowerMSHelper_H
10
13#include "GaudiKernel/ToolHandle.h"
14#include "GaudiKernel/ServiceHandle.h"
18#include "G4ThreeVector.hh" //is a typedef to CLHEP::Hep3Vector
19
20class TTree;
21
22namespace Trk
23{
24
25 class IExtrapolator;
26
27 class Track;
28 class MeasurementBase;
31
32 class GeantFollowerMSHelper : public extends<AthAlgTool, IGeantFollowerMSHelper>
33 {
34
35 public:
36
37 static constexpr int MAXPROBES{50000};
38
39 // constructor, destructor
40 GeantFollowerMSHelper(const std::string&,const std::string&,const IInterface*);
42
43 // Athena hooks
44 virtual StatusCode initialize() override;
45 virtual StatusCode finalize () override;
46
47 // Follower interface
48 // a) begin event - initialize follower process
49 virtual void beginEvent() override;
50 // b) track the particle
51 virtual void trackParticle(const G4ThreeVector& pos, const G4ThreeVector& mom, int pdg, double charge, float t, float X0) override;
52
54 std::vector<const Trk::TrackStateOnSurface*>
55 modifyTSOSvector(const std::vector<const Trk::TrackStateOnSurface*>& matvec,
56 double scaleX0, double scaleEloss, bool reposition,
57 bool aggregate, bool updateEloss, double caloEnergy,
58 double caloEnergyError, double pCaloEntry,
59 double momentumError, double & Eloss_tot) const;
60
61 // c) end event - ntuple writing
62 virtual void endEvent() override;
63
64 private:
65
66 ToolHandle<IExtrapolator> m_extrapolator;
67 PublicToolHandle<IEnergyLossUpdator> m_elossupdator
68 {this,"EnergyLossUpdator","Trk::EnergyLossUpdator/AtlasEnergyLossUpdator",""};
69
74 bool m_useIDExit; // used for validating the ID and Calo tracking
75
81
85
86 // put some validation code is
90
96 struct TreeData {
97 float m_t_x {0};
98 float m_t_y {0};
99 float m_t_z {0};
100 float m_t_theta {0};
101 float m_t_eta {0};
102 float m_t_phi {0};
103 float m_t_p {0};
104 float m_t_charge {0};
105 int m_t_pdg {0};
106 float m_m_x {0};
107 float m_m_y {0};
108 float m_m_z {0};
109 float m_m_theta {0};
110 float m_m_eta {0};
111 float m_m_phi {0};
112 float m_m_p {0};
113 float m_b_x {0};
114 float m_b_y {0};
115 float m_b_z {0};
116 float m_b_theta {0};
117 float m_b_eta {0};
118 float m_b_phi {0};
119 float m_b_p {0};
120 float m_b_X0 {0};
121 float m_b_Eloss {0};
123 int m_g4_steps {0};
124 float m_g4_p[MAXPROBES] {0};
125 float m_g4_eta[MAXPROBES] {0};
127 float m_g4_phi[MAXPROBES] {0};
128 float m_g4_x[MAXPROBES] {0};
129 float m_g4_y[MAXPROBES] {0};
130 float m_g4_z[MAXPROBES] {0};
131 float m_g4_tX0[MAXPROBES] {0};
132 float m_g4_t[MAXPROBES] {0};
133 float m_g4_X0[MAXPROBES] {0};
136 float m_trk_p[MAXPROBES] {0};
140 float m_trk_x[MAXPROBES] {0};
141 float m_trk_y[MAXPROBES] {0};
142 float m_trk_z[MAXPROBES] {0};
143 float m_trk_lx[MAXPROBES] {0};
144 float m_trk_ly[MAXPROBES] {0};
152 float m_trk_x0[MAXPROBES] {0};
159 int m_trk_scats {0};
160 int m_trk_sstatus[500] {0};
161 float m_trk_sx[500] {0};
162 float m_trk_sy[500] {0};
163 float m_trk_sz[500] {0};
164 float m_trk_sx0[500] {0};
165 float m_trk_seloss[500] {0};
166 float m_trk_smeanIoni[500] {0};
167 float m_trk_ssigIoni[500] {0};
168 float m_trk_smeanRad[500] {0};
169 float m_trk_ssigRad[500] {0};
170 float m_trk_ssigTheta[500] {0};
171 float m_trk_ssigPhi[500] {0};
173 };
174 std::unique_ptr<TreeData> m_treeData;
175 };
176
177}
178
179#endif
double charge(const T &p)
Definition AtlasPID.h:997
const TrackParameters * m_parameterCacheCov
std::string m_validationTreeFolder
stream/folder to for the TTree to be written out
virtual StatusCode finalize() override
std::unique_ptr< TreeData > m_treeData
std::vector< const Trk::TrackStateOnSurface * > modifyTSOSvector(const std::vector< const Trk::TrackStateOnSurface * > &matvec, double scaleX0, double scaleEloss, bool reposition, bool aggregate, bool updateEloss, double caloEnergy, double caloEnergyError, double pCaloEntry, double momentumError, double &Eloss_tot) const
modify TSOS vector
const TrackParameters * m_parameterCache
TTree * m_validationTree
Root Validation Tree.
const TrackParameters * m_parameterCacheEntry
GeantFollowerMSHelper(const std::string &, const std::string &, const IInterface *)
std::string m_validationTreeName
validation tree name - to be acessed by this from root
virtual void trackParticle(const G4ThreeVector &pos, const G4ThreeVector &mom, int pdg, double charge, float t, float X0) override
std::string m_validationTreeDescription
validation tree description - second argument in TTree
ToolHandle< IExtrapolator > m_extrapolator
virtual void beginEvent() override
const TrackParameters * m_parameterCacheEntryCov
virtual StatusCode initialize() override
PublicToolHandle< IEnergyLossUpdator > m_elossupdator
Interface class for the extrapolation AlgTool, it inherits from IAlgTool Detailed information about p...
represents the full description of deflection and e-loss of a track in material.
This class is the pure abstract base class for all fittable tracking measurements.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
represents the track state (measurement, material, fit parameters and quality) at a surface.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< TrackParametersDim, Charged > TrackParameters
Ntuple variables : initial parameters Split this out into a separate, dynamically-allocated block.
int m_trk_scats
Scattering centra from Trk.
int m_trk_status[MAXPROBES]
Ntuple variables : trk follow up parameters.
int m_g4_steps
Ntuple variables : g4 step parameters.