#include <RecoTracker/RingRecord/interface/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) |
iterator | begin () |
const_iterator | begin () const |
bool | containsDetId (DetId id, double phi=999999., double dphi_scalefactor=1.5) const |
std::string | dump () const |
iterator | end () |
const_iterator | end () const |
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 (Ring *input) | |
Ring (unsigned int index, float rmin, float rmax, float zmin, float zmax, unsigned int type) | |
Ring (type 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_ |
Definition at line 31 of file Ring.h.
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.
00051 : initialized_(false), 00052 rmin_(0.), 00053 rmax_(0.), 00054 zmin_(0.), 00055 zmax_(0.), 00056 type_(Unspecified), 00057 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, TOBRing, type_, and Unspecified.
00072 : initialized_(true), 00073 rmin_(rmin), 00074 rmax_(rmax), 00075 zmin_(zmin), 00076 zmax_(zmax), 00077 index_(index) { 00078 if ( type == 0 ) { 00079 type_ = TIBRing; 00080 } else if ( type == 1 ) { 00081 type_ = TOBRing; 00082 } else if ( type == 2 ) { 00083 type_ = TIDRing; 00084 } else if ( type == 3 ) { 00085 type_ = TECRing; 00086 } else if ( type == 4 ) { 00087 type_ = PXBRing; 00088 } else if ( type == 5 ) { 00089 type_ = PXFRing; 00090 } else { 00091 type_ = Unspecified; 00092 } 00093 }
Ring::Ring | ( | Ring * | input | ) | [inline] |
Definition at line 95 of file Ring.h.
00095 : detids_(input->getDetIdMap()), 00096 initialized_(input->isInitialized()), 00097 rmin_(input->getrmin()), 00098 rmax_(input->getrmax()), 00099 zmin_(input->getzmin()), 00100 zmax_(input->getzmax()), 00101 type_(input->getType()), 00102 index_(input->getindex()) {}
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().
00147 { return detids_.begin(); }
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, Geom::pi(), and Geom::twoPi().
00111 { 00112 // calculate window around given phi (if phi == 999999. set window to [-pi,pi]) 00113 // determine phi segmentation from number of detids in ring 00114 // window is += 1.5 times the phi segmentation 00115 double phi_inner = -Geom::pi(); 00116 double phi_outer = Geom::pi(); 00117 double delta_phi = Geom::twoPi() / detids_.size(); 00118 if ( phi != 999999. ) { 00119 phi_inner = map_phi(phi - dphi_scalefactor*delta_phi); 00120 phi_outer = map_phi(phi + dphi_scalefactor*delta_phi); 00121 } 00122 00123 // check for out of bounds of [0,2pi] 00124 if ( phi_inner > phi_outer ) { 00125 // double loop 00126 for ( const_iterator ring = detids_.lower_bound(phi_inner); ring != detids_.end(); ++ring ) { 00127 if ( id == ring->second ) { 00128 return true; 00129 } 00130 } 00131 for ( const_iterator ring = detids_.begin(); ring != detids_.upper_bound(phi_outer); ++ring ) { 00132 if ( id == ring->second ) { 00133 return true; 00134 } 00135 } 00136 } else { 00137 for ( const_iterator ring = detids_.lower_bound(phi_inner); ring != detids_.upper_bound(phi_outer); ++ring ) { 00138 if ( id == ring->second ) { 00139 return true; 00140 } 00141 } 00142 } 00143 00144 return false; 00145 }
std::string Ring::dump | ( | void | ) | const [inline] |
Definition at line 207 of file Ring.h.
References detids_, lat::endl(), index_, rmax_, rmin_, type_, zmax_, and zmin_.
00207 { 00208 std::ostringstream stream; 00209 stream << "### Ring with index: " << index_ << " ###" << std::endl; 00210 stream << index_ 00211 << " " << rmin_ 00212 << " " << rmax_ 00213 << " " << zmin_ 00214 << " " << zmax_ 00215 << " " << type_ << std::endl; 00216 stream << detids_.size() << std::endl; 00217 for ( const_iterator entry = detids_.begin(); entry != detids_.end(); ++entry ) { 00218 stream << entry->first << " " << entry->second.rawId() << std::endl; 00219 } 00220 return stream.str(); 00221 }
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().
00148 { return detids_.end(); }
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().
00181 { 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().
00185 { 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().
00108 { 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().
00156 { 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().
00155 { if ( !isInitialized() ) notInitializedMsg(); return rmin_; }
type Ring::getType | ( | ) | 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().
00158 { 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().
00157 { 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().
00167 { 00168 rmin_ = rmin; 00169 rmax_ = rmax; 00170 zmin_ = zmin; 00171 zmax_ = zmax; 00172 initialized_ = true; }
bool Ring::isInitialized | ( | ) | const [inline] |
Definition at line 153 of file Ring.h.
References initialized_.
Referenced by getrmax(), getrmin(), getzmax(), and getzmin().
00153 { 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 Geom::pi(), HLT_VtxMuL3::result, and Geom::twoPi().
Referenced by containsDetId().
00226 { 00227 // map phi to [-pi,pi] 00228 double result = phi; 00229 if ( result < -Geom::pi()) result += Geom::twoPi(); 00230 if ( result > Geom::pi()) result -= Geom::twoPi(); 00231 return result; 00232 }
void Ring::notInitializedMsg | ( | ) | const [inline] |
std::string Ring::print | ( | void | ) | const [inline] |
Definition at line 196 of file Ring.h.
References detids_, index_, rmax_, rmin_, zmax_, and zmin_.
00196 { 00197 std::ostringstream stream; 00198 stream << "Ring: " << index_ 00199 << " rmin: " << rmin_ 00200 << " rmax: " << rmax_ 00201 << " zmin: " << zmin_ 00202 << " zmax: " << zmax_ 00203 << " number of DetUnits: " << detids_.size(); 00204 return stream.str(); 00205 }
Definition at line 183 of file Ring.h.
References index_.
Referenced by RingMaker::constructPXBRings(), RingMaker::constructPXFRings(), RingMaker::constructTECRings(), RingMaker::constructTIBRings(), RingMaker::constructTIDRings(), and RingMaker::constructTOBRings().
void Ring::setrmax | ( | float | input | ) | [inline] |
void Ring::setrmin | ( | float | 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] |