ATLAS Offline Software
Loading...
Searching...
No Matches
TrigL2LayerNumberToolITk.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_TRIG_L2_LAYER_NUMBER_TOOL_ITK_H
6#define TRIGONLINESPACEPOINTTOOL_TRIG_L2_LAYER_NUMBER_TOOL_ITK_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 PhiEtaHashITk& p1, const struct PhiEtaHashITk& 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 PhiEtaHashITk(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 TrigL2LayerNumberToolITk(const std::string&,const std::string&,const IInterface*);
51
52 // standard Athena methods
53 virtual StatusCode initialize() override;
54
55 //concrete implementations
56
57 virtual int maxSiliconLayerNum() const override {return m_MaxSiliconLayerNum;}
58 virtual int offsetEndcapPixels() const override {return m_OffsetEndcapPixels;}
59 virtual int offsetBarrelSCT() const override {return m_OffsetBarrelSCT;}
60 virtual int offsetEndcapSCT() const override {return m_OffsetEndcapSCT;}
61 virtual void report() const override;//prints out the above
62
63 virtual int maxNumberOfUniqueLayers() const override {
64 return static_cast<int>(m_hashMap.size());
65 }
66
67 virtual const std::vector<short>* pixelLayers() const override {
68 return &m_pixelLayers;
69 }
70
71 virtual const std::vector<short>* sctLayers() const override {
72 return &m_sctLayers;
73 }
74
75 virtual const std::vector<TrigInDetSiLayer>* layerGeometry() const override {
76 return &m_layerGeometry;
77 }
78
79 protected:
80
81 Gaudi::Property<bool> m_useNewScheme{this, "UseNewLayerScheme", false};
82
83 //cached values
89
90 const SCT_ID* m_sctId{nullptr};
91 const PixelID* m_pixelId{nullptr};
94
95 void createModuleHashMap(std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> >&);
96
97 std::map<std::tuple<int, int, short, short>,std::vector<PhiEtaHashITk> > m_hashMap;
98 std::vector<short> m_pixelLayers, m_sctLayers;//hashid addressable arrays of layer numbers
99 std::vector<TrigInDetSiLayer> m_layerGeometry;
100};
101#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:
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:67
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
const InDetDD::PixelDetectorManager * m_pixelManager
Gaudi::Property< bool > m_useNewScheme
virtual int maxNumberOfUniqueLayers() const override
TrigL2LayerNumberToolITk(const std::string &, const std::string &, const IInterface *)
virtual const std::vector< short > * pixelLayers() const override
virtual int offsetEndcapSCT() const override
void createModuleHashMap(std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > &)
virtual const std::vector< TrigInDetSiLayer > * layerGeometry() const override
virtual const std::vector< short > * sctLayers() const override
virtual StatusCode initialize() override
const InDetDD::SCT_DetectorManager * m_sctManager
virtual int offsetBarrelSCT() const override
std::vector< TrigInDetSiLayer > m_layerGeometry
virtual void report() const override
virtual int offsetEndcapPixels() const override
virtual int maxSiliconLayerNum() const override
std::map< std::tuple< int, int, short, short >, std::vector< PhiEtaHashITk > > m_hashMap
Message Stream Member.
bool operator()(const struct PhiEtaHashITk &p1, const struct PhiEtaHashITk &p2)
PhiEtaHashITk(const PhiEtaHashITk &p)
PhiEtaHashITk(short phi, short eta, int hash)