CGEM BOSS 6.6.5.f
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.
 
 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 InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

Constructor & Destructor Documentation

◆ TMDCLayer() [1/2]

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}
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() [1/2]

TMDCLayer::~TMDCLayer ( )
virtual

Destructor.

Definition at line 42 of file TMDCLayer.cxx.

42 {
43}

◆ TMDCLayer() [2/2]

TMDCLayer::TMDCLayer ( const MdcGeoLayer )

Constructor.

◆ ~TMDCLayer() [2/2]

virtual TMDCLayer::~TMDCLayer ( )
virtual

Destructor.

Member Function Documentation

◆ axial() [1/2]

bool TMDCLayer::axial ( void  ) const
inline

returns true if this is an axial layer.

Definition at line 145 of file InstallArea/include/TrkReco/TrkReco/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().

◆ axial() [2/2]

bool TMDCLayer::axial ( void  ) const

returns true if this is an axial layer.

◆ axialStereoLayerId() [1/2]

unsigned TMDCLayer::axialStereoLayerId ( void  ) const
inline

returns id of axial or stereo id.

Definition at line 163 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

163 {
164 return _axialStereoLayerId;
165}

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

◆ axialStereoLayerId() [2/2]

unsigned TMDCLayer::axialStereoLayerId ( void  ) const

returns id of axial or stereo id.

◆ cellSize() [1/2]

float TMDCLayer::cellSize ( void  ) const
inline

returns cell size.

Definition at line 169 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

169 {
170 return _cellSize;
171}

Referenced by TMDCWire::cellSize().

◆ cellSize() [2/2]

float TMDCLayer::cellSize ( void  ) const

returns cell size.

◆ dump() [1/2]

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.

◆ dump() [2/2]

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

dumps debug information.

◆ geocdc() [1/2]

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

returns a pointer to GEOMDC_WIR.

Definition at line 127 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

127 {
128 return _geo;
129}

Referenced by TMDC::wire().

◆ geocdc() [2/2]

const MdcGeoLayer * TMDCLayer::geocdc ( void  ) const

returns a pointer to GEOMDC_WIR.

◆ id() [1/2]

unsigned TMDCLayer::id ( void  ) const
inline

returns id.

Definition at line 109 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

109 {
110 return _id;
111}

Referenced by wire().

◆ id() [2/2]

unsigned TMDCLayer::id ( void  ) const

returns id.

◆ localLayerId() [1/2]

unsigned TMDCLayer::localLayerId ( void  ) const
inline

returns local layer id in a super layer.

Definition at line 121 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

121 {
122 return _localLayerId;
123}

Referenced by TMDCWire::localLayerId().

◆ localLayerId() [2/2]

unsigned TMDCLayer::localLayerId ( void  ) const

returns local layer id in a super layer.

◆ nWires() [1/2]

unsigned TMDCLayer::nWires ( void  ) const
inline

◆ nWires() [2/2]

unsigned TMDCLayer::nWires ( void  ) const

returns # of wires.

◆ offset() [1/2]

float TMDCLayer::offset ( void  ) const
inline

returns offset.

Definition at line 133 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

133 {
134 return _offset;
135}

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

◆ offset() [2/2]

float TMDCLayer::offset ( void  ) const

returns offset.

◆ stereo() [1/2]

bool TMDCLayer::stereo ( void  ) const
inline

returns true if this is a stereo layer.

Definition at line 154 of file InstallArea/include/TrkReco/TrkReco/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().

◆ stereo() [2/2]

bool TMDCLayer::stereo ( void  ) const

returns true if this is a stereo layer.

◆ superLayerId() [1/2]

unsigned TMDCLayer::superLayerId ( void  ) const
inline

returns super layer id.

Definition at line 115 of file InstallArea/include/TrkReco/TrkReco/TMDCLayer.h.

115 {
116 return _superLayerId;
117}

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

◆ superLayerId() [2/2]

unsigned TMDCLayer::superLayerId ( void  ) const

returns super layer id.

◆ wire() [1/2]

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.

Referenced by TMDC::wire().

◆ wire() [2/2]

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


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