 |
ATLAS Offline Software
|
#include <TrackTimeDefAndQualityAlg.h>
|
| TrackTimeDefAndQualityAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~TrackTimeDefAndQualityAlg () |
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | execute (const EventContext &ctx) const override final |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) 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 | 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, V, H > &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 |
|
|
std::pair< float, float > | getRadiusAndZ (const xAOD::TrackParticle &track_particle) const |
|
CleaningResult | runTimeConsistencyCuts (const std::vector< float > ×, const std::vector< bool > &has_clusters, const std::vector< int > &hit_classification) const |
|
std::array< Hit, s_hgtd_layers > | getValidHits (const std::vector< float > ×, const std::vector< bool > &has_clusters, const std::vector< int > &hit_classification) const |
|
float | calculateChi2 (const std::array< Hit, s_hgtd_layers > &hits) const |
| Calculates the chi2 of the hit times given their resolution. More...
|
|
bool | passesDeltaT (const std::array< Hit, s_hgtd_layers > &hits) const |
| Checks two hits for time compatibility. More...
|
|
float | meanTime (const std::array< Hit, s_hgtd_layers > &hits) const |
| Calculates the arithmetic mean of the valid hit times;. More...
|
|
float | trackTimeResolution (const std::array< Hit, s_hgtd_layers > &hits) const |
| Calculates the combined resolution. More...
|
|
short | findLayerWithBadChi2 (std::array< Hit, s_hgtd_layers > hits) const |
| Identifies time outliers by finding the layer within which a hit contributes negatively to the overall chi2 value and returns the layer number. More...
|
|
void | setLayerAsInvalid (std::array< Hit, s_hgtd_layers > &hits, short layer) const |
| Given a layer number, the hit sitting on this layer is flagged as invalid. More...
|
|
short | getValidPattern (const std::array< Hit, s_hgtd_layers > &hits) const |
| Returns the pattern of valid hits in HGTD as a 4-bit bitfield, where a 1 encodes that a valid hit was found, while a 0 means no valid hit found. More...
|
|
bool | lastHitIsOnLastSurface (const xAOD::TrackParticle &track_particle) const |
| Checks if the last hit on track was found on a pre-specified set of Pixel and Strip layers close to the HGTD surfaces. More...
|
|
const Trk::TrackParameters * | getLastHitOnTrack (const Trk::Track &track) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 57 of file TrackTimeDefAndQualityAlg.h.
◆ StoreGateSvc_t
◆ TrackTimeDefAndQualityAlg()
HGTD::TrackTimeDefAndQualityAlg::TrackTimeDefAndQualityAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TrackTimeDefAndQualityAlg()
virtual HGTD::TrackTimeDefAndQualityAlg::~TrackTimeDefAndQualityAlg |
( |
| ) |
|
|
inlinevirtual |
◆ calculateChi2()
float HGTD::TrackTimeDefAndQualityAlg::calculateChi2 |
( |
const std::array< Hit, s_hgtd_layers > & |
hits | ) |
const |
|
private |
Calculates the chi2 of the hit times given their resolution.
- Parameters
-
- Returns
- Chi2 value.
Definition at line 241 of file TrackTimeDefAndQualityAlg.cxx.
247 for (
const auto& hit :
hits) {
250 (hit.m_resolution * hit.m_resolution);
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ 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);
◆ 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.
◆ 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.
◆ 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]
◆ execute()
StatusCode HGTD::TrackTimeDefAndQualityAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Definition at line 47 of file TrackTimeDefAndQualityAlg.cxx.
51 ATH_CHECK( trk_ptkl_container_handle.isValid() );
53 trk_ptkl_container_handle.cptr();
54 if (not track_particles) {
56 "[TrackTimeDefAndQualityAlg] TrackParticleContainer not found, "
58 return StatusCode::FAILURE;
72 ATH_CHECK(layerClusterTimeHandle.isValid());
76 ATH_CHECK(layerHasExtensionHandle.isValid());
80 ATH_CHECK(layerClusterTruthClassHandle.isValid());
83 for (
const auto* track_ptkl : *track_particles) {
86 const std::vector<float>&
times = layerClusterTimeHandle(*track_ptkl);
87 const std::vector<bool>& has_clusters = layerHasExtensionHandle(*track_ptkl);
88 const std::vector<int>& hit_classification = layerClusterTruthClassHandle(*track_ptkl);
102 short prime_pattern = 0x0;
103 for (
short i = 0;
i < s_hgtd_layers;
i++) {
104 if (
res.m_hits.at(
i).m_isprime) {
105 prime_pattern |= (1 <<
i);
111 time_handle(*track_ptkl) =
res.m_time;
112 timeres_handle(*track_ptkl) =
res.m_resolution;
113 hasValidTime_handle(*track_ptkl) =
res.m_hasValidTime;
114 summary_handle(*track_ptkl) =
res.m_field;
116 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ findLayerWithBadChi2()
short HGTD::TrackTimeDefAndQualityAlg::findLayerWithBadChi2 |
( |
std::array< Hit, s_hgtd_layers > |
hits | ) |
const |
|
private |
Identifies time outliers by finding the layer within which a hit contributes negatively to the overall chi2 value and returns the layer number.
Copies the hits, since they have to be invalidated one by one.
- Parameters
-
- Returns
- Layer with outlier time, value between 0 and 3.
Definition at line 307 of file TrackTimeDefAndQualityAlg.cxx.
309 short remove_layer = -1;
310 float local_min_chi2 = 999999;
311 for (
auto& hit :
hits) {
313 bool validbuff = hit.m_isvalid;
314 hit.m_isvalid =
false;
316 hit.m_isvalid = validbuff;
317 if (local_chi2 < local_min_chi2) {
318 local_min_chi2 = local_chi2;
319 remove_layer = hit.m_layer;
◆ getLastHitOnTrack()
Definition at line 336 of file TrackTimeDefAndQualityAlg.cxx.
339 track.trackStateOnSurfaces();
346 for (
auto i = tsos->rbegin();
i != tsos->rend(); ++
i) {
347 const auto* curr_last_tsos = *
i;
348 if (not curr_last_tsos) {
353 curr_last_tsos->trackParameters() and
354 curr_last_tsos->measurementOnTrack()) {
355 return curr_last_tsos->trackParameters();
◆ getRadiusAndZ()
std::pair< float, float > HGTD::TrackTimeDefAndQualityAlg::getRadiusAndZ |
( |
const xAOD::TrackParticle & |
track_particle | ) |
const |
|
private |
Definition at line 362 of file TrackTimeDefAndQualityAlg.cxx.
369 if (not
track)
throw std::runtime_error(
"Cannot retrieve Trk track from Track Particle");
371 if (not last_hit_param)
throw std::runtime_error(
"Cannot retrieve Trk track parameters from Trk track");
373 radius = std::hypot(last_hit_param->position().x(),
374 last_hit_param->position().y());
375 abs_z = std::abs(last_hit_param->position().z());
379 if (not actsTrackLink.isAvailable(track_particle))
throw std::runtime_error(
"Track particle does not have link to acts track");
382 if (not link_to_track.
isValid())
throw std::runtime_error(
"Element link to acts track is not valid");
384 std::optional<ActsTrk::TrackContainer::ConstTrackProxy> optional_track = *link_to_track;
385 if (not optional_track.has_value())
throw std::runtime_error(
"Link to acts track has no value");
387 const ActsTrk::TrackContainer::ConstTrackProxy&
track = optional_track.value();
388 const auto lastMeasurementState = Acts::findLastMeasurementState(
track);
389 const auto state = lastMeasurementState.value();
391 auto sl = state.getUncalibratedSourceLink().template get<ActsTrk::ATLASUncalibSourceLink>();
392 assert( sl !=
nullptr);
396 switch (clusterType) {
400 radius = std::sqrt( glob(0, 0) * glob(0, 0) + glob(1, 0) * glob(1, 0) );
401 abs_z = std::abs( glob(2, 0) );
407 radius = std::sqrt( glob(0, 0) * glob(0, 0) + glob(1, 0) * glob(1, 0) );
408 abs_z = std::abs( glob(2, 0) );
413 return std::make_pair(700, 3000);
415 return std::make_pair(
radius, abs_z);
419 return std::make_pair(
radius, abs_z);
◆ getValidHits()
std::array< TrackTimeDefAndQualityAlg::Hit, s_hgtd_layers > HGTD::TrackTimeDefAndQualityAlg::getValidHits |
( |
const std::vector< float > & |
times, |
|
|
const std::vector< bool > & |
has_clusters, |
|
|
const std::vector< int > & |
hit_classification |
|
) |
| const |
|
private |
Definition at line 211 of file TrackTimeDefAndQualityAlg.cxx.
214 std::array<Hit, s_hgtd_layers> valid_hits {};
216 for (
size_t i = 0;
i < s_hgtd_layers;
i++) {
217 Hit& newhit = valid_hits[
i];
218 if (has_clusters.at(
i)) {
219 newhit.m_time =
times.at(
i);
220 newhit.m_isprime = hit_classification.at(
i) == 1;
221 newhit.m_isvalid =
true;
◆ getValidPattern()
short HGTD::TrackTimeDefAndQualityAlg::getValidPattern |
( |
const std::array< Hit, s_hgtd_layers > & |
hits | ) |
const |
|
private |
Returns the pattern of valid hits in HGTD as a 4-bit bitfield, where a 1 encodes that a valid hit was found, while a 0 means no valid hit found.
The LSB carries the hit information for the layer closest to the IP.
- Parameters
-
- Returns
- Bit pattern encoding valid hits in layers.
Definition at line 229 of file TrackTimeDefAndQualityAlg.cxx.
233 for (
short i = 0;
i < s_hgtd_layers;
i++) {
234 if (
hits.at(
i).m_isvalid) {
◆ initialize()
StatusCode HGTD::TrackTimeDefAndQualityAlg::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ 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.
◆ isClonable()
◆ lastHitIsOnLastSurface()
Checks if the last hit on track was found on a pre-specified set of Pixel and Strip layers close to the HGTD surfaces.
FIXME: should not be hardcoded. To be exchanged by a hole search at a later point.
- Parameters
-
[in] | track_particle | Track reconstructed in ITk. |
- Returns
- True if the last hit on track was within the specified volume.
Definition at line 422 of file TrackTimeDefAndQualityAlg.cxx.
429 if (radius < 350 and abs_z > 2400) {
433 if (
radius > 205 and radius < 350 and abs_z > 2100) {
437 if (radius < 220 and abs_z > 2200) {
441 if (radius < 140 and abs_z > 1890) {
◆ meanTime()
float HGTD::TrackTimeDefAndQualityAlg::meanTime |
( |
const std::array< Hit, s_hgtd_layers > & |
hits | ) |
const |
|
private |
Calculates the arithmetic mean of the valid hit times;.
- Parameters
-
- Returns
- Returns true if the times were in agreement.
Definition at line 279 of file TrackTimeDefAndQualityAlg.cxx.
284 for (
const auto& hit :
hits) {
◆ 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.
◆ passesDeltaT()
bool HGTD::TrackTimeDefAndQualityAlg::passesDeltaT |
( |
const std::array< Hit, s_hgtd_layers > & |
hits | ) |
const |
|
private |
Checks two hits for time compatibility.
- Parameters
-
- Returns
- Returns true if the times were in agreement.
Definition at line 256 of file TrackTimeDefAndQualityAlg.cxx.
260 short n_valid = std::count_if(
hits.begin(),
hits.end(),
261 [](
const Hit& hit) { return hit.m_isvalid; });
266 std::vector<float>
times;
267 std::vector<float>
res;
268 for (
const auto& hit :
hits) {
270 times.push_back(hit.m_time);
271 res.push_back(hit.m_resolution);
◆ renounce()
◆ renounceArray()
◆ runTimeConsistencyCuts()
Definition at line 123 of file TrackTimeDefAndQualityAlg.cxx.
132 result.m_hits = valid_hits;
136 result.m_hasValidTime = 0;
142 short nhits = std::count_if(valid_hits.begin(), valid_hits.end(),
143 [](
const Hit& hit) { return hit.m_isvalid; });
149 result.m_hasValidTime = recoed_pattern ? 1 : 0;
151 }
else if (nhits == 2) {
159 result.m_hasValidTime = 1;
177 nhits = std::count_if(valid_hits.begin(), valid_hits.end(),
178 [](
const Hit& hit) { return hit.m_isvalid; });
191 result.m_hasValidTime = 1;
204 result.m_hasValidTime = 1;
◆ setFilterPassed()
◆ setLayerAsInvalid()
void HGTD::TrackTimeDefAndQualityAlg::setLayerAsInvalid |
( |
std::array< Hit, s_hgtd_layers > & |
hits, |
|
|
short |
layer |
|
) |
| const |
|
private |
Given a layer number, the hit sitting on this layer is flagged as invalid.
Used for outlier removal.
- Parameters
-
[in] | hits | Array of hits. |
[in] | layer | The layer that should be masked. |
Definition at line 325 of file TrackTimeDefAndQualityAlg.cxx.
328 for (
auto& hit :
hits) {
329 if (hit.m_layer ==
layer) {
330 hit.m_isvalid =
false;
◆ sysExecute()
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ trackTimeResolution()
float HGTD::TrackTimeDefAndQualityAlg::trackTimeResolution |
( |
const std::array< Hit, s_hgtd_layers > & |
hits | ) |
const |
|
private |
Calculates the combined resolution.
Definition at line 293 of file TrackTimeDefAndQualityAlg.cxx.
298 for (
const auto& hit :
hits) {
300 sum += 1. / (hit.m_resolution * hit.m_resolution);
304 :
static_cast<float>(std::sqrt(1. /
sum));
◆ updateVHKA()
◆ m_chi2_threshold
FloatProperty HGTD::TrackTimeDefAndQualityAlg::m_chi2_threshold |
|
private |
Initial value:{
this, "Chi2Threshold", 1.5,
"Quality cut for decision to keep hits compatible in time"}
Definition at line 125 of file TrackTimeDefAndQualityAlg.h.
◆ m_comp_ptrn_sft
const short HGTD::TrackTimeDefAndQualityAlg::m_comp_ptrn_sft = 8 |
|
private |
◆ m_default_time
FloatProperty HGTD::TrackTimeDefAndQualityAlg::m_default_time |
|
private |
Initial value:{
this, "DefaultTime", 0.0,
"Default time used for tracks without HGTD timing info"}
Definition at line 131 of file TrackTimeDefAndQualityAlg.h.
◆ m_default_time_res
FloatProperty HGTD::TrackTimeDefAndQualityAlg::m_default_time_res |
|
private |
Initial value:{
this, "DefaultTimeRes", 50. / std::sqrt(12.),
"Default time resolution used for tracks without HGTD timing info"}
Definition at line 136 of file TrackTimeDefAndQualityAlg.h.
◆ m_deltat_cut
FloatProperty HGTD::TrackTimeDefAndQualityAlg::m_deltat_cut |
|
private |
◆ m_detStore
◆ m_doActs
Gaudi::Property<bool> HGTD::TrackTimeDefAndQualityAlg::m_doActs {this, "doActs", false} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_hasValidTime_dec_key
◆ m_holes_ptrn_sft
const short HGTD::TrackTimeDefAndQualityAlg::m_holes_ptrn_sft = 12 |
|
private |
◆ m_layerClusterTimeKey
◆ m_layerClusterTruthClassKey
◆ m_layerHasExtensionKey
◆ m_primes_ptrn_sft
const short HGTD::TrackTimeDefAndQualityAlg::m_primes_ptrn_sft = 16 |
|
private |
◆ m_recoed_ptrn_sft
const short HGTD::TrackTimeDefAndQualityAlg::m_recoed_ptrn_sft = 0 |
|
private |
◆ m_summarypattern_dec_key
◆ m_time_dec_key
◆ m_time_res_dec_key
◆ m_trackParticleContainerKey
Initial value:{
this, "TrackParticleContainerName", "InDetTrackParticles",
"Name of the TrackParticle container"}
Definition at line 77 of file TrackTimeDefAndQualityAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
std::array< Hit, s_hgtd_layers > getValidHits(const std::vector< float > ×, const std::vector< bool > &has_clusters, const std::vector< int > &hit_classification) const
void setLayerAsInvalid(std::array< Hit, s_hgtd_layers > &hits, short layer) const
Given a layer number, the hit sitting on this layer is flagged as invalid.
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
float meanTime(const std::array< Hit, s_hgtd_layers > &hits) const
Calculates the arithmetic mean of the valid hit times;.
bool lastHitIsOnLastSurface(const xAOD::TrackParticle &track_particle) const
Checks if the last hit on track was found on a pre-specified set of Pixel and Strip layers close to t...
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Helper class to provide constant type-safe access to aux data.
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTruthClassKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_hasValidTime_dec_key
float trackTimeResolution(const std::array< Hit, s_hgtd_layers > &hits) const
Calculates the combined resolution.
bool isValid() const
Test to see if the link can be dereferenced.
const Trk::TrackParameters * getLastHitOnTrack(const Trk::Track &track) const
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Handle class for reading a decoration on an object.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Handle class for adding a decoration to an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_summarypattern_dec_key
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
std::pair< std::vector< unsigned int >, bool > res
double chi2(TH1 *h0, TH1 *h1)
CleaningResult runTimeConsistencyCuts(const std::vector< float > ×, const std::vector< bool > &has_clusters, const std::vector< int > &hit_classification) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
float calculateChi2(const std::array< Hit, s_hgtd_layers > &hits) const
Calculates the chi2 of the hit times given their resolution.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
FloatProperty m_default_time_res
Gaudi::Property< bool > m_doActs
FloatProperty m_deltat_cut
const xAOD::UncalibratedMeasurement & getUncalibratedMeasurement(const ATLASUncalibSourceLink &source_link)
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerClusterTimeKey
const short m_comp_ptrn_sft
FloatProperty m_default_time
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
std::pair< float, float > getRadiusAndZ(const xAOD::TrackParticle &track_particle) const
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_time_dec_key
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
#define ATH_MSG_WARNING(x)
const short m_holes_ptrn_sft
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_time_res_dec_key
const short m_primes_ptrn_sft
UncalibMeasType
Define the type of the uncalibrated measurement.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_layerHasExtensionKey
const short m_recoed_ptrn_sft
bool passesDeltaT(const std::array< Hit, s_hgtd_layers > &hits) const
Checks two hits for time compatibility.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
short getValidPattern(const std::array< Hit, s_hgtd_layers > &hits) const
Returns the pattern of valid hits in HGTD as a 4-bit bitfield, where a 1 encodes that a valid hit was...
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
FloatProperty m_chi2_threshold
short findLayerWithBadChi2(std::array< Hit, s_hgtd_layers > hits) const
Identifies time outliers by finding the layer within which a hit contributes negatively to the overal...