Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TMDCLayer Class Reference

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

#include <TMDCLayer.h>

List of all members.

Public Member Functions

bool axial (void) const
 returns true if this is an axial layer.
bool axial (void) const
 returns true if this is an axial layer.
unsigned axialStereoLayerId (void) const
 returns id of axial or stereo id.
unsigned axialStereoLayerId (void) const
 returns id of axial or stereo id.
float cellSize (void) const
 returns cell size.
float cellSize (void) const
 returns cell size.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
void dump (const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
 dumps debug information.
const MdcGeoLayergeocdc (void) const
 returns a pointer to GEOMDC_WIR.
const MdcGeoLayergeocdc (void) const
 returns a pointer to GEOMDC_WIR.
unsigned id (void) const
 returns id.
unsigned id (void) const
 returns id.
unsigned localLayerId (void) const
 returns local layer id in a super layer.
unsigned localLayerId (void) const
 returns local layer id in a super layer.
unsigned nWires (void) const
 returns # of wires.
unsigned nWires (void) const
 returns # of wires.
float offset (void) const
 returns offset.
float offset (void) const
 returns offset.
bool stereo (void) const
 returns true if this is a stereo layer.
bool stereo (void) const
 returns true if this is a stereo layer.
unsigned superLayerId (void) const
 returns super layer id.
unsigned superLayerId (void) const
 returns super layer id.
 TMDCLayer (const MdcGeoLayer *)
 Constructor.
 TMDCLayer (const MdcGeoLayer *)
 Constructor.
const TMDCWire *const wire (int id) const
 returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'.
const TMDCWire *const wire (int id) const
 returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'.
virtual ~TMDCLayer ()
 Destructor.
virtual ~TMDCLayer ()
 Destructor.

Private Attributes

unsigned _axialStereoLayerId
float _cellSize
const MdcGeoLayer_geo
const MdcGeoLayer_geo
unsigned _id
unsigned _localLayerId
unsigned _nWires
float _offset
unsigned _superLayerId
unsigned _type


Detailed Description

A class to represent a wire layer.


Constructor & Destructor Documentation

TMDCLayer::TMDCLayer const MdcGeoLayer  ) 
 

Constructor.

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.

00042                       {
00043 }

TMDCLayer::TMDCLayer const MdcGeoLayer  ) 
 

Constructor.

virtual TMDCLayer::~TMDCLayer  )  [virtual]
 

Destructor.


Member Function Documentation

bool TMDCLayer::axial void   )  const
 

returns true if this is an axial layer.

bool TMDCLayer::axial void   )  const [inline]
 

returns true if this is an axial layer.

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
 

returns id of axial or stereo id.

unsigned TMDCLayer::axialStereoLayerId void   )  const [inline]
 

returns id of axial or stereo id.

00163                                         {
00164     return _axialStereoLayerId;
00165 }

float TMDCLayer::cellSize void   )  const
 

returns cell size.

float TMDCLayer::cellSize void   )  const [inline]
 

returns cell size.

00169                               {
00170     return _cellSize;
00171 }

void TMDCLayer::dump const std::string &  message = std::string(""),
const std::string &  prefix = std::string("")
const
 

dumps debug information.

void TMDCLayer::dump const std::string &  message = std::string(""),
const std::string &  prefix = std::string("")
const
 

dumps debug information.

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
 

returns a pointer to GEOMDC_WIR.

const MdcGeoLayer * TMDCLayer::geocdc void   )  const [inline]
 

returns a pointer to GEOMDC_WIR.

00127                             {
00128     return _geo;
00129 }

unsigned TMDCLayer::id void   )  const
 

returns id.

unsigned TMDCLayer::id void   )  const [inline]
 

returns id.

00109                         {
00110     return _id;
00111 }

unsigned TMDCLayer::localLayerId void   )  const
 

returns local layer id in a super layer.

unsigned TMDCLayer::localLayerId void   )  const [inline]
 

returns local layer id in a super layer.

00121                                   {
00122     return _localLayerId;
00123 }

unsigned TMDCLayer::nWires void   )  const
 

returns # of wires.

unsigned TMDCLayer::nWires void   )  const [inline]
 

returns # of wires.

00139                             {
00140     return _nWires;
00141 }

float TMDCLayer::offset void   )  const
 

returns offset.

float TMDCLayer::offset void   )  const [inline]
 

returns offset.

00133                             {
00134     return _offset;
00135 }

bool TMDCLayer::stereo void   )  const
 

returns true if this is a stereo layer.

bool TMDCLayer::stereo void   )  const [inline]
 

returns true if this is a stereo layer.

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
 

returns super layer id.

unsigned TMDCLayer::superLayerId void   )  const [inline]
 

returns super layer id.

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()'.

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()'.

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]
 

float TMDCLayer::_cellSize [private]
 

const MdcGeoLayer* TMDCLayer::_geo [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]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 18:54:48 2011 for BOSS6.5.5 by  doxygen 1.3.9.1