ATLAS Offline Software
InDetEventCnvTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INDETEVENTCNVTOOL_H
6 #define INDETEVENTCNVTOOL_H
7 
10 
18 
19 #include <utility>
20 
21 class AtlasDetectorID;
22 class Identifier;
23 class IdentifierHash;
24 class IdDictManager;
25 class PixelID;
26 class SCT_ID;
27 class TRT_ID;
28 
29 namespace Trk {
30  class TrkDetElementBase;
31  class PrepRawData;
32 }
33 
34 
35 namespace InDet {
40 class InDetEventCnvTool : public extends<AthAlgTool, Trk::ITrkEventCnvTool>
41 {
42  public:
43 
45 
46  InDetEventCnvTool(const std::string&,const std::string&,const IInterface*);
47 
48  virtual ~InDetEventCnvTool() = default;
49 
50  virtual StatusCode initialize() override;
51 
52  virtual void checkRoT( const Trk::RIO_OnTrack& rioOnTrack ) const override;
53 
57  virtual std::pair<const Trk::TrkDetElementBase*, const Trk::PrepRawData*>
58  getLinks( Trk::RIO_OnTrack& rioOnTrack ) const override;
59 
61  virtual void prepareRIO_OnTrack( Trk::RIO_OnTrack* rot) const override;
62 
65  virtual void prepareRIO_OnTrackLink( const Trk::RIO_OnTrack* rot,
66  ELKey_t& key,
67  ELIndex_t& index ) const override;
68 
70  virtual void recreateRIO_OnTrack( Trk::RIO_OnTrack *RoT ) const override;
71 
73  virtual const Trk::TrkDetElementBase* getDetectorElement(const Identifier& id, const IdentifierHash& idHash) const override;
74 
76  virtual const Trk::TrkDetElementBase* getDetectorElement(const Identifier& id) const override;
77 
78 
79  private:
80 
82  virtual const Trk::PrepRawData* pixelClusterLink( const Identifier& id, const IdentifierHash& idHash) const;
83 
85  virtual const Trk::PrepRawData* sctClusterLink( const Identifier& id, const IdentifierHash& idHash ) const;
86 
88  virtual const Trk::PrepRawData* trtDriftCircleLink( const Identifier& id, const IdentifierHash& idHash ) const;
89 
92 
95 
98 
100 
101 
102  //various id helpers
107 
108  // added to check TRT existence (SLHC geo check)
110 
111  SG::ReadHandleKey<PixelClusterContainer> m_pixClusContName {this, "PixelClusterContainer", "PixelClusters", "Pixel Cluster container name"};
112  SG::ReadHandleKey<SCT_ClusterContainer> m_sctClusContName {this, "SCT_ClusterContainer", "SCT_Clusters", "SCT Cluster container name"};
113  SG::ReadHandleKey<TRT_DriftCircleContainer> m_trtDriftCircleContName{this, "TRT_DriftCircleContainer", "TRT_DriftCircleContainer", "TRT DriftCircle Container"};
114 
115  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey{this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
116  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
117  SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> m_trtDetEleContKey{this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer for TRT"};
118  };
119 
120 }
121 #endif // MOORETOTRACKTOOL_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
InDet::InDetEventCnvTool::sctClusterLink
virtual const Trk::PrepRawData * sctClusterLink(const Identifier &id, const IdentifierHash &idHash) const
use the passed identifier to recreate the SCT cluster link on the passed RIO_OnTrack
Definition: InDetEventCnvTool.cxx:265
InDet::InDetEventCnvTool::checkRoT
virtual void checkRoT(const Trk::RIO_OnTrack &rioOnTrack) const override
Definition: InDetEventCnvTool.cxx:81
InDet::InDetEventCnvTool::~InDetEventCnvTool
virtual ~InDetEventCnvTool()=default
InDet::InDetEventCnvTool::m_pixClusContName
SG::ReadHandleKey< PixelClusterContainer > m_pixClusContName
location of container of pixel clusters
Definition: InDetEventCnvTool.h:111
InDet::InDetEventCnvTool::initialize
virtual StatusCode initialize() override
Definition: InDetEventCnvTool.cxx:47
index
Definition: index.py:1
TRT_DetElementContainer.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::InDetEventCnvTool::TRT
@ TRT
Definition: InDetEventCnvTool.h:44
InDet::InDetEventCnvTool::Unknown
@ Unknown
Definition: InDetEventCnvTool.h:44
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
InDet::InDetEventCnvTool::m_IDHelper
const AtlasDetectorID * m_IDHelper
Definition: InDetEventCnvTool.h:103
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
InDet::InDetEventCnvTool::getDetectorElement
virtual const Trk::TrkDetElementBase * getDetectorElement(const Identifier &id, const IdentifierHash &idHash) const override
Return the detectorElement associated with this Identifier.
Definition: InDetEventCnvTool.cxx:177
InDet::InDetEventCnvTool::prepareRIO_OnTrackLink
virtual void prepareRIO_OnTrackLink(const Trk::RIO_OnTrack *rot, ELKey_t &key, ELIndex_t &index) const override
Similar, but just return the EL components rather then changing ROT.
Definition: InDetEventCnvTool.cxx:148
InDet::InDetEventCnvTool::pixelClusterLink
virtual const Trk::PrepRawData * pixelClusterLink(const Identifier &id, const IdentifierHash &idHash) const
use the passed identifier to recreate the pixel cluster link on the passed RIO_OnTrack
Definition: InDetEventCnvTool.cxx:236
SG::ReadHandleKey< PixelClusterContainer >
ITrkEventCnvTool.h
InDet::InDetEventCnvTool::m_idDictMgr
const IdDictManager * m_idDictMgr
Definition: InDetEventCnvTool.h:109
InDet::InDetEventCnvTool::m_setPrepRawDataLink
bool m_setPrepRawDataLink
if true, attempt to recreate link to PRD
Definition: InDetEventCnvTool.h:99
InDet::InDetEventCnvTool::trtDriftCircleLink
virtual const Trk::PrepRawData * trtDriftCircleLink(const Identifier &id, const IdentifierHash &idHash) const
use the passed identifier to recreate the TRT Drift circle link on the passed RIO_OnTrack
Definition: InDetEventCnvTool.cxx:294
InDet::InDetEventCnvTool::m_SCTHelper
const SCT_ID * m_SCTHelper
Definition: InDetEventCnvTool.h:105
InDet::InDetEventCnvTool::prepareRIO_OnTrack
virtual void prepareRIO_OnTrack(Trk::RIO_OnTrack *rot) const override
Definition: InDetEventCnvTool.cxx:127
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::InDetEventCnvTool::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: InDetEventCnvTool.h:115
AthAlgTool.h
InDet::InDetEventCnvTool::getSCTDetectorElement
const InDetDD::SiDetectorElement * getSCTDetectorElement(const IdentifierHash &waferHash) const
use the passed IdentifierHash to get SiDetectorElement for SCT
Definition: InDetEventCnvTool.cxx:328
InDet::InDetEventCnvTool::InDetConcreteType
InDetConcreteType
Definition: InDetEventCnvTool.h:44
InDet::InDetEventCnvTool::m_trtDriftCircleContName
SG::ReadHandleKey< TRT_DriftCircleContainer > m_trtDriftCircleContName
location of container of TRT drift circles
Definition: InDetEventCnvTool.h:113
InDet::InDetEventCnvTool::getPixelDetectorElement
const InDetDD::SiDetectorElement * getPixelDetectorElement(const IdentifierHash &waferHash) const
use the passed IdentifierHash to get SiDetectorElement for Pixel
Definition: InDetEventCnvTool.cxx:322
ReadCondHandleKey.h
Trk::PrepRawData
Definition: PrepRawData.h:62
InDet::InDetEventCnvTool::m_TRTHelper
const TRT_ID * m_TRTHelper
Definition: InDetEventCnvTool.h:106
TRT_DriftCircleContainer.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::InDetEventCnvTool::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: InDetEventCnvTool.h:116
PixelClusterContainer.h
IdDictManager
IdDictManager is the interface to identifier dictionaries.
Definition: IdDictManager.h:36
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDet::InDetEventCnvTool
Helper tool uses to convert InDet objects in generic tracking custom convertor TrkEventAthenaPool.
Definition: InDetEventCnvTool.h:41
SiDetectorElementCollection.h
InDet::InDetEventCnvTool::recreateRIO_OnTrack
virtual void recreateRIO_OnTrack(Trk::RIO_OnTrack *RoT) const override
Definition: InDetEventCnvTool.cxx:170
InDet::InDetEventCnvTool::getTRTDetectorElement
const InDetDD::TRT_BaseElement * getTRTDetectorElement(const IdentifierHash &HashId) const
use the passed IdentifierHash to get TRTDetectorElement for TRT
Definition: InDetEventCnvTool.cxx:334
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
TRT_ID
Definition: TRT_ID.h:84
SCT_ID
Definition: SCT_ID.h:68
InDet::InDetEventCnvTool::InDetEventCnvTool
InDetEventCnvTool(const std::string &, const std::string &, const IInterface *)
Definition: InDetEventCnvTool.cxx:31
InDet::InDetEventCnvTool::m_pixelHelper
const PixelID * m_pixelHelper
Definition: InDetEventCnvTool.h:104
SCT_ClusterContainer.h
InDet::InDetEventCnvTool::SCT
@ SCT
Definition: InDetEventCnvTool.h:44
InDet::InDetEventCnvTool::getLinks
virtual std::pair< const Trk::TrkDetElementBase *, const Trk::PrepRawData * > getLinks(Trk::RIO_OnTrack &rioOnTrack) const override
use the passed identifier to recreate the detector element and PRD links on the passed RIO_OnTrack
Definition: InDetEventCnvTool.cxx:96
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDet::InDetEventCnvTool::m_sctClusContName
SG::ReadHandleKey< SCT_ClusterContainer > m_sctClusContName
location of container of sct clusters
Definition: InDetEventCnvTool.h:112
InDet::InDetEventCnvTool::m_trtDetEleContKey
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
Definition: InDetEventCnvTool.h:117
PixelID
Definition: PixelID.h:67
InDet::InDetEventCnvTool::Pixel
@ Pixel
Definition: InDetEventCnvTool.h:44
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Identifier
Definition: IdentifierFieldParser.cxx:14