MdcLayer Class Reference

#include <MdcLayer.h>

List of all members.

Public Member Functions

 MdcLayer (int lay, int nwir, MdcSWire **wires, const MdcDetector &theDet)
 ~MdcLayer ()
void print (std::ostream &o) const
bool exist (void) const
int view (void) const
int layNum (void) const
int nWires (void) const
int superLayer (void) const
int subLayer (void) const
double cellHeight (void) const
double stDip (void) const
double zEnd (void) const
double rMid (void) const
double rEnd (void) const
double rIn (void) const
double rOut (void) const
double stereo (void) const
double dPhiz (void) const
double zLength (void) const
double sag (void) const
double phiOffset (void) const
double phiEPOffset (void) const
double dPhizDC (double z) const
double radiusDC (double z) const
MdcSWiregetWire (int wire) const
double phiWireDC (int cell, double z) const
double phiWire (int cell) const
double xWire (int cell) const
double yWire (int cell) const
double dPhi (void) const
double cellWidth (void) const
double cellWidth (double z) const
const TrajectorymakeHitTrajInGlobalCoords (int wire, double z=0) const
void View (int v)
void setCellHeight (double height)

Private Attributes

const MdcDetector_mdcDet
bool _exist
int _layer
int _nwires
MdcSWire ** _wires
double _stdip
double _rend
double _rmid
double _zend
double _stereo
double _delphi
double _phiOffset
double _cellHeight
int _view


Detailed Description

Definition at line 15 of file MdcLayer.h.


Constructor & Destructor Documentation

MdcLayer::MdcLayer ( int  lay,
int  nwir,
MdcSWire **  wires,
const MdcDetector theDet 
)

Definition at line 9 of file MdcLayer.cxx.

References _delphi, _exist, _layer, _nwires, _phiOffset, _rend, _rmid, _stdip, _stereo, _view, _zend, MdcSWire::dPhiz(), getWire(), MdcSWire::phiE(), MdcSWire::rEnd(), MdcSWire::rMid(), MdcSWire::stereo(), and MdcSWire::zEndDC().

00010   : _mdcDet(theDet), _exist(1),  _layer(lay), _nwires(nwir),
00011     _wires(wires)
00012 {
00013   if (_nwires == 0) _exist = 0;
00014   // set pointer to layer for wires
00015   for (int wire=0; wire<_nwires; wire++) {
00016     getWire(wire)->setLayerPtr(this);
00017 //    _cells.push_back(buildCell(wire));
00018   }
00019 
00020   // get nominal values from wire # 0
00021   _rend = wires[0]->rEnd();
00022   _rmid = wires[0]->rMid();
00023   _stdip = _rend - _rmid;
00024   // in the local (DC) system frame
00025   _zend = wires[0]->zEndDC();
00026   _stereo = wires[0]->stereo();
00027   // half twist angle
00028   _delphi = wires[0]->dPhiz();
00029   // stereo view
00030   if((_layer>=0 && _layer<=7)||(_layer>=20&&_layer<=35)){
00031     _view = (int)(_stereo/(fabs(_stereo)));
00032   } else {
00033     _view = 0;
00034   }
00035   _phiOffset = wires[0]->phiE();
00036 }

MdcLayer::~MdcLayer (  )  [inline]

Definition at line 22 of file MdcLayer.h.

00022 {};


Member Function Documentation

double MdcLayer::cellHeight ( void   )  const [inline]

Definition at line 33 of file MdcLayer.h.

References _cellHeight.

Referenced by rIn(), and rOut().

00033 { return _cellHeight; }

double MdcLayer::cellWidth ( double  z  )  const [inline]

Definition at line 66 of file MdcLayer.h.

References cos(), dPhi(), radiusDC(), and stereo().

00066 { return dPhi()*radiusDC(z)*cos(stereo()); }

double MdcLayer::cellWidth ( void   )  const [inline]

Definition at line 64 of file MdcLayer.h.

References cos(), dPhi(), rMid(), and stereo().

Referenced by print().

00064 { return dPhi()*rMid()*cos(stereo()); }

double MdcLayer::dPhi ( void   )  const [inline]

Definition at line 61 of file MdcLayer.h.

References nWires(), and Constants::twoPi.

Referenced by cellWidth(), print(), and MdcxHit::process().

00061 { return Constants::twoPi/nWires(); }

double MdcLayer::dPhiz ( void   )  const [inline]

Definition at line 43 of file MdcLayer.h.

References _delphi.

Referenced by print(), and MdcSuperLayer::updateInfo().

00043 { return _delphi; }

double MdcLayer::dPhizDC ( double  z  )  const [inline]

Definition at line 50 of file MdcLayer.h.

References phiWireDC().

Referenced by print().

00050 { return phiWireDC(0, z); }

bool MdcLayer::exist ( void   )  const [inline]

Definition at line 27 of file MdcLayer.h.

References _exist.

00027 { return _exist; }

MdcSWire* MdcLayer::getWire ( int  wire  )  const [inline]

Definition at line 52 of file MdcLayer.h.

References _wires.

Referenced by MdcSegFinder::createSegs(), makeHitTrajInGlobalCoords(), MdcLayer(), phiWire(), phiWireDC(), radiusDC(), sag(), MdcDetector::Wire(), xWire(), yWire(), and zLength().

00052 { return _wires[wire]; }

int MdcLayer::layNum ( void   )  const [inline]

Definition at line 29 of file MdcLayer.h.

References _layer.

Referenced by MdcSegFinder::createSegs(), MdcDetector::nextLayer(), MdcDetector::prevLayer(), print(), subLayer(), and superLayer().

00029 { return _layer; }

const Trajectory * MdcLayer::makeHitTrajInGlobalCoords ( int  wire,
double  z = 0 
) const

Definition at line 132 of file MdcLayer.cxx.

References MdcSWire::getTraj(), getWire(), and nWires().

Referenced by MdcHit::hitTraj().

00133 {
00134   if ( wire >= 0 && wire < nWires() ) {
00135     return getWire(wire)->getTraj();
00136   } else {
00137     std::cout << "Error In makeHitTrajInGlobalCoords: wrong cell # "<< wire << "\n"
00138                  <<"  number of cells in this layer is " << nWires() << std::endl;
00139     return getWire(0)->getTraj();
00140   }
00141 }

int MdcLayer::nWires ( void   )  const [inline]

Definition at line 30 of file MdcLayer.h.

References _nwires.

Referenced by MdcSegFinder::createSegs(), MdcSegList::deleteDups(), dPhi(), MdcTrkRecon::fillTrackList(), MdcxFindSegs::initWireGroups(), makeHitTrajInGlobalCoords(), phiWire(), phiWireDC(), MdcNavigation::poca(), MdcSegData::poisonHits(), print(), MdcxFindSegs::process(), MdcSegList::tagAmbig(), xWire(), and yWire().

00030 { return _nwires; }

double MdcLayer::phiEPOffset ( void   )  const [inline]

Definition at line 49 of file MdcLayer.h.

References _phiOffset.

Referenced by MdcNavigation::poca(), and print().

00049 { return _phiOffset; }

double MdcLayer::phiOffset ( void   )  const [inline]

Definition at line 47 of file MdcLayer.h.

References phiWire().

Referenced by print(), and MdcxHit::process().

00047 { return phiWire(0); }

double MdcLayer::phiWire ( int  cell  )  const

Definition at line 87 of file MdcLayer.cxx.

References getWire(), nWires(), and MdcSWire::phi().

Referenced by MdcTrkRecon::fillEvent(), phiOffset(), and print().

00088 {
00089   // in the middle of the chamber
00090   if ( cell >= 0 && cell < nWires() ) {
00091     return getWire(cell)->phi();
00092   } else {
00093     std::cout  << "phiWire: wrong cell # " << cell << "\n"
00094                   << "  number of cells in this layer is " << nWires() 
00095                   << std::endl;
00096     return 0.;
00097   }
00098 }

double MdcLayer::phiWireDC ( int  cell,
double  z 
) const

Definition at line 74 of file MdcLayer.cxx.

References getWire(), nWires(), and MdcSWire::phiDC().

Referenced by dPhizDC(), and print().

00075 {
00076   if ( cell >= 0 && cell < nWires() ) {
00077     return getWire(cell)->phiDC(z);
00078   } else {
00079     std::cout << "phiWireDC: wrong cell # " << cell << "\n"
00080                   << "  number of cells in this layer is " << nWires() 
00081                   << std::endl;
00082     return 0.;
00083   }
00084 }

void MdcLayer::print ( std::ostream o  )  const

Definition at line 41 of file MdcLayer.cxx.

References cellWidth(), dPhi(), dPhiz(), dPhizDC(), layNum(), nWires(), phiEPOffset(), phiOffset(), phiWire(), phiWireDC(), radiusDC(), rEnd(), rIn(), rMid(), rOut(), sag(), stDip(), stereo(), subLayer(), superLayer(), view(), xWire(), yWire(), zEnd(), and zLength().

00042 {
00043   o<< setw(3)<<layNum()<<
00044     setw(3)<<view()<<
00045     setw(4)<<nWires()<<
00046     setw(3)<<superLayer()<<
00047     setw(3)<<subLayer()<<
00048     setw(10)<<stDip()<<
00049     setw(10)<<zEnd()<<
00050     setw(10)<<rMid()<<
00051     setw(10)<<rEnd()<<
00052     setw(10)<<rIn()<<
00053     setw(10)<<rOut()<<
00054     setw(10)<<stereo()<<
00055     setw(10)<<dPhiz()<<
00056     setw(7)<<zLength()<<
00057     setw(10)<<sag()<<
00058     setw(10)<<dPhi()<<
00059     setw(10)<<phiOffset()<<
00060     setw(10)<<phiEPOffset()<<
00061     setw(10)<<dPhizDC(0.)<<
00062     setw(10)<<radiusDC(0.)<<
00063     setw(10)<<phiWireDC(0,0.)<<
00064     setw(10)<<phiWire(0)<<
00065     setw(10)<<xWire(0)<<
00066     setw(10)<<yWire(0)<<
00067     setw(10)<<cellWidth()<<
00068     setw(10)<<cellWidth(0.)<<
00069     std::endl;
00070 }

double MdcLayer::radiusDC ( double  z  )  const [inline]

Definition at line 51 of file MdcLayer.h.

References getWire(), and MdcSWire::radiusDC().

Referenced by cellWidth(), and print().

00051 { return getWire(0)->radiusDC(z); }

double MdcLayer::rEnd ( void   )  const [inline]

Definition at line 37 of file MdcLayer.h.

References _rend.

Referenced by MdcTrackList::pickHits(), print(), and MdcSuperLayer::updateInfo().

00037 { return _rend; }

double MdcLayer::rIn ( void   )  const [inline]

Definition at line 38 of file MdcLayer.h.

References cellHeight(), and rMid().

Referenced by MdcTrackList::pickHits(), and print().

00038 { return rMid() - 0.5 * cellHeight(); }//yzhang del

double MdcLayer::rMid ( void   )  const [inline]

Definition at line 36 of file MdcLayer.h.

References _rmid.

Referenced by cellWidth(), MdcHoughFinder::digiToHots(), HoughValidUpdate::digiToHots(), MdcHoughFinder::digiToHots2(), HoughValidUpdate::digiToHots2(), MdcTrkRecon::fillTrackList(), MdcDetector::MdcDetector(), MdcNavigation::poca(), print(), MdcSuperLayer::rad0(), rIn(), rOut(), MdcSegGrouper::transferHits(), and MdcSegFinder::tryPatterns().

00036 { return _rmid; }

double MdcLayer::rOut ( void   )  const [inline]

Definition at line 39 of file MdcLayer.h.

References cellHeight(), and rMid().

Referenced by MdcTrackList::pickHits(), and print().

00039 { return rMid() + 0.5 * cellHeight(); }//yzhang del

double MdcLayer::sag ( void   )  const [inline]

Definition at line 45 of file MdcLayer.h.

References MdcSWire::getSag(), and getWire().

Referenced by print().

00045 { return getWire(0)->getSag(); }

void MdcLayer::setCellHeight ( double  height  )  [inline]

Definition at line 77 of file MdcLayer.h.

References _cellHeight.

00077 { _cellHeight = height; }

double MdcLayer::stDip ( void   )  const [inline]

Definition at line 34 of file MdcLayer.h.

References _stdip.

Referenced by print(), and MdcSuperLayer::stDip().

00034 { return _stdip; }

double MdcLayer::stereo ( void   )  const [inline]

Definition at line 42 of file MdcLayer.h.

References _stereo.

Referenced by cellWidth(), print(), and MdcxHit::process().

00042 { return _stereo; }

int MdcLayer::subLayer ( void   )  const [inline]

Definition at line 32 of file MdcLayer.h.

References layNum(), and superLayer().

Referenced by print().

00032 { return layNum()-4*(superLayer()-1);}

int MdcLayer::superLayer ( void   )  const [inline]

Definition at line 31 of file MdcLayer.h.

References layNum().

Referenced by print(), and subLayer().

00031 { return 1+((layNum()-1)/4);}

void MdcLayer::View ( int  v  )  [inline]

Definition at line 76 of file MdcLayer.h.

References _view.

00076 { _view = v; }

int MdcLayer::view ( void   )  const [inline]

Definition at line 28 of file MdcLayer.h.

References _view.

Referenced by MdcDetector::buildpointers(), MdcDetector::buildSuperLayers(), print(), MdcMergeDups::testByOverlapHit(), MdcSuperLayer::updateInfo(), and MdcHit::whichView().

00028 { return _view; }

double MdcLayer::xWire ( int  cell  )  const

Definition at line 101 of file MdcLayer.cxx.

References getWire(), nWires(), and MdcSWire::xMid().

Referenced by print(), and MdcxHit::process().

00102 {
00103   // in the middle of the chamber
00104   if ( cell >= 0 && cell < nWires() ) {
00105     return getWire(cell)->xMid();
00106   } else {
00107     std::cout << "xWire: wrong cell # " << cell << "\n"
00108                   << "  number of cells in this layer is " << nWires() 
00109                   << std::endl;
00110     return 0.;
00111   }
00112 }

double MdcLayer::yWire ( int  cell  )  const

Definition at line 115 of file MdcLayer.cxx.

References getWire(), nWires(), and MdcSWire::yMid().

Referenced by print(), and MdcxHit::process().

00116 {
00117   // in the middle of the chamber 
00118   if ( cell >= 0 && cell < nWires() ) {
00119     return getWire(cell)->yMid(); 
00120   } else {
00121     std::cout << "YWire: wrong cell # " << cell << "\n"
00122                   << "  number of cells in this layer is " << nWires() 
00123                   << std::endl;
00124     return 0.;
00125   }
00126 }

double MdcLayer::zEnd ( void   )  const [inline]

Definition at line 35 of file MdcLayer.h.

References _zend.

Referenced by print(), and MdcSuperLayer::zEnd().

00035 { return _zend; }

double MdcLayer::zLength ( void   )  const [inline]

Definition at line 44 of file MdcLayer.h.

References getWire(), and MdcSWire::zLength().

Referenced by MdcHit::MdcHit(), MdcHitOnTrack::MdcHitOnTrack(), print(), MdcxTrackFinder::printTrack(), and MdcxHit::process().

00044 { return getWire(0)->zLength(); }


Member Data Documentation

double MdcLayer::_cellHeight [private]

Definition at line 97 of file MdcLayer.h.

Referenced by cellHeight(), and setCellHeight().

double MdcLayer::_delphi [private]

Definition at line 95 of file MdcLayer.h.

Referenced by dPhiz(), and MdcLayer().

bool MdcLayer::_exist [private]

Definition at line 83 of file MdcLayer.h.

Referenced by exist(), and MdcLayer().

int MdcLayer::_layer [private]

Definition at line 84 of file MdcLayer.h.

Referenced by layNum(), and MdcLayer().

const MdcDetector& MdcLayer::_mdcDet [private]

Definition at line 81 of file MdcLayer.h.

int MdcLayer::_nwires [private]

Definition at line 85 of file MdcLayer.h.

Referenced by MdcLayer(), and nWires().

double MdcLayer::_phiOffset [private]

Definition at line 96 of file MdcLayer.h.

Referenced by MdcLayer(), and phiEPOffset().

double MdcLayer::_rend [private]

Definition at line 91 of file MdcLayer.h.

Referenced by MdcLayer(), and rEnd().

double MdcLayer::_rmid [private]

Definition at line 92 of file MdcLayer.h.

Referenced by MdcLayer(), and rMid().

double MdcLayer::_stdip [private]

Definition at line 89 of file MdcLayer.h.

Referenced by MdcLayer(), and stDip().

double MdcLayer::_stereo [private]

Definition at line 94 of file MdcLayer.h.

Referenced by MdcLayer(), and stereo().

int MdcLayer::_view [private]

Definition at line 98 of file MdcLayer.h.

Referenced by MdcLayer(), View(), and view().

MdcSWire** MdcLayer::_wires [private]

Definition at line 86 of file MdcLayer.h.

Referenced by getWire().

double MdcLayer::_zend [private]

Definition at line 93 of file MdcLayer.h.

Referenced by MdcLayer(), and zEnd().


Generated on Tue Nov 29 23:20:14 2016 for BOSS_7.0.2 by  doxygen 1.4.7