ATLAS Offline Software
Loading...
Searching...
No Matches
InDetTrackBiasingTool.h
Go to the documentation of this file.
1// -*- c++ -*-
2/*
3 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4*/
5
6#ifndef INDETTRACKSYSTEMATICSTOOLS_INDETTRACKBIASINGTOOL_H
7#define INDETTRACKSYSTEMATICSTOOLS_INDETTRACKBIASINGTOOL_H
8
10#include "AsgTools/AsgTool.h"
14#include <string>
15#include <vector>
16
17#include <TH2.h>
18
19#include "TRandom3.h"
20
21class TFile;
22
23namespace InDet {
24
31
33 : public virtual IInDetTrackBiasingTool
34 , public virtual InDetTrackSystematicsTool
35 , public virtual CP::CorrectionTool< xAOD::TrackParticleContainer >
36 {
37
40
41 public:
42
43 InDetTrackBiasingTool (const std::string& name);
44 virtual ~InDetTrackBiasingTool();
45
46 virtual StatusCode initialize() override;
47 virtual void prepare() override {};
48
52 xAOD::TrackParticle*& out ) override;
54
55
57 virtual bool isAffectedBySystematic( const CP::SystematicVariation& ) const override;
59 virtual CP::SystematicSet affectingSystematics() const override;
61 virtual CP::SystematicSet recommendedSystematics() const override;
63 virtual StatusCode applySystematicVariation( const CP::SystematicSet& ) override;
64
65 protected:
66
67 StatusCode initHistograms();
68 StatusCode firstCall();
69
70 float readHistogram(float fDefault, TH2* histogram, float phi, float eta) const;
71
72 float m_biasD0 = 0.f;
73 float m_biasZ0 = 0.f;
75
76 std::unique_ptr<TH2> m_data15_biasD0Histogram = nullptr;
77 std::unique_ptr<TH2> m_data15_biasZ0Histogram = nullptr;
78 std::unique_ptr<TH2> m_data15_biasQoverPsagittaHistogram = nullptr;
79 std::unique_ptr<TH2> m_data15_biasD0HistError = nullptr;
80 std::unique_ptr<TH2> m_data15_biasZ0HistError = nullptr;
81 std::unique_ptr<TH2> m_data15_biasQoverPsagittaHistError = nullptr;
82
83 std::unique_ptr<TH2> m_data16_1stPart_biasD0Histogram = nullptr;
84 std::unique_ptr<TH2> m_data16_1stPart_biasZ0Histogram = nullptr;
85 std::unique_ptr<TH2> m_data16_1stPart_biasQoverPsagittaHistogram = nullptr;
86 std::unique_ptr<TH2> m_data16_1stPart_biasD0HistError = nullptr;
87 std::unique_ptr<TH2> m_data16_1stPart_biasZ0HistError = nullptr;
88 std::unique_ptr<TH2> m_data16_1stPart_biasQoverPsagittaHistError = nullptr;
89
90 std::unique_ptr<TH2> m_data16_2ndPart_biasD0Histogram = nullptr;
91 std::unique_ptr<TH2> m_data16_2ndPart_biasZ0Histogram = nullptr;
92 std::unique_ptr<TH2> m_data16_2ndPart_biasQoverPsagittaHistogram = nullptr;
93 std::unique_ptr<TH2> m_data16_2ndPart_biasD0HistError = nullptr;
94 std::unique_ptr<TH2> m_data16_2ndPart_biasZ0HistError = nullptr;
95 std::unique_ptr<TH2> m_data16_2ndPart_biasQoverPsagittaHistError = nullptr;
96
97 std::unique_ptr<TH2> m_data17_1stPart_biasD0Histogram = nullptr;
98 std::unique_ptr<TH2> m_data17_1stPart_biasZ0Histogram = nullptr;
99 std::unique_ptr<TH2> m_data17_1stPart_biasQoverPsagittaHistogram = nullptr;
100 std::unique_ptr<TH2> m_data17_1stPart_biasD0HistError = nullptr;
101 std::unique_ptr<TH2> m_data17_1stPart_biasZ0HistError = nullptr;
102 std::unique_ptr<TH2> m_data17_1stPart_biasQoverPsagittaHistError = nullptr;
103
104 std::unique_ptr<TH2> m_data17_2ndPart_biasD0Histogram = nullptr;
105 std::unique_ptr<TH2> m_data17_2ndPart_biasZ0Histogram = nullptr;
106 std::unique_ptr<TH2> m_data17_2ndPart_biasQoverPsagittaHistogram = nullptr;
107 std::unique_ptr<TH2> m_data17_2ndPart_biasD0HistError = nullptr;
108 std::unique_ptr<TH2> m_data17_2ndPart_biasZ0HistError = nullptr;
109 std::unique_ptr<TH2> m_data17_2ndPart_biasQoverPsagittaHistError = nullptr;
110
111 std::unique_ptr<TH2> m_data18_1stPart_biasD0Histogram = nullptr;
112 std::unique_ptr<TH2> m_data18_1stPart_biasZ0Histogram = nullptr;
113 std::unique_ptr<TH2> m_data18_1stPart_biasQoverPsagittaHistogram = nullptr;
114 std::unique_ptr<TH2> m_data18_1stPart_biasD0HistError = nullptr;
115 std::unique_ptr<TH2> m_data18_1stPart_biasZ0HistError = nullptr;
116 std::unique_ptr<TH2> m_data18_1stPart_biasQoverPsagittaHistError = nullptr;
117
118 std::unique_ptr<TH2> m_data18_2ndPart_biasD0Histogram = nullptr;
119 std::unique_ptr<TH2> m_data18_2ndPart_biasZ0Histogram = nullptr;
120 std::unique_ptr<TH2> m_data18_2ndPart_biasQoverPsagittaHistogram = nullptr;
121 std::unique_ptr<TH2> m_data18_2ndPart_biasD0HistError = nullptr;
122 std::unique_ptr<TH2> m_data18_2ndPart_biasZ0HistError = nullptr;
123 std::unique_ptr<TH2> m_data18_2ndPart_biasQoverPsagittaHistError = nullptr;
124
125 // if neither of these is set manually, then the tool will try to get this from EventInfo in the event store.
126 // these options exist only as a manual override.
127 bool m_isData = false;
128 bool m_isSimulation = false;
129 uint32_t m_runNumber = 0;
130
131 bool m_doD0Bias = true;
132 bool m_doZ0Bias = true;
133 bool m_doQoverPBias = true;
134
135 // allow the user to configure which calibration files to use if desired
136 std::string m_calibFileData15;
143
144 // paths and histogram names in the calibration files
145 std::string m_d0_nominal_histName = "d0/d0_theNominal";
146 std::string m_z0_nominal_histName = "z0/z0_theNominal";
147 std::string m_sagitta_nominal_histName = "sagitta/sagitta_theNominal";
148 std::string m_d0_uncertainty_histName = "d0/d0_theUncertainty";
149 std::string m_z0_uncertainty_histName = "z0/z0_theUncertainty";
150 std::string m_sagitta_uncertainty_histName = "sagitta/sagitta_theUncertainty";
151
152 }; // class InDetTrackBiasingTool
153
154} // namespace InDet
155
156#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
std::string histogram
Definition chains.cxx:52
Return value from object correction CP tools.
Helper base class for "correction tools".
Class to wrap a set of SystematicVariations.
This class biases tracks to emulate systematic distortions of the tracking geometry.
virtual StatusCode applySystematicVariation(const CP::SystematicSet &) override
configure the tool to apply a given list of systematic variations
std::unique_ptr< TH2 > m_data16_1stPart_biasD0Histogram
std::unique_ptr< TH2 > m_data18_1stPart_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data18_1stPart_biasD0HistError
std::unique_ptr< TH2 > m_data15_biasD0Histogram
std::unique_ptr< TH2 > m_data18_1stPart_biasQoverPsagittaHistError
std::unique_ptr< TH2 > m_data17_2ndPart_biasD0HistError
virtual CP::CorrectionCode applyCorrection(xAOD::TrackParticle &track) override
Computes the tracks origin.
float readHistogram(float fDefault, TH2 *histogram, float phi, float eta) const
virtual CP::SystematicSet recommendedSystematics() const override
returns: list of recommended systematics to use with this tool
std::unique_ptr< TH2 > m_data16_1stPart_biasZ0HistError
virtual bool isAffectedBySystematic(const CP::SystematicVariation &) const override
returns: whether the tool is affected by the systematic
std::unique_ptr< TH2 > m_data18_1stPart_biasZ0HistError
std::unique_ptr< TH2 > m_data17_2ndPart_biasZ0Histogram
std::unique_ptr< TH2 > m_data17_1stPart_biasD0HistError
std::unique_ptr< TH2 > m_data17_1stPart_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data17_2ndPart_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data18_2ndPart_biasZ0Histogram
std::unique_ptr< TH2 > m_data17_2ndPart_biasZ0HistError
std::unique_ptr< TH2 > m_data16_2ndPart_biasD0HistError
std::unique_ptr< TH2 > m_data17_1stPart_biasZ0Histogram
std::unique_ptr< TH2 > m_data17_1stPart_biasD0Histogram
std::unique_ptr< TH2 > m_data18_2ndPart_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data16_2ndPart_biasZ0HistError
std::unique_ptr< TH2 > m_data18_2ndPart_biasD0Histogram
std::unique_ptr< TH2 > m_data16_1stPart_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data15_biasQoverPsagittaHistError
virtual ASG_TOOL_CLASS(InDetTrackBiasingTool, InDet::IInDetTrackBiasingTool) public ~InDetTrackBiasingTool()
std::unique_ptr< TH2 > m_data15_biasZ0HistError
std::unique_ptr< TH2 > m_data18_1stPart_biasZ0Histogram
std::unique_ptr< TH2 > m_data17_1stPart_biasQoverPsagittaHistError
virtual void prepare() override
virtual CP::CorrectionCode correctedCopy(const xAOD::TrackParticle &in, xAOD::TrackParticle *&out) override
std::unique_ptr< TH2 > m_data18_1stPart_biasD0Histogram
std::unique_ptr< TH2 > m_data18_2ndPart_biasZ0HistError
virtual CP::CorrectionCode applyContainerCorrection(xAOD::TrackParticleContainer &cont) override
std::unique_ptr< TH2 > m_data18_2ndPart_biasQoverPsagittaHistError
std::unique_ptr< TH2 > m_data15_biasD0HistError
std::unique_ptr< TH2 > m_data17_2ndPart_biasD0Histogram
std::unique_ptr< TH2 > m_data18_2ndPart_biasD0HistError
std::unique_ptr< TH2 > m_data16_1stPart_biasZ0Histogram
std::unique_ptr< TH2 > m_data16_2ndPart_biasQoverPsagittaHistError
virtual CP::SystematicSet affectingSystematics() const override
returns: list of systematics this tool can be affected by
std::unique_ptr< TH2 > m_data15_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data17_2ndPart_biasQoverPsagittaHistError
std::unique_ptr< TH2 > m_data16_2ndPart_biasD0Histogram
std::unique_ptr< TH2 > m_data15_biasZ0Histogram
std::unique_ptr< TH2 > m_data17_1stPart_biasZ0HistError
std::unique_ptr< TH2 > m_data16_1stPart_biasD0HistError
virtual StatusCode initialize() override
std::unique_ptr< TH2 > m_data16_2ndPart_biasQoverPsagittaHistogram
std::unique_ptr< TH2 > m_data16_2ndPart_biasZ0Histogram
std::unique_ptr< TH2 > m_data16_1stPart_biasQoverPsagittaHistError
Primary Vertex Finder.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".