#include <MdcSuperLayer.h>
Public Member Functions | |
MdcSuperLayer (int number) | |
~MdcSuperLayer () | |
int | index (void) const |
int | whichView (void) const |
bool | exist (void) const |
double | rEnd (void) const |
double | rad0 (void) const |
double | zEnd (void) const |
double | stDip (void) const |
double | delPhi (void) const |
double | delPhiinv (void) const |
const MdcLayer * | firstLayer (void) const |
const MdcLayer * | lastLayer (void) const |
const MdcSuperLayer * | next (void) const |
const MdcSuperLayer * | prev (void) const |
const MdcSuperLayer * | nextInView (void) const |
const MdcSuperLayer * | prevInView (void) const |
int | slayNum (void) const |
int | nLayers (void) const |
const MdcLayer * | layer (int i) const |
void | setNextInView (MdcSuperLayer *sl) |
void | setPrevInView (MdcSuperLayer *sl) |
void | print (std::ostream &o=std::cout) const |
Private Member Functions | |
void | addLayer (int index, const MdcLayer *lay) |
void | updateInfo (const MdcSuperLayer *prev, const MdcSuperLayer *next) |
Private Attributes | |
bool | _exist |
double | _radius |
double | _delphi |
double | _delphiinv |
int | _view |
int | _slayer |
const MdcLayer * | layers [4] |
const MdcSuperLayer * | _next |
const MdcSuperLayer * | _prev |
const MdcSuperLayer * | _nextInView |
const MdcSuperLayer * | _prevInView |
int | _nLayers |
Friends | |
class | MdcDetector |
Definition at line 9 of file MdcSuperLayer.h.
MdcSuperLayer::MdcSuperLayer | ( | int | number | ) |
Definition at line 63 of file MdcSuperLayer.cxx.
References _delphi, _delphiinv, _exist, _next, _nextInView, _nLayers, _prev, _prevInView, _radius, _slayer, _view, and layers.
00064 { 00065 _radius = _delphi = _delphiinv = 0; 00066 layers[0] = layers[1] = layers[2] = layers[3] = 0; 00067 _nLayers = 0; 00068 _view = 0; 00069 _next = _prev = _nextInView = _prevInView = 0; 00070 _exist = false; 00071 _slayer = number; 00072 }
MdcSuperLayer::~MdcSuperLayer | ( | ) |
void MdcSuperLayer::addLayer | ( | int | index, | |
const MdcLayer * | lay | |||
) | [private] |
Definition at line 85 of file MdcSuperLayer.cxx.
References _nLayers, layer(), and layers.
Referenced by MdcDetector::buildSuperLayers().
00085 { 00086 //---------------------------------------------------------- 00087 // here |index| is the index of array of pointers to layers 00088 // belonging to the superlayer, so this ramges from 0 to 3 00089 //---------------------------------------------------------- 00090 // check on index number 00091 assert ( index>=0 && index <4); 00092 // check that it was not already set 00093 assert ( layer(index) == 0 ); 00094 // chack that layer stays in this superlayer 00095 //assert ( (int)((lay->layNum()-1)/_layInSuper+1) == slayNum() ); 00096 00097 // lay->setSlayer(this); 00098 layers[index] = lay; 00099 _nLayers++; 00100 }
double MdcSuperLayer::delPhi | ( | void | ) | const [inline] |
Definition at line 30 of file MdcSuperLayer.h.
References _delphi.
Referenced by MdcSegInfoSterO::calcStereo(), and MdcSegGrouperSt::fillWithSegs().
00030 {return _delphi;}
double MdcSuperLayer::delPhiinv | ( | void | ) | const [inline] |
Definition at line 31 of file MdcSuperLayer.h.
References _delphiinv.
Referenced by MdcSegInfoSterO::calcStereo().
00031 {return _delphiinv;}
bool MdcSuperLayer::exist | ( | void | ) | const [inline] |
const MdcLayer* MdcSuperLayer::firstLayer | ( | void | ) | const [inline] |
Definition at line 37 of file MdcSuperLayer.h.
References layers.
Referenced by rad0(), stDip(), MdcSegFinder::tryPatterns(), updateInfo(), and zEnd().
00037 { return layers[0];}
int MdcSuperLayer::index | ( | void | ) | const [inline] |
Definition at line 20 of file MdcSuperLayer.h.
References _slayer.
Referenced by MdcSegList::append(), MdcSegInfoSterO::calcStereo(), MdcSegFinder::createSegs(), and MdcxFindSegs::process().
00020 {return _slayer; }
const MdcLayer* MdcSuperLayer::lastLayer | ( | void | ) | const [inline] |
Definition at line 38 of file MdcSuperLayer.h.
References _nLayers, and layers.
Referenced by rad0(), stDip(), MdcSegFinder::tryPatterns(), updateInfo(), and zEnd().
const MdcLayer* MdcSuperLayer::layer | ( | int | i | ) | const [inline] |
Definition at line 45 of file MdcSuperLayer.h.
References layers.
Referenced by addLayer(), MdcDetector::buildSuperLayers(), MdcSegFinder::createSegs(), MdcxFindSegs::initWireGroups(), and MdcxFindSegs::process().
00045 { /*yzhang SKIP assert ( i>=0 && i < nLayer() ) ;*/ 00046 // const MdcLayer* layer(int i) const { assert ( i>=0 && i < _nLayers ) ; 00047 return layers[i]; }
const MdcSuperLayer* MdcSuperLayer::next | ( | void | ) | const [inline] |
Definition at line 39 of file MdcSuperLayer.h.
References _next.
Referenced by MdcSegFinder::createSegs(), MdcSegGrouperSt::resetComb(), MdcSegGrouperCsmc::resetComb(), MdcSegGrouperAx::resetComb(), and updateInfo().
00039 { return _next;}
const MdcSuperLayer* MdcSuperLayer::nextInView | ( | void | ) | const [inline] |
int MdcSuperLayer::nLayers | ( | void | ) | const [inline] |
Definition at line 44 of file MdcSuperLayer.h.
References _nLayers.
Referenced by MdcSegFinder::createSegs(), MdcxFindSegs::initWireGroups(), and MdcxFindSegs::process().
00044 { return _nLayers;}
const MdcSuperLayer* MdcSuperLayer::prev | ( | void | ) | const [inline] |
Definition at line 40 of file MdcSuperLayer.h.
References _prev.
Referenced by updateInfo().
00040 { return _prev;}
const MdcSuperLayer* MdcSuperLayer::prevInView | ( | void | ) | const [inline] |
Definition at line 42 of file MdcSuperLayer.h.
References _prevInView.
Referenced by MdcSegList::getSeed().
00042 { return _prevInView;}
void MdcSuperLayer::print | ( | std::ostream & | o = std::cout |
) | const |
Referenced by operator<<().
double MdcSuperLayer::rad0 | ( | void | ) | const [inline] |
Definition at line 24 of file MdcSuperLayer.h.
References firstLayer(), lastLayer(), and MdcLayer::rMid().
Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoCsmc::calcStraight(), and MdcSegFinder::tryPatterns().
00024 { return 0.5 * (firstLayer()->rMid() + 00025 lastLayer()->rMid()); }
double MdcSuperLayer::rEnd | ( | void | ) | const [inline] |
Definition at line 23 of file MdcSuperLayer.h.
References _radius.
Referenced by MdcSegInfoSterO::calcStereo(), and MdcSegGrouperSt::fillWithSegs().
00023 {return _radius;}
void MdcSuperLayer::setNextInView | ( | MdcSuperLayer * | sl | ) | [inline] |
Definition at line 48 of file MdcSuperLayer.h.
References _nextInView.
Referenced by MdcDetector::buildSuperLayers().
00048 {_nextInView = sl;}
void MdcSuperLayer::setPrevInView | ( | MdcSuperLayer * | sl | ) | [inline] |
Definition at line 49 of file MdcSuperLayer.h.
References _prevInView.
Referenced by MdcDetector::buildSuperLayers().
00049 {_prevInView = sl;}
int MdcSuperLayer::slayNum | ( | void | ) | const [inline] |
Definition at line 43 of file MdcSuperLayer.h.
References _slayer.
Referenced by MdcSegFinder::createSegs(), MdcSegGrouperAx::incompWithSeg(), MdcxFindSegs::initWireGroups(), MdcSeg::plotSeg(), and MdcSegFinder::tryPatterns().
00043 { return _slayer;}
double MdcSuperLayer::stDip | ( | void | ) | const [inline] |
Definition at line 28 of file MdcSuperLayer.h.
References firstLayer(), lastLayer(), and MdcLayer::stDip().
Referenced by MdcSegInfoSterO::calcStereo().
00028 { return 0.5 * (firstLayer()->stDip() + 00029 lastLayer()->stDip()); }
void MdcSuperLayer::updateInfo | ( | const MdcSuperLayer * | prev, | |
const MdcSuperLayer * | next | |||
) | [private] |
Definition at line 103 of file MdcSuperLayer.cxx.
References _delphi, _delphiinv, _exist, _next, _prev, _radius, _view, MdcLayer::dPhiz(), firstLayer(), lastLayer(), next(), prev(), MdcLayer::rEnd(), and MdcLayer::view().
Referenced by MdcDetector::buildSuperLayers().
00104 { 00105 // 00106 // function to set the data-members of this class 00107 // 00108 _exist = true; 00109 _radius = 0.5 * (firstLayer()->rEnd() + lastLayer()->rEnd()); 00110 _view = firstLayer()->view(); 00111 _delphi = firstLayer()->dPhiz(); 00112 _delphiinv = 0.0; 00113 if ( _delphi != 0. ) _delphiinv = 1./_delphi; 00114 // now the pointers 00115 _next = next; 00116 _prev = prev; 00117 }
int MdcSuperLayer::whichView | ( | void | ) | const [inline] |
Definition at line 21 of file MdcSuperLayer.h.
References _view.
Referenced by MdcSegGrouperSt::fillWithSegs(), MdcSegGrouperCsmc::fillWithSegs(), and MdcSegGrouperAx::fillWithSegs().
00021 {return _view;}
double MdcSuperLayer::zEnd | ( | void | ) | const [inline] |
Definition at line 26 of file MdcSuperLayer.h.
References firstLayer(), lastLayer(), and MdcLayer::zEnd().
Referenced by MdcSegInfoSterO::calcStereo(), and MdcSegGrouperSt::fillWithSegs().
00026 { return 0.5 * (firstLayer()->zEnd() + 00027 lastLayer()->zEnd()); }
friend class MdcDetector [friend] |
Definition at line 55 of file MdcSuperLayer.h.
double MdcSuperLayer::_delphi [private] |
Definition at line 62 of file MdcSuperLayer.h.
Referenced by delPhi(), MdcSuperLayer(), and updateInfo().
double MdcSuperLayer::_delphiinv [private] |
Definition at line 63 of file MdcSuperLayer.h.
Referenced by delPhiinv(), MdcSuperLayer(), and updateInfo().
bool MdcSuperLayer::_exist [private] |
Definition at line 60 of file MdcSuperLayer.h.
Referenced by exist(), MdcSuperLayer(), and updateInfo().
const MdcSuperLayer* MdcSuperLayer::_next [private] |
Definition at line 68 of file MdcSuperLayer.h.
Referenced by MdcSuperLayer(), next(), and updateInfo().
const MdcSuperLayer* MdcSuperLayer::_nextInView [private] |
Definition at line 70 of file MdcSuperLayer.h.
Referenced by MdcSuperLayer(), nextInView(), and setNextInView().
int MdcSuperLayer::_nLayers [private] |
Definition at line 72 of file MdcSuperLayer.h.
Referenced by addLayer(), lastLayer(), MdcSuperLayer(), and nLayers().
const MdcSuperLayer* MdcSuperLayer::_prev [private] |
Definition at line 69 of file MdcSuperLayer.h.
Referenced by MdcSuperLayer(), prev(), and updateInfo().
const MdcSuperLayer* MdcSuperLayer::_prevInView [private] |
Definition at line 71 of file MdcSuperLayer.h.
Referenced by MdcSuperLayer(), prevInView(), and setPrevInView().
double MdcSuperLayer::_radius [private] |
Definition at line 61 of file MdcSuperLayer.h.
Referenced by MdcSuperLayer(), rEnd(), and updateInfo().
int MdcSuperLayer::_slayer [private] |
Definition at line 65 of file MdcSuperLayer.h.
Referenced by index(), MdcSuperLayer(), and slayNum().
int MdcSuperLayer::_view [private] |
Definition at line 64 of file MdcSuperLayer.h.
Referenced by MdcSuperLayer(), updateInfo(), and whichView().
const MdcLayer* MdcSuperLayer::layers[4] [private] |
Definition at line 67 of file MdcSuperLayer.h.
Referenced by addLayer(), firstLayer(), lastLayer(), layer(), and MdcSuperLayer().