ATLAS Offline Software
Loading...
Searching...
No Matches
GeoSiHit.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5
8#include "GaudiKernel/ServiceHandle.h"
9
10
12{
13 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
14 const InDetDD::PixelDetectorManager* pix = nullptr;
15 if (!detStore->contains<InDetDD::PixelDetectorManager>("Pixel") || detStore->retrieve(pix,"Pixel").isFailure())
16 {
17 // if Pixel retrieval fails, try ITkPixel
18 if (!detStore->contains<InDetDD::PixelDetectorManager>("ITkPixel") || detStore->retrieve(pix,"ITkPixel").isFailure())
19 {
20 std::abort();
21 }
22 }
23 return pix;
24}
25
26
28{
29 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
30 const InDetDD::SCT_DetectorManager* sct = nullptr;
31 if (!detStore->contains<InDetDD::SCT_DetectorManager>("SCT") || detStore->retrieve(sct,"SCT").isFailure())
32 {
33 // if SCT retrieval fails, try ITkStrip
34 if (!detStore->contains<InDetDD::SCT_DetectorManager>("ITkStrip") || detStore->retrieve(sct,"ITkStrip").isFailure())
35 {
36 std::abort();
37 }
38 }
39 return sct;
40}
41
43{
44 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
45 const HGTD_DetectorManager* hgtd = nullptr;
46 detStore->retrieve(hgtd,"HGTD").isFailure();
47 return hgtd;
48}
49
51{
52 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
53 const InDetDD::PixelDetectorManager* plr = nullptr;
54 detStore->retrieve(plr,"PLR").isFailure();
55 return plr;
56}
57
59{
60 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
61 const PixelID* pix = nullptr;
62 if(detStore->retrieve(pix,"PixelID").isFailure()) {
63 std::abort();
64 }
65 return pix;
66}
67
69{
70 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
71 const SCT_ID* sct = nullptr;
72 if(detStore->retrieve(sct,"SCT_ID").isFailure()) {
73 std::abort();
74 }
75 return sct;
76}
77
79{
80 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
81 const HGTD_ID* hgtd = nullptr;
82 if(detStore->retrieve(hgtd,"HGTD_ID").isFailure()) {
83 std::abort();
84 }
85 return hgtd;
86}
87
89{
90 ServiceHandle<StoreGateSvc> detStore ("DetectorStore", "GeoSiHit");
91 const PLR_ID* plr = nullptr;
92 if(detStore->retrieve(plr,"PLR_ID").isFailure()) {
93 std::abort();
94 }
95 return plr;
96}
97
99{
100 const InDetDD::PixelDetectorManager* const mgr = initPixMgr();
101 return mgr;
102}
103
104
106{
107 const InDetDD::SCT_DetectorManager* const mgr = initSctMgr();
108 return mgr;
109}
110
111
113{
114 const HGTD_DetectorManager* const mgr = initHgtdMgr();
115 return mgr;
116}
117
118
120{
121 const InDetDD::PixelDetectorManager* const mgr = initPlrMgr();
122 return mgr;
123}
124
125
127{
128 const PixelID* const id = initPixID();
129 return id;
130}
131
132
134{
135 const SCT_ID* const id = initSctID();
136 return id;
137}
138
139
141{
142 const HGTD_ID* const id = initHgtdID();
143 return id;
144}
145
146
148{
149 const PLR_ID* const id = initPlrID();
150 return id;
151}
static const PixelID * initPixID()
Definition GeoSiHit.cxx:58
static const InDetDD::SCT_DetectorManager * initSctMgr()
Definition GeoSiHit.cxx:27
const InDetDD::PixelDetectorManager * pixMgr() const
Definition GeoSiHit.cxx:98
static const SCT_ID * initSctID()
Definition GeoSiHit.cxx:68
const HGTD_DetectorManager * hgtdMgr() const
Definition GeoSiHit.cxx:112
const HGTD_ID * hgtdID() const
Definition GeoSiHit.cxx:140
const PixelID * pixID() const
Definition GeoSiHit.cxx:126
const InDetDD::SCT_DetectorManager * sctMgr() const
Definition GeoSiHit.cxx:105
static const InDetDD::PixelDetectorManager * initPlrMgr()
Definition GeoSiHit.cxx:50
const PLR_ID * plrID() const
Definition GeoSiHit.cxx:147
static const PLR_ID * initPlrID()
Definition GeoSiHit.cxx:88
static const InDetDD::PixelDetectorManager * initPixMgr()
Definition GeoSiHit.cxx:11
const InDetDD::PixelDetectorManager * plrMgr() const
Definition GeoSiHit.cxx:119
const SCT_ID * sctID() const
Definition GeoSiHit.cxx:133
static const HGTD_ID * initHgtdID()
Definition GeoSiHit.cxx:78
static const HGTD_DetectorManager * initHgtdMgr()
Definition GeoSiHit.cxx:42
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
This is a Identifier helper class for the PLR subdetector.
Definition PLR_ID.h:22
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