ATLAS Offline Software
Loading...
Searching...
No Matches
GBTSTrigL2LayerNumberTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGONLINESPACEPOINTTOOL_GBTS_TRIG_L2_LAYER_NUMBER_TOOL_H
6#define TRIGONLINESPACEPOINTTOOL_GBTS_TRIG_L2_LAYER_NUMBER_TOOL_H
7
8#include <vector>
9#include <map>
10#include <tuple>
11
14
15class SCT_ID;
16class PixelID;
17
18namespace InDetDD {
21}
22
24
25 struct compare {
26 public:
27 bool operator()(const struct GBTSPhiEtaHash& p1, const struct GBTSPhiEtaHash& p2) {
28 if(p1.m_phiIndex == p2.m_phiIndex) {
29 return p1.m_etaIndex < p2.m_etaIndex;
30 }
31 else {
32 return p1.m_phiIndex < p2.m_phiIndex;
33 }
34 }
35 };
36
37public:
38 GBTSPhiEtaHash(short phi, short eta, int hash) : m_phiIndex(phi), m_etaIndex(eta), m_hash(hash) {};
41 int m_hash;
42};
43
44
46 public:
47
48 // standard AlgTool methods
49 GBTSTrigL2LayerNumberTool(const std::string&,const std::string&,const IInterface*);
51
52 // standard Athena methods
53 StatusCode initialize();
54 StatusCode finalize();
55
56 //concrete implementations
57
58 virtual int maxSiliconLayerNum() const {return m_MaxSiliconLayerNum;}
59 virtual int offsetEndcapPixels() const {return m_OffsetEndcapPixels;}
60 virtual int offsetBarrelSCT() const {return m_OffsetBarrelSCT;}
61 virtual int offsetEndcapSCT() const {return m_OffsetEndcapSCT;}
62 virtual void report() const;//prints out the above
63
64 virtual int maxNumberOfUniqueLayers() const {
65 return (int) m_hashMap.size();
66 }
67
68 virtual const std::vector<short>* pixelLayers() const {
69 return &m_pixelLayers;
70 }
71
72 virtual const std::vector<short>* sctLayers() const {
73 return &m_sctLayers;
74 }
75
76 virtual const std::vector<TrigInDetSiLayer>* layerGeometry() const {
77 return &m_layerGeometry;
78 }
79
80 protected:
81
83
84 //cached values
90
91 const SCT_ID* m_sctId = nullptr;
92 const PixelID* m_pixelId = nullptr;
95
96 void createModuleHashMap(std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> >&);
97
98 std::map<std::tuple<int, int, short, short>,std::vector<GBTSPhiEtaHash> > m_hashMap;
99 std::vector<short> m_pixelLayers, m_sctLayers;//hashid addressable arrays of layer numbers
100 std::vector<TrigInDetSiLayer> m_layerGeometry;
101};
102#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const InDetDD::PixelDetectorManager * m_pixelManager
virtual const std::vector< short > * sctLayers() const
std::vector< TrigInDetSiLayer > m_layerGeometry
virtual const std::vector< short > * pixelLayers() const
virtual const std::vector< TrigInDetSiLayer > * layerGeometry() const
std::map< std::tuple< int, int, short, short >, std::vector< GBTSPhiEtaHash > > m_hashMap
void createModuleHashMap(std::map< std::tuple< int, int, short, short >, std::vector< GBTSPhiEtaHash > > &)
GBTSTrigL2LayerNumberTool(const std::string &, const std::string &, const IInterface *)
virtual int maxNumberOfUniqueLayers() const
const InDetDD::SCT_DetectorManager * m_sctManager
provides the abstract interface for the silicon layer number tool
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 an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Message Stream Member.
bool operator()(const struct GBTSPhiEtaHash &p1, const struct GBTSPhiEtaHash &p2)
GBTSPhiEtaHash(short phi, short eta, int hash)
GBTSPhiEtaHash(const GBTSPhiEtaHash &p)