BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/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 : yoshihito.iwasaki@kek.jp
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
34public:
35 /// Constructor.
37
38 /// Destructor
39 virtual ~TMDCLayer();
40
41public: // 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
79public: // Modifiers
80private:
81 const MdcGeoLayer* _geo;
82
83 unsigned _id;
84 //_type=0 axial; _type=1 stereo;
85 unsigned _type;
86 unsigned _superLayerId;
87 unsigned _localLayerId;
88 unsigned _axialStereoLayerId;
89
90 float _offset;
91 float _cellSize;
92 unsigned _nWires;
93};
94
95//-----------------------------------------------------------------------------
96
97#ifdef TMDCLayer_NO_INLINE
98# define inline
99#else
100# undef inline
101# define TMDCLayer_INLINE_DEFINE_HERE
102#endif
103
104#ifdef TMDCLayer_INLINE_DEFINE_HERE
105
106inline unsigned TMDCLayer::id( void ) const { return _id; }
107
108inline unsigned TMDCLayer::superLayerId( void ) const { return _superLayerId; }
109
110inline unsigned TMDCLayer::localLayerId( void ) const { return _localLayerId; }
111
112inline const MdcGeoLayer* TMDCLayer::geocdc( void ) const { return _geo; }
113
114inline float TMDCLayer::offset( void ) const { return _offset; }
115
116inline unsigned TMDCLayer::nWires( void ) const { return _nWires; }
117
118inline bool TMDCLayer::axial( void ) const {
119 // cout<<"zsl,axial:"<<_superLayerId<<endl;
120 // if (_superLayerId % 2) return false;
121 if ( _type == 1 ) return false;
122 return true;
123}
124
125inline bool TMDCLayer::stereo( void ) const {
126 // cout<<"zsl,stereo:"<<_superLayerId<<endl;
127 // if (_superLayerId % 2) return true;
128 if ( _type == 1 ) return true;
129 return false;
130}
131
132inline unsigned TMDCLayer::axialStereoLayerId( void ) const { return _axialStereoLayerId; }
133
134inline float TMDCLayer::cellSize( void ) const { return _cellSize; }
135
136#endif
137
138#undef inline
139
140#endif /* TMDCLayer_FLAG_ */
unsigned id(void) const
returns id.
unsigned superLayerId(void) const
returns super layer id.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
float offset(void) const
returns offset.
float cellSize(void) const
returns cell size.
bool stereo(void) const
returns true if this is a stereo layer.
unsigned localLayerId(void) const
returns local layer id in a super layer.
unsigned axialStereoLayerId(void) const
returns id of axial or stereo id.
const TMDCWire *const wire(int id) const
returns a pointer to a wire. 'id' can be negative or 'id' can be greater than 'nWires()'.
TMDCLayer(const MdcGeoLayer *)
Constructor.
bool axial(void) const
returns true if this is an axial layer.
virtual ~TMDCLayer()
Destructor.
const MdcGeoLayer * geocdc(void) const
returns a pointer to GEOMDC_WIR.
unsigned nWires(void) const
returns # of wires.