#include <Ring.h>
Public Types | |
typedef DetIdMap::const_iterator | const_iterator |
typedef std::pair < const_iterator, const_iterator > | ConstIteratorRange |
typedef std::multimap< double, DetId > | DetIdMap |
typedef DetIdMap::iterator | iterator |
typedef std::pair< iterator, iterator > | IteratorRange |
enum | type { TIBRing, TOBRing, TIDRing, TECRing, PXBRing, PXFRing, Unspecified } |
Public Member Functions | |
void | addId (double phi, DetId id) |
const_iterator | begin () const |
iterator | begin () |
bool | containsDetId (DetId id, double phi=999999., double dphi_scalefactor=1.5) const |
std::string | dump () const |
const_iterator | end () const |
iterator | end () |
DetIdMap | getDetIdMap () const |
DetId | getFirst () const |
unsigned int | getindex () const |
int | getNumDetIds () const |
float | getrmax () const |
float | getrmin () const |
type | getType () const |
float | getzmax () const |
float | getzmin () const |
void | initialize (float rmin, float rmax, float zmin, float zmax) |
bool | isInitialized () const |
const_iterator | lower_bound (double phi) const |
double | map_phi (double phi) const |
void | notInitializedMsg () const |
int | operator!= (const Ring &ring) const |
inequality | |
int | operator< (const Ring &ring) const |
comparison | |
int | operator== (const Ring &ring) const |
equality | |
std::string | print () const |
Ring (type input) | |
Ring (unsigned int index, float rmin, float rmax, float zmin, float zmax, unsigned int type) | |
Ring (Ring *input) | |
Ring () | |
void | setindex (unsigned int input) |
void | setInitialized (bool input) |
void | setrmax (float input) |
void | setrmin (float input) |
void | setType (type input) |
void | setzmax (float input) |
void | setzmin (float input) |
const_iterator | upper_bound (double phi) const |
~Ring () | |
Private Attributes | |
DetIdMap | detids_ |
unsigned int | index_ |
bool | initialized_ |
float | rmax_ |
float | rmin_ |
type | type_ |
float | zmax_ |
float | zmin_ |
typedef DetIdMap::const_iterator Ring::const_iterator |
typedef std::pair<const_iterator,const_iterator> Ring::ConstIteratorRange |
typedef std::multimap<double,DetId> Ring::DetIdMap |
typedef DetIdMap::iterator Ring::iterator |
typedef std::pair<iterator,iterator> Ring::IteratorRange |
enum Ring::type |
Ring::Ring | ( | ) | [inline] |
Definition at line 51 of file Ring.h.
: initialized_(false), rmin_(0.), rmax_(0.), zmin_(0.), zmax_(0.), type_(Unspecified), index_(0) {}
Ring::Ring | ( | type | input | ) | [inline] |
Ring::Ring | ( | unsigned int | index, |
float | rmin, | ||
float | rmax, | ||
float | zmin, | ||
float | zmax, | ||
unsigned int | type | ||
) | [inline] |
Definition at line 67 of file Ring.h.
References PXBRing, PXFRing, TECRing, TIBRing, TIDRing, TOBRing, type_, and Unspecified.
: initialized_(true), rmin_(rmin), rmax_(rmax), zmin_(zmin), zmax_(zmax), index_(index) { if ( type == 0 ) { type_ = TIBRing; } else if ( type == 1 ) { type_ = TOBRing; } else if ( type == 2 ) { type_ = TIDRing; } else if ( type == 3 ) { type_ = TECRing; } else if ( type == 4 ) { type_ = PXBRing; } else if ( type == 5 ) { type_ = PXFRing; } else { type_ = Unspecified; } }
Ring::Ring | ( | Ring * | input | ) | [inline] |
void Ring::addId | ( | double | phi, |
DetId | id | ||
) | [inline] |
Definition at line 106 of file Ring.h.
References detids_.
Referenced by RingMaker::constructPXBRing(), RingMaker::constructPXFRing(), RingMaker::constructTECRing(), RingMaker::constructTIBRing(), RingMaker::constructTIDRing(), RingMaker::constructTOBRing(), and Rings::readInFromAsciiFile().
const_iterator Ring::begin | ( | void | ) | const [inline] |
Definition at line 147 of file Ring.h.
References detids_.
Referenced by RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerOneOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerTwoOuter(), and RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsTwoInnerOneOuter().
{ return detids_.begin(); }
iterator Ring::begin | ( | void | ) | [inline] |
bool Ring::containsDetId | ( | DetId | id, |
double | phi = 999999. , |
||
double | dphi_scalefactor = 1.5 |
||
) | const [inline] |
Definition at line 110 of file Ring.h.
References kinem::delta_phi(), detids_, map_phi(), phi, pi, relativeConstraints::ring, and Geom::twoPi().
{ // calculate window around given phi (if phi == 999999. set window to [-pi,pi]) // determine phi segmentation from number of detids in ring // window is += 1.5 times the phi segmentation double phi_inner = -Geom::pi(); double phi_outer = Geom::pi(); double delta_phi = Geom::twoPi() / detids_.size(); if ( phi != 999999. ) { phi_inner = map_phi(phi - dphi_scalefactor*delta_phi); phi_outer = map_phi(phi + dphi_scalefactor*delta_phi); } // check for out of bounds of [0,2pi] if ( phi_inner > phi_outer ) { // double loop for ( const_iterator ring = detids_.lower_bound(phi_inner); ring != detids_.end(); ++ring ) { if ( id == ring->second ) { return true; } } for ( const_iterator ring = detids_.begin(); ring != detids_.upper_bound(phi_outer); ++ring ) { if ( id == ring->second ) { return true; } } } else { for ( const_iterator ring = detids_.lower_bound(phi_inner); ring != detids_.upper_bound(phi_outer); ++ring ) { if ( id == ring->second ) { return true; } } } return false; }
std::string Ring::dump | ( | void | ) | const [inline] |
Definition at line 207 of file Ring.h.
References detids_, index_, rmax_, rmin_, type_, zmax_, and zmin_.
{ std::ostringstream stream; stream << "### Ring with index: " << index_ << " ###" << std::endl; stream << index_ << " " << rmin_ << " " << rmax_ << " " << zmin_ << " " << zmax_ << " " << type_ << std::endl; stream << detids_.size() << std::endl; for ( const_iterator entry = detids_.begin(); entry != detids_.end(); ++entry ) { stream << entry->first << " " << entry->second.rawId() << std::endl; } return stream.str(); }
const_iterator Ring::end | ( | void | ) | const [inline] |
Definition at line 148 of file Ring.h.
References detids_.
Referenced by RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerOneOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerTwoOuter(), and RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsTwoInnerOneOuter().
{ return detids_.end(); }
iterator Ring::end | ( | void | ) | [inline] |
DetIdMap Ring::getDetIdMap | ( | ) | const [inline] |
DetId Ring::getFirst | ( | ) | const [inline] |
Definition at line 181 of file Ring.h.
References detids_.
Referenced by RoadMaker::RingInBarrel(), RoadSearchSeedFinderAlgorithm::ringsOnSameLayer(), and RoadMaker::RingsOnSameLayer().
{ return detids_.begin()->second; }
unsigned int Ring::getindex | ( | ) | const [inline] |
Definition at line 185 of file Ring.h.
References index_.
Referenced by RoadMaker::collectInnerTECSeedRings(), RoadMaker::collectInnerTECSeedRings1(), RoadMaker::collectInnerTECSeedRings2(), RoadMaker::collectInnerTIBSeedRings(), RoadMaker::collectInnerTIBSeedRings1(), RoadMaker::collectInnerTIBSeedRings2(), RoadMaker::collectInnerTIDSeedRings(), RoadMaker::collectInnerTIDSeedRings1(), RoadMaker::collectInnerTIDSeedRings2(), RoadMaker::collectInnerTOBSeedRings(), RoadMaker::collectInnerTOBSeedRings1(), RoadMaker::collectInnerTOBSeedRings2(), RoadMaker::collectOuterTECSeedRings(), RoadMaker::collectOuterTECSeedRings1(), RoadMaker::collectOuterTIBSeedRings(), RoadMaker::collectOuterTIBSeedRings1(), RoadMaker::collectOuterTOBSeedRings(), RoadMaker::collectOuterTOBSeedRings1(), RingMaker::constructPXBRings(), RingMaker::constructTECRings(), RingMaker::constructTIBRings(), RingMaker::constructTIDRings(), RingMaker::constructTOBRings(), SortLayersByZR::LayersSortedInZR(), operator!=(), operator<(), operator==(), and SortRingsByZR::RingsSortedInZR().
{ return index_; }
int Ring::getNumDetIds | ( | ) | const [inline] |
Definition at line 108 of file Ring.h.
References detids_.
Referenced by RingMaker::constructPXBRings(), RingMaker::constructPXFRings(), RingMaker::constructTECRings(), RingMaker::constructTIBRings(), RingMaker::constructTIDRings(), and RingMaker::constructTOBRings().
{ return detids_.size(); }
float Ring::getrmax | ( | ) | const [inline] |
Definition at line 156 of file Ring.h.
References isInitialized(), notInitializedMsg(), and rmax_.
Referenced by RoadMaker::CompatibleWithLines(), RoadMaker::LinesThroughRingAndBS(), and RoadMaker::LinesThroughRings().
{ if ( !isInitialized() ) notInitializedMsg(); return rmax_; }
float Ring::getrmin | ( | ) | const [inline] |
Definition at line 155 of file Ring.h.
References isInitialized(), notInitializedMsg(), and rmin_.
Referenced by RoadMaker::CompatibleWithLines(), RoadMaker::LinesThroughRingAndBS(), and RoadMaker::LinesThroughRings().
{ if ( !isInitialized() ) notInitializedMsg(); return rmin_; }
type Ring::getType | ( | void | ) | const [inline] |
float Ring::getzmax | ( | ) | const [inline] |
Definition at line 158 of file Ring.h.
References isInitialized(), notInitializedMsg(), and zmax_.
Referenced by RoadMaker::CompatibleWithLines(), RingMaker::constructPXBRings(), RingMaker::constructPXFRings(), RingMaker::constructTECRings(), RingMaker::constructTIBRings(), RingMaker::constructTIDRings(), RingMaker::constructTOBRings(), RoadMaker::LinesThroughRingAndBS(), and RoadMaker::LinesThroughRings().
{ if ( !isInitialized() ) notInitializedMsg(); return zmax_; }
float Ring::getzmin | ( | ) | const [inline] |
Definition at line 157 of file Ring.h.
References isInitialized(), notInitializedMsg(), and zmin_.
Referenced by RoadMaker::CompatibleWithLines(), RingMaker::constructPXBRings(), RingMaker::constructPXFRings(), RingMaker::constructTECRings(), RingMaker::constructTIBRings(), RingMaker::constructTIDRings(), RingMaker::constructTOBRings(), RoadMaker::LinesThroughRingAndBS(), and RoadMaker::LinesThroughRings().
{ if ( !isInitialized() ) notInitializedMsg(); return zmin_; }
void Ring::initialize | ( | float | rmin, |
float | rmax, | ||
float | zmin, | ||
float | zmax | ||
) | [inline] |
Definition at line 167 of file Ring.h.
References initialized_, rmax_, rmin_, zmax_, and zmin_.
Referenced by RingMaker::constructPXBRing(), RingMaker::constructPXFRing(), RingMaker::constructTECRing(), RingMaker::constructTIBRing(), RingMaker::constructTIDRing(), and RingMaker::constructTOBRing().
{ rmin_ = rmin; rmax_ = rmax; zmin_ = zmin; zmax_ = zmax; initialized_ = true; }
bool Ring::isInitialized | ( | ) | const [inline] |
Definition at line 153 of file Ring.h.
References initialized_.
Referenced by getrmax(), getrmin(), getzmax(), and getzmin().
{ return initialized_; }
const_iterator Ring::lower_bound | ( | double | phi | ) | const [inline] |
Definition at line 223 of file Ring.h.
References detids_.
Referenced by RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerOneOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerTwoOuter(), and RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsTwoInnerOneOuter().
double Ring::map_phi | ( | double | phi | ) | const [inline] |
Definition at line 226 of file Ring.h.
References phi, Geom::pi(), query::result, and Geom::twoPi().
Referenced by containsDetId().
{ // map phi to [-pi,pi] double result = phi; if ( result < -Geom::pi()) result += Geom::twoPi(); if ( result > Geom::pi()) result -= Geom::twoPi(); return result; }
void Ring::notInitializedMsg | ( | ) | const [inline] |
int Ring::operator!= | ( | const Ring & | ring | ) | const [inline] |
int Ring::operator< | ( | const Ring & | ring | ) | const [inline] |
int Ring::operator== | ( | const Ring & | ring | ) | const [inline] |
void Ring::setindex | ( | unsigned int | input | ) | [inline] |
Definition at line 183 of file Ring.h.
References index_, and collect_tpl::input.
Referenced by RingMaker::constructPXBRings(), RingMaker::constructPXFRings(), RingMaker::constructTECRings(), RingMaker::constructTIBRings(), RingMaker::constructTIDRings(), and RingMaker::constructTOBRings().
void Ring::setInitialized | ( | bool | input | ) | [inline] |
Definition at line 165 of file Ring.h.
References initialized_, and collect_tpl::input.
{ initialized_ = input; }
void Ring::setrmax | ( | float | input | ) | [inline] |
void Ring::setrmin | ( | float | input | ) | [inline] |
void Ring::setType | ( | type | input | ) | [inline] |
void Ring::setzmax | ( | float | input | ) | [inline] |
void Ring::setzmin | ( | float | input | ) | [inline] |
const_iterator Ring::upper_bound | ( | double | phi | ) | const [inline] |
Definition at line 224 of file Ring.h.
References detids_.
Referenced by RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerOneOuter(), RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsOneInnerTwoOuter(), and RoadSearchSeedFinderAlgorithm::calculateCircleSeedsFromRingsTwoInnerOneOuter().
DetIdMap Ring::detids_ [private] |
Definition at line 236 of file Ring.h.
Referenced by addId(), begin(), containsDetId(), dump(), end(), getDetIdMap(), getFirst(), getNumDetIds(), lower_bound(), print(), and upper_bound().
unsigned int Ring::index_ [private] |
Definition at line 247 of file Ring.h.
Referenced by dump(), getindex(), notInitializedMsg(), operator!=(), operator<(), operator==(), print(), and setindex().
bool Ring::initialized_ [private] |
Definition at line 238 of file Ring.h.
Referenced by initialize(), isInitialized(), and setInitialized().
float Ring::rmax_ [private] |
float Ring::rmin_ [private] |
type Ring::type_ [private] |
float Ring::zmax_ [private] |
float Ring::zmin_ [private] |