ATLAS Offline Software
Loading...
Searching...
No Matches
EnergyLossExtrapolationValidation.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// EnergyLossValidation.h, (c) ATLAS Detector software
8
9#ifndef TRKEXALGS_ENERGYLOSSEXTRAPOLATIONVALIDATION_H
10#define TRKEXALGS_ENERGYLOSSEXTRAPOLATIONVALIDATION_H
11
12// Gaudi includes
14#include "GaudiKernel/MsgStream.h"
15#include "GaudiKernel/ToolHandle.h"
16#include "GaudiKernel/IRndmGenSvc.h"
17#include "GaudiKernel/RndmGenerators.h"
18#include "GaudiKernel/SystemOfUnits.h"
19#include <string>
21// CylinderSurfaces
24//
25#include <memory>
26class TTree;
27
28#ifndef TRKEXALGS_MAXPARAMETERS
29#define TRKEXALGS_MAXPARAMETERS 10
30#endif
31
32
33namespace Trk
34{
35
36 class IExtrapolator;
37 class Surface;
38 class TrackingGeometry;
39 class TrackingVolume;
40
60
62 {
63 public:
64
66 EnergyLossExtrapolationValidation(const std::string& name, ISvcLocator* pSvcLocator);
69
71 StatusCode initialize();
73 StatusCode execute();
75 StatusCode finalize();
76
77 private:
79 static std::unique_ptr<Amg::Transform3D> createTransform(double x,
80 double y,
81 double z,
82 double phi = 0.,
83 double theta = 0.,
84 double alphaZ = 0.);
85
88
90 ToolHandle<IExtrapolator> m_extrapolator
91 {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
92
94 Rndm::Numbers* m_gaussDist = nullptr;
95 Rndm::Numbers* m_flatDist = nullptr;
96
98 {this, "UseMaterialCollection", false,
99 "use the material collection (extrapolateM)"};
100
101 TTree* m_validationTree = nullptr;
102 TTree* m_validationRunTree = nullptr;
103
105 {this, "ValidationTreeFolder", "/val/EventTreeTG",
106 "stream/folder to for the TTree to be written out"};
107 StringProperty m_validationTreeName
108 {this, "ValidationTreeName", "EventTreeTG",
109 "validation tree name - to be accessed by this from root"};
111 {this, "ValidationTreeDescription",
112 "Event output of the EnergyLossExtrapolationValidation Algorithm",
113 "validation tree description - second argument in TTree"};
115 {this, "ValidationRunTreeFolder", "/val/RunTreeTG",
116 "stream/folder to for the second TTree to be written out"};
118 {this, "ValidationRunTreeName", "RunTreeTG",
119 "run stats tree name - to be accessed by this from root"};
121 {this, "ValidationRunTreeDescription",
122 "Run stats of the EnergyLossExtrapolationValidation Algorithm",
123 "run stats tree description - second argument in TTree"};
124
125 UnsignedIntegerProperty m_cylinders{this, "ValidationCylinders", 6,
126 "number of cylinder layers"};
127 BooleanProperty m_onion{this, "StrictOnionMode", true,
128 "strictly hierarchical ordering (onion-like)"};
129 FloatProperty m_momentum{this, "StartPerigeeMomentum",
130 10.*Gaudi::Units::GeV};
131 BooleanProperty m_usePt{this, "StartPerigeeUsePt", true,
132 "use pt instead of p"};
133 FloatProperty m_minEta{this, "StartPerigeeMinEta", -3.};
134 FloatProperty m_maxEta{this, "StartPerigeeMaxEta", 3.};
135
136 size_t m_events = 0;
139
140 int m_pdg = 0;
141 IntegerProperty m_particleType{this, "ParticleType", 2,
142 "the particle type for the extrapolation"};
143
144 // ---- variables for the ROOT event tree
145 size_t m_entries = 0;
159
160 // ---- output statistics
161 size_t m_triesForward = 0;
162 size_t m_breaksForward = 0;
163 size_t m_triesBack = 0;
164 size_t m_breaksBack = 0;
165
168
169
170 // ---- cylinders and discs
176 FloatArrayProperty m_cylinderVR{this, "ValidationCylinderR", {},
177 "radius of cylinder layers"};
178 FloatArrayProperty m_cylinderVZ{this, "ValidationCylinderZ", {},
179 "length of cylinder layers"};
180 };
181} // end of namespace
182
183#endif
An STL vector of pointers that by default owns its pointed-to elements.
#define TRKEXALGS_MAXPARAMETERS
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Derived DataVector<T>.
Definition DataVector.h:795
static std::unique_ptr< Amg::Transform3D > createTransform(double x, double y, double z, double phi=0., double theta=0., double alphaZ=0.)
private helper method to create a Transform
ToolHandle< IExtrapolator > m_extrapolator
The Extrapolator to be retrieved.
float m_avgRecordedLayers
average recorded layers per event
int m_pdg
PDG code corresponding to m_particleType.
float m_cylinderZ[TRKEXALGS_MAXPARAMETERS]
length of cylinder layers (for ROOT tree)
float m_parameterX0[TRKEXALGS_MAXPARAMETERS]
thickness in X0
size_t m_collectedLayerForward
collected material layers forward
size_t m_entries
effective number of used entries (recorded layers) in this event
DataVector< const Trk::CylinderSurface > * m_theCylinders
float m_positionZ[TRKEXALGS_MAXPARAMETERS]
position Z
int m_totalRecordedLayers
total number of recorded layers
const TrackingVolume * m_highestVolume
the highest volume
StatusCode execute()
standard Athena-Algorithm method
size_t m_layer[TRKEXALGS_MAXPARAMETERS]
layer id
float m_positionX[TRKEXALGS_MAXPARAMETERS]
position X
float m_positionY[TRKEXALGS_MAXPARAMETERS]
position Y
float m_energyLoss[TRKEXALGS_MAXPARAMETERS]
energy loss
float m_cylinderR[TRKEXALGS_MAXPARAMETERS]
radius of cylinder layers (for ROOT tree)
DataVector< const Trk::DiscSurface > * m_theDiscs1
size_t m_collectedLayerBack
collected material layers backward
float m_parameterQoverP[TRKEXALGS_MAXPARAMETERS]
qOverP
StatusCode initialize()
standard Athena-Algorithm method
float m_radius[TRKEXALGS_MAXPARAMETERS]
position radius
EnergyLossExtrapolationValidation(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
StatusCode finalize()
standard Athena-Algorithm method
DataVector< const Trk::DiscSurface > * m_theDiscs2
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Ensure that the ATLAS eigen extensions are properly loaded.
@ x
Definition ParamDefs.h:55
@ z
global position (cartesian)
Definition ParamDefs.h:57
@ theta
Definition ParamDefs.h:66
@ y
Definition ParamDefs.h:56
@ phi
Definition ParamDefs.h:75