This validation tool writes information about Trk::CompetingRIOsOnTrack into an ntuple.
More...
#include <DAF_ValidationNtupleHelper.h>
This validation tool writes information about Trk::CompetingRIOsOnTrack into an ntuple.
Definition at line 33 of file DAF_ValidationNtupleHelper.h.
◆ StoreGateSvc_t
◆ DAF_ValidationNtupleHelper()
| Trk::DAF_ValidationNtupleHelper::DAF_ValidationNtupleHelper |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
Definition at line 35 of file DAF_ValidationNtupleHelper.cxx.
39 :
46
47
48 {
49 declareInterface<IValidationNtupleHelperTool>(this);
50 declareProperty(
"IgnoreMissingTrackCovarianceForPulls",
m_ignoreMissTrkCov =
false,
"Do not warn, if track states do not have covariance matries when calculating pulls");
53}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< int > * m_indexOfMaxAssgnProb
std::vector< int > * m_nContainedROTs
std::vector< float > * m_maxAssgnProb
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool.
bool m_writeHitPositions
jobOption: shall the positions of the contained ROTs be written?
◆ ~DAF_ValidationNtupleHelper()
| Trk::DAF_ValidationNtupleHelper::~DAF_ValidationNtupleHelper |
( |
| ) |
|
|
default |
◆ addNtupleItems()
| StatusCode Trk::DAF_ValidationNtupleHelper::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::ITrackValidationNtupleTool)
addNtupleItems
Implements Trk::IValidationNtupleHelperTool.
Definition at line 89 of file DAF_ValidationNtupleHelper.cxx.
92 {
93
94
95 TBranch* trackStatesUnbiasedBranch =
tree->GetBranch(
"TrackStatesUnbiased");
96 if (!trackStatesUnbiasedBranch) {
97 ATH_MSG_ERROR (
"Unable to get Branch TrackStatesUnbiased in ntuple" );
98 return StatusCode::FAILURE;
99 }
100 void* variableAdr = static_cast<void*>(trackStatesUnbiasedBranch->GetAddress());
101 if (!variableAdr) {
102 ATH_MSG_ERROR (
"Unable to get variable address of Branch TrackStatesUnbiased" );
103 return StatusCode::FAILURE;
104 }
107
108
115
117 return StatusCode::SUCCESS;
118}
#define ATH_MSG_VERBOSE(x)
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ extraDeps_update_handler()
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()
◆ fillMeasurementData()
| StatusCode Trk::DAF_ValidationNtupleHelper::fillMeasurementData |
( |
const Trk::MeasurementBase * | measurement, |
|
|
const Trk::TrackParameters * | trkParameters, |
|
|
const int & | detectorType, |
|
|
const bool & | isOutlier ) |
|
virtual |
fill Trk::CompetingRIOsOnTrack data
fill CompetingRIOsOnTrack data
Implements Trk::IValidationNtupleHelperTool.
Definition at line 123 of file DAF_ValidationNtupleHelper.cxx.
129 {
130
131 if (isOutlier) {
132
133 return StatusCode::SUCCESS;
134 }
135 if (!trkParameters) {
137 return StatusCode::FAILURE;
138 }
139
140 const Trk::CompetingRIOsOnTrack* comprot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(measurement);
141 if (comprot) {
142 ATH_MSG_VERBOSE (
"measurement is CompetingRIOsOnTrack, fill ntuple variables" );
143
144
149
150 } else {
154 ATH_MSG_VERBOSE (
"measurement is not a CompetingRIOsOnTrack, ignore it");
155 }
156 return StatusCode::SUCCESS;
157}
AssignmentProb assignmentProbability(unsigned int indx) const
returns the AssignmentProbability depending on the integer.
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
◆ finalize()
| StatusCode Trk::DAF_ValidationNtupleHelper::finalize |
( |
| ) |
|
◆ initialize()
| StatusCode Trk::DAF_ValidationNtupleHelper::initialize |
( |
| ) |
|
initialize
Definition at line 63 of file DAF_ValidationNtupleHelper.cxx.
63 {
64
66
67
72 }
73
74 return StatusCode::SUCCESS;
75}
::StatusCode StatusCode
StatusCode definition for legacy code.
◆ inputHandles()
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()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ outputHandles()
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()
Definition at line 380 of file AthCommonDataStore.h.
381 {
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()
◆ resetVariables()
| StatusCode Trk::DAF_ValidationNtupleHelper::resetVariables |
( |
const int & | detectorType | ) |
|
|
virtual |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_detStore
◆ m_evtStore
◆ m_ignoreMissTrkCov
| bool Trk::DAF_ValidationNtupleHelper::m_ignoreMissTrkCov |
|
private |
◆ m_indexOfMaxAssgnProb
| std::vector<int>* Trk::DAF_ValidationNtupleHelper::m_indexOfMaxAssgnProb |
|
private |
◆ m_isUnbiased
| int* Trk::DAF_ValidationNtupleHelper::m_isUnbiased |
|
private |
◆ m_maxAssgnProb
| std::vector<float>* Trk::DAF_ValidationNtupleHelper::m_maxAssgnProb |
|
private |
◆ m_nContainedROTs
| std::vector<int>* Trk::DAF_ValidationNtupleHelper::m_nContainedROTs |
|
private |
◆ m_residualPullCalculator
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeHitPositions
| bool Trk::DAF_ValidationNtupleHelper::m_writeHitPositions |
|
private |
◆ s_maxContainedROTs
| const unsigned int Trk::DAF_ValidationNtupleHelper::s_maxContainedROTs = 8 |
|
staticprivate |
The documentation for this class was generated from the following files: