BOSS 8.0.0
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
8MdcSWire::MdcSWire( HepPoint3D& eastP, HepPoint3D& westP, double sag, int id, int cell )
9 : _traj( sag, eastP, westP )
10 , _east( eastP )
11 , _west( westP )
12 , _sag( sag )
13 , _id( id )
14 , _cell( cell ) {
15 _rend = sqrt( xEast() * xEast() + yEast() * yEast() );
16 _phiend = _east.phi();
17 BesAngle westPphi( westP.phi() );
18 BesAngle eastPphi( eastP.phi() );
19 _twist = ( westPphi - eastPphi ) * 0.5;
20}
21
22Hep3Vector MdcSWire::yAxis( double z ) {
23 Hep3Vector vec( xWireDC( z ), yWireDC( z ), z );
24 return vec.unit();
25}
26
27void MdcSWire::print( std::ostream& o ) const {
28 o << setw( 6 ) << Id() << setw( 10 ) << xEast() << setw( 10 ) << yEast() << setw( 10 )
29 << zEast() << setw( 10 ) << xWest() << setw( 10 ) << yWest() << setw( 10 ) << zWest()
30 << setw( 10 ) << xMid() << setw( 10 ) << yMid() << setw( 10 ) << rEnd() << setw( 10 )
31 << getSag() << setw( 10 ) << cell() << setw( 10 ) << zLength() << setw( 10 ) << dPhiz()
32 << setw( 10 ) << zEndDC() << setw( 10 ) << rMid() << setw( 10 ) << phiE() << setw( 10 )
33 << phi() << setw( 10 ) << stereo() << setw( 10 ) << stDip() << setw( 10 ) << radiusDC( 0. )
34 << setw( 10 ) << phiDC( 0. ) << setw( 10 ) << xWireDC( 0. ) << setw( 10 ) << yWireDC( 0. )
35 << setw( 10 ) << dPhizDC( 0. ) << setw( 10 ) << getTraj()->sag() << //
36 setw( 10 ) << getTraj()->position( 0. ) << setw( 10 ) << getTraj()->direction( 0. )
37 << setw( 10 ) << getTraj()->curvature() << //
38 setw( 10 ) << getTraj()->rawDirection() << std::endl;
39}
40
41void MdcSWire::printInfo( std::ostream& o ) const {
42 o << "east " << getEastPoint()->x() << " " << getEastPoint()->y() << " "
43 << getEastPoint()->z() << "\n"
44 << "west " << getWestPoint()->x() << " " << getWestPoint()->y() << " "
45 << getWestPoint()->z() << "\n"
46 << "sagitta: " << getSag() << " z length: " << zLength() << " twist: " << dPhiz()
47 << " stereo: " << stereo() << "\n"
48 << "x-y mid: " << xMid() << " - " << yMid() << std::endl;
49}
50
51std::ostream& operator<<( std::ostream& o, const MdcSWire& w ) {
52 w.print( o );
53 return o;
54}
dble_vec_t vec[12]
double w
std::ostream & operator<<(std::ostream &o, const MdcSWire &w)
Definition MdcSWire.cxx:51
HepGeom::Point3D< double > HepPoint3D
void print(std::ostream &o) const
Definition MdcSWire.cxx:27
Hep3Vector yAxis(double z=0.)
Definition MdcSWire.cxx:22
MdcSWire(HepPoint3D &eastP, HepPoint3D &westP, double sag=0, int id=0, int cell=0)
Definition MdcSWire.cxx:8
void printInfo(std::ostream &o) const
Definition MdcSWire.cxx:41
HepPoint3D position(double) const
double curvature(double f=0.) const
Hep3Vector direction(double) const