BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TMDCLayer.cxx
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TMDCLayer.cxx,v 1.5 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TMDCLayer.cc
5// Section : Tracking MDC
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to represent a wire layer.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#define TMDCLayer_INLINE_DEFINE_HERE
14//#include "panther/panther.h"
15//#include MDC_H
16//#include "MdcRecGeo/MdcGeoLayer.h"
18#include "TrkReco/TMDC.h"
19#include "TrkReco/TMDCLayer.h"
20#include "TrkReco/TMDCUtil.h"
21
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}
41
43}
44
45void
46TMDCLayer::dump(const std::string & msg, const std::string & pre) const {
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}
57
58const TMDCWire * const
59TMDCLayer::wire(int id) const {
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}
71
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
unsigned id(void) const
returns id.
Definition: TMDCLayer.h:109
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TMDCLayer.cxx:46
virtual ~TMDCLayer()
Destructor.
Definition: TMDCLayer.cxx:42
const TMDCWire *const wire(int id) const
returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'.
Definition: TMDCLayer.cxx:59
TMDCLayer(const MdcGeoLayer *)
Constructor.
Definition: TMDCLayer.cxx:22
bool axial(void) const
returns true if this is an axial layer.
Definition: TMDCLayer.h:145
A class to represent a wire in MDC.
Definition: TMDCWire.h:55
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