BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
TMDCLayer Class Reference

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

#include <TMDCLayer.h>

+ Inheritance diagram for TMDCLayer:

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.
 

Detailed Description

A class to represent a wire layer.

Definition at line 32 of file TMDCLayer.h.

Constructor & Destructor Documentation

◆ TMDCLayer()

TMDCLayer::TMDCLayer ( const MdcGeoLayer l)

Constructor.

Definition at line 22 of file TMDCLayer.cxx.

22 {
23 _geo = l;
24 _id = l->Id();
25 _superLayerId = TMDC::superLayerId(l);
26 _localLayerId = TMDC::localLayerId(l);
27 //liucy&jialk origin uses slant to judge type now directly uses superLayerId to judge
28 if(_id>=36||(_id>=8&&_id<=19)) _type=0;
29 else _type=1;
30// _offset = l->Offset();
31// _cellSize = l->PCSiz();
32 // Unit from rad to cell for _offset; and from mm to cm for cellSize
33// _offset = l->Offset()/(2. * M_PI/l->NCell());
34 // unit of offset is rad, which is diff from belle
35 _offset = l->Offset();
36 _cellSize = l->PCSiz()/10;
37
38 _nWires = (unsigned) l->NCell();
39 _axialStereoLayerId = TMDC::axialStereoLayerId(l);
40}
int Id(void) const
Definition: MdcGeoLayer.h:155
double PCSiz(void) const
Definition: MdcGeoLayer.h:164
int NCell(void) const
Definition: MdcGeoLayer.h:165
double Offset(void) const
Definition: MdcGeoLayer.h:166
static unsigned axialStereoLayerId(const MdcGeoLayer *const)
Definition: TMDC.cxx:991
static unsigned superLayerId(unsigned wireId)
Definition: TMDC.cxx:765
static unsigned localLayerId(unsigned wireId)
Definition: TMDC.cxx:833

◆ ~TMDCLayer()

TMDCLayer::~TMDCLayer ( )
virtual

Destructor.

Definition at line 42 of file TMDCLayer.cxx.

42 {
43}

Member Function Documentation

◆ axial()

bool TMDCLayer::axial ( void  ) const
inline

returns true if this is an axial layer.

Definition at line 145 of file TMDCLayer.h.

145 {
146// cout<<"zsl,axial:"<<_superLayerId<<endl;
147// if (_superLayerId % 2) return false;
148 if (_type==1) return false;
149 return true;
150}

Referenced by TMDCWire::axial(), and dump().

◆ axialStereoLayerId()

unsigned TMDCLayer::axialStereoLayerId ( void  ) const
inline

returns id of axial or stereo id.

Definition at line 163 of file TMDCLayer.h.

163 {
164 return _axialStereoLayerId;
165}

Referenced by TMDCWire::axialStereoLayerId(), and TBuilder0::buildStereo().

◆ cellSize()

float TMDCLayer::cellSize ( void  ) const
inline

returns cell size.

Definition at line 169 of file TMDCLayer.h.

169 {
170 return _cellSize;
171}

Referenced by TMDCWire::cellSize().

◆ dump()

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.

46 {
47 std::cout << pre;
48 std::cout << "layer " << _id;
49 std::cout << ", super layer " << _superLayerId;
50 std::cout << ", local layer " << _localLayerId;
51 if (axial()) std::cout << ", axial ";
52 else std::cout << ", stereo ";
53 std::cout << _axialStereoLayerId;
54 std::cout << ", " << _nWires << " wires";
55 std::cout << std::endl;
56}
bool axial(void) const
returns true if this is an axial layer.
Definition: TMDCLayer.h:145

◆ geocdc()

const MdcGeoLayer * TMDCLayer::geocdc ( void  ) const
inline

returns a pointer to GEOMDC_WIR.

Definition at line 127 of file TMDCLayer.h.

127 {
128 return _geo;
129}

Referenced by TMDC::wire().

◆ id()

unsigned TMDCLayer::id ( void  ) const
inline

returns id.

Definition at line 109 of file TMDCLayer.h.

109 {
110 return _id;
111}

Referenced by wire().

◆ localLayerId()

unsigned TMDCLayer::localLayerId ( void  ) const
inline

returns local layer id in a super layer.

Definition at line 121 of file TMDCLayer.h.

121 {
122 return _localLayerId;
123}

Referenced by TMDCWire::localLayerId().

◆ nWires()

unsigned TMDCLayer::nWires ( void  ) const
inline

returns # of wires.

Definition at line 139 of file TMDCLayer.h.

139 {
140 return _nWires;
141}

Referenced by TMDCTsf::createTsf(), TMDCWire::localIdDifference(), TMDCWire::neighbor(), and TMDC::wire().

◆ offset()

float TMDCLayer::offset ( void  ) const
inline

returns offset.

Definition at line 133 of file TMDCLayer.h.

133 {
134 return _offset;
135}

Referenced by TMDCTsf::createTsf(), and TMDCWire::neighbor().

◆ stereo()

bool TMDCLayer::stereo ( void  ) const
inline

returns true if this is a stereo layer.

Definition at line 154 of file TMDCLayer.h.

154 {
155// cout<<"zsl,stereo:"<<_superLayerId<<endl;
156// if (_superLayerId % 2) return true;
157 if (_type==1) return true;
158 return false;
159}

Referenced by TMDCWire::stereo().

◆ superLayerId()

unsigned TMDCLayer::superLayerId ( void  ) const
inline

returns super layer id.

Definition at line 115 of file TMDCLayer.h.

115 {
116 return _superLayerId;
117}

Referenced by TMDCWire::neighbor(), and TMDCWire::superLayerId().

◆ wire()

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.

59 {
60 if (_nWires == 0) return 0;
61
62 if (id < 0)
63 while (id < 0)
64 id += _nWires;
65
66 if (id >= _nWires)
67 id %= _nWires;
68
69 return (* this)[id];
70}
unsigned id(void) const
returns id.
Definition: TMDCLayer.h:109

Referenced by TMDC::wire().


The documentation for this class was generated from the following files: