ATLAS Offline Software
Loading...
Searching...
No Matches
InDetPhysHitDecoratorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETPHYSVALMONITORING_InDetPhysHitDecoratorAlg_H
6#define INDETPHYSVALMONITORING_InDetPhysHitDecoratorAlg_H
13// STL includes
14#include <mutex>
15#include <string>
17#include "GaudiKernel/ToolHandle.h"
20#include "GaudiKernel/EventContext.h"
25
26class Identifier;
27class AtlasDetectorID;
28class PixelID;
29class SCT_ID;
30class TRT_ID;
31
32// class to decorate xAOD::TruthParticles with additional information required by validation
34public:
35 // L0PIXBARR : layer0 of pixel barrel (IBL in Run2)
36 // PIXEL : in barrel all layers appart from layer0. In end-caps all disks/rings.
43 InDetPhysHitDecoratorAlg(const std::string& name, ISvcLocator* pSvcLocator);
44 virtual
46 virtual StatusCode initialize() override;
47 virtual StatusCode finalize() override;
48 virtual StatusCode execute(const EventContext &ctx) const override;
49
50private:
51 bool
52 decorateTrack(const xAOD::TrackParticle &particle,
53 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<float> > > &float_decor,
54 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<int> > > &int_decor,
55 std::vector< SG::WriteDecorHandle<xAOD::TrackParticleContainer,std::vector<uint64_t> > > &uint64_decor) const;
56
57 ToolHandle<Trk::ITrackHoleSearchTool> m_holeSearchTool
58 {this, "InDetTrackHoleSearchTool", "InDet::InDetTrackHoleSearchTool"};
59 ToolHandle<Trk::IUpdator> m_updatorHandle
60 {this, "Updator", "Trk::KalmanUpdator/TrkKalmanUpdator",
61 "Tool handle of updator for unbiased states"};
62 ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator
63 {this, "ResidualPullCalculator",
64 "Trk::ResidualPullCalculator/ResidualPullCalculator"};
65 ToolHandle<ISiLorentzAngleTool> m_lorentzAngleTool{this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retrieve Lorentz angle"};
66
95 // need tracks particle key, to compose decoration keys
97 {this,"TrackParticleContainerName", "InDetTrackParticles",""};
98
99 std::vector<SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> > m_intDecor;
100 std::vector<SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> > m_uint64Decor;
101 std::vector<SG::WriteDecorHandleKey<xAOD::TrackParticleContainer> > m_floatDecor;
102
103 Gaudi::Property<std::string> m_prefix
104 {this, "Prefix", "", "Decoration prefix to avoid clashes."};
105
106 mutable std::atomic<bool> m_alreadyWarned{false};
107 // the following help identify a surface in the detector
109 const PixelID* m_pixelID{nullptr};
110 const SCT_ID* m_sctID{nullptr};
111 const TRT_ID* m_trtID{nullptr};
112
113 // private member functions
114 bool decideDetectorRegion(const Identifier& id, Subdetector& det, Region& r, int& layer) const;
117 const Trk::MeasurementBase* measurement,
118 bool &isUnbiased) const;
119};
120
121#endif
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
bool decideDetectorRegion(const Identifier &id, Subdetector &det, Region &r, int &layer) const
bool decorateTrack(const xAOD::TrackParticle &particle, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< float > > > &float_decor, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< int > > > &int_decor, std::vector< SG::WriteDecorHandle< xAOD::TrackParticleContainer, std::vector< uint64_t > > > &uint64_decor) const
InDetPhysHitDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_prefix
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
const Trk::TrackParameters * getUnbiasedTrackParameters(const Trk::TrackParameters *trkParameters, const Trk::MeasurementBase *measurement, bool &isUnbiased) const
virtual StatusCode initialize() override
const AtlasDetectorID * m_idHelper
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_intDecor
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trkParticleName
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
ToolHandle< Trk::IUpdator > m_updatorHandle
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_floatDecor
std::vector< SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > > m_uint64Decor
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode finalize() override
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for adding a decoration to an object.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
This class is the pure abstract base class for all fittable tracking measurements.
int r
Definition globals.cxx:22
Definition HitInfo.h:33
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".