BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSWire Class Reference

#include <MdcSWire.h>

Public Member Functions

 MdcSWire (HepPoint3D &eastP, HepPoint3D &westP, double sag=0, int id=0, int cell=0)
 
 ~MdcSWire ()
 
double getSag (void) const
 
const HepPoint3DgetEastPoint (void) const
 
const HepPoint3DgetWestPoint (void) const
 
const MdcSagTrajgetTraj (void) const
 
double xEast (void) const
 
double yEast (void) const
 
double zEast (void) const
 
double xWest (void) const
 
double yWest (void) const
 
double zWest (void) const
 
double xMid (void) const
 
double yMid (void) const
 
double rEnd (void) const
 
const MdcLayerlayer (void) const
 
int Id (void) const
 
int cell (void) const
 
double zLength (void) const
 
double dPhiz (void) const
 
double zEndDC (void) const
 
double rMid (void) const
 
double phiE (void) const
 
double phi (void) const
 
double stereo (void) const
 
double stDip (void) const
 
double radiusDC (double z) const
 
double phiDC (double z) const
 
double xWireDC (double z) const
 
double yWireDC (double z) const
 
double dPhizDC (double z) const
 
Hep3Vector yAxis (double z=0.)
 
const Hep3Vector & zAxis (void) const
 
void print (std::ostream &o) const
 
void printInfo (std::ostream &o) const
 

Protected Member Functions

void setLayerPtr (const MdcLayer *lay)
 

Friends

class MdcLayer
 

Detailed Description

Definition at line 20 of file MdcSWire.h.

Constructor & Destructor Documentation

◆ MdcSWire()

MdcSWire::MdcSWire ( HepPoint3D eastP,
HepPoint3D westP,
double  sag = 0,
int  id = 0,
int  cell = 0 
)

Definition at line 9 of file MdcSWire.cxx.

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}
int cell(void) const
Definition: MdcSWire.h:46
double yEast(void) const
Definition: MdcSWire.h:36
double xEast(void) const
Definition: MdcSWire.h:35

◆ ~MdcSWire()

MdcSWire::~MdcSWire ( )
inline

Definition at line 26 of file MdcSWire.h.

26{};

Member Function Documentation

◆ cell()

int MdcSWire::cell ( void  ) const
inline

Definition at line 46 of file MdcSWire.h.

46{ return _cell; } //local cell number in layer

Referenced by print().

◆ dPhiz()

double MdcSWire::dPhiz ( void  ) const
inline

Definition at line 48 of file MdcSWire.h.

48{ return _twist; }

Referenced by MdcLayer::MdcLayer(), print(), printInfo(), rMid(), and stereo().

◆ dPhizDC()

double MdcSWire::dPhizDC ( double  z) const
inline

Definition at line 63 of file MdcSWire.h.

63{ return atan2( z*stereo(),rMid() ); }
double rMid(void) const
Definition: MdcSWire.h:50
double stereo(void) const
Definition: MdcSWire.h:53

Referenced by phiDC(), and print().

◆ getEastPoint()

const HepPoint3D * MdcSWire::getEastPoint ( void  ) const
inline

Definition at line 32 of file MdcSWire.h.

32{ return &_east; }

Referenced by MdcUtilitySvc::docaPatPar(), printInfo(), zLength(), and MdcSegInfoSterO::zPosition().

◆ getSag()

double MdcSWire::getSag ( void  ) const
inline

Definition at line 31 of file MdcSWire.h.

31{ return _sag; }

Referenced by print(), printInfo(), and MdcLayer::sag().

◆ getTraj()

const MdcSagTraj * MdcSWire::getTraj ( void  ) const
inline

Definition at line 34 of file MdcSWire.h.

34{ return &_traj; }

Referenced by MdcUtilitySvc::docaPatPar(), main(), MdcLayer::makeHitTrajInGlobalCoords(), and print().

◆ getWestPoint()

const HepPoint3D * MdcSWire::getWestPoint ( void  ) const
inline

Definition at line 33 of file MdcSWire.h.

33{ return &_west; }

Referenced by printInfo(), zLength(), and MdcSegInfoSterO::zPosition().

◆ Id()

int MdcSWire::Id ( void  ) const
inline

Definition at line 45 of file MdcSWire.h.

45{ return _id; }//wire number in Mdc

Referenced by print().

◆ layer()

const MdcLayer * MdcSWire::layer ( void  ) const
inline

Definition at line 44 of file MdcSWire.h.

44{ return _lay; }

◆ phi()

double MdcSWire::phi ( void  ) const
inline

Definition at line 52 of file MdcSWire.h.

52{ return _phiend + _twist; }

Referenced by MdcHit::MdcHit(), phiDC(), MdcLayer::phiWire(), print(), xMid(), and yMid().

◆ phiDC()

double MdcSWire::phiDC ( double  z) const
inline

Definition at line 60 of file MdcSWire.h.

60{ return phi() - dPhizDC(z); }
double phi(void) const
Definition: MdcSWire.h:52
double dPhizDC(double z) const
Definition: MdcSWire.h:63

Referenced by MdcHit::phi(), MdcLayer::phiWireDC(), print(), xWireDC(), and yWireDC().

◆ phiE()

double MdcSWire::phiE ( void  ) const
inline

Definition at line 51 of file MdcSWire.h.

51{ return _phiend; }

Referenced by MdcSegFinder::createSegs(), MdcxFindSegs::initWireGroups(), MdcLayer::MdcLayer(), and print().

◆ print()

void MdcSWire::print ( std::ostream &  o) const

Definition at line 26 of file MdcSWire.cxx.

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}
double xWest(void) const
Definition: MdcSWire.h:38
double yWest(void) const
Definition: MdcSWire.h:39
double stDip(void) const
Definition: MdcSWire.h:55
double rEnd(void) const
Definition: MdcSWire.h:43
double yMid(void) const
Definition: MdcSWire.h:42
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
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 zEndDC(void) const
Definition: MdcSWire.h:49
double zEast(void) const
Definition: MdcSWire.h:37
const MdcSagTraj * getTraj(void) const
Definition: MdcSWire.h:34
double radiusDC(double z) const
Definition: MdcSWire.h:57
double xMid(void) const
Definition: MdcSWire.h:41
double dPhiz(void) const
Definition: MdcSWire.h:48
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

◆ printInfo()

void MdcSWire::printInfo ( std::ostream &  o) const

Definition at line 61 of file MdcSWire.cxx.

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}
const HepPoint3D * getWestPoint(void) const
Definition: MdcSWire.h:33
const HepPoint3D * getEastPoint(void) const
Definition: MdcSWire.h:32

◆ radiusDC()

double MdcSWire::radiusDC ( double  z) const
inline

Definition at line 57 of file MdcSWire.h.

57 { return rEnd() - stDip() * (1.-
58 z*z/(zEndDC()*zEndDC())); }

Referenced by print(), MdcLayer::radiusDC(), xWireDC(), and yWireDC().

◆ rEnd()

double MdcSWire::rEnd ( void  ) const
inline

Definition at line 43 of file MdcSWire.h.

43{ return _rend; }

Referenced by MdcLayer::MdcLayer(), print(), radiusDC(), rMid(), stDip(), and stereo().

◆ rMid()

double MdcSWire::rMid ( void  ) const
inline

Definition at line 50 of file MdcSWire.h.

50{ return rEnd() * cos( dPhiz() ); }
double cos(const BesAngle a)
Definition: BesAngle.h:213

Referenced by dPhizDC(), HoughHit::HoughHit(), MdcHit::MdcHit(), MdcLayer::MdcLayer(), print(), stDip(), xMid(), and yMid().

◆ setLayerPtr()

void MdcSWire::setLayerPtr ( const MdcLayer lay)
inlineprotected

Definition at line 74 of file MdcSWire.h.

74{ _lay =lay; }

Referenced by MdcLayer::MdcLayer().

◆ stDip()

double MdcSWire::stDip ( void  ) const
inline

Definition at line 55 of file MdcSWire.h.

55{ return rEnd() - rMid(); }

Referenced by print(), and radiusDC().

◆ stereo()

double MdcSWire::stereo ( void  ) const
inline

Definition at line 53 of file MdcSWire.h.

54 { return 2.*rEnd()*sin(dPhiz())/zLength(); }
double sin(const BesAngle a)
Definition: BesAngle.h:210

Referenced by dPhizDC(), MdcLayer::MdcLayer(), print(), and printInfo().

◆ xEast()

double MdcSWire::xEast ( void  ) const
inline

Definition at line 35 of file MdcSWire.h.

35{ return _east.x(); }

Referenced by MdcSWire(), and print().

◆ xMid()

double MdcSWire::xMid ( void  ) const
inline

Definition at line 41 of file MdcSWire.h.

41{ return rMid() * cos(phi()); }

Referenced by print(), printInfo(), and MdcLayer::xWire().

◆ xWest()

double MdcSWire::xWest ( void  ) const
inline

Definition at line 38 of file MdcSWire.h.

38{ return _west.x(); }

Referenced by print().

◆ xWireDC()

double MdcSWire::xWireDC ( double  z) const
inline

Definition at line 61 of file MdcSWire.h.

61{ return radiusDC(z)*cos(phiDC(z)); }

Referenced by MdcUtilitySvc::docaPatPar(), print(), MdcHit::x(), and yAxis().

◆ yAxis()

Hep3Vector MdcSWire::yAxis ( double  z = 0.)

Definition at line 20 of file MdcSWire.cxx.

21{
22 Hep3Vector vec( xWireDC(z), yWireDC(z), z);
23 return vec.unit();
24}

◆ yEast()

double MdcSWire::yEast ( void  ) const
inline

Definition at line 36 of file MdcSWire.h.

36{ return _east.y(); }

Referenced by MdcSWire(), and print().

◆ yMid()

double MdcSWire::yMid ( void  ) const
inline

Definition at line 42 of file MdcSWire.h.

42{ return rMid() * sin(phi()); }

Referenced by print(), printInfo(), and MdcLayer::yWire().

◆ yWest()

double MdcSWire::yWest ( void  ) const
inline

Definition at line 39 of file MdcSWire.h.

39{ return _west.y(); }

Referenced by print().

◆ yWireDC()

double MdcSWire::yWireDC ( double  z) const
inline

Definition at line 62 of file MdcSWire.h.

62{ return radiusDC(z)*sin(phiDC(z)); }

Referenced by MdcUtilitySvc::docaPatPar(), print(), MdcHit::y(), and yAxis().

◆ zAxis()

const Hep3Vector & MdcSWire::zAxis ( void  ) const
inline

Definition at line 68 of file MdcSWire.h.

68{ return _traj.rawDirection(); }

Referenced by MdcSegInfoSterO::zPosition().

◆ zEast()

double MdcSWire::zEast ( void  ) const
inline

Definition at line 37 of file MdcSWire.h.

37{ return _east.z(); }

Referenced by print().

◆ zEndDC()

double MdcSWire::zEndDC ( void  ) const
inline

Definition at line 49 of file MdcSWire.h.

49{ return 0.5*zLength(); }

Referenced by MdcUtilitySvc::docaPatPar(), MdcLayer::MdcLayer(), print(), and radiusDC().

◆ zLength()

double MdcSWire::zLength ( void  ) const
inline

Definition at line 47 of file MdcSWire.h.

47{ return getEastPoint()->z()- getWestPoint()->z(); }

Referenced by print(), printInfo(), stereo(), zEndDC(), and MdcLayer::zLength().

◆ zWest()

double MdcSWire::zWest ( void  ) const
inline

Definition at line 40 of file MdcSWire.h.

40{ return _west.z(); }

Referenced by print().

Friends And Related Function Documentation

◆ MdcLayer

friend class MdcLayer
friend

Definition at line 78 of file MdcSWire.h.


The documentation for this class was generated from the following files: