|
ATLAS Offline Software
|
#include <ResidualValidationNtupleHelper.h>
|
| ResidualValidationNtupleHelper (const std::string &, const std::string &, const IInterface *) |
|
| ~ResidualValidationNtupleHelper () |
|
StatusCode | initialize () |
| initialize More...
|
|
StatusCode | finalize () |
| finalize More...
|
|
virtual StatusCode | fillMeasurementData (const Trk::MeasurementBase *, const Trk::TrackParameters *, const int &detectorType, const bool &isOutlier) |
| fill residual data More...
|
|
virtual StatusCode | fillHoleData (const Trk::TrackStateOnSurface &, const int &) |
| fill special data about holes on track (here: do nothing) More...
|
|
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) More...
|
|
virtual StatusCode | resetVariables (const int &detectorType) |
| reset ntuple variables More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
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 > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
bool | m_pullWarning = false |
| warn only once, if pull cannot be calculated More...
|
|
bool | m_trkParametersWarning |
| warn only once, if no track parameters exist More...
|
|
ToolHandle< Trk::IResidualPullCalculator > | m_residualPullCalculator |
| The residual and pull calculator tool. More...
|
|
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 More...
|
|
std::vector< float > * | m_PixPullEta |
| hit pull in pixel local eta coord for each Pixel meas't, vector of size nPixelHits UNIT:1 More...
|
|
std::vector< float > * | m_PixResPhi |
| hit residual in pixel local phi for each Pixel meas't, vector of size nPixelHits UNIT:mm More...
|
|
std::vector< float > * | m_PixResEta |
| hit residual in pixel local eta for each Pixel meas't, vector of size nPixelHits UNIT:mm More...
|
|
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. More...
|
|
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. More...
|
|
std::vector< float > * | m_TRTPull |
| hit pull in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:1 More...
|
|
std::vector< float > * | m_TRTRes |
| hit residual in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:mm More...
|
|
std::vector< float > * | m_MDTPull |
| hit pull in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:1 More...
|
|
std::vector< float > * | m_MDTRes |
| hit residual in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:mm More...
|
|
std::vector< float > * | m_RPCPull |
| hit pull in RPC strip coordinate for each RPC meas't, vector of size nRPCHits UNIT:1 More...
|
|
std::vector< float > * | m_RPCRes |
| hit residual in RPC coordinate for each RPC meas't, vector of size nRPCHits UNIT:mm More...
|
|
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 More...
|
|
std::vector< float > * | m_TGCRes |
| hit residual in TGC strip coordinate for each TGC meas't, vector of size nTGCHits UNIT:mm More...
|
|
std::vector< float > * | m_CSCPull |
| hit pull in CSC ??? coordinate for each CSC meas't, vector of size nCSCHits UNIT:1 More...
|
|
std::vector< float > * | m_CSCRes |
| hit residual in CSC ??? coordinate for each CSC meas't, vector of size nCSCHits UNIT:mm More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
◆ StoreGateSvc_t
◆ ResidualValidationNtupleHelper()
Trk::ResidualValidationNtupleHelper::ResidualValidationNtupleHelper |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~ResidualValidationNtupleHelper()
Trk::ResidualValidationNtupleHelper::~ResidualValidationNtupleHelper |
( |
| ) |
|
|
default |
◆ 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.
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;
◆ calcPull()
double Trk::ResidualValidationNtupleHelper::calcPull |
( |
const double |
residual, |
|
|
const double |
locMesCov, |
|
|
const double |
locTrkCov |
|
) |
| const |
|
private |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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()
fill residual data
Implements Trk::IValidationNtupleHelperTool.
Definition at line 200 of file ResidualValidationNtupleHelper.cxx.
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;
◆ fillValues()
void Trk::ResidualValidationNtupleHelper::fillValues |
( |
const int & |
detectorType, |
|
|
double |
res1 = -1000. , |
|
|
double |
pull1 = -1000. , |
|
|
double |
res2 = -1000. , |
|
|
double |
pull2 = -1000. |
|
) |
| |
|
inlineprivate |
◆ finalize()
StatusCode Trk::ResidualValidationNtupleHelper::finalize |
( |
| ) |
|
◆ givePullWarning()
void Trk::ResidualValidationNtupleHelper::givePullWarning |
( |
| ) |
const |
|
inlineprivate |
Definition at line 118 of file ResidualValidationNtupleHelper.h.
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;
◆ initialize()
StatusCode Trk::ResidualValidationNtupleHelper::initialize |
( |
| ) |
|
◆ 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 |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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()
◆ renounceArray()
◆ resetVariables()
StatusCode Trk::ResidualValidationNtupleHelper::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()
◆ m_CSCPull
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_CSCPull |
|
private |
◆ m_CSCRes
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_CSCRes |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_ignoreMissTrkCov
bool Trk::ResidualValidationNtupleHelper::m_ignoreMissTrkCov |
|
private |
◆ m_isUnbiased
int* Trk::ResidualValidationNtupleHelper::m_isUnbiased |
|
private |
◆ m_MDTPull
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_MDTPull |
|
private |
◆ m_MDTRes
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_MDTRes |
|
private |
◆ m_PixPullEta
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixPullEta |
|
private |
◆ m_PixPullPhi
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixPullPhi |
|
private |
◆ m_PixResEta
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixResEta |
|
private |
◆ m_PixResPhi
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_PixResPhi |
|
private |
◆ m_pullWarning
bool Trk::ResidualValidationNtupleHelper::m_pullWarning = false |
|
private |
◆ m_residualPullCalculator
◆ m_RPCPull
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_RPCPull |
|
private |
◆ m_RPCRes
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_RPCRes |
|
private |
◆ 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 |
◆ m_TGCRes
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TGCRes |
|
private |
◆ m_trkParametersWarning
bool Trk::ResidualValidationNtupleHelper::m_trkParametersWarning |
|
private |
◆ m_TRTPull
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TRTPull |
|
private |
◆ m_TRTRes
std::vector<float>* Trk::ResidualValidationNtupleHelper::m_TRTRes |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
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_TGCPull
hit pull in TGC strip coordinate for each TGC meas't (corrects for fan-shaped strip arrangement),...
void givePullWarning() const
void fillValues(const int &detectorType, double res1=-1000., double pull1=-1000., double res2=-1000., double pull2=-1000.)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< float > * m_MDTPull
hit pull in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:1
@ Unbiased
RP with track state that has measurement not included.
std::vector< float > * m_CSCRes
hit residual in CSC ??? coordinate for each CSC meas't, vector of size nCSCHits UNIT:mm
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_PixPullEta
hit pull in pixel local eta coord for each Pixel meas't, vector of size nPixelHits UNIT:1
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
#define ATH_MSG_VERBOSE(x)
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< float > * m_MDTRes
hit residual in MDT drift radius for each MDT meas't, vector of size nMDTHits UNIT:mm
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool.
std::vector< float > * m_PixResEta
hit residual in pixel local eta for each Pixel meas't, vector of size nPixelHits UNIT:mm
@ distEta
readout for silicon
::StatusCode StatusCode
StatusCode definition for legacy code.
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...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool m_trkParametersWarning
warn only once, if no track parameters exist
std::vector< float > * m_CSCPull
hit pull in CSC ??? coordinate for each CSC meas't, vector of size nCSCHits UNIT:1
std::vector< float > * m_RPCRes
hit residual in RPC coordinate for each RPC meas't, vector of size nRPCHits UNIT:mm
@ Biased
RP with track state including the hit.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
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_TRTPull
hit pull in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:1
std::vector< float > * m_RPCPull
hit pull in RPC strip coordinate for each RPC meas't, vector of size nRPCHits UNIT:1
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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_TRTRes
hit residual in TRT drift radius for each TRT meas't, vector of size nTRTHits UNIT:mm