ATLAS Offline Software
Loading...
Searching...
No Matches
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"
37
38
39class RegSelLayer : public ZRObject {
40
41public:
42
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
78private:
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
97private:
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
109
111
112 double m_phiMin;
113 double m_phiMax;
114
115 std::vector<std::vector<const RegSelModule*> > m_phimaps;
116
117};
118
119
120std::ostream& operator<<(std::ostream& s, const RegSelLayer& layer);
121
122
123#endif /* REGSELLAYER_H */
std::ostream & operator<<(std::ostream &s, const RegSelLayer &layer)
std::vector< int > m_N
Definition RegSelLayer.h:90
void addModule(const RegSelModule &m)
std::vector< double > m_positions
Definition RegSelLayer.h:91
unsigned size() const
Definition RegSelLayer.h:88
int clusterModules() const
RegSelLayer(double rmin, double rmax, double zmin, double zmax)
Definition RegSelLayer.h:49
double phiMin(double phimin)
Definition RegSelLayer.h:74
void setupDisabledModuleList()
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...
int ID() const
Definition RegSelLayer.h:64
int size() const
Definition RegSelLayer.h:67
void addModule(const RegSelModule &module)
std::vector< const RegSelModule * > m_disabled
double phiMin() const
Definition RegSelLayer.h:71
void getDisabledModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
double phiMax() const
Definition RegSelLayer.h:72
std::vector< std::vector< const RegSelModule * > > m_phimaps
double m_phiMax
void createMaps()
std::vector< const RegSelModule * > m_modules
double m_phiMin
int ID(int id)
Definition RegSelLayer.h:65
double phiMax(double phimax)
Definition RegSelLayer.h:75
double m_ideltaphi
ZRObject()
Definition ZRObject.h:45