BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
TMDCLayer.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TMDCLayer.h,v 1.4 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TMDCLayer.h
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#ifndef TMDCLayer_FLAG_
14#define TMDCLayer_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17#ifndef TRKRECO_DEBUG
18#define TRKRECO_DEBUG
19#endif
20#endif
21
22#include <string>
23
24#define HEP_SHORT_NAMES
25#include "CLHEP/Alist/AList.h"
26
27class TMDCWire;
28//struct geocdc_layer;
29class MdcGeoLayer;
30
31/// A class to represent a wire layer.
32class TMDCLayer : public AList<TMDCWire> {
33
34 public:
35 /// Constructor.
36 TMDCLayer(const MdcGeoLayer *);
37
38 /// Destructor
39 virtual ~TMDCLayer();
40
41 public:// Selectors
42 /// returns id.
43 unsigned id(void) const;
44
45 /// returns super layer id.
46 unsigned superLayerId(void) const;
47
48 /// returns local layer id in a super layer.
49 unsigned localLayerId(void) const;
50
51 /// returns id of axial or stereo id.
52 unsigned axialStereoLayerId(void) const;
53
54 /// returns \# of wires.
55 unsigned nWires(void) const;
56
57 /// returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'.
58 const TMDCWire * const wire(int id) const;
59
60 /// returns true if this is an axial layer.
61 bool axial(void) const;
62
63 /// returns true if this is a stereo layer.
64 bool stereo(void) const;
65
66 /// returns offset.
67 float offset(void) const;
68
69 /// returns cell size.
70 float cellSize(void) const;
71
72 /// returns a pointer to GEOMDC_WIR.
73 const MdcGeoLayer * geocdc(void) const;
74
75 /// dumps debug information.
76 void dump(const std::string & message = std::string(""),
77 const std::string & prefix = std::string("")) const;
78
79 public:// Modifiers
80
81 private:
82 const MdcGeoLayer * _geo;
83
84 unsigned _id;
85//_type=0 axial; _type=1 stereo;
86 unsigned _type;
87 unsigned _superLayerId;
88 unsigned _localLayerId;
89 unsigned _axialStereoLayerId;
90
91 float _offset;
92 float _cellSize;
93 unsigned _nWires;
94};
95
96//-----------------------------------------------------------------------------
97
98#ifdef TMDCLayer_NO_INLINE
99#define inline
100#else
101#undef inline
102#define TMDCLayer_INLINE_DEFINE_HERE
103#endif
104
105#ifdef TMDCLayer_INLINE_DEFINE_HERE
106
107inline
108unsigned
109TMDCLayer::id(void) const {
110 return _id;
111}
112
113inline
114unsigned
116 return _superLayerId;
117}
118
119inline
120unsigned
122 return _localLayerId;
123}
124
125inline
126const MdcGeoLayer *
127TMDCLayer::geocdc(void) const {
128 return _geo;
129}
130
131inline
132float
133TMDCLayer::offset(void) const {
134 return _offset;
135}
136
137inline
138unsigned
139TMDCLayer::nWires(void) const {
140 return _nWires;
141}
142
143inline
144bool
145TMDCLayer::axial(void) const {
146// cout<<"zsl,axial:"<<_superLayerId<<endl;
147// if (_superLayerId % 2) return false;
148 if (_type==1) return false;
149 return true;
150}
151
152inline
153bool
154TMDCLayer::stereo(void) const {
155// cout<<"zsl,stereo:"<<_superLayerId<<endl;
156// if (_superLayerId % 2) return true;
157 if (_type==1) return true;
158 return false;
159}
160
161inline
162unsigned
164 return _axialStereoLayerId;
165}
166
167inline
168float
170 return _cellSize;
171}
172
173#endif
174
175#undef inline
176
177#endif /* TMDCLayer_FLAG_ */
178
A class to represent a wire layer.
Definition: TMDCLayer.h:32
unsigned id(void) const
returns id.
Definition: TMDCLayer.h:109
unsigned superLayerId(void) const
returns super layer id.
Definition: TMDCLayer.h:115
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TMDCLayer.cxx:46
float offset(void) const
returns offset.
Definition: TMDCLayer.h:133
float cellSize(void) const
returns cell size.
Definition: TMDCLayer.h:169
bool stereo(void) const
returns true if this is a stereo layer.
Definition: TMDCLayer.h:154
virtual ~TMDCLayer()
Destructor.
Definition: TMDCLayer.cxx:42
unsigned localLayerId(void) const
returns local layer id in a super layer.
Definition: TMDCLayer.h:121
unsigned axialStereoLayerId(void) const
returns id of axial or stereo id.
Definition: TMDCLayer.h:163
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
bool axial(void) const
returns true if this is an axial layer.
Definition: TMDCLayer.h:145
const MdcGeoLayer * geocdc(void) const
returns a pointer to GEOMDC_WIR.
Definition: TMDCLayer.h:127
unsigned nWires(void) const
returns # of wires.
Definition: TMDCLayer.h:139
A class to represent a wire in MDC.
Definition: TMDCWire.h:55