ATLAS Offline Software
Loading...
Searching...
No Matches
RoiUtil.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  RoiUtil

Functions

bool RoiUtil::contains (const IRoiDescriptor &roi, double z0, double dzdr)
 see whether a segment is contained within the roi in r-z
bool RoiUtil::contains_zrange (const IRoiDescriptor &roi, double z0, double dzdr, double zmin, double zmax)
bool RoiUtil::contains (const IRoiDescriptor &roi, double z, double r, double phi)
 see whether a point is contained within the roi (in phi and r-z)
bool RoiUtil::containsPhi (const IRoiDescriptor &roi, double phi)
 test whether a stub is contained within the roi
bool RoiUtil::containsZed (const IRoiDescriptor &roi, double z, double r)
double RoiUtil::phicheck (double phi)
 basic range checkers
double RoiUtil::etacheck (double eta)
double RoiUtil::zedcheck (double zed)
bool operator== (const IRoiDescriptor &roi0, const IRoiDescriptor &roi1)
bool operator!= (const IRoiDescriptor &roi0, const IRoiDescriptor &roi1)

Function Documentation

◆ operator!=()

bool operator!= ( const IRoiDescriptor & roi0,
const IRoiDescriptor & roi1 )

Definition at line 190 of file RoiUtil.cxx.

190{ return !(roi0==roi1); }

◆ operator==()

bool operator== ( const IRoiDescriptor & roi0,
const IRoiDescriptor & roi1 )

trivial self comparison

same compositness ?

not composite

check full scan - all non-composite full scan rois are equivalent

check geometry

Fixme: naive phi differwnce - should test for the phi=pi boundary for the case of very close angles but wrapped differently

check constituents

Definition at line 149 of file RoiUtil.cxx.

149 {
150
152 if ( &roi0 == &roi1 ) return true;
153
155 if ( roi0.composite() != roi1.composite() ) return false;
156
157 if ( !roi0.composite() ) {
159
161 if ( roi0.isFullscan() != roi1.isFullscan() ) return false;
162 if ( roi0.isFullscan() ) return true;
163
165 if ( std::fabs(roi0.zed() -roi1.zed() )>1e-7 ) return false;
166 if ( std::fabs(roi0.zedPlus() -roi1.zedPlus() )>1e-7 ) return false;
167 if ( std::fabs(roi0.zedMinus()-roi1.zedMinus())>1e-7 ) return false;
168
169 if ( std::fabs(roi0.eta() -roi1.eta() )>1e-7 ) return false;
170 if ( std::fabs(roi0.etaPlus() -roi1.etaPlus() )>1e-7 ) return false;
171 if ( std::fabs(roi0.etaMinus()-roi1.etaMinus())>1e-7 ) return false;
172
175 if ( std::fabs(roi0.phi() -roi1.phi() ) >1e-7 ) return false;
176 if ( std::fabs(roi0.phiPlus() -roi1.phiPlus()) >1e-7 ) return false;
177 if ( std::fabs(roi0.phiMinus()-roi1.phiMinus())>1e-7 ) return false;
178 }
179 else {
181 if ( roi0.size() != roi1.size() ) return false;
182 for ( unsigned i=roi0.size() ; i-- ; ) if ( !( *roi0.at(i) == *roi1.at(i) ) ) return false;
183 }
184
185 return true;
186}
virtual bool isFullscan() const =0
is this a full detector RoI?
virtual double eta() const =0
virtual double phiPlus() const =0
extreme phi values
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
virtual double phiMinus() const =0
virtual double phi() const =0
Methods to retrieve data members.
virtual double zedMinus() const =0
virtual double zed() const =0
virtual const IRoiDescriptor * at(int i) const =0
find an RoiDescriptor constituent
virtual unsigned size() const =0
number of constituents
virtual double etaMinus() const =0
virtual double etaPlus() const =0
virtual bool composite() const =0
Super RoI access methods.