CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSWire.cxx
Go to the documentation of this file.
1#include "MdcGeom/MdcSWire.h"
2#include "MdcGeom/BesAngle.h"
3#include "MdcGeom/MdcLayer.h"
4#include <iomanip>
5#include <iostream>
6using namespace std;
7
8
9MdcSWire::MdcSWire(HepPoint3D &eastP, HepPoint3D &westP, double sag, int id, int cell)
10: _traj(sag,eastP,westP), _east(eastP), _west(westP), _sag(sag), _id(id), _cell(cell)
11{
12 _rend = sqrt(xEast()*xEast() + yEast()*yEast());
13 _phiend = _east.phi();
14 BesAngle westPphi(westP.phi());
15 BesAngle eastPphi(eastP.phi());
16 _twist = ( westPphi - eastPphi)* 0.5;
17}
18
19Hep3Vector
20MdcSWire::yAxis( double z )
21{
22 Hep3Vector vec( xWireDC(z), yWireDC(z), z);
23 return vec.unit();
24}
25
26void MdcSWire::print(std::ostream &o) const
27{
28 o<< setw(6)<<Id()<<
29 setw(10)<<xEast()<<
30 setw(10)<<yEast()<<
31 setw(10)<<zEast()<<
32 setw(10)<<xWest()<<
33 setw(10)<<yWest()<<
34 setw(10)<<zWest()<<
35 setw(10)<<xMid()<<
36 setw(10)<<yMid()<<
37 setw(10)<<rEnd()<<
38 setw(10)<<getSag()<<
39 setw(10)<<cell()<<
40 setw(10)<<zLength()<<
41 setw(10)<<dPhiz()<<
42 setw(10)<<zEndDC()<<
43 setw(10)<<rMid()<<
44 setw(10)<<phiE()<<
45 setw(10)<<phi()<<
46 setw(10)<<stereo()<<
47 setw(10)<<stDip()<<
48 setw(10)<<radiusDC(0.)<<
49 setw(10)<<phiDC(0.)<<
50 setw(10)<<xWireDC(0.)<<
51 setw(10)<<yWireDC(0.)<<
52 setw(10)<<dPhizDC(0.)<<
53 setw(10)<<getTraj()->sag()<<//
54 setw(10)<<getTraj()->position(0.)<<
55 setw(10)<<getTraj()->direction(0.)<<
56 setw(10)<<getTraj()->curvature()<<//
57 setw(10)<<getTraj()->rawDirection()<<
58 std::endl;
59}
60
61void MdcSWire::printInfo(std::ostream &o) const
62{
63 o << "east " << getEastPoint()->x() << " " << getEastPoint()->y() << " "
64 << getEastPoint()->z() <<"\n"
65 << "west " << getWestPoint()->x() <<" " << getWestPoint()->y()
66 << " " << getWestPoint()->z() << "\n"
67 << "sagitta: " << getSag()
68 << " z length: " << zLength()
69 << " twist: " << dPhiz()
70 << " stereo: " << stereo() <<"\n"
71 << "x-y mid: " << xMid() << " - " << yMid() << std::endl;
72
73}
74
75std::ostream& operator << (std::ostream& o, const MdcSWire& w)
76{
77 w.print(o);
78 return o;
79}
80
std::ostream & operator<<(std::ostream &o, const MdcSWire &w)
Definition: MdcSWire.cxx:75
double xWest(void) const
Definition: MdcSWire.h:38
void print(std::ostream &o) const
Definition: MdcSWire.cxx:26
double yWest(void) const
Definition: MdcSWire.h:39
Hep3Vector yAxis(double z=0.)
Definition: MdcSWire.cxx:20
double stDip(void) const
Definition: MdcSWire.h:55
double rEnd(void) const
Definition: MdcSWire.h:43
double phi(void) const
Definition: MdcSWire.h:52
double yMid(void) const
Definition: MdcSWire.h:42
double dPhizDC(double z) const
Definition: MdcSWire.h:63
int Id(void) const
Definition: MdcSWire.h:45
double phiE(void) const
Definition: MdcSWire.h:51
double zLength(void) const
Definition: MdcSWire.h:47
double yWireDC(double z) const
Definition: MdcSWire.h:62
MdcSWire(HepPoint3D &eastP, HepPoint3D &westP, double sag=0, int id=0, int cell=0)
Definition: MdcSWire.cxx:9
double getSag(void) const
Definition: MdcSWire.h:31
double xWireDC(double z) const
Definition: MdcSWire.h:61
double zWest(void) const
Definition: MdcSWire.h:40
double phiDC(double z) const
Definition: MdcSWire.h:60
double rMid(void) const
Definition: MdcSWire.h:50
double zEndDC(void) const
Definition: MdcSWire.h:49
const HepPoint3D * getWestPoint(void) const
Definition: MdcSWire.h:33
void printInfo(std::ostream &o) const
Definition: MdcSWire.cxx:61
double zEast(void) const
Definition: MdcSWire.h:37
const MdcSagTraj * getTraj(void) const
Definition: MdcSWire.h:34
int cell(void) const
Definition: MdcSWire.h:46
double yEast(void) const
Definition: MdcSWire.h:36
double stereo(void) const
Definition: MdcSWire.h:53
double radiusDC(double z) const
Definition: MdcSWire.h:57
double xMid(void) const
Definition: MdcSWire.h:41
double xEast(void) const
Definition: MdcSWire.h:35
double dPhiz(void) const
Definition: MdcSWire.h:48
const HepPoint3D * getEastPoint(void) const
Definition: MdcSWire.h:32
const Hep3Vector & rawDirection(void) const
Definition: MdcSagTraj.h:87
HepPoint3D position(double) const
Definition: MdcSagTraj.cxx:121
double curvature(double f=0.) const
Definition: MdcSagTraj.cxx:190
double sag(void) const
Definition: MdcSagTraj.h:80
Hep3Vector direction(double) const
Definition: MdcSagTraj.cxx:132
dble_vec_t vec[12]
Definition: ranlxd.c:372