|
ATLAS Offline Software
|
Concrete implementation of the ITrackScoringTool pABC.
More...
#include <InDetTrtTrackScoringTool.h>
|
| InDetTrtTrackScoringTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~InDetTrtTrackScoringTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual bool | passBasicSelections (const Trk::Track &track) const override |
| check track selections independent from TrackSummary More...
|
|
virtual Trk::TrackScore | score (const Trk::Track &track, bool checkBasicSel) const override |
| create a score based on how good the passed track is More...
|
|
virtual Trk::TrackScore | simpleScore (const Trk::Track &track, const Trk::TrackSummary &trackSum) const override |
| create a score based on how good the passed TrackSummary is More...
|
|
Trk::TrackScore | TRT_ambigScore (const Trk::Track &track, const Trk::TrackSummary &trackSum) const |
|
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 |
|
|
const TRT_ID * | m_trtId |
| ID TRT helper. More...
|
|
int | m_maxSigmaChi2 = -1 |
|
int | m_maxTrtRatio = -1 |
|
int | m_maxTrtFittedRatio = -1 |
|
std::vector< double > | m_factorSigmaChi2 |
|
std::vector< double > | m_factorTrtRatio |
|
std::vector< double > | m_factorTrtFittedRatio |
|
std::vector< double > | m_boundsSigmaChi2 |
|
std::vector< double > | m_boundsTrtRatio |
|
std::vector< double > | m_boundsTrtFittedRatio |
|
BooleanProperty | m_useAmbigFcn {this, "useAmbigFcn", true} |
| use the scoring tuned to Ambiguity processing or not More...
|
|
BooleanProperty | m_useSigmaChi2 {this, "useSigmaChi2", false} |
|
std::vector< Trk::TrackScore > | m_summaryTypeScore |
| holds the scores assigned to each Trk::SummaryType from the track's Trk::TrackSummary More...
|
|
ToolHandle< ITrtDriftCircleCutTool > | m_selectortool {this, "DriftCircleCutTool", "InDet::InDetTrtDriftCircleCutTool"} |
| Returns minimum number of expected TRT drift circles depending on eta. More...
|
|
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > | m_fieldCacheCondObjInputKey |
|
ToolHandle< ILumiBlockMuTool > | m_lumiBlockMuTool |
|
IntegerProperty | m_minTRTonTrk {this, "minTRTonTrk", 15, "minimum number of TRT hits"} |
| cuts for selecting good tracks More...
|
|
DoubleProperty | m_maxEta {this, "maxEta", 2.1, "maximal Eta cut"} |
|
DoubleProperty | m_ptmin {this, "PtMin", 1.0, "Minimum Pt"} |
|
BooleanProperty | m_parameterization {this, "UseParameterization", true, "use parameterization to cut instead of custom cut"} |
|
BooleanProperty | m_oldLogic {this, "OldTransitionLogic", false, "use old transition hit logic"} |
|
DoubleProperty | m_minTRTprecision {this, "minTRTPrecisionFraction", 0.5, "minimum fraction of TRT precision hits"} |
|
DoubleArrayProperty | m_TRTTrksEtaBins |
|
DoubleArrayProperty | m_TRTTrksMinTRTHitsThresholds |
|
DoubleArrayProperty | m_TRTTrksMinTRTHitsMuDependencies |
|
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 |
|
Concrete implementation of the ITrackScoringTool pABC.
Definition at line 34 of file InDetTrtTrackScoringTool.h.
◆ StoreGateSvc_t
◆ InDetTrtTrackScoringTool()
InDet::InDetTrtTrackScoringTool::InDetTrtTrackScoringTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~InDetTrtTrackScoringTool()
virtual InDet::InDetTrtTrackScoringTool::~InDetTrtTrackScoringTool |
( |
| ) |
|
|
virtualdefault |
◆ 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
◆ getEtaBin()
unsigned int InDet::InDetTrtTrackScoringTool::getEtaBin |
( |
const Trk::Perigee & |
perigee | ) |
const |
|
private |
◆ getMuDependentNtrtMinCut()
double InDet::InDetTrtTrackScoringTool::getMuDependentNtrtMinCut |
( |
unsigned int |
eta_bin | ) |
const |
|
private |
◆ initialize()
StatusCode InDet::InDetTrtTrackScoringTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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::ITrackScoringTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ isGoodTRT()
bool InDet::InDetTrtTrackScoringTool::isGoodTRT |
( |
const Trk::Track & |
track | ) |
const |
|
private |
Decide whether standalone TRT tracks pass the minimum hit requirement.
Definition at line 336 of file InDetTrtTrackScoringTool.cxx.
344 int firstWheel = -999;
345 int lastLayer = -999;
374 if (isB == 2 || isB == -2)
376 else if (isB == 1 || isB == -1)
391 if ((nEC > 0 && nBRL > 0) || (nEC == 0 && nBRL > 0 && lastLayer < 2) ||
392 (nEC > 0 && nBRL == 0 && (firstWheel > 10 || firstWheel < 2))) {
412 return nTRT > nCutTRT;
◆ 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.
◆ passBasicSelections()
bool InDet::InDetTrtTrackScoringTool::passBasicSelections |
( |
const Trk::Track & |
track | ) |
const |
|
overridevirtual |
check track selections independent from TrackSummary
Reject track below the pT cut
Implements Trk::ITrackScoringTool.
Definition at line 55 of file InDetTrtTrackScoringTool.cxx.
62 const EventContext& ctx = Gaudi::Hive::currentContext();
65 if (fieldCondObj ==
nullptr) {
66 ATH_MSG_ERROR(
"simpleScore: Failed to retrieve AtlasFieldCacheCondObj with key "
71 fieldCondObj->getInitializedCache(fieldCache);
◆ renounce()
◆ renounceArray()
◆ score()
◆ setupTRT_ScoreModifiers()
void InDet::InDetTrtTrackScoringTool::setupTRT_ScoreModifiers |
( |
| ) |
|
|
private |
Definition at line 263 of file InDetTrtTrackScoringTool.cxx.
269 constexpr
int maxTrtRatio = 7;
270 constexpr
double TrtRatioBounds[maxTrtRatio + 1] = { 0, 0.2, 0.4, 0.6,
271 0.8, 1.0, 1.2, 2.4 };
273 constexpr
double goodTrtRatio[maxTrtRatio] = { 0.05, 0.11, 0.12, 0.15,
275 constexpr
double fakeTrtRatio[maxTrtRatio] = { 0.6, 0.08, 0.06, 0.05,
287 const int maxTrtFittedRatio = 4;
288 const double TrtFittedRatioBounds[maxTrtFittedRatio + 1] = { 0, 0.3, 0.6, 0.9, 1.0 };
290 const double goodTrtFittedRatio[maxTrtFittedRatio] = { 0.1, 0.2, 0.3, 0.5 };
291 const double fakeTrtFittedRatio[maxTrtFittedRatio] = { 0.6, 0.1, 0.1, 0.1 };
306 constexpr
int maxSigmaChi2 = 26;
307 constexpr
double SigmaChi2Bounds[maxSigmaChi2 + 1] = {
308 -5.0, -4.5, -4.0, -3.5, -3.0, -2.5, -2.0, -1.5, -1.0,
309 -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5,
310 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0
312 constexpr
double modiSigmaChi2[maxSigmaChi2] = {
313 0.0001, 0.0001, 0.0001, 0.0001, 0.001, 0.005, 0.024, 0.255, 0.644,
314 0.045, 0.008, 0.005, 0.004, 0.003, 0.002, 0.001, 0.001, 0.001,
315 0.001, 0.001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001
317 constexpr
double vetoSigmaChi2[maxSigmaChi2] = {
318 0.001, 0.001, 0.001, 0.003, 0.014, 0.030, 0.079, 0.244, 0.295,
319 0.064, 0.029, 0.028, 0.030, 0.026, 0.023, 0.023, 0.021, 0.019,
320 0.016, 0.018, 0.012, 0.009, 0.007, 0.005, 0.001, 0.001
324 for (
int i = 0;
i < maxSigmaChi2; ++
i) {
325 if (vetoSigmaChi2[
i] == 0.0)
330 for (
int i = 0;
i < maxSigmaChi2; ++
i)
◆ simpleScore()
create a score based on how good the passed TrackSummary is
Implements Trk::ITrackScoringTool.
Definition at line 106 of file InDetTrtTrackScoringTool.cxx.
112 if (numTRT >= 15 && ((
double)(numTRT - numTRTTube)) / numTRT <
m_minTRTprecision) {
122 if (numTRT_plusOutliers < minTRT) {
159 if (
track.fitQuality() !=
nullptr &&
track.fitQuality()->chiSquared() > 0 &&
track.fitQuality()->numberDoF() > 0) {
160 double p = 1.0 - Genfun::CumulativeChiSquare(
track.fitQuality()->numberDoF())(
track.fitQuality()->chiSquared());
◆ 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.
◆ TRT_ambigScore()
Definition at line 173 of file InDetTrtTrackScoringTool.cxx.
179 double pt = std::abs(
track.trackParameters()->front()->pT());
180 double prob = log10(
pt) - 1.;
191 double nTrtExpected = 30.;
194 double ratio = iTRT_Hits / nTrtExpected;
206 double fitted =
double(iTRT_Hits) /
double(iTRT_Hits + iTRT_Outliers);
220 if (
track.fitQuality() !=
nullptr &&
track.fitQuality()->chiSquared() > 0 &&
track.fitQuality()->numberDoF() > 0) {
221 int indf =
track.fitQuality()->numberDoF();
222 double chi2 =
track.fitQuality()->chiSquared();
223 double fac = 1. / log10(10. + 10. *
chi2 / indf);
231 int indf =
track.fitQuality()->numberDoF();
232 double ichi2 =
track.fitQuality()->chiSquared();
239 if (sigmaChi2times100 > 0) {
240 double testvar =
double(sigmaChi2times100) / 100. - sqrt(2. * ichi2 / indf);
◆ updateVHKA()
◆ m_boundsSigmaChi2
std::vector<double> InDet::InDetTrtTrackScoringTool::m_boundsSigmaChi2 |
|
private |
◆ m_boundsTrtFittedRatio
std::vector<double> InDet::InDetTrtTrackScoringTool::m_boundsTrtFittedRatio |
|
private |
◆ m_boundsTrtRatio
std::vector<double> InDet::InDetTrtTrackScoringTool::m_boundsTrtRatio |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_factorSigmaChi2
std::vector<double> InDet::InDetTrtTrackScoringTool::m_factorSigmaChi2 |
|
private |
◆ m_factorTrtFittedRatio
std::vector<double> InDet::InDetTrtTrackScoringTool::m_factorTrtFittedRatio |
|
private |
◆ m_factorTrtRatio
std::vector<double> InDet::InDetTrtTrackScoringTool::m_factorTrtRatio |
|
private |
◆ m_fieldCacheCondObjInputKey
Initial value:{
this,
"AtlasFieldCacheCondObj",
"fieldCondObj",
"Name of the Magnetic Field conditions object key"
}
Definition at line 96 of file InDetTrtTrackScoringTool.h.
◆ m_lumiBlockMuTool
Initial value:{
this,
"LuminosityTool",
"LumiBlockMuTool/LumiBlockMuTool",
"Luminosity Tool"
}
Definition at line 103 of file InDetTrtTrackScoringTool.h.
◆ m_maxEta
DoubleProperty InDet::InDetTrtTrackScoringTool::m_maxEta {this, "maxEta", 2.1, "maximal Eta cut"} |
|
private |
◆ m_maxSigmaChi2
int InDet::InDetTrtTrackScoringTool::m_maxSigmaChi2 = -1 |
|
private |
◆ m_maxTrtFittedRatio
int InDet::InDetTrtTrackScoringTool::m_maxTrtFittedRatio = -1 |
|
private |
◆ m_maxTrtRatio
int InDet::InDetTrtTrackScoringTool::m_maxTrtRatio = -1 |
|
private |
◆ m_minTRTonTrk
IntegerProperty InDet::InDetTrtTrackScoringTool::m_minTRTonTrk {this, "minTRTonTrk", 15, "minimum number of TRT hits"} |
|
private |
◆ m_minTRTprecision
DoubleProperty InDet::InDetTrtTrackScoringTool::m_minTRTprecision {this, "minTRTPrecisionFraction", 0.5, "minimum fraction of TRT precision hits"} |
|
private |
◆ m_oldLogic
BooleanProperty InDet::InDetTrtTrackScoringTool::m_oldLogic {this, "OldTransitionLogic", false, "use old transition hit logic"} |
|
private |
◆ m_parameterization
BooleanProperty InDet::InDetTrtTrackScoringTool::m_parameterization {this, "UseParameterization", true, "use parameterization to cut instead of custom cut"} |
|
private |
◆ m_ptmin
DoubleProperty InDet::InDetTrtTrackScoringTool::m_ptmin {this, "PtMin", 1.0, "Minimum Pt"} |
|
private |
◆ m_selectortool
◆ m_summaryTypeScore
std::vector<Trk::TrackScore> InDet::InDetTrtTrackScoringTool::m_summaryTypeScore |
|
private |
◆ m_trtId
◆ m_TRTTrksEtaBins
DoubleArrayProperty InDet::InDetTrtTrackScoringTool::m_TRTTrksEtaBins |
|
private |
Initial value:{this, "TRTTrksEtaBins",
{999., 999., 999., 999., 999., 999., 999., 999., 999., 999.},
"Eta bins (10 expected) for TRT-only track cuts"}
Definition at line 122 of file InDetTrtTrackScoringTool.h.
◆ m_TRTTrksMinTRTHitsMuDependencies
DoubleArrayProperty InDet::InDetTrtTrackScoringTool::m_TRTTrksMinTRTHitsMuDependencies |
|
private |
Initial value:{this, "TRTTrksMinTRTHitsMuDependencies",
{0., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
"Eta-bined Mu-dependent component for nTRT cut"}
Definition at line 130 of file InDetTrtTrackScoringTool.h.
◆ m_TRTTrksMinTRTHitsThresholds
DoubleArrayProperty InDet::InDetTrtTrackScoringTool::m_TRTTrksMinTRTHitsThresholds |
|
private |
Initial value:{this, "TRTTrksMinTRTHitsThresholds",
{0., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
"Eta-binned nTRT cut for TRT-only cuts"}
Definition at line 126 of file InDetTrtTrackScoringTool.h.
◆ m_useAmbigFcn
BooleanProperty InDet::InDetTrtTrackScoringTool::m_useAmbigFcn {this, "useAmbigFcn", true} |
|
private |
◆ m_useSigmaChi2
BooleanProperty InDet::InDetTrtTrackScoringTool::m_useSigmaChi2 {this, "useSigmaChi2", false} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
@ numberOfTRTHighThresholdHits
total number of TRT hits which pass the high threshold
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
@ numberOfTrackSummaryTypes
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
@ standardDeviationOfChi2OS
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
void toLower(std::string &)
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
@ numberOfTRTTubeHits
number of TRT hits on track in straws with xenon
@ numberOfTRTOutliers
number of TRT holes
double chi2(TH1 *h0, TH1 *h1)
virtual Identifier identify() const override final
identifier of this detector element:
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int layer_or_wheel(const Identifier &id) const
bool solenoidOn() const
status of the magnets
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ numberOfTRTHits
number of TRT outliers
StatusCode initialize(bool used=true)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SummaryType
enumerates the different types of information stored in Summary.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.