ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_StrawNeighbourSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_STRAWNEIGHBOURSVC_H
6#define TRT_STRAWNEIGHBOURSVC_H
7
13
16#include "GaudiKernel/ServiceHandle.h"
17#include <string>
18#include <vector>
19
20class TRT_ID;
21class StoreGateSvc;
22
23class TRT_StrawNeighbourSvc: public extends<AthService, ITRT_StrawNeighbourSvc>
24{
25 public:
27 TRT_StrawNeighbourSvc( const std::string& name, ISvcLocator* pSvcLocator );
28
31
33 virtual StatusCode initialize();
34
36 virtual StatusCode finalize();
37
39 void getPad(Identifier offlineID, int& pad);
40
41 void getChip(Identifier offlineID, int& chip ) ;
42
43 void getPin(Identifier offlineID, int& pin ) ; // Only for barrel
44
45 void getSocket(Identifier offlineID, int& socket ) ;
46
47 //Disclaimers: getStrawFrom*** functions tested thouroughly for barrel only
48 // : getStrawsFromPad works only for barrel
49
50 void getStrawsFromPad(Identifier offlineID, std::vector<Identifier>& neighbourIDs);
51 void getStrawsFromChip(Identifier offlineID, std::vector<Identifier>& neighbourIDs);
52
54
55 int getRing( const Identifier &id );
56
57 static int chipToBoardEndCap(int chip);
58
59 int strawNumber( Identifier id);
61
62 int getRunningNumbering(Identifier offlineID);
63 void getAtlasIdentifier(int strawnumber, Identifier &outputID, Identifier inputID);
64 // chip to board conversion. Works for barrel only!
65 int chipToBoardBarrel(int chip, int layer) ;
66
67
68 private:
71
74
75 std::vector<unsigned int> m_layer_m1;
76 std::vector<unsigned int> m_layer_m1_acc;
77 std::vector<unsigned int> m_layer_m2;
78 std::vector<unsigned int> m_layer_m2_acc;
79 std::vector<unsigned int> m_layer_m3;
80 std::vector<unsigned int> m_layer_m3_acc;
81
82 std::vector<unsigned int> m_m1;
83 std::vector<unsigned int> m_m2;
84 std::vector<unsigned int> m_m3;
85
86 std::vector<std::vector<std::vector<int> > > m_pad_to_straw;
87
88 std::vector<std::vector<std::vector<int> > > m_chip_to_straw;
89
90 std::vector<double> m_chip_vector1;
91 std::vector<double> m_chip_vector2;
92 std::vector<double> m_chip_vector3;
93
100
101 int m_endcapChipMapA0[12]{}; // endcap chip number maps
105};
106
107
108inline int sign(int a) { return (a == 0) ? 0 : (a<0 ? -1 : 1); }
109
110inline int getModuleType( int strawnumber ) {
111 int mod = -1;
112 if ((strawnumber%1642)<=329) mod =1;
113 else if ((strawnumber%1642)<=(329+520)) mod =2;
114 else if ((strawnumber%1642)<=(329+520+793)) mod =3;
115 return mod;
116}
117
118#endif
Abstract interface to information on straws electronic grouping.
static Double_t a
int getModuleType(int strawnumber)
int sign(int a)
The Athena Transient Store API.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
std::vector< double > m_chip_vector1
std::vector< unsigned int > m_m3
virtual ~TRT_StrawNeighbourSvc()
destructor
std::vector< unsigned int > m_layer_m3
void getSocket(Identifier offlineID, int &socket)
void getStrawsFromPad(Identifier offlineID, std::vector< Identifier > &neighbourIDs)
std::vector< unsigned int > m_layer_m2_acc
ServiceHandle< StoreGateSvc > m_detStore
TRT_StrawNeighbourSvc(const std::string &name, ISvcLocator *pSvcLocator)
constructor
std::vector< unsigned int > m_layer_m1
std::vector< unsigned int > m_layer_m1_acc
int strawLayerNumber(Identifier id)
int getRing(const Identifier &id)
void getPin(Identifier offlineID, int &pin)
int chipToBoardBarrel(int chip, int layer)
std::vector< unsigned int > m_m2
std::vector< unsigned int > m_layer_m2
void getPad(Identifier offlineID, int &pad)
public methods
int getRunningNumbering(Identifier offlineID)
virtual StatusCode initialize()
tool initialize
void getChip(Identifier offlineID, int &chip)
TRTCond::ExpandedIdentifier getFirstStrawFromChip(Identifier offlineID)
void getStrawsFromChip(Identifier offlineID, std::vector< Identifier > &neighbourIDs)
std::vector< unsigned int > m_m1
std::vector< double > m_chip_vector2
virtual StatusCode finalize()
tool finalize
std::vector< std::vector< std::vector< int > > > m_chip_to_straw
std::vector< std::vector< std::vector< int > > > m_pad_to_straw
std::vector< unsigned int > m_layer_m3_acc
void getAtlasIdentifier(int strawnumber, Identifier &outputID, Identifier inputID)
std::vector< double > m_chip_vector3
static int chipToBoardEndCap(int chip)