ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::ResidualValidationNtupleHelper Class Reference

This validation helper tool writes residual data into the ntuple using the common Trk::ResidualPullCalculator. More...

#include <ResidualValidationNtupleHelper.h>

Inheritance diagram for Trk::ResidualValidationNtupleHelper:
Collaboration diagram for Trk::ResidualValidationNtupleHelper:

Public Member Functions

 ResidualValidationNtupleHelper (const std::string &, const std::string &, const IInterface *)
 ~ResidualValidationNtupleHelper ()
StatusCode initialize ()
 initialize
StatusCode finalize ()
 finalize
virtual StatusCode fillMeasurementData (const Trk::MeasurementBase *, const Trk::TrackParameters *, const int &detectorType, const bool &isOutlier)
 fill residual data
virtual StatusCode fillHoleData (const Trk::TrackStateOnSurface &, const int &)
 fill special data about holes on track (here: do nothing)
virtual StatusCode addNtupleItems (TTree *tree, const int &detectorType)
 add items to the ntuple and configure the helper tool: should be called once (per detector type) by the steering tool (Trk::IValidationNtupleTool)
virtual StatusCode resetVariables (const int &detectorType)
 reset ntuple variables
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Interface ID, declared here, and defined below.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

double calcPull (const double residual, const double locMesCov, const double locTrkCov) const
void givePullWarning () const
void fillValues (const int &detectorType, double res1=-1000., double pull1=-1000., double res2=-1000., double pull2=-1000.)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_pullWarning = false
 warn only once, if pull cannot be calculated
bool m_trkParametersWarning
 warn only once, if no track parameters exist
ToolHandle< Trk::IResidualPullCalculatorm_residualPullCalculator
 The residual and pull calculator tool.
bool m_ignoreMissTrkCov
int * m_isUnbiased
std::vector< float > * m_PixPullPhi
 hit pull in pixel local phi coord for each Pixel meas't, vector of size nPixelHits UNIT:1
std::vector< float > * m_PixPullEta
 hit pull in pixel local eta coord for each Pixel meas't, vector of size nPixelHits UNIT:1
std::vector< float > * m_PixResPhi
 hit residual in pixel local phi for each Pixel meas't, vector of size nPixelHits UNIT:mm
std::vector< float > * m_PixResEta
 hit residual in pixel local eta for each Pixel meas't, vector of size nPixelHits UNIT:mm
std::vector< float > * m_SCTPull
 hit pull in SCT local strip coord for each SCT meas't (corrects for fan-shaped strip arrangement in endcap, i.e.
std::vector< float > * m_SCTRes
 hit residual in SCT local strip coord for each SCT meas't (corrects for fan-shaped strip arrangement in endcap, i.e.
std::vector< float > * m_TRTPull
 hit pull in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:1
std::vector< float > * m_TRTRes
 hit residual in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:mm
std::vector< float > * m_MDTPull
 hit pull in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:1
std::vector< float > * m_MDTRes
 hit residual in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:mm
std::vector< float > * m_RPCPull
 hit pull in RPC strip coordinate for each RPC meas't, vector of size nRPCHits UNIT:1
std::vector< float > * m_RPCRes
 hit residual in RPC coordinate for each RPC meas't, vector of size nRPCHits UNIT:mm
std::vector< float > * m_TGCPull
 hit pull in TGC strip coordinate for each TGC meas't (corrects for fan-shaped strip arrangement), vector of size nTGCHits UNIT:1
std::vector< float > * m_TGCRes
 hit residual in TGC strip coordinate for each TGC meas't, vector of size nTGCHits UNIT:mm
std::vector< float > * m_CSCPull
 hit pull in CSC ?
std::vector< float > * m_CSCRes
 hit residual in CSC ?
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

This validation helper tool writes residual data into the ntuple using the common Trk::ResidualPullCalculator.

Author
Sebas.nosp@m.tian.nosp@m..Flei.nosp@m.schm.nosp@m.ann@c.nosp@m.ern..nosp@m.ch

Definition at line 37 of file ResidualValidationNtupleHelper.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ResidualValidationNtupleHelper()

Trk::ResidualValidationNtupleHelper::ResidualValidationNtupleHelper ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 31 of file ResidualValidationNtupleHelper.cxx.

35 :
36 AthAlgTool(t,n,p),
38 m_residualPullCalculator("Trk::ResidualPullCalculator/ResidualPullCalculator"),
39 m_isUnbiased(nullptr),
40 m_PixPullPhi(nullptr), m_PixPullEta(nullptr), m_PixResPhi(nullptr), m_PixResEta(nullptr),
41 m_SCTPull(nullptr), m_SCTRes(nullptr),
42 m_TRTPull(nullptr), m_TRTRes(nullptr),
43 m_MDTPull(nullptr), m_MDTRes(nullptr),
44 m_RPCPull(nullptr), m_RPCRes(nullptr),
45 m_TGCPull(nullptr), m_TGCRes(nullptr),
46 m_CSCPull(nullptr), m_CSCRes(nullptr)
47{
48 declareInterface<IValidationNtupleHelperTool>(this);
49 // Declare the properties
50 declareProperty("IgnoreMissingTrackCovariance", m_ignoreMissTrkCov = false);
51 declareProperty("ResidualPullCalculatorTool", m_residualPullCalculator, "Tool to calculate residuals and pulls");
52 // declareProperty("NtupleDirectoryName", m_ntupleDirName = "FitterValidation");
53 // declareProperty("NtupleTreeName", m_ntupleTreeName = "Validation");
54 // declareProperty("DoPixels", mjo_doPixels = true);
55 // declareProperty("DoTRT", mjo_doTRT = true);
56}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< float > * m_TGCRes
hit residual in TGC strip coordinate for each TGC meas't, vector of size nTGCHits UNIT:mm
std::vector< float > * m_TGCPull
hit pull in TGC strip coordinate for each TGC meas't (corrects for fan-shaped strip arrangement),...
std::vector< float > * m_CSCRes
hit residual in CSC ?
std::vector< float > * m_TRTRes
hit residual in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:mm
std::vector< float > * m_PixPullPhi
hit pull in pixel local phi coord for each Pixel meas't, vector of size nPixelHits UNIT:1
std::vector< float > * m_MDTPull
hit pull in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:1
std::vector< float > * m_PixResPhi
hit residual in pixel local phi for each Pixel meas't, vector of size nPixelHits UNIT:mm
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool.
std::vector< float > * m_RPCPull
hit pull in RPC strip coordinate for each RPC meas't, vector of size nRPCHits UNIT:1
std::vector< float > * m_PixPullEta
hit pull in pixel local eta coord for each Pixel meas't, vector of size nPixelHits UNIT:1
std::vector< float > * m_SCTRes
hit residual in SCT local strip coord for each SCT meas't (corrects for fan-shaped strip arrangement ...
std::vector< float > * m_MDTRes
hit residual in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:mm
std::vector< float > * m_RPCRes
hit residual in RPC coordinate for each RPC meas't, vector of size nRPCHits UNIT:mm
bool m_trkParametersWarning
warn only once, if no track parameters exist
std::vector< float > * m_SCTPull
hit pull in SCT local strip coord for each SCT meas't (corrects for fan-shaped strip arrangement in e...
std::vector< float > * m_PixResEta
hit residual in pixel local eta for each Pixel meas't, vector of size nPixelHits UNIT:mm
std::vector< float > * m_CSCPull
hit pull in CSC ?
std::vector< float > * m_TRTPull
hit pull in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:1

◆ ~ResidualValidationNtupleHelper()

Trk::ResidualValidationNtupleHelper::~ResidualValidationNtupleHelper ( )
default

Member Function Documentation

◆ addNtupleItems()

StatusCode Trk::ResidualValidationNtupleHelper::addNtupleItems ( TTree * tree,
const int & detectorType )
virtual

add items to the ntuple and configure the helper tool: should be called once (per detector type) by the steering tool (Trk::IValidationNtupleTool)

addNtupleItems

Implements Trk::IValidationNtupleHelperTool.

Definition at line 117 of file ResidualValidationNtupleHelper.cxx.

119 {
120
121 TBranch* trackStatesUnbiasedBranch = tree->GetBranch("TrackStatesUnbiased");
122 if (!trackStatesUnbiasedBranch) {
123 ATH_MSG_ERROR ( "Unable to get Branch TrackStatesUnbiased in ntuple" );
124 return StatusCode::FAILURE;
125 }
126 void* variableAdr = static_cast<void*>(trackStatesUnbiasedBranch->GetAddress());
127 if (!variableAdr) {
128 ATH_MSG_ERROR ("Unable to get variable address of Branch TrackStatesUnbiased");
129 return StatusCode::FAILURE;
130 }
131 ATH_MSG_VERBOSE ("Address of unbiasedState tree variable: " << variableAdr );
132 m_isUnbiased = static_cast<int*>(variableAdr);
133
134// TBranch* nHitsBranch = m_nt->GetBranch("nHits");
135// variableAdr = static_cast<void*>(nHitsBranch->GetAddress());
136// m_hits = static_cast<int*>(variableAdr);
137
138 // -------------------------------------------
139 // retrieve and add items from/to the ntuple
140 // if (detectorType.test(Pixel)) {
141 if (detectorType==Trk::TrackState::Pixel) {
142 ATH_MSG_INFO ( "adding Pixel residual/pull variables to ntuple ");
143 // add items for pixel
144 tree->Branch("PixPullPhi", &m_PixPullPhi);
145 tree->Branch("PixPullEta", &m_PixPullEta);
146 tree->Branch("PixResPhi", &m_PixResPhi);
147 tree->Branch("PixResEta", &m_PixResEta);
148 }
149
150 //if (detectorType.test(TRT)) {
151 if (detectorType==Trk::TrackState::TRT) {
152 ATH_MSG_INFO ("adding TRT residual/pull variables to ntuple ");
153 tree->Branch("TRTPull", &m_TRTPull);
154 tree->Branch("TRTRes", &m_TRTRes);
155 }
156 if (detectorType==Trk::TrackState::SCT) {
157 ATH_MSG_INFO ( "adding SCT residual/pull variables to ntuple ");
158 tree->Branch("SCTPull", &m_SCTPull);
159 tree->Branch("SCTRes", &m_SCTRes);
160 }
161
162 if (detectorType==Trk::TrackState::MDT) {
163 ATH_MSG_INFO ( "adding MDT residual/pull variables to ntuple ");
164 // add items for MDT
165 tree->Branch("MDTPull", &m_MDTPull);
166 tree->Branch("MDTRes", &m_MDTRes);
167 }
168
169 if (detectorType==Trk::TrackState::RPC) {
170 ATH_MSG_INFO ("adding RPC residual/pull variables to ntuple ");
171 ATH_MSG_INFO ("Reminder: these variables do not distinguish RPC phi from eta hits.");
172 // add items for RPC
173 tree->Branch("RPCPull", &m_RPCPull);
174 tree->Branch("RPCRes", &m_RPCRes);
175 }
176
177 if (detectorType==Trk::TrackState::TGC) {
178 ATH_MSG_INFO ( "adding TGC residual/pull variables to ntuple ");
179 ATH_MSG_INFO ( "Reminder: these variables do not distinguish TGC phi from eta hits.");
180 // add items for TGC
181 tree->Branch("TGCPull", &m_TGCPull);
182 tree->Branch("TGCRes", &m_TGCRes);
183 }
184
185 if (detectorType==Trk::TrackState::CSC) {
186 ATH_MSG_INFO ( "adding CSC residual/pull variables to ntuple ");
187 ATH_MSG_INFO ( "Reminder: these variables do not distinguish CSC phi from eta hits.");
188 // add items for CSC
189 tree->Branch("CSCPull", &m_CSCPull);
190 tree->Branch("CSCRes", &m_CSCRes);
191 }
192
193 ATH_MSG_VERBOSE ( "added items to ntuple") ;
194 return StatusCode::SUCCESS;
195}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
TChain * tree

◆ calcPull()

double Trk::ResidualValidationNtupleHelper::calcPull ( const double residual,
const double locMesCov,
const double locTrkCov ) const
private

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillHoleData()

StatusCode Trk::ResidualValidationNtupleHelper::fillHoleData ( const Trk::TrackStateOnSurface & ,
const int &  )
virtual

fill special data about holes on track (here: do nothing)

Implements Trk::IValidationNtupleHelperTool.

Definition at line 306 of file ResidualValidationNtupleHelper.cxx.

308 {
309 // we do nothing with holes
310 return StatusCode::SUCCESS;
311}

◆ fillMeasurementData()

StatusCode Trk::ResidualValidationNtupleHelper::fillMeasurementData ( const Trk::MeasurementBase * measurement,
const Trk::TrackParameters * trkParameters,
const int & detectorType,
const bool & isOutlier )
virtual

fill residual data

Implements Trk::IValidationNtupleHelperTool.

Definition at line 200 of file ResidualValidationNtupleHelper.cxx.

206 {
207
208 //const Trk::MeasuredTrackParameters *measuredTrkParameters = dynamic_cast<const Trk::MeasuredTrackParameters*>(trkParameters);
209 if (!trkParameters) {
210 if (!isOutlier) {
211 // outliers usually do have not track parameters, so do not warn for them!
213 // warn once only!
214 ATH_MSG_WARNING ("No TrackParameters: Residuals cannot be filled (filling dummy values).");
215 ATH_MSG_WARNING (" This is possible for slimmed tracks; if residuals are needed choose another track collection");
216 ATH_MSG_WARNING (" (further warnings will be suppressed)");
218 }
219 }
220 fillValues(detectorType);
221 return StatusCode::SUCCESS;
222 } // end if (!trkPar)
223 /* open up to more measurement flavours
224 const Trk::RIO_OnTrack *ROT = dynamic_cast<const Trk::RIO_OnTrack*>(measurement);
225 if (!ROT) {
226 msg(MSG::WARNING) << "No RIO_OnTrack: Residuals cannot be calculated (filling dummy values)." << endmsg;
227 fillValues(detectorType);
228 return StatusCode::SUCCESS;
229 } */
230 std::optional<Trk::ResidualPull> residualPull=std::nullopt;
231 if (detectorType!=TrackState::unidentified) {
232 residualPull = m_residualPullCalculator->residualPull(measurement, trkParameters,
234 } else {
235 ATH_MSG_WARNING ("Detector type could not be identified, can not calculate residuals!");
236 fillValues(detectorType);
237 return StatusCode::FAILURE;
238 }
239 if (!residualPull) {
240 ATH_MSG_WARNING ("Residual Pull Calculator did not succeed!");
241 fillValues(detectorType);
242 return StatusCode::FAILURE;
243 }
244
245 if (detectorType==TrackState::Pixel) {
246 if ((residualPull->isPullValid()) || m_ignoreMissTrkCov ) {
247 fillValues( detectorType,
248 residualPull->residual()[Trk::distPhi],
249 residualPull->pull()[Trk::distPhi],
250 residualPull->residual()[Trk::distEta],
251 residualPull->pull()[Trk::distEta] );
252 } else {
254 fillValues( detectorType,
255 residualPull->residual()[Trk::distPhi],
256 -1000.,
257 residualPull->residual()[Trk::distEta],
258 -1000. );
259 }
260 } else {
261 if ((residualPull->isPullValid()) || m_ignoreMissTrkCov ) {
262 fillValues( detectorType,
263 residualPull->residual()[Trk::loc1],
264 residualPull->pull()[Trk::loc1] );
265 } else {
267 fillValues( detectorType,
268 residualPull->residual()[Trk::loc1],
269 -1000. );
270 }
271 }
272
273 return StatusCode::SUCCESS;
274}
#define ATH_MSG_WARNING(x)
@ Biased
RP with track state including the hit.
@ Unbiased
RP with track state that has measurement not included.
void fillValues(const int &detectorType, double res1=-1000., double pull1=-1000., double res2=-1000., double pull2=-1000.)
@ distEta
readout for silicon
Definition ParamDefs.h:51
@ distPhi
Definition ParamDefs.h:50
@ loc1
Definition ParamDefs.h:34

◆ fillValues()

void Trk::ResidualValidationNtupleHelper::fillValues ( const int & detectorType,
double res1 = -1000.,
double pull1 = -1000.,
double res2 = -1000.,
double pull2 = -1000. )
inlineprivate

Definition at line 125 of file ResidualValidationNtupleHelper.h.

125 {
126 if (detectorType==TrackState::Pixel) {
127 m_PixResPhi->push_back(res1);
128 m_PixResEta->push_back(res2);
129 m_PixPullPhi->push_back(pull1);
130 m_PixPullEta->push_back(pull2);
131 } else if (detectorType==TrackState::SCT) {
132 m_SCTRes->push_back(res1);
133 m_SCTPull->push_back(pull1);
134 } else if (detectorType==TrackState::TRT) {
135 m_TRTRes->push_back(res1);
136 m_TRTPull->push_back(pull1);
137 } else if (detectorType==TrackState::MDT) {
138 m_MDTRes->push_back(res1);
139 m_MDTPull->push_back(pull1);
140 } else if (detectorType==TrackState::RPC) {
141 m_RPCRes->push_back(res1);
142 m_RPCPull->push_back(pull1);
143 } else if (detectorType==TrackState::TGC) {
144 m_TGCRes->push_back(res1);
145 m_TGCPull->push_back(pull1);
146 } else if (detectorType==TrackState::CSC) {
147 m_CSCRes->push_back(res1);
148 m_CSCPull->push_back(pull1);
149 }
150}

◆ finalize()

StatusCode Trk::ResidualValidationNtupleHelper::finalize ( )

finalize

Definition at line 99 of file ResidualValidationNtupleHelper.cxx.

99 {
100
101 delete m_PixPullPhi; delete m_PixPullEta;
102 delete m_PixResPhi; delete m_PixResEta;
103 delete m_SCTPull; delete m_SCTRes;
104 delete m_TRTPull; delete m_TRTRes;
105 delete m_MDTPull; delete m_MDTRes;
106 delete m_RPCPull; delete m_RPCRes;
107 delete m_TGCPull; delete m_TGCRes;
108 delete m_CSCPull; delete m_CSCRes;
109
110 ATH_MSG_INFO ("finalize() successful in " << name() );
111 return StatusCode::SUCCESS;
112}

◆ givePullWarning()

void Trk::ResidualValidationNtupleHelper::givePullWarning ( ) const
inlineprivate

Definition at line 118 of file ResidualValidationNtupleHelper.h.

118 {
119 [[maybe_unused]] static const bool pullWarningOnce = [&]() {
120 msg(MSG::WARNING) << "no covariance of the track parameters given, can not calc pull!" << endmsg;
121 msg(MSG::WARNING) << "you may want to use the jobOption 'IgnoreMissingTrackCovariance' to calculate it anyhow." << endmsg;
122 return true;
123 }();
124 }
#define endmsg
MsgStream & msg() const

◆ initialize()

StatusCode Trk::ResidualValidationNtupleHelper::initialize ( )

initialize

Definition at line 64 of file ResidualValidationNtupleHelper.cxx.

64 {
65
66
67 StatusCode sc = AthAlgTool::initialize();
68 if (sc.isFailure()) return sc;
69
70 // get the ResidualPullCalculator
71 sc = m_residualPullCalculator.retrieve();
72 if (sc.isFailure()) {
73 ATH_MSG_ERROR ("Could not retrieve "<< m_residualPullCalculator <<" (to calculate residuals,pulls) ");
74 return sc;
75 }
76 m_PixPullPhi = new std::vector<float>();
77 m_PixPullEta = new std::vector<float>();
78 m_PixResPhi = new std::vector<float>();
79 m_PixResEta = new std::vector<float>();
80 m_SCTPull = new std::vector<float>();
81 m_SCTRes = new std::vector<float>();
82 m_TRTPull = new std::vector<float>();
83 m_TRTRes = new std::vector<float>();
84 m_MDTPull = new std::vector<float>();
85 m_MDTRes = new std::vector<float>();
86 m_RPCPull = new std::vector<float>();
87 m_RPCRes = new std::vector<float>();
88 m_TGCPull = new std::vector<float>();
89 m_TGCRes = new std::vector<float>();
90 m_CSCPull = new std::vector<float>();
91 m_CSCRes = new std::vector<float>();
92
93 return sc;
94}
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & Trk::IValidationNtupleHelperTool::interfaceID ( )
inlinestaticinherited

Interface ID, declared here, and defined below.

Definition at line 76 of file IValidationNtupleHelperTool.h.

76 {
78}
static const InterfaceID IID_IValidationNtupleHelperTool("IValidationNtupleHelperTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ resetVariables()

StatusCode Trk::ResidualValidationNtupleHelper::resetVariables ( const int & detectorType)
virtual

reset ntuple variables

Implements Trk::IValidationNtupleHelperTool.

Definition at line 276 of file ResidualValidationNtupleHelper.cxx.

277 {
278 if (detectorType==TrackState::Pixel) {
279 m_PixPullPhi->clear();
280 m_PixPullEta->clear();
281 m_PixResPhi->clear();
282 m_PixResEta->clear();
283 } else if (detectorType==TrackState::SCT) {
284 m_SCTPull->clear();
285 m_SCTRes->clear();
286 } else if (detectorType==TrackState::TRT) {
287 m_TRTRes->clear();
288 m_TRTPull->clear();
289 } else if (detectorType==TrackState::MDT) {
290 m_MDTRes->clear();
291 m_MDTPull->clear();
292 } else if (detectorType==TrackState::RPC) {
293 m_RPCRes->clear();
294 m_RPCPull->clear();
295 } else if (detectorType==TrackState::TGC) {
296 m_TGCRes->clear();
297 m_TGCPull->clear();
298 } else if (detectorType==TrackState::CSC) {
299 m_CSCRes->clear();
300 m_CSCPull->clear();
301 }
302 return StatusCode::SUCCESS;
303}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_CSCPull

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_CSCPull
private

hit pull in CSC ?

?? coordinate for each CSC meas't, vector of size nCSCHits UNIT:1

Definition at line 113 of file ResidualValidationNtupleHelper.h.

◆ m_CSCRes

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_CSCRes
private

hit residual in CSC ?

?? coordinate for each CSC meas't, vector of size nCSCHits UNIT:mm

Definition at line 114 of file ResidualValidationNtupleHelper.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_ignoreMissTrkCov

bool Trk::ResidualValidationNtupleHelper::m_ignoreMissTrkCov
private

Definition at line 88 of file ResidualValidationNtupleHelper.h.

◆ m_isUnbiased

int* Trk::ResidualValidationNtupleHelper::m_isUnbiased
private

Definition at line 90 of file ResidualValidationNtupleHelper.h.

◆ m_MDTPull

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_MDTPull
private

hit pull in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:1

Definition at line 104 of file ResidualValidationNtupleHelper.h.

◆ m_MDTRes

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_MDTRes
private

hit residual in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:mm

Definition at line 105 of file ResidualValidationNtupleHelper.h.

◆ m_PixPullEta

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixPullEta
private

hit pull in pixel local eta coord for each Pixel meas't, vector of size nPixelHits UNIT:1

Definition at line 94 of file ResidualValidationNtupleHelper.h.

◆ m_PixPullPhi

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixPullPhi
private

hit pull in pixel local phi coord for each Pixel meas't, vector of size nPixelHits UNIT:1

Definition at line 93 of file ResidualValidationNtupleHelper.h.

◆ m_PixResEta

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixResEta
private

hit residual in pixel local eta for each Pixel meas't, vector of size nPixelHits UNIT:mm

Definition at line 96 of file ResidualValidationNtupleHelper.h.

◆ m_PixResPhi

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixResPhi
private

hit residual in pixel local phi for each Pixel meas't, vector of size nPixelHits UNIT:mm

Definition at line 95 of file ResidualValidationNtupleHelper.h.

◆ m_pullWarning

bool Trk::ResidualValidationNtupleHelper::m_pullWarning = false
private

warn only once, if pull cannot be calculated

Definition at line 82 of file ResidualValidationNtupleHelper.h.

◆ m_residualPullCalculator

ToolHandle<Trk::IResidualPullCalculator> Trk::ResidualValidationNtupleHelper::m_residualPullCalculator
private

The residual and pull calculator tool.

Definition at line 86 of file ResidualValidationNtupleHelper.h.

◆ m_RPCPull

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_RPCPull
private

hit pull in RPC strip coordinate for each RPC meas't, vector of size nRPCHits UNIT:1

Definition at line 107 of file ResidualValidationNtupleHelper.h.

◆ m_RPCRes

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_RPCRes
private

hit residual in RPC coordinate for each RPC meas't, vector of size nRPCHits UNIT:mm

Definition at line 108 of file ResidualValidationNtupleHelper.h.

◆ m_SCTPull

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_SCTPull
private

hit pull in SCT local strip coord for each SCT meas't (corrects for fan-shaped strip arrangement in endcap, i.e.

pull is perpendicular to strip direction), vector of size nSCTHits UNIT:1

Definition at line 98 of file ResidualValidationNtupleHelper.h.

◆ m_SCTRes

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_SCTRes
private

hit residual in SCT local strip coord for each SCT meas't (corrects for fan-shaped strip arrangement in endcap, i.e.

residual is perpendicular to strip direction), vector of size nSCTHits UNIT:mm

Definition at line 99 of file ResidualValidationNtupleHelper.h.

◆ m_TGCPull

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TGCPull
private

hit pull in TGC strip coordinate for each TGC meas't (corrects for fan-shaped strip arrangement), vector of size nTGCHits UNIT:1

Definition at line 110 of file ResidualValidationNtupleHelper.h.

◆ m_TGCRes

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TGCRes
private

hit residual in TGC strip coordinate for each TGC meas't, vector of size nTGCHits UNIT:mm

Definition at line 111 of file ResidualValidationNtupleHelper.h.

◆ m_trkParametersWarning

bool Trk::ResidualValidationNtupleHelper::m_trkParametersWarning
private

warn only once, if no track parameters exist

Definition at line 83 of file ResidualValidationNtupleHelper.h.

◆ m_TRTPull

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TRTPull
private

hit pull in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:1

Definition at line 101 of file ResidualValidationNtupleHelper.h.

◆ m_TRTRes

std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TRTRes
private

hit residual in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:mm

Definition at line 102 of file ResidualValidationNtupleHelper.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: