ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::RIO_OnTrackCreator Class Referencefinal

general tool to converts clusters or driftcircles (Trk::PrepRawData) to fully calibrated hits (Trk::RIO_OnTrack) further use in track fits. More...

#include <RIO_OnTrackCreator.h>

Inheritance diagram for Trk::RIO_OnTrackCreator:
Collaboration diagram for Trk::RIO_OnTrackCreator:

Public Member Functions

virtual ~RIO_OnTrackCreator ()
 virtual destructor
virtual StatusCode initialize () override
 get specific ROT tools and the AtlasIdHelper
RIO_OnTrackcorrect (const PrepRawData &rio, const TrackParameters &pars, const EventContext &ctx) const override final
 the master method for going from RIO to ROT.

Private Types

enum struct  Mode { all = 0 , indet = 1 , muon = 2 , invalid = 3 }

Private Attributes

ToolHandle< IRIO_OnTrackCreatorm_pixClusCor {this, "ToolPixelCluster", ""}
 Detector-specific helper tool, performing the actual calibration corrections for every InDet::PixelCluster.
ToolHandle< IRIO_OnTrackCreatorm_sctClusCor {this, "ToolSCT_Cluster", ""}
 Detector-specific helper tool, performing the actual calibration corrections for every InDet::SCT_Cluster.
ToolHandle< IRIO_OnTrackCreatorm_trt_Cor {this, "ToolTRT_DriftCircle", ""}
 Detector-specific helper tool, performing the actual calibration corrections for every InDet::TRT::DriftCircle.
ToolHandle< IRIO_OnTrackCreatorm_muonDriftCircleCor {this, "ToolMuonDriftCircle", ""}
 Detector-specific helper tool, performing the actual calibration corrections for every Muon::MdtPrepData.
ToolHandle< IRIO_OnTrackCreatorm_muonClusterCor {this, "ToolMuonCluster",""}
 Detector-specific helper tool, performing the actual calibration corrections for the remaining muon detector technologies: RPC, TGC, CSC, MM, sTGC.
Gaudi::Property< std::string > m_mode {this, "Mode" ,"all" }
 flag: can be 'all', 'indet' or 'muon'
Mode m_enumMode = Mode::all

Detailed Description

general tool to converts clusters or driftcircles (Trk::PrepRawData) to fully calibrated hits (Trk::RIO_OnTrack) further use in track fits.

This implementation is the technology-independent master tool which identifies the detector where the hit comes from (e.g. PixelCluster) and calls the appropriate tool to create e.g. PixelClusterOnTrack. The use of detector-specific tools is configured via job options.

Both this tool and the detector-specific tools need a track hypothesis to make the conversion from Trk::PrepRawData to Trk:: RIO_OnTrack. This needs to be provided by the local pattern recognition or the track fitting tool.

Author
Wolfgang Liebig http://consult.cern.ch/xwho/people/54608

Definition at line 51 of file RIO_OnTrackCreator.h.

Member Enumeration Documentation

◆ Mode

enum struct Trk::RIO_OnTrackCreator::Mode
strongprivate
Enumerator
all 
indet 
muon 
invalid 

Definition at line 89 of file RIO_OnTrackCreator.h.

89 {
90 all = 0,
91 indet = 1,
92 muon = 2,
93 invalid = 3
94 };

Constructor & Destructor Documentation

◆ ~RIO_OnTrackCreator()

Trk::RIO_OnTrackCreator::~RIO_OnTrackCreator ( )
virtualdefault

virtual destructor

Member Function Documentation

◆ correct()

Trk::RIO_OnTrack * Trk::RIO_OnTrackCreator::correct ( const PrepRawData & rio,
const TrackParameters & pars,
const EventContext & ctx ) const
finaloverride

the master method for going from RIO to ROT.

Definition at line 60 of file RIO_OnTrackCreator.cxx.

62 {
63
64
65 // --- print RIO
66 ATH_MSG_VERBOSE ("RIO ID prints as "<<rio);
67 ATH_MSG_VERBOSE ("RIO.locP = "<<Amg::toString(rio.localPosition()));
68 switch (rio.prdType()) {
69 using enum Trk::PrepRawDataType;
70 case PixelCluster:
71 if (m_pixClusCor.isEnabled()) {
72 return m_pixClusCor->correct(rio, trk, ctx);
73 }
74 break;
75 case SCT_Cluster:
76 if (m_sctClusCor.isEnabled()) {
77 return m_sctClusCor->correct(rio, trk, ctx);
78 }
79 break;
80 case TRT_DriftCircle:
81 if (m_trt_Cor.isEnabled()){
82 return m_trt_Cor->correct(rio, trk, ctx);
83 }
84 break;
85 case MdtPrepData:
86 if (m_muonDriftCircleCor.isEnabled()) {
87 return m_muonDriftCircleCor->correct(rio, trk, ctx);
88 }
89 break;
90 case RpcPrepData:
91 case TgcPrepData:
92 case sTgcPrepData:
93 case MMPrepData:
94 case CscPrepData:
95 if (m_muonClusterCor.isEnabled()) {
96 return m_muonClusterCor->correct(rio, trk, ctx);
97 }
98 break;
99 case HGTD_Cluster:
100 ATH_MSG_WARNING("HGTD is not implemented yet");
101 break;
102 case CscStripPrepData:
103 case PlanarCluster:
104 case SiCluster:
105 ATH_MSG_WARNING("Cannot associate prd to a technology ROT creator "<<rio);
106 break;
107 }
108 ATH_MSG_WARNING("No ROT creator active for PRD "<<rio);
109 return nullptr;
110}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
ToolHandle< IRIO_OnTrackCreator > m_sctClusCor
Detector-specific helper tool, performing the actual calibration corrections for every InDet::SCT_Clu...
ToolHandle< IRIO_OnTrackCreator > m_trt_Cor
Detector-specific helper tool, performing the actual calibration corrections for every InDet::TRT::Dr...
ToolHandle< IRIO_OnTrackCreator > m_muonClusterCor
Detector-specific helper tool, performing the actual calibration corrections for the remaining muon d...
ToolHandle< IRIO_OnTrackCreator > m_muonDriftCircleCor
Detector-specific helper tool, performing the actual calibration corrections for every Muon::MdtPrepD...
ToolHandle< IRIO_OnTrackCreator > m_pixClusCor
Detector-specific helper tool, performing the actual calibration corrections for every InDet::PixelCl...
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
PrepRawDataType
Definition PrepRawData.h:39

◆ initialize()

StatusCode Trk::RIO_OnTrackCreator::initialize ( )
overridevirtual

get specific ROT tools and the AtlasIdHelper

Definition at line 29 of file RIO_OnTrackCreator.cxx.

29 {
30
31 if (m_mode == "all") {
33 } else if (m_mode == "indet") {
35 } else if (m_mode == "muon") {
37 } else {
39 }
40
42 ATH_MSG_FATAL("Mode is set to unknown value " << m_mode);
43 return StatusCode::FAILURE;
44 }
45
46 ATH_MSG_INFO("Mode is set to :" <<m_mode);
47 const bool doId = m_enumMode == Mode::all || m_enumMode == Mode::indet;
48 const bool doMuon = m_enumMode == Mode::all || m_enumMode == Mode::muon;
49 ATH_CHECK(m_pixClusCor.retrieve(EnableTool{!m_pixClusCor.empty() && doId}));
50 ATH_CHECK(m_sctClusCor.retrieve(EnableTool{!m_sctClusCor.empty() && doId}));
51 ATH_CHECK(m_trt_Cor.retrieve(EnableTool{!m_trt_Cor.empty() && doId}));
52
53 ATH_CHECK(m_muonDriftCircleCor.retrieve(EnableTool{!m_muonDriftCircleCor.empty() && doMuon}));
54 ATH_CHECK(m_muonClusterCor.retrieve(EnableTool{!m_muonClusterCor.empty() && doMuon}));
55 return StatusCode::SUCCESS;
56}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
Gaudi::Property< std::string > m_mode
flag: can be 'all', 'indet' or 'muon'

Member Data Documentation

◆ m_enumMode

Mode Trk::RIO_OnTrackCreator::m_enumMode = Mode::all
private

Definition at line 95 of file RIO_OnTrackCreator.h.

◆ m_mode

Gaudi::Property<std::string> Trk::RIO_OnTrackCreator::m_mode {this, "Mode" ,"all" }
private

flag: can be 'all', 'indet' or 'muon'

Definition at line 87 of file RIO_OnTrackCreator.h.

87{this, "Mode" ,"all" };

◆ m_muonClusterCor

ToolHandle<IRIO_OnTrackCreator> Trk::RIO_OnTrackCreator::m_muonClusterCor {this, "ToolMuonCluster",""}
private

Detector-specific helper tool, performing the actual calibration corrections for the remaining muon detector technologies: RPC, TGC, CSC, MM, sTGC.

Definition at line 85 of file RIO_OnTrackCreator.h.

85{this, "ToolMuonCluster",""};

◆ m_muonDriftCircleCor

ToolHandle<IRIO_OnTrackCreator> Trk::RIO_OnTrackCreator::m_muonDriftCircleCor {this, "ToolMuonDriftCircle", ""}
private

Detector-specific helper tool, performing the actual calibration corrections for every Muon::MdtPrepData.

Definition at line 81 of file RIO_OnTrackCreator.h.

81{this, "ToolMuonDriftCircle", ""};

◆ m_pixClusCor

ToolHandle<IRIO_OnTrackCreator> Trk::RIO_OnTrackCreator::m_pixClusCor {this, "ToolPixelCluster", ""}
private

Detector-specific helper tool, performing the actual calibration corrections for every InDet::PixelCluster.

Definition at line 72 of file RIO_OnTrackCreator.h.

72{this, "ToolPixelCluster", ""};

◆ m_sctClusCor

ToolHandle<IRIO_OnTrackCreator> Trk::RIO_OnTrackCreator::m_sctClusCor {this, "ToolSCT_Cluster", ""}
private

Detector-specific helper tool, performing the actual calibration corrections for every InDet::SCT_Cluster.

Definition at line 75 of file RIO_OnTrackCreator.h.

75{this, "ToolSCT_Cluster", ""};

◆ m_trt_Cor

ToolHandle<IRIO_OnTrackCreator> Trk::RIO_OnTrackCreator::m_trt_Cor {this, "ToolTRT_DriftCircle", ""}
private

Detector-specific helper tool, performing the actual calibration corrections for every InDet::TRT::DriftCircle.

Definition at line 78 of file RIO_OnTrackCreator.h.

78{this, "ToolTRT_DriftCircle", ""};

The documentation for this class was generated from the following files: