TMDCLayer Class Reference

A class to represent a wire layer. More...

#include <TMDCLayer.h>

List of all members.

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 MdcGeoLayergeocdc (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


Detailed Description

A class to represent a wire layer.

Definition at line 32 of file TMDCLayer.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 42 of file TMDCLayer.cxx.

00042                       {
00043 }


Member Function Documentation

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 }


Member Data Documentation

unsigned TMDCLayer::_axialStereoLayerId [private]

Definition at line 89 of file TMDCLayer.h.

Referenced by axialStereoLayerId(), dump(), and TMDCLayer().

float TMDCLayer::_cellSize [private]

Definition at line 92 of file TMDCLayer.h.

Referenced by cellSize(), and TMDCLayer().

const MdcGeoLayer* TMDCLayer::_geo [private]

Definition at line 82 of file TMDCLayer.h.

Referenced by geocdc(), and TMDCLayer().

unsigned TMDCLayer::_id [private]

Definition at line 84 of file TMDCLayer.h.

Referenced by dump(), id(), and TMDCLayer().

unsigned TMDCLayer::_localLayerId [private]

Definition at line 88 of file TMDCLayer.h.

Referenced by dump(), localLayerId(), and TMDCLayer().

unsigned TMDCLayer::_nWires [private]

Definition at line 93 of file TMDCLayer.h.

Referenced by dump(), nWires(), TMDCLayer(), and wire().

float TMDCLayer::_offset [private]

Definition at line 91 of file TMDCLayer.h.

Referenced by offset(), and TMDCLayer().

unsigned TMDCLayer::_superLayerId [private]

Definition at line 87 of file TMDCLayer.h.

Referenced by dump(), superLayerId(), and TMDCLayer().

unsigned TMDCLayer::_type [private]

Definition at line 86 of file TMDCLayer.h.

Referenced by axial(), stereo(), and TMDCLayer().


Generated on Tue Nov 29 23:36:01 2016 for BOSS_7.0.2 by  doxygen 1.4.7