ATLAS Offline Software
FPGATrackSimModuleRelabel.h
Go to the documentation of this file.
1 // Copyright (C) 2023-2024 CERN for the benefit of the ATLAS collaboration
2 
3 // Module relabel object for remapping pixel endcap hits.
4 // This small header contains a very simple object, which implements
5 // the geokey -> ring index lookup for use in multiple places and provides
6 // a function for actually remapping pixel endcap hits.
7 
8 #ifndef FPGATRACKSIMMODULERELABEL_H
9 #define FPGATRACKSIMMODULERELABEL_H
10 #include "AthenaBaseComps/AthMessaging.h" //inheritance
11 
12 
13 #include <map>
14 #include <vector>
15 #include <string>
16 
17 class FPGATrackSimHit;
18 
19 // this doesn't necessarily have to live in a namespace, but it would
20 // if it were in FPGATrackSimMacros.h.
21 // New supported geometries should be added here.
22 namespace htt {
23  const std::map<const std::string, const std::vector<uint>> ringIndices = {
24  {"ATLAS-P2-ITK-22-02-00", {0, 17, 47, 58, 66}},
25  {"ATLAS-P2-ITK-23-00-01", {0, 15, 44, 50, 61, 69, 77, 86}},
26  {"ATLAS-P2-RUN4-03-00-00", {0, 15, 21, 44, 50, 61, 69, 77, 86}}
27  };
28 }
29 
31 
32 public:
33 
34  // Constructor, maps geokey -> ringIndex.
35  FPGATrackSimModuleRelabel(std::string geokey, bool remapModules);
36 
37  bool remap(FPGATrackSimHit& hit) const;
38 
39 private:
40 
41  // Geometry version, set by constructor.
42  std::string m_geoKey;
43 
44  // Should we remap modules in addition to layers.
45  bool m_remapModules = false;
46 
47  // Vector of size (nrings): used to remap (ring, module) -> (layer).
48  // Indexed by ring number.
49  const std::vector<uint>* m_ringIndex = nullptr;
50 
51 };
52 
53 #endif
htt
Definition: FPGATrackSimModuleRelabel.h:22
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
htt::ringIndices
const std::map< const std::string, const std::vector< uint > > ringIndices
Definition: FPGATrackSimModuleRelabel.h:23
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
FPGATrackSimModuleRelabel::m_geoKey
std::string m_geoKey
Definition: FPGATrackSimModuleRelabel.h:42
FPGATrackSimModuleRelabel::m_remapModules
bool m_remapModules
Definition: FPGATrackSimModuleRelabel.h:45
AthMessaging.h
FPGATrackSimModuleRelabel::m_ringIndex
const std::vector< uint > * m_ringIndex
Definition: FPGATrackSimModuleRelabel.h:49
FPGATrackSimModuleRelabel::FPGATrackSimModuleRelabel
FPGATrackSimModuleRelabel(std::string geokey, bool remapModules)
Definition: FPGATrackSimModuleRelabel.cxx:10
FPGATrackSimModuleRelabel::remap
bool remap(FPGATrackSimHit &hit) const
Definition: FPGATrackSimModuleRelabel.cxx:25
FPGATrackSimModuleRelabel
Definition: FPGATrackSimModuleRelabel.h:30