ATLAS Offline Software
TrigRoiDescriptor.cxx
Go to the documentation of this file.
1 // emacs: this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
4 */
5 //
6 // @file TrigRoiDescriptor.h
7 //
8 // RoiDescriptor class - includes constructors in preparation
9 // for enforcement of correct roi sizes - ingherits almost
10 // everything from DetectorDescription/RoiDescriptor
11 //
12 // @author sutt@cern.ch
13 //
14 // $Id: RoiDescriptor.h, v0.0 Fri 08 Jun 2013 23:52:09 CEST sutt $
15 
16 
18 
19 #include <cmath>
20 #include <sstream>
21 
22 
23 
24 
26  : RoiDescriptor( fullscan ),
27  m_l1Id(0), m_roiId(0), m_roiWord(0)
28 { }
29 
30 
31 
32 TrigRoiDescriptor::TrigRoiDescriptor(double eta, double etaMinus, double etaPlus,
33  double phi, double phiMinus, double phiPlus,
34  double zed, double zedMinus, double zedPlus)
35  : RoiDescriptor( eta, etaMinus, etaPlus, phi, phiMinus, phiPlus, zed, zedMinus, zedPlus ),
36  m_l1Id(0), m_roiId(0), m_roiWord(0)
37 { }
38 
39 
40 TrigRoiDescriptor::TrigRoiDescriptor(unsigned int l1id, unsigned int id,
41  double eta, double etaMinus, double etaPlus,
42  double phi, double phiMinus, double phiPlus,
43  double zed, double zedMinus, double zedPlus)
44  : RoiDescriptor( eta, etaMinus, etaPlus, phi, phiMinus, phiPlus, zed, zedMinus, zedPlus ),
45  m_l1Id(l1id), m_roiId(id), m_roiWord(0)
46 { }
47 
48 
49 
50 TrigRoiDescriptor::TrigRoiDescriptor(unsigned int roiWord, unsigned int l1id, unsigned int id,
51  double eta, double etaMinus, double etaPlus,
52  double phi, double phiMinus, double phiPlus,
53  double zed, double zedMinus, double zedPlus)
54  : RoiDescriptor( eta, etaMinus, etaPlus, phi, phiMinus, phiPlus, zed, zedMinus, zedPlus ),
55  m_l1Id(l1id), m_roiId(id), m_roiWord(roiWord)
56 { }
57 
58 
59 
61  : RoiDescriptor( roi ),
62  m_l1Id(roi.l1Id()), m_roiId(roi.roiId()), m_roiWord(roi.roiWord()) {
63 }
64 
66 
67 
68 
70  if ( this==&roi ) return *this;
71 
72  construct(roi);
73 
74  m_l1Id = roi.l1Id();
75  m_roiId = roi.roiId();
76  m_roiWord = roi.roiWord();
77 
79  if ( roi.size()>0 ) {
80  if ( m_manageConstituents ) {
82  for ( unsigned i=0 ; i<roi.size() ; i++ ) push_back( new TrigRoiDescriptor( *roi.at(i) ) );
83  }
84  else {
86  for ( unsigned i=0 ; i<roi.size() ; i++ ) push_back( roi.at(i) );
87  }
88  }
89 
90  return *this;
91 }
92 
93 
95  return TrigRoiDescriptor::operator=( static_cast<const IRoiDescriptor&>(roi) );
96 }
97 
99 
100 
101 
102 
104 // helper operators
105 
106 TrigRoiDescriptor::operator std::string() const {
107  std::stringstream ss;
108  ss << " RoIid: " << roiId() << " RoIword: " << roiWord() << "\t" << RoiDescriptor::operator::std::string();
109  return ss.str();
110 }
111 
112 std::string str( const TrigRoiDescriptor& d ) {
113  return std::string(d);
114 }
115 
116 std::ostream& operator<<( std::ostream& m, const TrigRoiDescriptor& d ) {
117  return m << std::string(d);
118 }
119 
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
hist_file_dump.d
d
Definition: hist_file_dump.py:137
IRoiDescriptor::size
virtual unsigned size() const =0
number of constituents
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
TrigRoiDescriptor::m_roiWord
unsigned int m_roiWord
lvl1 RoI word from which this RoI was initially constructed
Definition: TrigRoiDescriptor.h:143
RoiDescriptor::m_manageConstituents
bool m_manageConstituents
flag to determine whether consituents should be managed
Definition: RoiDescriptor.h:234
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
TrigRoiDescriptor::TrigRoiDescriptor
TrigRoiDescriptor(bool fullscan=false)
default constructor
Definition: TrigRoiDescriptor.cxx:25
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
RoiDescriptor::push_back
void push_back(const IRoiDescriptor *roi)
add a RoiDescriptor
Definition: RoiDescriptor.h:157
str
std::string str(const TrigRoiDescriptor &d)
Definition: TrigRoiDescriptor.cxx:112
lumiFormat.i
int i
Definition: lumiFormat.py:92
TrigRoiDescriptor::m_roiId
unsigned int m_roiId
RoI number.
Definition: TrigRoiDescriptor.h:142
TrigRoiDescriptor::operator=
TrigRoiDescriptor & operator=(const IRoiDescriptor &roi)
Definition: TrigRoiDescriptor.cxx:69
IRoiDescriptor
Describes the API of the Region of Ineterest geometry.
Definition: IRoiDescriptor.h:23
xAOD::roiId
setTeId setLumiBlock roiId
Definition: L2StandAloneMuon_v1.cxx:331
RoiDescriptor
Describes the Region of Ineterest geometry It has basically 9 parameters.
Definition: RoiDescriptor.h:40
IRoiDescriptor::roiId
virtual unsigned int roiId() const =0
identifiers
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
IRoiDescriptor::l1Id
virtual unsigned int l1Id() const =0
TrigRoiDescriptor::~TrigRoiDescriptor
virtual ~TrigRoiDescriptor()
Definition: TrigRoiDescriptor.cxx:98
TrigRoiDescriptor.h
IRoiDescriptor::at
virtual const IRoiDescriptor * at(int i) const =0
find an RoiDescriptor constituent
IRoiDescriptor::roiWord
virtual unsigned int roiWord() const =0
operator<<
std::ostream & operator<<(std::ostream &m, const TrigRoiDescriptor &d)
Definition: TrigRoiDescriptor.cxx:116
TrigRoiDescriptor::m_l1Id
unsigned int m_l1Id
lvl1 event number
Definition: TrigRoiDescriptor.h:141
RoiDescriptor::construct
void construct(double eta, double etaMinus, double etaPlus, double phi, double phiMinus, double phiPlus, double zed, double zedMinus, double zedPlus)
construct RoiDescriptor internals - similar to constructors
Definition: RoiDescriptor.cxx:160