ATLAS Offline Software
RegSelSubDetector.h
Go to the documentation of this file.
1 // emacs: this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 /**************************************************************************
8  **
9  ** File: RegSelSubDetector.h
10  **
11  ** Description: Basic name class for named objects, just to
12  ** keep everything tidy with standard calls
13  **
14  **
15  ** Author: M.Sutton
16  **
17  ** Created: Wed Apr 4 15:50:48 BST 2007
18  ** Modified:
19  **
20  **
21  **
22  **************************************************************************/
23 
24 
25 #ifndef __REGSELSUBDETECTOR_H
26 #define __REGSELSUBDETECTOR_H
27 
28 
29 #include "RegSelLUT/RegSelRoI.h"
30 #include "RegSelLUT/RegSelModule.h"
31 #include "RegSelLUT/RegSelLayer.h"
32 
33 #include "RegSelLUT/RegSelName.h"
34 #include "RegSelLUT/ZRObject.h"
35 
36 #include <vector>
37 #include <map>
38 
39 
40 
41 
42 
43 
44 class RegSelSubDetector : public ZRObject, public RegSelName {
45 
46 public:
47 
48  RegSelSubDetector() : ZRObject(0,0,0,0), m_ID(0), m_Nlayers(0), m_mapped(false) { }
49 
50  RegSelSubDetector(int ID, int Nlayers, const std::string& s) :
51  ZRObject(0,0,0,0), RegSelName(s), m_ID(ID), m_Nlayers(Nlayers), m_mapped(false)
52  { } // m_layer.resize(m_Nlayers); }
53 
54  RegSelSubDetector(int ID, const std::string& s) :
55  ZRObject(0,0,0,0), RegSelName(s), m_ID(ID), m_Nlayers(0), m_mapped(false)
56  { }
57 
58  RegSelSubDetector(int ID) :
59  ZRObject(0,0,0,0), RegSelName(""), m_ID(ID), m_Nlayers(0), m_mapped(false)
60  { }
61 
62 
63 
64  RegSelSubDetector(double rmin, double rmax,
65  double zmin, double zmax) :
66  ZRObject(rmin, rmax, zmin, zmax), m_ID(0), m_Nlayers(0), m_mapped(false)
67  { } // m_layer.resize(m_Nlayers); }
68 
69 
70  RegSelSubDetector(double rmin, double rmax,
71  double zmin, double zmax,
72  const std::string& s) :
73  ZRObject(rmin, rmax, zmin, zmax), RegSelName(s), m_ID(0), m_Nlayers(0), m_mapped(false)
74  { }
75 
76 
77  void reset();
78 
79  void addModules(std::vector<RegSelModule>& modules);
80 
81  void setupDisabledModules();
82 
83  void getModules(const RegSelRoI& roi, std::vector<const RegSelModule*>& modules) const;
84  void getModules(const RegSelRoI& roi, unsigned layer, std::vector<const RegSelModule*>& modules) const;
85  void getModules(unsigned layer, std::vector<const RegSelModule*>& modules) const;
86 
87 
88  int ID() const { return m_ID; }
89  int Nlayers() const { return m_Nlayers; }
90 
91 
92  void drawlayers(std::vector<const ZRObject*>& c) const {
93  for ( unsigned i=0 ; i<m_Nlayers ; i++ ) c.push_back(&m_layer[i]);
94  }
95 
96  const std::vector<RegSelLayer>& getLayers() const { return m_layer; }
97 
98  void disableLayer(unsigned layer);
99  void enableLayer(unsigned layer);
100 
101 protected:
102 
103  int m_ID;
104 
105  unsigned m_Nlayers;
106  std::vector<RegSelLayer> m_layer;
107 
108  std::map<unsigned, unsigned> m_layermap;
109  bool m_mapped;
110 };
111 
112 
113 
114 
115 
116 #endif /* __REGSELSUBDETECTOR_H */
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
RegSelSubDetector::m_Nlayers
unsigned m_Nlayers
Definition: RegSelSubDetector.h:120
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
ZRObject::ZRObject
ZRObject()
Definition: ZRObject.h:45
RegSelSubDetector::m_mapped
bool m_mapped
Definition: RegSelSubDetector.h:124
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
RegSelSubDetector::m_ID
int m_ID
Definition: RegSelSubDetector.h:118
RegSelModule.h
RegSelName.h
RegSelSubDetector::reset
void reset()
Definition: RegSelSubDetector.cxx:85
RegSelSubDetector::m_layer
std::vector< RegSelLayer > m_layer
Definition: RegSelSubDetector.h:121
RegSelSubDetector::addModules
void addModules(std::vector< RegSelModule > &modules)
Definition: RegSelSubDetector.cxx:90
RegSelSubDetector::RegSelSubDetector
RegSelSubDetector()
Definition: RegSelSubDetector.h:63
RegSelLayer.h
RegSelName
Definition: RegSelName.h:33
RegSelSubDetector::ID
int ID() const
Definition: RegSelSubDetector.h:103
RegSelSubDetector::Nlayers
int Nlayers() const
Definition: RegSelSubDetector.h:104
lumiFormat.i
int i
Definition: lumiFormat.py:85
RegSelSubDetector::setupDisabledModules
void setupDisabledModules()
Definition: RegSelSubDetector.cxx:76
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
RegSelRoI
Definition: RegSelRoI.h:32
RegSelSubDetector
Definition: RegSelSubDetector.h:44
RegSelSubDetector::getLayers
const std::vector< RegSelLayer > & getLayers() const
Definition: RegSelSubDetector.h:111
RegSelName::RegSelName
RegSelName(const std::string &s="")
Definition: RegSelName.h:52
RegSelSubDetector::drawlayers
void drawlayers(std::vector< const ZRObject * > &c) const
Definition: RegSelSubDetector.h:107
RegSelSubDetector::m_layermap
std::map< unsigned, unsigned > m_layermap
Definition: RegSelSubDetector.h:123
RegSelSubDetector::enableLayer
void enableLayer(unsigned layer)
Definition: RegSelSubDetector.cxx:202
ZRObject
Definition: ZRObject.h:41
ZRObject.h
RegSelSubDetector::disableLayer
void disableLayer(unsigned layer)
Definition: RegSelSubDetector.cxx:192
python.compressB64.c
def c
Definition: compressB64.py:93
RegSelRoI.h
RegSelSubDetector::getModules
void getModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
Definition: RegSelSubDetector.cxx:31