BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Mdc/MdcGeomSvc/include/MdcGeomSvc/MdcGeoWire.h
Go to the documentation of this file.
1// $Id: MdcGeoWire.h,v 1.6 2010/03/26 00:45:11 zhangy Exp $ // -*-c++-*-
2// header file for a class called "MdcGeoWire"
3#ifndef MDC_GEO_WIRE_H
4#define MDC_GEO_WIRE_H
5
6#include "MdcGeoLayer.h"
7#include <CLHEP/Geometry/Point3D.h>
8#include <iostream>
9#ifndef ENABLE_BACKWARDS_COMPATIBILITY
10typedef HepGeom::Point3D<double> HepPoint3D;
11#endif
12
13using namespace CLHEP;
14
15class MdcGeoWire {
16
17public:
18 // Constructor.
19 MdcGeoWire() : fId( 0 ), fSlant( 0 ), fnomSlant( 0 ), fCell( 0 ), fLayer( 0 ), fStat( 0 ) {
20 HepPoint3D O( 0, 0, 0 );
21 fBackward = O;
22 fForward = O;
23 fBwirepos = O;
24 fFwirepos = O;
25 fnomBackward = O;
26 fnomForward = O;
27 fLyr = NULL;
28 }
29
30 // Copy and Assignment
31 MdcGeoWire( const MdcGeoWire& e ) {
32 fId = e.Id();
33 fBackward = e.Backward();
34 fForward = e.Forward();
35 fBwirepos = e.BWirePos();
36 fFwirepos = e.FWirePos();
37 fSlant = e.Slant();
38 fCell = e.Cell();
39 fLayer = e.Layer();
40 fStat = e.Stat();
41 fLyr = e.Lyr();
42 };
43
45 if ( this != &e )
46 {
47 fId = e.Id();
48 fBackward = e.Backward();
49 fForward = e.Forward();
50 fBwirepos = e.BWirePos();
51 fFwirepos = e.FWirePos();
52 fSlant = e.Slant();
53 fCell = e.Cell();
54 fLayer = e.Layer();
55 fStat = e.Stat();
56 fLyr = e.Lyr();
57 }
58 return *this;
59 }
60
61 // Destructor
63
64public: // Extractors
65 int Id( void ) const;
66 HepPoint3D Backward( void ) const;
67 HepPoint3D Forward( void ) const;
68 HepPoint3D BWirePos( void ) const;
69 HepPoint3D FWirePos( void ) const;
70 double Slant( void ) const;
71 HepPoint3D nomBackward( void ) const;
72 HepPoint3D nomForward( void ) const;
73 double nomSlant( void ) const;
74 double Tension( void ) const;
75 const double Sag( void ) const;
76 const double Sagz( const double z ) const;
77
78 int Cell( void ) const;
79 int Layer( void ) const;
80 int Stat( void ) const;
81 MdcGeoLayer* Lyr( void ) const;
82
83public: // Modifiers
84 int Id( int );
89 double Slant( double );
92 double nomSlant( double );
93 double Tension( double );
94
95 int Cell( int );
96 int Layer( int );
97 int Stat( int );
99
100private:
101 int fId;
102 HepPoint3D fBackward; // wire position at backward endplate (mm)
103 HepPoint3D fForward; // wire position at forward endplate (mm)
104 HepPoint3D fBwirepos; // wire position at backward endplate (mm)
105 HepPoint3D fFwirepos; // wire position at forward endplate (mm)
106 double fSlant; // slant angle of wire (rad)
107 HepPoint3D fnomBackward; // nominal wire position at backward endplate (mm)
108 HepPoint3D fnomForward; // nominal wire position at forward endplate (mm)
109 double fnomSlant; // nominal slant angle of wire (rad)
110 double fTension; // the tension of wire
111
112 int fCell; // #cell
113 int fLayer; // #layer
114 int fStat; // status (32 bits)
115 MdcGeoLayer* fLyr;
116};
117
118// Extractors
119inline int MdcGeoWire::Id( void ) const { return fId; }
120inline HepPoint3D MdcGeoWire::Backward( void ) const { return fBackward; }
121inline HepPoint3D MdcGeoWire::Forward( void ) const { return fForward; }
122inline HepPoint3D MdcGeoWire::BWirePos( void ) const { return fBwirepos; }
123inline HepPoint3D MdcGeoWire::FWirePos( void ) const { return fFwirepos; }
124inline double MdcGeoWire::Slant( void ) const { return fSlant; }
125inline HepPoint3D MdcGeoWire::nomBackward( void ) const { return fnomBackward; }
126inline HepPoint3D MdcGeoWire::nomForward( void ) const { return fnomForward; }
127inline double MdcGeoWire::nomSlant( void ) const { return fnomSlant; }
128inline double MdcGeoWire::Tension( void ) const { return fTension; }
129inline int MdcGeoWire::Cell( void ) const { return fCell; }
130inline int MdcGeoWire::Layer( void ) const { return fLayer; }
131inline int MdcGeoWire::Stat( void ) const { return fStat; }
132inline MdcGeoLayer* MdcGeoWire::Lyr( void ) const { return fLyr; }
133
134// Modifiers
135inline int MdcGeoWire::Id( int i ) { return fId = i; }
136inline HepPoint3D MdcGeoWire::Backward( HepPoint3D i ) { return fBackward = i; }
137inline HepPoint3D MdcGeoWire::Forward( HepPoint3D i ) { return fForward = i; }
138inline HepPoint3D MdcGeoWire::BWirePos( HepPoint3D i ) { return fBwirepos = i; }
139inline HepPoint3D MdcGeoWire::FWirePos( HepPoint3D i ) { return fFwirepos = i; }
140inline HepPoint3D MdcGeoWire::nomBackward( HepPoint3D i ) { return fnomBackward = i; }
141inline HepPoint3D MdcGeoWire::nomForward( HepPoint3D i ) { return fnomForward = i; }
142inline double MdcGeoWire::Slant( double i ) { return fnomSlant = i; }
143inline double MdcGeoWire::nomSlant( double i ) { return fnomSlant = i; }
144inline double MdcGeoWire::Tension( double i ) { return fTension = i; }
145inline int MdcGeoWire::Cell( int i ) { return fCell = i; }
146inline int MdcGeoWire::Layer( int i ) { return fLayer = i; }
147inline int MdcGeoWire::Stat( int i ) { return fStat = i; }
148inline MdcGeoLayer* MdcGeoWire::Lyr( MdcGeoLayer* i ) { return fLyr = i; }
149
150#endif /* MdcGeoWire_CLASS */
HepGeom::Point3D< double > HepPoint3D
HepGeom::Point3D< double > HepPoint3D
HepPoint3D nomBackward(HepPoint3D)
HepPoint3D nomForward(HepPoint3D)
double Slant(double)
int Layer(int)
HepPoint3D FWirePos(HepPoint3D)
const double Sag(void) const
MdcGeoWire & operator=(const MdcGeoWire &e)
int Cell(int)
const double Sagz(const double z) const
double Tension(double)
double nomSlant(double)
HepPoint3D nomForward(void) const
HepPoint3D nomBackward(void) const
HepPoint3D BWirePos(HepPoint3D)
double Tension(void) const
HepPoint3D Backward(HepPoint3D)
int Id(int)
int Stat(int)
HepPoint3D Forward(HepPoint3D)
double nomSlant(void) const
MdcGeoLayer * Lyr(MdcGeoLayer *)