ATLAS Offline Software
Loading...
Searching...
No Matches
InDetAlignOverlapTool Class Reference

The InDetAlignOverlapTool is to select good quality tracks for alignment to build residuals with possible cuts on overlap hits, overlaps in SCT and PIXELs (in Phi and Eta). More...

#include <InDetAlignOverlapTool.h>

Inheritance diagram for InDetAlignOverlapTool:
Collaboration diagram for InDetAlignOverlapTool:

Public Member Functions

 InDetAlignOverlapTool (const std::string &, const std::string &, const IInterface *)
virtual ~InDetAlignOverlapTool ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()
int getNumberOverlapPIX (const AlignTrk &) const
 main method to get an overlap hit
int getNumberOverlapSCT (const AlignTrk &) const
std::vector< AlignSiHitgetOverlapHit (const AlignTrk &)
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< AlignSiHitm_Overlaphits
const AlignSiModuleListp_modlist
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The InDetAlignOverlapTool is to select good quality tracks for alignment to build residuals with possible cuts on overlap hits, overlaps in SCT and PIXELs (in Phi and Eta).

Definition at line 27 of file InDetAlignOverlapTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ InDetAlignOverlapTool()

InDetAlignOverlapTool::InDetAlignOverlapTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 25 of file InDetAlignOverlapTool.cxx.

26 : AthAlgTool(t, n, p)
28 , p_modlist{} {
29 declareInterface<IInDetAlignOverlapTool>(this);
30}
AthAlgTool()
Default constructor:
const AlignSiModuleList * p_modlist
std::vector< AlignSiHit > m_Overlaphits

◆ ~InDetAlignOverlapTool()

InDetAlignOverlapTool::~InDetAlignOverlapTool ( )
virtual

Definition at line 32 of file InDetAlignOverlapTool.cxx.

32{}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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

◆ finalize()

StatusCode InDetAlignOverlapTool::finalize ( )
virtual

Definition at line 47 of file InDetAlignOverlapTool.cxx.

47 {
48 ATH_MSG_DEBUG("finalize() successful in " << name());
49 return AlgTool::finalize();
50}
#define ATH_MSG_DEBUG(x)

◆ getNumberOverlapPIX()

int InDetAlignOverlapTool::getNumberOverlapPIX ( const AlignTrk & trk) const
virtual

main method to get an overlap hit

Implements IInDetAlignOverlapTool.

Definition at line 54 of file InDetAlignOverlapTool.cxx.

54 {
55 ATH_MSG_DEBUG(" InDetAlignOverlapTool::get getNumberOverlapPIX inizialized");
56
57 int nPixelBarrelOverlapEta = 0;
58 int nPixelBarrelOverlapPhi = 0;
59 int nPixelECOverlapPhi = 0;
60 int PixelSector[3] = {
61 21, 37, 51
62 };
63 int ECPixelSector = 48;
64 int nOverlapPIX = 0;
65 int nhits2 = 0;
66
67 //--------------------
68 // first loop:
69 //--------------------
70
71 nhits2 = trk.nhits();
72 ATH_MSG_DEBUG(" Num de Hits " << nhits2);
73 ATH_MSG_DEBUG(" Anem a entrar en el loop");
74
75 for (std::vector<AlignSiHit>::const_iterator hit = trk.hitlist_cbegin();
76 hit != trk.hitlist_cend(); ++hit) {
77 int index = hit->index() - 1; // note index starts at 1 in ntuple!
78
79 if (msgLvl(MSG::VERBOSE)) {
80 if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[index]).dettype() == 1) {
81 msg().setColor(MSG::GREEN);
82 msg(MSG::VERBOSE) << "Index " << index << " Detector: " << (p_modlist->vec[index]).dettype() << " layer : " <<
83 (p_modlist->vec[index]).layer() << " ring : "
84 << (p_modlist->vec[index]).ring() << " sector : " << (p_modlist->vec[index]).sector() <<
85 endmsg;
86 }
87 }
88
89 //--------------------
90 // second loop:
91 //--------------------
92 for (std::vector<AlignSiHit>::const_iterator Allhit = hit;
93 Allhit != trk.hitlist_cend(); ++Allhit) {
94 int Allindex = Allhit->index() - 1; // note index starts at 1 in ntuple!
95
96 if (msgLvl(MSG::VERBOSE)) {
97 if ((p_modlist->vec[Allindex]).bec() == 0 && (p_modlist->vec[Allindex]).dettype() == 1) {
98 msg().setColor(MSG::BLUE);
99 msg(MSG::VERBOSE) << "Index " << Allindex << endmsg;
100 }
101 }
102
103 //------------------------//
104 // PIXEL SYSTEM //
105 //------------------------//
106
107 if ((p_modlist->vec[index]).dettype() == 1 && (p_modlist->vec[Allindex]).dettype() == 1) {
108 if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[Allindex]).bec() == 0) { // BARREL
109 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
110 (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
111 (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
112 std::abs((p_modlist->vec[Allindex]).sector() -
113 ((p_modlist->vec[index]).sector() + PixelSector[(p_modlist->vec[index]).layer()])) == 1.)) {
114 // msg()
115 if (msgLvl(MSG::DEBUG)) {
116 msg().setColor(MSG::RED);
117 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
118 (p_modlist->vec[index]).ring() <<
119 " sector " << (p_modlist->vec[index]).sector() << endmsg;//<<"rPhi Residuals: " << hit->rphi_resid() <<"
120 // eta Residuals: " << hit->z_resid());
121 msg().setColor(MSG::RED);
122 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
123 " ring " << (p_modlist->vec[Allindex]).ring() <<
124 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;//<<" rPhi Residuals: " <<
125 // Allhit->rphi_resid() <<" eta Residuals:
126 // " << Allhit->z_resid());
127 msg().setColor(MSG::RED);
128 msg(MSG::DEBUG) << "Pixel Overlap in Phi found" << endmsg;
129 } //msg() end
130
131 nPixelBarrelOverlapPhi++;
132 }
133
134 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
135 std::abs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
136 (p_modlist->vec[Allindex]).sector() == (p_modlist->vec[index]).sector()) {
137 //msg()
138 if (msgLvl(MSG::DEBUG)) {
139 msg().setColor(MSG::RED);
140 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
141 (p_modlist->vec[index]).ring() <<
142 " sector " << (p_modlist->vec[index]).sector() << endmsg;//<<"rPhi Residuals: " << hit->rphi_resid() <<"
143 // eta Residuals: " << hit->z_resid());
144 msg().setColor(MSG::RED);
145 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
146 " ring " << (p_modlist->vec[Allindex]).ring() <<
147 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;// <<" rPhi Residuals: " <<
148 // Allhit->rphi_resid() <<" eta Residuals:
149 // " << Allhit->z_resid());
150 msg().setColor(MSG::RED);
151 msg(MSG::DEBUG) << "Pixel Overlap in Eta found" << endmsg;
152 } //msg() end
153
154 nPixelBarrelOverlapEta++;
155 }
156 } // END OF BARREL
157
158 if ((p_modlist->vec[index]).bec() != 0 && (p_modlist->vec[index]).bec() == (p_modlist->vec[Allindex]).bec()) { // ENDCAP
159 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
160 (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
161 (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
162 std::abs((p_modlist->vec[Allindex]).sector() - ((p_modlist->vec[index]).sector() + ECPixelSector)) == 1.)) {
163 //msg()
164 if (msgLvl(MSG::DEBUG)) {
165 msg().setColor(MSG::RED);
166 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
167 (p_modlist->vec[index]).ring() <<
168 " sector " << (p_modlist->vec[index]).sector() << endmsg;
169 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
170 " ring " << (p_modlist->vec[Allindex]).ring() <<
171 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;
172 msg(MSG::DEBUG) << "EC Pixel Overlap in Phi found" << endmsg;
173 }// msg() end
174
175 nPixelECOverlapPhi++;
176 }
177 } // END OF ENDCAP
178 }
179 }
180 }
181
182 nOverlapPIX = nPixelBarrelOverlapPhi + nPixelBarrelOverlapEta + nPixelECOverlapPhi;
183 ATH_MSG_DEBUG(" Total number of Pixel overlaps in eta " << nPixelBarrelOverlapEta);
184 ATH_MSG_DEBUG(" Total number of Pixel overlaps in phi " << nPixelBarrelOverlapPhi);
185 ATH_MSG_DEBUG(" Total number of Pixel EC overlaps in phi " << nPixelECOverlapPhi);
186
187 return nOverlapPIX;
188}
#define endmsg
std::vector< AlignSiHit >::const_iterator hitlist_cend() const
Definition AlignTrk.h:167
int nhits() const
Definition AlignTrk.h:110
std::vector< AlignSiHit >::const_iterator hitlist_cbegin() const
Definition AlignTrk.h:165
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
str index
Definition DeMoScan.py:362
@ layer
Definition HitInfo.h:79

◆ getNumberOverlapSCT()

int InDetAlignOverlapTool::getNumberOverlapSCT ( const AlignTrk & trk) const
virtual

Implements IInDetAlignOverlapTool.

Definition at line 193 of file InDetAlignOverlapTool.cxx.

193 {
194 ATH_MSG_DEBUG(" InDetAlignOverlapTool::get getNumberOverlapSCT initialized");
195
196 // counters for overlaps eta and overlaps Phi
197 int nSCTBarrelOverlapEta = 0;
198 int nSCTBarrelOverlapPhi = 0;
199 int nSCTECOverlapPhi = 0;
200 int nSCTECOverlapEta = 0;
201
202 int SCTSector[4] = {
203 31, 39, 47, 55
204 };
205 int ECSCTSector = 52;
206
207 int nOverlapSCT = 0;
208 int nhits2 = 0;
209
210 nhits2 = trk.nhits();
211 ATH_MSG_DEBUG(" Num de Hits " << nhits2);
212 ATH_MSG_DEBUG(" Anem a entrar en el loop");
213
214 //-------------
215 // first loop:
216 //-------------
217
218 for (std::vector<AlignSiHit>::const_iterator hit = trk.hitlist_cbegin();
219 hit != trk.hitlist_cend(); ++hit) {
220 int index = hit->index() - 1; // note index starts at 1 in ntuple!
221
222 if (msgLvl(MSG::VERBOSE)) {
223 if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[index]).dettype() == 1) {
224 msg().setColor(MSG::GREEN);
225 msg(MSG::VERBOSE) << "Index " << index << " Detector: " << (p_modlist->vec[index]).dettype() << " layer : " <<
226 (p_modlist->vec[index]).layer() << " ring : "
227 << (p_modlist->vec[index]).ring() << " sector : " << (p_modlist->vec[index]).sector() <<
228 endmsg;
229 }
230 }
231
232 //-------------
233 // second loop:
234 //-------------
235
236 for (std::vector<AlignSiHit>::const_iterator Allhit = hit;
237 Allhit != trk.hitlist_cend(); ++Allhit) {
238 int Allindex = Allhit->index() - 1; // note index starts at 1 in ntuple!
239
240 if (msgLvl(MSG::VERBOSE)) {
241 if ((p_modlist->vec[Allindex]).bec() == 0 && (p_modlist->vec[Allindex]).dettype() == 1) {
242 msg().setColor(MSG::BLUE);
243 msg(MSG::VERBOSE) << "Index " << Allindex << endmsg;
244 }
245 }
246
247 //------------------------//
248 // SCT SYSTEM //
249 //------------------------//
250
251 if ((p_modlist->vec[index]).dettype() == 2 && (p_modlist->vec[Allindex]).dettype() == 2) {
252 if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[Allindex]).bec() == 0) { // BARREL
253 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
254 (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
255 (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
256 std::abs((p_modlist->vec[Allindex]).sector() -
257 ((p_modlist->vec[index]).sector() + SCTSector[(p_modlist->vec[index]).layer()])) == 1.)) {
258 if (msgLvl(MSG::DEBUG)) {
259 msg().setColor(MSG::RED);
260 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
261 (p_modlist->vec[index]).ring() <<
262 " sector " << (p_modlist->vec[index]).sector() << endmsg;
263 msg().setColor(MSG::RED);
264 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
265 " ring " << (p_modlist->vec[Allindex]).ring() <<
266 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;
267 msg().setColor(MSG::RED);
268 msg(MSG::DEBUG) << "SCT Overlap in Phi found" << endmsg;
269 }
270 nSCTBarrelOverlapPhi++;
271 }
272
273 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
274 std::abs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
275 (p_modlist->vec[Allindex]).sector() == (p_modlist->vec[index]).sector()) {
276 if (msgLvl(MSG::DEBUG)) {
277 msg().setColor(MSG::RED);
278 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
279 (p_modlist->vec[index]).ring() <<
280 " sector " << (p_modlist->vec[index]).sector() << endmsg;
281 msg().setColor(MSG::RED);
282 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
283 " ring " << (p_modlist->vec[Allindex]).ring() <<
284 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;
285 msg().setColor(MSG::RED);
286 msg(MSG::DEBUG) << "SCT Overlap in Eta found" << endmsg;
287 }
288 nSCTBarrelOverlapEta++;
289 }
290 }
291
292 if ((p_modlist->vec[index]).bec() != 0 && ((p_modlist->vec[index]).bec() == (p_modlist->vec[Allindex]).bec())) { // EndCap
293 // (
294 // EC
295 // values
296 // 2
297 // i
298 // -2)
299 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
300 (p_modlist->vec[Allindex]).ring() == (p_modlist->vec[index]).ring() &&
301 (std::abs((p_modlist->vec[Allindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
302 std::abs((p_modlist->vec[Allindex]).sector() - ((p_modlist->vec[index]).sector() + ECSCTSector)) == 1.)) {
303 if (msgLvl(MSG::DEBUG)) {
304 msg().setColor(MSG::RED);
305 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
306 (p_modlist->vec[index]).ring() <<
307 " sector " << (p_modlist->vec[index]).sector() << endmsg;
308 msg().setColor(MSG::RED);
309 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
310 " ring " << (p_modlist->vec[Allindex]).ring() <<
311 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;
312
313 msg(MSG::DEBUG) << "EC SCT Overlap in Phi found" << endmsg;
314 }
315 nSCTECOverlapPhi++;
316 }
317
318 if ((p_modlist->vec[Allindex]).layer() == (p_modlist->vec[index]).layer() &&
319 std::abs((p_modlist->vec[Allindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
320 (p_modlist->vec[Allindex]).sector() == (p_modlist->vec[index]).sector()) {
321 if (msgLvl(MSG::DEBUG)) {
322 msg().setColor(MSG::GREEN);
323 msg(MSG::DEBUG) << " Index:" << index << " layer " << (p_modlist->vec[index]).layer() << " ring " <<
324 (p_modlist->vec[index]).ring() <<
325 " sector " << (p_modlist->vec[index]).sector() << endmsg;
326 msg().setColor(MSG::GREEN);
327 msg(MSG::DEBUG) << " AllIndex:" << Allindex << " layer " << (p_modlist->vec[Allindex]).layer() <<
328 " ring " << (p_modlist->vec[Allindex]).ring() <<
329 " sector " << (p_modlist->vec[Allindex]).sector() << endmsg;
330
331 msg(MSG::DEBUG) << "EC SCT Overlap in Eta found" << endmsg;
332 }
333 nSCTECOverlapEta++;
334 }
335 }
336 }
337 }
338 }
339
340 nOverlapSCT = nSCTBarrelOverlapPhi + nSCTBarrelOverlapEta + nSCTECOverlapPhi + nSCTECOverlapEta;
341
342 ATH_MSG_DEBUG(" Total number of STC overlaps in eta " << nSCTBarrelOverlapEta);
343 ATH_MSG_DEBUG(" Total number of SCT overlaps in phi " << nSCTBarrelOverlapPhi);
344 ATH_MSG_DEBUG(" Total number of STC EC overlaps in phi " << nSCTECOverlapPhi);
345 ATH_MSG_DEBUG(" Total number of STC EC overlaps in Eta " << nSCTECOverlapEta);
346
347 return nOverlapSCT;
348}

◆ getOverlapHit()

std::vector< AlignSiHit > InDetAlignOverlapTool::getOverlapHit ( const AlignTrk & trk)
virtual

Implements IInDetAlignOverlapTool.

Definition at line 353 of file InDetAlignOverlapTool.cxx.

353 { //const {
354 ATH_MSG_DEBUG(" InDetAlignOverlapTool::get getOverlapHit inizialized");
355
356 bool isPIXOverlap = false;
357 bool isSCTOverlap = false;
358 //bool isOverlap=false;
359
360 int PixelSector[3] = {
361 21, 37, 51
362 };
363 int ECPixelSector = 48;
364 int SCTSector[4] = {
365 31, 39, 47, 55
366 };
367 int ECSCTSector = 52;
368
369 //----------------------------------------------------
370 // first loop: preparing info for next processing
371 //----------------------------------------------------
372 for (std::vector<AlignSiHit>::const_iterator hit = trk.hitlist_cbegin();
373 hit != trk.hitlist_cend(); ++hit) {
374 int index = hit->index() - 1; // note index starts at 1 in ntuple!
375
376 isPIXOverlap = false;
377 isSCTOverlap = false;
378 //isOverlap=false;
379
380 //----------------------------------------------------
381 // Second loop: preparing info for next processing
382 //----------------------------------------------------
383 for (std::vector<AlignSiHit>::const_iterator hit2 = trk.hitlist_cbegin();
384 hit2 != trk.hitlist_cend(); ++hit2) {
385 int newindex = hit2->index() - 1; // note index starts at 1 in ntuple!
386 //------------------------//
387 // PIXEL SYSTEM //
388 //------------------------//
389
390 if ((p_modlist->vec[index]).dettype() == 1 && (p_modlist->vec[newindex]).dettype() == 1) {
391 if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[newindex]).bec() == 0) { // BARREL
392 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
393 (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
394 (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
395 std::abs((p_modlist->vec[newindex]).sector() -
396 ((p_modlist->vec[index]).sector() + PixelSector[(p_modlist->vec[index]).layer()])) == 1.)) {
397 isPIXOverlap = true;
398 }
399
400 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
401 std::abs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
402 (p_modlist->vec[newindex]).sector() == (p_modlist->vec[index]).sector()) {
403 isPIXOverlap = true;
404 }
405 }
406
407 if ((p_modlist->vec[index]).bec() != 0 && (p_modlist->vec[index]).bec() == (p_modlist->vec[newindex]).bec()) { // ENDCAP
408 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
409 (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
410 (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
411 std::abs((p_modlist->vec[newindex]).sector() - ((p_modlist->vec[index]).sector() + ECPixelSector)) == 1.)) {
412 isPIXOverlap = true;
413 }
414 }
415 } // End Pixel system
416
417
418 //------------------------//
419 // SCT SYSTEM //
420 //------------------------//
421
422 if ((p_modlist->vec[index]).dettype() == 2 && (p_modlist->vec[newindex]).dettype() == 2) {
423 if ((p_modlist->vec[index]).bec() == 0 && (p_modlist->vec[newindex]).bec() == 0) { // BARREL
424 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
425 (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
426 (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
427 std::abs((p_modlist->vec[newindex]).sector() -
428 ((p_modlist->vec[index]).sector() + SCTSector[(p_modlist->vec[index]).layer()])) == 1.)) {
429 isSCTOverlap = true;
430 }
431
432 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
433 std::abs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
434 (p_modlist->vec[newindex]).sector() == (p_modlist->vec[index]).sector()) {
435 isSCTOverlap = true;
436 }
437 }
438
439 if ((p_modlist->vec[index]).bec() != 0 && ((p_modlist->vec[index]).bec() == (p_modlist->vec[newindex]).bec())) { // //
440 // ENDCAP
441 // (
442 // EC
443 // values
444 // 2
445 // i
446 // -2)
447 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
448 (p_modlist->vec[newindex]).ring() == (p_modlist->vec[index]).ring() &&
449 (std::abs((p_modlist->vec[newindex]).sector() - (p_modlist->vec[index]).sector()) == 1. ||
450 std::abs((p_modlist->vec[newindex]).sector() - ((p_modlist->vec[index]).sector() + ECSCTSector)) == 1.)) {
451 isSCTOverlap = true;
452 }
453
454 if ((p_modlist->vec[newindex]).layer() == (p_modlist->vec[index]).layer() &&
455 std::abs((p_modlist->vec[newindex]).ring() - (p_modlist->vec[index]).ring()) == 1 &&
456 (p_modlist->vec[newindex]).sector() == (p_modlist->vec[index]).sector()) {
457 isSCTOverlap = true;
458 }
459 } // End SCT system
460 }
461 }
462 if (isPIXOverlap || isSCTOverlap) {
463 msg().setColor(MSG::GREEN);
464 ATH_MSG_DEBUG("This Hit is overlap" << index);
465 m_Overlaphits.push_back(*hit);
466 }
467 }
468
469 return m_Overlaphits;
470}

◆ initialize()

StatusCode InDetAlignOverlapTool::initialize ( )
virtual

Definition at line 34 of file InDetAlignOverlapTool.cxx.

34 {
35 StatusCode sc = AlgTool::initialize();
36
37 if (sc.isFailure()) return sc;
38
39 // get DetectorStore service
41 // get pointer to AlignSiModuleList; after setup has created it
42 ATH_CHECK(detStore()->retrieve(p_modlist, "InDetAlignNt"));
43 ATH_MSG_DEBUG("initialize() successful in " << name());
44 return StatusCode::SUCCESS;
45}
#define ATH_CHECK
Evaluate an expression and check for errors.
static Double_t sc
const ServiceHandle< StoreGateSvc > & detStore() const
::StatusCode StatusCode
StatusCode definition for legacy code.
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ interfaceID()

const InterfaceID & IInDetAlignOverlapTool::interfaceID ( )
inlinestaticinherited

Definition at line 38 of file IInDetAlignOverlapTool.h.

38 {
40}
static const InterfaceID IID_INDETALIGN_IInDetAlignOverlapTool("IInDetAlignOverlapTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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.

◆ renounce()

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 > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_Overlaphits

std::vector<AlignSiHit> InDetAlignOverlapTool::m_Overlaphits
private

Definition at line 44 of file InDetAlignOverlapTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ p_modlist

const AlignSiModuleList* InDetAlignOverlapTool::p_modlist
private

Definition at line 46 of file InDetAlignOverlapTool.h.


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