ATLAS Offline Software
RegSelLayer.h
Go to the documentation of this file.
1 // emacs: this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 /**************************************************************************
8  **
9  ** File: RegSelLayer.h
10  **
11  ** Description:
12  **
13  **
14  **
15  ** Author: M.Sutton
16  **
17  ** Created: Wed Apr 4 17:13:53 BST 2007
18  ** Modified:
19  **
20  **
21  **
22  **************************************************************************/
23 
24 
25 #ifndef REGSELLAYER_H
26 #define REGSELLAYER_H
27 
28 
29 #include <vector>
30 #include <iostream>
31 
32 
33 
34 #include "RegSelLUT/ZRObject.h"
35 #include "RegSelLUT/RegSelRoI.h"
36 #include "RegSelLUT/RegSelModule.h"
37 
38 
39 class RegSelLayer : public ZRObject {
40 
41 public:
42 
43  RegSelLayer() :
44  ZRObject(0,0,0,0),
45  m_set(false), m_ID(0),
46  m_modules(0), m_disabled(0), m_Nphi(0),
47  m_ideltaphi(0), m_phiMin(0), m_phiMax(0), m_phimaps(0) { }
48 
49  RegSelLayer(double rmin, double rmax, double zmin, double zmax) :
50  ZRObject(rmin, rmax, zmin, zmax),
51  m_set(true), m_ID(0), m_modules(0), m_disabled(0), m_Nphi(0),
52  m_ideltaphi(0), m_phiMin(0), m_phiMax(0), m_phimaps(0) { }
53 
54  void reset();
55 
56  void addModule(const RegSelModule& module);
58 
59  void getModules(const RegSelRoI& roi, std::vector<const RegSelModule*>& modules) const;
60  void getModules(std::vector<const RegSelModule*>& modules) const;
61 
62  void getDisabledModules(const RegSelRoI& roi, std::vector<const RegSelModule*>& modules) const;
63 
64  int ID() const { return m_ID; }
65  int ID(int id) { m_ID = id; return m_ID; }
66 
67  int size() const { return m_modules.size(); }
68 
69  void createMaps();
70 
71  double phiMin() const { return m_phiMin; }
72  double phiMax() const { return m_phiMax; }
73 
74  double phiMin(double phimin) { return m_phiMin=phimin; }
75  double phiMax(double phimax) { return m_phiMax=phimax; }
76 
77 
78 private:
79 
80  // code to cluster the module positions to calculate
81  // the appropriate phi segemntation for the layer
82 
83  class PhiCluster {
84  public:
85  // add and cluster module
86  void addModule(const RegSelModule& m);
87  // how many phi clusters are there?
88  unsigned size() const { return m_N.size(); }
89  private:
90  std::vector<int> m_N;
91  std::vector<double> m_positions;
92  };
93 
94  // driver routine to pick which modules to cluster
95  int clusterModules() const;
96 
97 private:
98 
99  bool m_set;
100  int m_ID;
101 
102  std::vector<const RegSelModule*> m_modules;
103  std::vector<const RegSelModule*> m_disabled;
104 
105  // std::vector<const RegSelModule*> m_enabledmodules;
106 
107 
108  int m_Nphi;
109 
110  double m_ideltaphi;
111 
112  double m_phiMin;
113  double m_phiMax;
114 
115  std::vector<std::vector<const RegSelModule*> > m_phimaps;
116 
117 };
118 
119 
120 std::ostream& operator<<(std::ostream& s, const RegSelLayer& layer);
121 
122 
123 #endif /* REGSELLAYER_H */
RegSelModule
Definition: RegSelModule.h:38
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
RegSelLayer::phiMax
double phiMax() const
Definition: RegSelLayer.h:87
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
ZRObject::ZRObject
ZRObject()
Definition: ZRObject.h:45
RegSelLayer::getDisabledModules
void getDisabledModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
Definition: RegSelLayer.cxx:314
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:169
RegSelLayer::PhiCluster::addModule
void addModule(const RegSelModule &m)
Definition: RegSelLayer.cxx:87
RegSelLayer::m_phiMin
double m_phiMin
Definition: RegSelLayer.h:127
RegSelLayer::m_modules
std::vector< const RegSelModule * > m_modules
Definition: RegSelLayer.h:117
RegSelLayer::m_ID
int m_ID
Definition: RegSelLayer.h:115
RegSelLayer::PhiCluster
Definition: RegSelLayer.h:98
RegSelLayer
Definition: RegSelLayer.h:39
RegSelLayer::m_phiMax
double m_phiMax
Definition: RegSelLayer.h:128
RegSelModule.h
RegSelLayer::m_disabled
std::vector< const RegSelModule * > m_disabled
Definition: RegSelLayer.h:118
RegSelLayer::PhiCluster::size
unsigned size() const
Definition: RegSelLayer.h:103
RegSelLayer::clusterModules
int clusterModules() const
Definition: RegSelLayer.cxx:50
python.PyAthena.module
module
Definition: PyAthena.py:131
RegSelLayer::phiMin
double phiMin() const
Definition: RegSelLayer.h:86
operator<<
std::ostream & operator<<(std::ostream &s, const RegSelLayer &layer)
Definition: RegSelLayer.cxx:391
RegSelLayer::addModule
void addModule(const RegSelModule &module)
Definition: RegSelLayer.cxx:130
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
RegSelLayer::ID
int ID() const
Definition: RegSelLayer.h:79
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:169
RegSelLayer::PhiCluster::m_N
std::vector< int > m_N
Definition: RegSelLayer.h:105
RegSelRoI
Definition: RegSelRoI.h:32
RegSelLayer::PhiCluster::m_positions
std::vector< double > m_positions
Definition: RegSelLayer.h:106
RegSelLayer::getModules
void getModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
Fixme: This is the completely correct solution, where each module is allowed to be at a completely di...
Definition: RegSelLayer.cxx:197
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
RegSelLayer::m_ideltaphi
double m_ideltaphi
Definition: RegSelLayer.h:125
RegSelLayer::setupDisabledModuleList
void setupDisabledModuleList()
Definition: RegSelLayer.cxx:166
RegSelLayer::size
int size() const
Definition: RegSelLayer.h:82
RegSelLayer::m_Nphi
int m_Nphi
Definition: RegSelLayer.h:123
RegSelLayer::createMaps
void createMaps()
Definition: RegSelLayer.cxx:334
RegSelLayer::m_set
bool m_set
Definition: RegSelLayer.h:114
RegSelLayer::RegSelLayer
RegSelLayer()
Definition: RegSelLayer.h:58
RegSelLayer::reset
void reset()
Definition: RegSelLayer.cxx:38
ZRObject
Definition: ZRObject.h:41
ZRObject.h
RegSelLayer::m_phimaps
std::vector< std::vector< const RegSelModule * > > m_phimaps
Definition: RegSelLayer.h:130
RegSelRoI.h