ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsValidationTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_FATRASTOOLS_PHYSICSVALIDATIONTOOL_H
6#define ISF_FATRASTOOLS_PHYSICSVALIDATIONTOOL_H
7
8// Athena Base
10#include "GaudiKernel/ToolHandle.h"
11#include "GaudiKernel/ITHistSvc.h"
14
15// iFatras
17
18// Tracking
22
23#ifndef MAXCHILDREN
24#define MAXCHILDREN 40
25#endif
26
27// ROOT forward declarations
28class TTree;
29
30namespace ISF {
31 class ISFParticle;
32}
33
34namespace iFatras
35{
42
43 class ATLAS_NOT_THREAD_SAFE PhysicsValidationTool : public extends<AthAlgTool, IPhysicsValidationTool> // deprecated: ATLASSIM-6020
44 {
45 public:
47 PhysicsValidationTool(const std::string&,const std::string&,const IInterface*);
48
50 virtual ~PhysicsValidationTool ();
51
53 virtual StatusCode initialize() override;
54
56 virtual
57 void saveISFParticleInfo(const ISF::ISFParticle& isp, int endProcess, const Trk::TrackParameters* ePar, double time, double dX0 ) const override;
58
60 virtual
62 Trk::ExtrapolationCode ecode ) const override;
63
65 virtual
67 Trk::ExtrapolationCode ecode ) const override;
68
69
70 virtual
72 Amg::Vector3D* primOut, const ISF::ISFParticleVector& children) const override;
73
74
75 private:
77 template <class T> StatusCode retrieveTool(ToolHandle<T>& thandle){
78 if (!thandle.empty() && thandle.retrieve().isFailure()){
79 ATH_MSG_FATAL( "[ fatras setup ] Cannot retrieve " << thandle << ". Abort.");
80 return StatusCode::FAILURE;
81 }
82 else {
83 ATH_MSG_DEBUG("[ fatras setup ] Successfully retrieved " << thandle);
84 }
85 return StatusCode::SUCCESS;
86 }
87
88 void saveInfo(const ISF::ISFParticle& isp) const;
89
90 /*---------------------------------------------------------------------
91 * Private members
92 *---------------------------------------------------------------------*/
93
95 std::string m_validationStream;
97
98 // FIXME mutable variables are not thread-safe.
99 TTree *m_particles = nullptr;
100 mutable int m_pdg = 0;
101 mutable int m_scIn = 0;
102 mutable int m_scEnd = 0;
103 mutable int m_gen = 0;
104 mutable int m_geoID = 0;
105 mutable float m_pth = 0.0F;
106 mutable float m_pph = 0.0F;
107 mutable float m_p = 0.0F;
108 mutable float m_eloss;
109 mutable float m_ionloss;
110 mutable float m_radloss;
111 mutable float m_zOaTr;
112 mutable float m_wZ;
113 mutable float m_thIn;
114 mutable float m_phIn;
115 mutable float m_dIn;
116 mutable float m_thEnd;
117 mutable float m_phEnd;
118 mutable float m_dEnd;
119 mutable float m_X0;
120 mutable float m_dt;
121
123 mutable int m_process;
124 mutable int m_pdg_mother;
125 mutable int m_gen_mother;
126 mutable int m_nChild;
127 mutable float m_vtx_dist;
128 mutable float m_vtx_theta;
129 mutable float m_vtx_phi;
130 mutable float m_vtx_e_diff;
131 mutable float m_vtx_p_diff;
132 mutable float m_vtx_plong_diff;
133 mutable float m_vtx_pperp_diff;
134 mutable float m_p_mother;
135 mutable int m_pdg_child[MAXCHILDREN]{}; // decay product pdg code
136 mutable float m_fp_child[MAXCHILDREN]{}; // fraction of incoming momentum
137 mutable float m_oa_child[MAXCHILDREN]{}; // opening angle wrt the mother
138
139 };
140}
141
142#endif // FATRASTOOLS_TRANSPORTTOOL_H
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
#define MAXCHILDREN
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
The generic ISF particle definition,.
Definition ISFParticle.h:42
templated class as an input-output object of the extrapolation, only public members,...
virtual void saveISFParticleInfo(const ISF::ISFParticle &isp, int endProcess, const Trk::TrackParameters *ePar, double time, double dX0) const override
ISFParticle info: old transport tool.
virtual void saveISFVertexInfo(int process, Amg::Vector3D vertex, const ISF::ISFParticle &isp, Amg::Vector3D primIn, Amg::Vector3D *primOut, const ISF::ISFParticleVector &children) const override
TTree * m_interactions
ROOT tree containing vertex info.
StatusCode retrieveTool(ToolHandle< T > &thandle)
templated Tool retrieval - gives unique handling & look and feel
PhysicsValidationTool(const std::string &, const std::string &, const IInterface *)
Constructor.
std::string m_validationStream
validation THist stream name
TTree * m_particles
Validation output TTree (+variables)
ServiceHandle< ITHistSvc > m_thistSvc
the histogram service
const std::string process
Eigen::Matrix< double, 3, 1 > Vector3D
ISFParticleOrderedQueue.
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
ParametersBase< TrackParametersDim, Charged > TrackParameters
void initialize()