ATLAS Offline Software
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 
58 RegSelROBList::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 
85 
86  for ( ; robitr!=robs.end() ; ++robitr ) {
87  std::cout << "RegSelLUT::fillROBMap() " << robitr->second << std::endl;
88  }
89 }
90 
91 
92 
93 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
RegSelModule
Definition: RegSelModule.h:38
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
RegSelROBList::RegSelROBList
RegSelROBList(const std::vector< RegSelModule > &modules)
Definition: RegSelROB.cxx:58
ZRObject::m_zMax
double m_zMax
Definition: ZRObject.h:119
RegSelROB.h
RegSelROB::addModule
void addModule(const RegSelModule *m)
Definition: RegSelROB.cxx:36
RegSelROB::m_etaMax
double m_etaMax
Definition: RegSelROB.h:58
ZRObject::rMin
double rMin() const
Definition: ZRObject.h:80
RegSelROB::RegSelROB
RegSelROB(const RegSelModule *m)
Definition: RegSelROB.cxx:18
ZRObject::rMax
double rMax() const
Definition: ZRObject.h:81
ZRObject::m_rMax
double m_rMax
Definition: ZRObject.h:118
RegSelROB::phiMax
double phiMax() const
Definition: RegSelROB.h:36
RegSelROB::m_modules
std::set< const RegSelModule * > m_modules
Definition: RegSelROB.h:60
ZRObject::zMin
double zMin() const
Definition: ZRObject.h:83
python.HLT.CommonSequences.EventBuildingSequences.robs
robs
Definition: EventBuildingSequences.py:401
RegSelROB::m_etaMin
double m_etaMin
Definition: RegSelROB.h:57
RegSelROB::etaMin
double etaMin() const
Definition: RegSelROB.h:42
RegSelROB::m_robID
uint32_t m_robID
Definition: RegSelROB.h:52
RegSelROB
Definition: RegSelROB.h:25
ZRObject::zMax
double zMax() const
Definition: ZRObject.h:84
ZRObject::m_zMin
double m_zMin
Definition: ZRObject.h:119
RegSelROB::m_phiMin
double m_phiMin
Definition: RegSelROB.h:54
RegSelROB::m_phiMax
double m_phiMax
Definition: RegSelROB.h:55
ZRObject::m_rMin
double m_rMin
Definition: ZRObject.h:118
RegSelROB::etaMax
double etaMax() const
Definition: RegSelROB.h:43
RegSelROB::phiMin
double phiMin() const
Definition: RegSelROB.h:35