|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/SmartDataPtr.h"
17 #include "GaudiKernel/ITHistSvc.h"
19 #include "GaudiKernel/ISvcLocator.h"
41 m_residualPullCalculator(
"Trk::ResidualPullCalculator/ResidualPullCalculator"),
42 m_isUnbiased(nullptr),
43 m_nContainedROTs(nullptr),
44 m_indexOfMaxAssgnProb(nullptr),
45 m_maxAssgnProb(nullptr)
49 declareInterface<IValidationNtupleHelperTool>(
this);
50 declareProperty(
"IgnoreMissingTrackCovarianceForPulls",
m_ignoreMissTrkCov =
false,
"Do not warn, if track states do not have covariance matries when calculating pulls");
68 sc = m_residualPullCalculator.retrieve();
70 ATH_MSG_FATAL (
"Could not retrieve "<< m_residualPullCalculator <<
" (to calculate residuals and pulls) " );
74 return StatusCode::SUCCESS;
82 return StatusCode::SUCCESS;
95 TBranch* trackStatesUnbiasedBranch =
tree->GetBranch(
"TrackStatesUnbiased");
96 if (!trackStatesUnbiasedBranch) {
97 ATH_MSG_ERROR (
"Unable to get Branch TrackStatesUnbiased in ntuple" );
98 return StatusCode::FAILURE;
100 void* variableAdr =
static_cast<void*
>(trackStatesUnbiasedBranch->GetAddress());
102 ATH_MSG_ERROR (
"Unable to get variable address of Branch TrackStatesUnbiased" );
103 return StatusCode::FAILURE;
106 m_isUnbiased =
static_cast<int*
>(variableAdr);
109 m_nContainedROTs =
new std::vector<int>();
110 m_indexOfMaxAssgnProb =
new std::vector<int>();
111 m_maxAssgnProb =
new std::vector<float>();
112 tree->Branch(
"CompROTnContainedROTs", &m_nContainedROTs);
113 tree->Branch(
"CompROTindexOfMaxAssgnProb", &m_indexOfMaxAssgnProb);
114 tree->Branch(
"CompROTmaxAssgnProb", &m_maxAssgnProb);
117 return StatusCode::SUCCESS;
129 const bool& isOutlier) {
133 return StatusCode::SUCCESS;
135 if (!trkParameters) {
137 return StatusCode::FAILURE;
142 ATH_MSG_VERBOSE (
"measurement is CompetingRIOsOnTrack, fill ntuple variables" );
147 m_indexOfMaxAssgnProb->push_back(indexOfMaxAssgnProb);
151 m_nContainedROTs->push_back(0);
152 m_indexOfMaxAssgnProb->push_back(0);
153 m_maxAssgnProb->push_back(0.);
154 ATH_MSG_VERBOSE (
"measurement is not a CompetingRIOsOnTrack, ignore it");
156 return StatusCode::SUCCESS;
161 m_nContainedROTs->clear();
162 m_indexOfMaxAssgnProb->clear();
163 m_maxAssgnProb->clear();
164 return StatusCode::SUCCESS;
171 return StatusCode::SUCCESS;
DAF_ValidationNtupleHelper(const std::string &, const std::string &, const IInterface *)
virtual StatusCode fillMeasurementData(const Trk::MeasurementBase *, const Trk::TrackParameters *, const int &detectorType, const bool &isOutlier)
fill Trk::CompetingRIOsOnTrack data
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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 t...
#define ATH_MSG_VERBOSE(x)
virtual StatusCode resetVariables(const int &detectorType)
reset ntuple variables
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
::StatusCode StatusCode
StatusCode definition for legacy code.
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
bool m_writeHitPositions
jobOption: shall the positions of the contained ROTs be written?
~DAF_ValidationNtupleHelper()
represents the track state (measurement, material, fit parameters and quality) at a surface.
StatusCode initialize()
initialize
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool.
AssignmentProb assignmentProbability(unsigned int indx) const
returns the AssignmentProbability depending on the integer.
virtual StatusCode fillHoleData(const Trk::TrackStateOnSurface &, const int &)
fill special data about holes on track (here: do nothing)
StatusCode finalize()
finalize