ATLAS Offline Software
Loading...
Searching...
No Matches
RegSelROB.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4//
5// @file RegSelROB.cxx
6//
7//
8// @author M.Sutton
9//
10//
11// $Id: RegSelROB.cxx, v0.0 Thu 14 Oct 2010 18:08:00 BST sutt $
12
13#include <cmath>
14#include <map>
15
16#include "RegSelLUT/RegSelROB.h"
17
19 m_robID = m->robID();
20 m_modules.insert(m);
21
22 m_phiMin = m->phiMin();
23 m_phiMax = m->phiMax();
24
25 m_rMax = m->rMax();
26 m_rMin = m->rMin();
27
28 m_zMax = m->zMax();
29 m_zMin = m->zMin();
30
31 m_etaMin = m->_etaMin();
32 m_etaMax = m->_etaMax();
33}
34
35
37 if ( m->robID()==m_robID ) {
38 m_modules.insert(m);
39
40 if ( m->phiMin()<phiMin() ) m_phiMin = m->phiMin();
41 if ( m->phiMax()>phiMax() ) m_phiMax = m->phiMax();
42
43 if ( m->rMax()>rMax() ) m_rMax = m->rMax();
44 if ( m->rMin()<rMin() ) m_rMin = m->rMin();
45
46 if ( m->zMax()>zMax() ) m_zMax = m->zMax();
47 if ( m->zMin()<zMin() ) m_zMin = m->zMin();
48
49 if ( m->_etaMin()<etaMin() ) m_etaMin = m->_etaMin();
50 if ( m->_etaMax()>etaMax() ) m_etaMax = m->_etaMax();
51
52 }
53}
54
55
56
57
58RegSelROBList::RegSelROBList(const std::vector<RegSelModule>& modules) {
59
60 std::map<uint32_t, RegSelROB> robs;
61
62 std::cout << "RegSelSiLUT::fillROBMap()" << std::endl;
63
64 for ( std::vector<RegSelModule>::const_iterator mptr = modules.begin() ; mptr!=modules.end() ; ++mptr ) {
65
66 // std::cout << *mptr << std::endl;
67
68 std::map<uint32_t, RegSelROB>::iterator robitr = robs.find(mptr->robID());
69
70 std::cout << *mptr << std::endl;
71
72 if ( robitr != robs.end() ) {
73 // std::cout << "add to ROB" << mptr->robID() << std::endl;
74 robitr->second.addModule(&(*mptr));
75 }
76 else {
77 // std::cout << "add new ROB" << mptr->robID() << std::endl;
78 robs.insert( std::map<uint32_t, RegSelROB>::value_type(mptr->robID(),RegSelROB(&(*mptr))) );
79 }
80 }
81
82 std::cout << "roblist size " << robs.size() << std::endl;
83
84 std::map<uint32_t, RegSelROB>::iterator robitr = robs.begin();
85
86 for ( ; robitr!=robs.end() ; ++robitr ) {
87 std::cout << "RegSelLUT::fillROBMap() " << robitr->second << std::endl;
88 }
89}
90
91
92
93
RegSelROBList(const std::vector< RegSelModule > &modules)
Definition RegSelROB.cxx:58
double etaMin() const
Definition RegSelROB.h:42
RegSelROB(const RegSelModule *m)
Definition RegSelROB.cxx:18
double phiMax() const
Definition RegSelROB.h:36
double phiMin() const
Definition RegSelROB.h:35
double m_etaMin
Definition RegSelROB.h:57
double etaMax() const
Definition RegSelROB.h:43
double m_phiMax
Definition RegSelROB.h:55
double m_etaMax
Definition RegSelROB.h:58
double m_phiMin
Definition RegSelROB.h:54
uint32_t m_robID
Definition RegSelROB.h:52
void addModule(const RegSelModule *m)
Definition RegSelROB.cxx:36
std::set< const RegSelModule * > m_modules
Definition RegSelROB.h:60
double m_rMin
Definition ZRObject.h:118
double rMax() const
Definition ZRObject.h:81
double rMin() const
Definition ZRObject.h:80
double m_zMin
Definition ZRObject.h:119
double zMin() const
Definition ZRObject.h:83
double zMax() const
Definition ZRObject.h:84
double m_zMax
Definition ZRObject.h:119
double m_rMax
Definition ZRObject.h:118