ATLAS Offline Software
Loading...
Searching...
No Matches
AnalyticalDerivCalcTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRK_ANALYTICALDERIVCALCTOOL_H
6#define TRK_ANALYTICALDERIVCALCTOOL_H
7
9#include "GaudiKernel/ToolHandle.h"
12
15
17
18#include <vector>
19
20
32
33class AtlasDetectorID;
34
35namespace Trk
36{
37 class AlignModule;
38 class AlignTrack;
39 class MeasurementTypeID;
40
41 class AnalyticalDerivCalcTool : virtual public IDerivCalcTool, public AthAlgTool
42 {
43
44 public:
45 AnalyticalDerivCalcTool(const std::string & type, const std::string & name, const IInterface * parent);
46
47 StatusCode initialize() override;
48 StatusCode finalize() override;
49
51 bool setDerivatives(AlignTrack * alignTrack) override;
52
54 void showStatistics() override {}
55
57 bool setResidualCovMatrix(AlignTrack * alignTrack) const override;
58
59 private:
60
61 PublicToolHandle<IAlignModuleTool> m_alignModuleTool{
62 this, "AlignModuleTool", "InDet::InDetAlignModuleTool/InDetAlignModuleTool"};
63
64 const AtlasDetectorID * m_idHelper = nullptr;
66
67 bool getMeasErrorMatrix(const AlignTrack * alignTrack, Amg::MatrixX & V) const;
68
69 bool getTrkParamCovMatrix(const AlignTrack * alignTrack, Amg::MatrixX & HCH) const;
70
71 bool checkValidity(const Amg::MatrixX & R) const;
72
73 std::vector<Amg::VectorX> getDerivatives(AlignTrack * alignTrack, const AlignModule * module);
74
75 void checkResidualType(const AlignTrack * alignTrack);
76
77 std::vector<std::pair<const AlignModule *, std::vector<Amg::VectorX> > > m_derivatives;
78
79 BooleanProperty m_useLocalSetting{this, "UseLocalSetting", false,
80 "use local setup for the covariance matrix of the track"};
81
82 // Use constant errors for each sub-detector such that it's equivalent
83 // to minimize residual distance instead of minizing residual pull.
84 // This is only applied if m_useLocalSetting==true
86 this, "UseIntrinsicPixelError", false, "use intrinsic errors for Pixel"};
87 BooleanProperty m_useIntrinsicSCTErrors{
88 this, "UseIntrinsicSCTError", false, "use intrinsic errors for SCT"};
89 BooleanProperty m_useIntrinsicTRTErrors{
90 this, "UseIntrinsicTRTError", false, "use intrinsic errors for TRT"};
91
93 bool m_residualTypeSet = false;
94
95 BooleanProperty m_storeDerivatives{this, "StoreDerivatives", false,
96 "store derivatives dr/da on AlignTSOS to be filled into ntuple"};
97
98 }; // end class
99
100} // end namespace
101
102#endif // TRK_ANALYTICALDERIVCALCTOOL_H
AlignModule is a grouping of TrkDetElementBase objects, grouped according to the type of alignment,...
AlignTrack is a generalization of a Trk::Track, used as the basic object to contain track information...
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
PublicToolHandle< IAlignModuleTool > m_alignModuleTool
bool checkValidity(const Amg::MatrixX &R) const
bool getMeasErrorMatrix(const AlignTrack *alignTrack, Amg::MatrixX &V) const
AnalyticalDerivCalcTool(const std::string &type, const std::string &name, const IInterface *parent)
std::vector< std::pair< const AlignModule *, std::vector< Amg::VectorX > > > m_derivatives
bool getTrkParamCovMatrix(const AlignTrack *alignTrack, Amg::MatrixX &HCH) const
int m_residualType
residual type to be used in the calculations
bool setResidualCovMatrix(AlignTrack *alignTrack) const override
sets residual covariance matrix
bool m_residualTypeSet
do we have the residual type set?
bool setDerivatives(AlignTrack *alignTrack) override
sets analytical partial derivatives of residuals w.r.t alignment parameters for TSOS on alignTrack.
void checkResidualType(const AlignTrack *alignTrack)
std::vector< Amg::VectorX > getDerivatives(AlignTrack *alignTrack, const AlignModule *module)
void showStatistics() override
not used yet
classifies a MeasurementBase into one of the known inherited flavours or one of the detector types fo...
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Ensure that the ATLAS eigen extensions are properly loaded.