ATLAS Offline Software
Loading...
Searching...
No Matches
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
33 double phi, double phiMinus, double phiPlus,
34 double zed, double zedMinus, double zedPlus)
36 m_l1Id(0), m_roiId(0), m_roiWord(0)
37{ }
38
39
40TrigRoiDescriptor::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)
45 m_l1Id(l1id), m_roiId(id), m_roiWord(0)
46{ }
47
48
49
50TrigRoiDescriptor::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)
55 m_l1Id(l1id), m_roiId(id), m_roiWord(roiWord)
56{ }
57
58
59
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
97
99
100
101
102
104// helper operators
105
106TrigRoiDescriptor::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
112std::string str( const TrigRoiDescriptor& d ) {
113 return std::string(d);
114}
115
116std::ostream& operator<<( std::ostream& m, const TrigRoiDescriptor& d ) {
117 return m << std::string(d);
118}
119
static Double_t ss
std::ostream & operator<<(std::ostream &m, const TrigRoiDescriptor &d)
Athena::TPCnvVers::Current TrigRoiDescriptor
IRoiDescriptor()
default constructor
virtual const IRoiDescriptor * at(int i) const =0
find an RoiDescriptor constituent
virtual unsigned size() const =0
number of constituents
virtual unsigned int roiWord() const =0
virtual unsigned int roiId() const =0
identifiers
virtual unsigned int l1Id() const =0
virtual double etaMinus() const override final
gets eta at zMinus
void push_back(const IRoiDescriptor *roi)
add a RoiDescriptor
virtual double etaPlus() const override final
gets eta at zedPlus
virtual double zed() const override final
RoiDescriptor(bool fullscan=ROI)
default constructor
virtual double phi() const override final
Methods to retrieve data members.
virtual double phiMinus() const override final
gets phiMinus
bool m_manageConstituents
flag to determine whether consituents should be managed
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
virtual double zedPlus() const override final
z at the most forward end of the RoI
virtual double zedMinus() const override final
z at the most backward end of the RoI
virtual double eta() const override final
virtual double phiPlus() const override final
gets phiPlus
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
unsigned int m_roiWord
lvl1 RoI word from which this RoI was initially constructed
TrigRoiDescriptor(bool fullscan=false)
default constructor
virtual unsigned int roiWord() const override final
TrigRoiDescriptor & operator=(const IRoiDescriptor &roi)
virtual unsigned int roiId() const override final
these quantities probably don't need to be used any more
virtual unsigned int l1Id() const override final
unsigned int m_roiId
RoI number.
unsigned int m_l1Id
lvl1 event number