#include <TMDCLayer.h>
Public Member Functions | |
TMDCLayer (const MdcGeoLayer *) | |
Constructor. | |
virtual | ~TMDCLayer () |
Destructor. | |
unsigned | id (void) const |
returns id. | |
unsigned | superLayerId (void) const |
returns super layer id. | |
unsigned | localLayerId (void) const |
returns local layer id in a super layer. | |
unsigned | axialStereoLayerId (void) const |
returns id of axial or stereo id. | |
unsigned | nWires (void) const |
returns # of wires. | |
const TMDCWire *const | wire (int id) const |
returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'. | |
bool | axial (void) const |
returns true if this is an axial layer. | |
bool | stereo (void) const |
returns true if this is a stereo layer. | |
float | offset (void) const |
returns offset. | |
float | cellSize (void) const |
returns cell size. | |
const MdcGeoLayer * | geocdc (void) const |
returns a pointer to GEOMDC_WIR. | |
void | dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const |
dumps debug information. | |
Private Attributes | |
const MdcGeoLayer * | _geo |
unsigned | _id |
unsigned | _type |
unsigned | _superLayerId |
unsigned | _localLayerId |
unsigned | _axialStereoLayerId |
float | _offset |
float | _cellSize |
unsigned | _nWires |
Definition at line 32 of file TMDCLayer.h.
TMDCLayer::TMDCLayer | ( | const MdcGeoLayer * | ) |
Constructor.
Definition at line 22 of file TMDCLayer.cxx.
References _axialStereoLayerId, _cellSize, _geo, _id, _localLayerId, _nWires, _offset, _superLayerId, _type, TMDC::axialStereoLayerId(), MdcGeoLayer::Id(), TMDC::localLayerId(), MdcGeoLayer::NCell(), MdcGeoLayer::Offset(), MdcGeoLayer::PCSiz(), and TMDC::superLayerId().
00022 { 00023 _geo = l; 00024 _id = l->Id(); 00025 _superLayerId = TMDC::superLayerId(l); 00026 _localLayerId = TMDC::localLayerId(l); 00027 //liucy&jialk origin uses slant to judge type now directly uses superLayerId to judge 00028 if(_id>=36||(_id>=8&&_id<=19)) _type=0; 00029 else _type=1; 00030 // _offset = l->Offset(); 00031 // _cellSize = l->PCSiz(); 00032 // Unit from rad to cell for _offset; and from mm to cm for cellSize 00033 // _offset = l->Offset()/(2. * M_PI/l->NCell()); 00034 // unit of offset is rad, which is diff from belle 00035 _offset = l->Offset(); 00036 _cellSize = l->PCSiz()/10; 00037 00038 _nWires = (unsigned) l->NCell(); 00039 _axialStereoLayerId = TMDC::axialStereoLayerId(l); 00040 }
TMDCLayer::~TMDCLayer | ( | ) | [virtual] |
bool TMDCLayer::axial | ( | void | ) | const [inline] |
returns true if this is an axial layer.
Definition at line 145 of file TMDCLayer.h.
References _type.
Referenced by TMDCWire::axial(), and dump().
00145 { 00146 // cout<<"zsl,axial:"<<_superLayerId<<endl; 00147 // if (_superLayerId % 2) return false; 00148 if (_type==1) return false; 00149 return true; 00150 }
unsigned TMDCLayer::axialStereoLayerId | ( | void | ) | const [inline] |
returns id of axial or stereo id.
Definition at line 163 of file TMDCLayer.h.
References _axialStereoLayerId.
Referenced by TMDCWire::axialStereoLayerId().
00163 { 00164 return _axialStereoLayerId; 00165 }
float TMDCLayer::cellSize | ( | void | ) | const [inline] |
returns cell size.
Definition at line 169 of file TMDCLayer.h.
References _cellSize.
Referenced by TMDCWire::cellSize().
00169 { 00170 return _cellSize; 00171 }
void TMDCLayer::dump | ( | const std::string & | message = std::string("") , |
|
const std::string & | prefix = std::string("") | |||
) | const |
dumps debug information.
Definition at line 46 of file TMDCLayer.cxx.
References _axialStereoLayerId, _id, _localLayerId, _nWires, _superLayerId, and axial().
00046 { 00047 std::cout << pre; 00048 std::cout << "layer " << _id; 00049 std::cout << ", super layer " << _superLayerId; 00050 std::cout << ", local layer " << _localLayerId; 00051 if (axial()) std::cout << ", axial "; 00052 else std::cout << ", stereo "; 00053 std::cout << _axialStereoLayerId; 00054 std::cout << ", " << _nWires << " wires"; 00055 std::cout << std::endl; 00056 }
const MdcGeoLayer * TMDCLayer::geocdc | ( | void | ) | const [inline] |
returns a pointer to GEOMDC_WIR.
Definition at line 127 of file TMDCLayer.h.
References _geo.
Referenced by TMDC::wire().
00127 { 00128 return _geo; 00129 }
unsigned TMDCLayer::id | ( | void | ) | const [inline] |
returns id.
Definition at line 109 of file TMDCLayer.h.
References _id.
00109 { 00110 return _id; 00111 }
unsigned TMDCLayer::localLayerId | ( | void | ) | const [inline] |
returns local layer id in a super layer.
Definition at line 121 of file TMDCLayer.h.
References _localLayerId.
Referenced by TMDCWire::localLayerId().
00121 { 00122 return _localLayerId; 00123 }
unsigned TMDCLayer::nWires | ( | void | ) | const [inline] |
returns # of wires.
Definition at line 139 of file TMDCLayer.h.
References _nWires.
Referenced by TBuilder0::consectiveHits(), TMDCTsf::createTsf(), TSegment::expandSeg(), TrkReco::FillTuple(), TMDCWire::localIdDifference(), TMDCWire::neighbor(), and TMDC::wire().
00139 { 00140 return _nWires; 00141 }
float TMDCLayer::offset | ( | void | ) | const [inline] |
returns offset.
Definition at line 133 of file TMDCLayer.h.
References _offset.
Referenced by TMDCTsf::createTsf(), TSegment::expandSeg(), TrkReco::FillTuple(), and TMDCWire::neighbor().
00133 { 00134 return _offset; 00135 }
bool TMDCLayer::stereo | ( | void | ) | const [inline] |
returns true if this is a stereo layer.
Definition at line 154 of file TMDCLayer.h.
References _type.
Referenced by TMDCWire::stereo().
00154 { 00155 // cout<<"zsl,stereo:"<<_superLayerId<<endl; 00156 // if (_superLayerId % 2) return true; 00157 if (_type==1) return true; 00158 return false; 00159 }
unsigned TMDCLayer::superLayerId | ( | void | ) | const [inline] |
returns super layer id.
Definition at line 115 of file TMDCLayer.h.
References _superLayerId.
Referenced by TMDCWire::neighbor(), TMDCWire::superLayerId(), and TMDC::TMDC().
00115 { 00116 return _superLayerId; 00117 }
const TMDCWire *const TMDCLayer::wire | ( | int | id | ) | const |
returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'.
Definition at line 59 of file TMDCLayer.cxx.
References _nWires.
Referenced by TMDC::wire().
00059 { 00060 if (_nWires == 0) return 0; 00061 00062 if (id < 0) 00063 while (id < 0) 00064 id += _nWires; 00065 00066 if (id >= _nWires) 00067 id %= _nWires; 00068 00069 return (* this)[id]; 00070 }
unsigned TMDCLayer::_axialStereoLayerId [private] |
Definition at line 89 of file TMDCLayer.h.
Referenced by axialStereoLayerId(), dump(), and TMDCLayer().
float TMDCLayer::_cellSize [private] |
const MdcGeoLayer* TMDCLayer::_geo [private] |
unsigned TMDCLayer::_id [private] |
unsigned TMDCLayer::_localLayerId [private] |
unsigned TMDCLayer::_nWires [private] |
float TMDCLayer::_offset [private] |
unsigned TMDCLayer::_superLayerId [private] |
unsigned TMDCLayer::_type [private] |