48 declareInterface<IValidationNtupleHelperTool>(
this);
67 StatusCode
sc = AthAlgTool::initialize();
68 if (
sc.isFailure())
return sc;
111 return StatusCode::SUCCESS;
119 const int& detectorType ) {
121 TBranch* trackStatesUnbiasedBranch =
tree->GetBranch(
"TrackStatesUnbiased");
122 if (!trackStatesUnbiasedBranch) {
123 ATH_MSG_ERROR (
"Unable to get Branch TrackStatesUnbiased in ntuple" );
124 return StatusCode::FAILURE;
126 void* variableAdr =
static_cast<void*
>(trackStatesUnbiasedBranch->GetAddress());
128 ATH_MSG_ERROR (
"Unable to get variable address of Branch TrackStatesUnbiased");
129 return StatusCode::FAILURE;
131 ATH_MSG_VERBOSE (
"Address of unbiasedState tree variable: " << variableAdr );
142 ATH_MSG_INFO (
"adding Pixel residual/pull variables to ntuple ");
152 ATH_MSG_INFO (
"adding TRT residual/pull variables to ntuple ");
157 ATH_MSG_INFO (
"adding SCT residual/pull variables to ntuple ");
163 ATH_MSG_INFO (
"adding MDT residual/pull variables to ntuple ");
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.");
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.");
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.");
194 return StatusCode::SUCCESS;
205 const int& detectorType,
206 const bool& isOutlier ) {
209 if (!trkParameters) {
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");
221 return StatusCode::SUCCESS;
230 std::optional<Trk::ResidualPull> residualPull=std::nullopt;
235 ATH_MSG_WARNING (
"Detector type could not be identified, can not calculate residuals!");
237 return StatusCode::FAILURE;
242 return StatusCode::FAILURE;
273 return StatusCode::SUCCESS;
277 const int& detectorType ) {
302 return StatusCode::SUCCESS;
310 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
This class is the pure abstract base class for all fittable tracking measurements.
@ Biased
RP with track state including the hit.
@ Unbiased
RP with track state that has measurement not included.
std::vector< float > * m_TGCRes
hit residual in TGC strip coordinate for each TGC meas't, vector of size nTGCHits UNIT:mm
StatusCode finalize()
finalize
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
void givePullWarning() const
std::vector< float > * m_PixResPhi
hit residual in pixel local phi for each Pixel meas't, vector of size nPixelHits UNIT:mm
virtual StatusCode fillMeasurementData(const Trk::MeasurementBase *, const Trk::TrackParameters *, const int &detectorType, const bool &isOutlier)
fill residual data
virtual StatusCode resetVariables(const int &detectorType)
reset ntuple variables
ResidualValidationNtupleHelper(const std::string &, const std::string &, const IInterface *)
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
virtual StatusCode fillHoleData(const Trk::TrackStateOnSurface &, const int &)
fill special data about holes on track (here: do nothing)
void fillValues(const int &detectorType, double res1=-1000., double pull1=-1000., double res2=-1000., double pull2=-1000.)
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
StatusCode initialize()
initialize
~ResidualValidationNtupleHelper()
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
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...
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
represents the track state (measurement, material, fit parameters and quality) at a surface.
@ distEta
readout for silicon
ParametersBase< TrackParametersDim, Charged > TrackParameters