BOSS 7.0.5
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
double w
std::ostream & operator<<(std::ostream &o, const MdcSWire &w)
Definition: MdcSWire.cxx:75
void print(std::ostream &o) const
Definition: MdcSWire.cxx:26
Hep3Vector yAxis(double z=0.)
Definition: MdcSWire.cxx:20
MdcSWire(HepPoint3D &eastP, HepPoint3D &westP, double sag=0, int id=0, int cell=0)
Definition: MdcSWire.cxx:9
const HepPoint3D * getWestPoint(void) const
void printInfo(std::ostream &o) const
Definition: MdcSWire.cxx:61
const MdcSagTraj * getTraj(void) const
const HepPoint3D * getEastPoint(void) const
const Hep3Vector & rawDirection(void) const
HepPoint3D position(double) const
Definition: MdcSagTraj.cxx:121
double curvature(double f=0.) const
Definition: MdcSagTraj.cxx:190
Hep3Vector direction(double) const
Definition: MdcSagTraj.cxx:132