BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MucRec3DRoad Class Reference

#include <MucRec3DRoad.h>

Inheritance diagram for MucRec3DRoad:

Public Member Functions

 MucRec3DRoad (MucRec2DRoad *road0, MucRec2DRoad *road1)
 Constructor.
MucRec3DRoadoperator= (const MucRec3DRoad &orig)
 Assignment constructor.
 MucRec3DRoad (const MucRec3DRoad &source)
 Copy constructor.
 ~MucRec3DRoad ()
 Destructor.
void SetIndex (const int &index)
 set the index for this road
void SetGroup (const int &Group)
 set the group index for this road
void SetSimpleFitParams (const float &m_SlopeZX, const float &m_InterceptZX, const float &m_SlopeZY, const float &m_InterceptZY)
 set the fit parameters : slope and intercept for XZ and YZ.
int RefitNoCurrentGap (const int &gap, float &slopeZX, float &interceptZX, float &slopeZY, float &interceptZY)
 refit the 3D road without the assigned gap
vector< IdentifierProjectToStrip (const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection)
vector< IdentifierProjectToStrip (const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection, vector< int > &padID, vector< float > &intersect_x, vector< float > &intersect_y, vector< float > &intersect_z)
void ProjectWithSigma (const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ)
 Where does the trajectory of this road intersect a specific gap?
void ProjectNoCurrentGap (const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ, float &quad_x1, float &quad_y1, float &quad_z1, float &quad_x2, float &quad_y2, float &quad_z2)
void Project (const int &gap, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2)
 Where does the trajectory of this road intersect two surfaces of a specific gap?
void Project (const int &gap, const float zx, const float x0, const float zy, const float y0, float &x1, float &y1, float &z1)
 project with assigned pos and dir
void TransformPhiRToXY (const float &vk, const float &vr, const float &k0, const float &r0, float &vx, float &vy, float &x0, float &y0) const
 Where does the trajectory of this road intersect the reference plane?
float GetVxSign (const float vk) const
 Get sign of vx in TransformPhiRToXY.
int GetIndex () const
 A unique identifier for this road in the current event.
int GetPart () const
 In which part was this road found?
int GetSeg () const
 In which segment was this road found?
int GetGroup () const
 unique index of group this road belongs to
int GetLastGap () const
 Which gap is the last one with hits attached to this road?
int GetNGapsWithHits () const
 How many gaps provide hits attached to this road?
int GetTotalHits () const
 How many hits in all does this road contain?
int GetHitsPerGap (const int &gap) const
 How many hits per gap does this road contain?
int GetMaxHitsPerGap () const
 How many hits were attached in the gap with the most attached hits?
bool HasHitInGap (const int &gap) const
 Does this road contain any hits in the given segment?
int GetNSharedHits (const MucRec3DRoad *road) const
 How many hits do two roads share?
int GetLastGapDelta () const
 Difference between the last gap in the two 1-D roads.
int GetTotalHitsDelta () const
 Difference between the number of hits in the two 1-D roads.
int GetDegreesOfFreedom () const
 How many degrees of freedom in the trajectory fit?
float GetReducedChiSquare () const
 Chi-square parameter (per degree of freedom) of the trajectory fit.
float GetSlopeZX () const
 Get Z-X dimension slope.
float GetInterceptZX () const
 Get Z-X dimension intercept.
float GetSlopeZY () const
 Get Z-Y dimension slope.
float GetInterceptZY () const
 Get Z-Y dimension intercept.
MucRecHitGetHit (const int &gap) const
 Get a pointer to the first hit attached in a particular gap.
MucRec2DRoadGet2DRoad (const int &orient=0) const
 Is the intersection of a pair of H and V clusters inside a panel?
vector< IdentifierGetHitsID () const
 Get indices of all hits in the road.
void PrintHitsInfo ()
 Print Hits Infomation.
 MucRec3DRoad (MucRec2DRoad *road0, MucRec2DRoad *road1)
 Constructor.
MucRec3DRoadoperator= (const MucRec3DRoad &orig)
 Assignment constructor.
 MucRec3DRoad (const MucRec3DRoad &source)
 Copy constructor.
 ~MucRec3DRoad ()
 Destructor.
void SetIndex (const int &index)
 set the index for this road
void SetGroup (const int &Group)
 set the group index for this road
void SetSimpleFitParams (const float &m_SlopeZX, const float &m_InterceptZX, const float &m_SlopeZY, const float &m_InterceptZY)
 set the fit parameters : slope and intercept for XZ and YZ.
int RefitNoCurrentGap (const int &gap, float &slopeZX, float &interceptZX, float &slopeZY, float &interceptZY)
 refit the 3D road without the assigned gap
vector< IdentifierProjectToStrip (const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection)
vector< IdentifierProjectToStrip (const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection, vector< int > &padID, vector< float > &intersect_x, vector< float > &intersect_y, vector< float > &intersect_z)
void ProjectWithSigma (const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ)
 Where does the trajectory of this road intersect a specific gap?
void ProjectNoCurrentGap (const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ, float &quad_x1, float &quad_y1, float &quad_z1, float &quad_x2, float &quad_y2, float &quad_z2)
void Project (const int &gap, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2)
 Where does the trajectory of this road intersect two surfaces of a specific gap?
void Project (const int &gap, const float zx, const float x0, const float zy, const float y0, float &x1, float &y1, float &z1)
 project with assigned pos and dir
void TransformPhiRToXY (const float &vk, const float &vr, const float &k0, const float &r0, float &vx, float &vy, float &x0, float &y0) const
 Where does the trajectory of this road intersect the reference plane?
float GetVxSign (const float vk) const
 Get sign of vx in TransformPhiRToXY.
int GetIndex () const
 A unique identifier for this road in the current event.
int GetPart () const
 In which part was this road found?
int GetSeg () const
 In which segment was this road found?
int GetGroup () const
 unique index of group this road belongs to
int GetLastGap () const
 Which gap is the last one with hits attached to this road?
int GetNGapsWithHits () const
 How many gaps provide hits attached to this road?
int GetTotalHits () const
 How many hits in all does this road contain?
int GetHitsPerGap (const int &gap) const
 How many hits per gap does this road contain?
int GetMaxHitsPerGap () const
 How many hits were attached in the gap with the most attached hits?
bool HasHitInGap (const int &gap) const
 Does this road contain any hits in the given segment?
int GetNSharedHits (const MucRec3DRoad *road) const
 How many hits do two roads share?
int GetLastGapDelta () const
 Difference between the last gap in the two 1-D roads.
int GetTotalHitsDelta () const
 Difference between the number of hits in the two 1-D roads.
int GetDegreesOfFreedom () const
 How many degrees of freedom in the trajectory fit?
float GetReducedChiSquare () const
 Chi-square parameter (per degree of freedom) of the trajectory fit.
float GetSlopeZX () const
 Get Z-X dimension slope.
float GetInterceptZX () const
 Get Z-X dimension intercept.
float GetSlopeZY () const
 Get Z-Y dimension slope.
float GetInterceptZY () const
 Get Z-Y dimension intercept.
MucRecHitGetHit (const int &gap) const
 Get a pointer to the first hit attached in a particular gap.
MucRec2DRoadGet2DRoad (const int &orient=0) const
 Is the intersection of a pair of H and V clusters inside a panel?
vector< IdentifierGetHitsID () const
 Get indices of all hits in the road.
void PrintHitsInfo ()
 Print Hits Infomation.
 MucRec3DRoad (MucRec2DRoad *road0, MucRec2DRoad *road1)
 Constructor.
MucRec3DRoadoperator= (const MucRec3DRoad &orig)
 Assignment constructor.
 MucRec3DRoad (const MucRec3DRoad &source)
 Copy constructor.
 ~MucRec3DRoad ()
 Destructor.
void SetIndex (const int &index)
 set the index for this road
void SetGroup (const int &Group)
 set the group index for this road
void SetSimpleFitParams (const float &m_SlopeZX, const float &m_InterceptZX, const float &m_SlopeZY, const float &m_InterceptZY)
 set the fit parameters : slope and intercept for XZ and YZ.
int RefitNoCurrentGap (const int &gap, float &slopeZX, float &interceptZX, float &slopeZY, float &interceptZY)
 refit the 3D road without the assigned gap
vector< IdentifierProjectToStrip (const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection)
vector< IdentifierProjectToStrip (const int &part, const int &gap, const HepPoint3D &gPoint, const Hep3Vector &gDirection, vector< int > &padID, vector< float > &intersect_x, vector< float > &intersect_y, vector< float > &intersect_z)
void ProjectWithSigma (const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ)
 Where does the trajectory of this road intersect a specific gap?
void ProjectNoCurrentGap (const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ, float &quad_x1, float &quad_y1, float &quad_z1, float &quad_x2, float &quad_y2, float &quad_z2)
void Project (const int &gap, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2)
 Where does the trajectory of this road intersect two surfaces of a specific gap?
void Project (const int &gap, const float zx, const float x0, const float zy, const float y0, float &x1, float &y1, float &z1)
 project with assigned pos and dir
void TransformPhiRToXY (const float &vk, const float &vr, const float &k0, const float &r0, float &vx, float &vy, float &x0, float &y0) const
 Where does the trajectory of this road intersect the reference plane?
float GetVxSign (const float vk) const
 Get sign of vx in TransformPhiRToXY.
int GetIndex () const
 A unique identifier for this road in the current event.
int GetPart () const
 In which part was this road found?
int GetSeg () const
 In which segment was this road found?
int GetGroup () const
 unique index of group this road belongs to
int GetLastGap () const
 Which gap is the last one with hits attached to this road?
int GetNGapsWithHits () const
 How many gaps provide hits attached to this road?
int GetTotalHits () const
 How many hits in all does this road contain?
int GetHitsPerGap (const int &gap) const
 How many hits per gap does this road contain?
int GetMaxHitsPerGap () const
 How many hits were attached in the gap with the most attached hits?
bool HasHitInGap (const int &gap) const
 Does this road contain any hits in the given segment?
int GetNSharedHits (const MucRec3DRoad *road) const
 How many hits do two roads share?
int GetLastGapDelta () const
 Difference between the last gap in the two 1-D roads.
int GetTotalHitsDelta () const
 Difference between the number of hits in the two 1-D roads.
int GetDegreesOfFreedom () const
 How many degrees of freedom in the trajectory fit?
float GetReducedChiSquare () const
 Chi-square parameter (per degree of freedom) of the trajectory fit.
float GetSlopeZX () const
 Get Z-X dimension slope.
float GetInterceptZX () const
 Get Z-X dimension intercept.
float GetSlopeZY () const
 Get Z-Y dimension slope.
float GetInterceptZY () const
 Get Z-Y dimension intercept.
MucRecHitGetHit (const int &gap) const
 Get a pointer to the first hit attached in a particular gap.
MucRec2DRoadGet2DRoad (const int &orient=0) const
 Is the intersection of a pair of H and V clusters inside a panel?
vector< IdentifierGetHitsID () const
 Get indices of all hits in the road.
void PrintHitsInfo ()
 Print Hits Infomation.

Detailed Description

Describes a road found in the muon chamber.

A 3Droad is a set of hits in muon chamber strips that we expect to be associated with a single particle traversing the muon chamber. (Roads are found by the MucRecRoadFinder class.) Methods include adding hits, calculating and retrieving the trajectory indicated by the hits, projecting along the trajectory to an arbitrary gap, etc.

Author
Zhengyun You \URL{youzy.nosp@m.@hep.nosp@m..pku..nosp@m.cn}

Definition at line 35 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucRecEvent/MucRec3DRoad.h.

Constructor & Destructor Documentation

◆ MucRec3DRoad() [1/6]

MucRec3DRoad::MucRec3DRoad ( MucRec2DRoad * road0,
MucRec2DRoad * road1 )

Constructor.

Definition at line 26 of file MucRec3DRoad.cxx.

27 : m_Road0( road0 )
28 , m_Road1( road1 )
29 , m_Index( -1 )
30 , m_Part( road0->GetPart() )
31 , m_Seg( road0->GetSeg() )
32 , m_LastGap( 0 )
33 , m_Group( -1 ) {
34 float x, y, z;
35 road0->GetVertexPos( x, y, z );
36 m_VertexPos.setX( x );
37 m_VertexPos.setY( y );
38 m_VertexPos.setZ( z );
39
40 // If the part numbers don't match, something is seriously wrong!
41 if ( ( road1->GetPart() != m_Part ) || ( road1->GetSeg() != m_Seg ) )
42 {
43 cout << "MucRec3DRoad(ctor)-E1 mismatched 2D roads:"
44 << " x part = " << road0->GetPart() << " seg = " << road0->GetSeg() << endl
45 << " y part = " << road1->GetPart() << " seg = " << road1->GetSeg() << endl;
46 m_Part = -1;
47 m_Seg = -1;
48 }
49
50 // Compute the last-gap parameter; take the deeper of the 1D roads.
51 if ( road1->GetLastGap() > road0->GetLastGap() ) { m_LastGap = road1->GetLastGap(); }
52 else { m_LastGap = road0->GetLastGap(); }
53
54 // Check that the two 1D roads have clusters in the same panels.
55 // FIXME: logic needs more thought!
56
57 // Calculate the chi-square and number of degrees of freedom of the
58 // 2-D trajectory (use the "simple" fits).
59 // FIXME: Can we calc. chi-square without brute force?
60
61 m_DOF = m_Road0->GetDegreesOfFreedom() + m_Road1->GetDegreesOfFreedom();
62 m_Chi2 = 0.0;
63
64 for ( int gap = 0; gap < (int)MucID::getGapMax(); gap++ )
65 {
66 MucRecHit* hit;
67 float dist, sigma;
68 hit = m_Road0->GetHit( gap );
69 if ( hit )
70 {
71 if ( hit->Part() == 1 ) sigma = hit->GetCenterSigma().y(); // ???
72 else sigma = hit->GetCenterSigma().y();
73
74 dist = m_Road0->GetHitDistance( hit ) / sigma;
75 m_Chi2 += dist * dist;
76 // cout<<"in MucRec3DRoad dist1="<<dist<<" hitdis "<<dist*sigma<<" sigma="<<sigma<<"
77 // chi2="<<m_Chi2<<endl;
78 }
79
80 hit = m_Road1->GetHit( gap );
81 if ( hit )
82 {
83 if ( hit->Part() == 1 )
84 {
85 // sigma = fabs(sqrt( (hit->GetCenterSigma().x())*(hit->GetCenterSigma().x())
86 // + (hit->GetCenterSigma().y())*(hit->GetCenterSigma().y()) ));
87 sigma = hit->GetCenterSigma().x();
88 }
89 else { sigma = hit->GetCenterSigma().x(); }
90 dist = m_Road1->GetHitDistance( hit ) / sigma;
91 m_Chi2 += dist * dist;
92 // cout<<"in MucRec3DRoad dist2="<<dist<<" hitdis "<<dist*sigma<<" sigma="<<sigma<<"
93 // chi2="<<m_Chi2<<endl;
94 }
95 }
96}
Double_t x[10]
static value_type getGapMax()
Definition MucID.cxx:165
void GetVertexPos(float &x, float &y, float &z) const
Position of the vertex point.
int GetLastGap() const
Which gap is the last one with hits attached to this road?
int GetPart() const
In which part was this road found?
int GetSeg() const
In which segment was this road found?
Hep3Vector GetCenterSigma() const
Get Center position uncertainty of the strip (global coords).
Definition MucRecHit.cxx:99

Referenced by GetNSharedHits(), MucRec3DRoad(), and operator=().

◆ MucRec3DRoad() [2/6]

MucRec3DRoad::MucRec3DRoad ( const MucRec3DRoad & source)

Copy constructor.

Definition at line 99 of file MucRec3DRoad.cxx.

100 : m_VertexPos( source.m_VertexPos )
101 , m_VertexSigma( source.m_VertexSigma )
102 , m_Road0( source.m_Road0 )
103 , m_Road1( source.m_Road1 )
104 , m_Index( source.m_Index )
105 , m_Part( source.m_Part )
106 , m_Seg( source.m_Seg )
107 , m_LastGap( source.m_LastGap )
108 , m_Chi2( source.m_Chi2 )
109 , m_DOF( source.m_DOF )
110 , m_Group( source.m_Group ) {}

◆ ~MucRec3DRoad() [1/3]

MucRec3DRoad::~MucRec3DRoad ( )

Destructor.

Definition at line 113 of file MucRec3DRoad.cxx.

113 {
114 // The 3D road objects do not "own" 2D objects, so don't delete them
115 // here!
116}

◆ MucRec3DRoad() [3/6]

MucRec3DRoad::MucRec3DRoad ( MucRec2DRoad * road0,
MucRec2DRoad * road1 )

Constructor.

◆ MucRec3DRoad() [4/6]

MucRec3DRoad::MucRec3DRoad ( const MucRec3DRoad & source)

Copy constructor.

◆ ~MucRec3DRoad() [2/3]

MucRec3DRoad::~MucRec3DRoad ( )

Destructor.

◆ MucRec3DRoad() [5/6]

MucRec3DRoad::MucRec3DRoad ( MucRec2DRoad * road0,
MucRec2DRoad * road1 )

Constructor.

◆ MucRec3DRoad() [6/6]

MucRec3DRoad::MucRec3DRoad ( const MucRec3DRoad & source)

Copy constructor.

◆ ~MucRec3DRoad() [3/3]

MucRec3DRoad::~MucRec3DRoad ( )

Destructor.

Member Function Documentation

◆ Get2DRoad() [1/3]

MucRec2DRoad * MucRec3DRoad::Get2DRoad ( const int & orient = 0) const

Is the intersection of a pair of H and V clusters inside a panel?

get a pointer to the 2D road in the 3D road.

Definition at line 617 of file MucRec3DRoad.cxx.

617 {
618 if ( orient == 0 ) { return m_Road0; }
619 else { return m_Road1; }
620}

Referenced by GetNSharedHits().

◆ Get2DRoad() [2/3]

MucRec2DRoad * MucRec3DRoad::Get2DRoad ( const int & orient = 0) const

Is the intersection of a pair of H and V clusters inside a panel?

get a pointer to the 2D road in the 3D road.

◆ Get2DRoad() [3/3]

MucRec2DRoad * MucRec3DRoad::Get2DRoad ( const int & orient = 0) const

Is the intersection of a pair of H and V clusters inside a panel?

get a pointer to the 2D road in the 3D road.

◆ GetDegreesOfFreedom() [1/3]

int MucRec3DRoad::GetDegreesOfFreedom ( ) const

How many degrees of freedom in the trajectory fit?

Definition at line 220 of file MucRec3DRoad.cxx.

220{ return m_DOF; }

Referenced by MucRecRoadFinder::execute(), and RecMucTrack::LineFit().

◆ GetDegreesOfFreedom() [2/3]

int MucRec3DRoad::GetDegreesOfFreedom ( ) const

How many degrees of freedom in the trajectory fit?

◆ GetDegreesOfFreedom() [3/3]

int MucRec3DRoad::GetDegreesOfFreedom ( ) const

How many degrees of freedom in the trajectory fit?

◆ GetGroup() [1/3]

int MucRec3DRoad::GetGroup ( ) const

unique index of group this road belongs to

Definition at line 141 of file MucRec3DRoad.cxx.

141{ return m_Group; }

◆ GetGroup() [2/3]

int MucRec3DRoad::GetGroup ( ) const

unique index of group this road belongs to

◆ GetGroup() [3/3]

int MucRec3DRoad::GetGroup ( ) const

unique index of group this road belongs to

◆ GetHit() [1/3]

MucRecHit * MucRec3DRoad::GetHit ( const int & gap) const

Get a pointer to the first hit attached in a particular gap.

Definition at line 245 of file MucRec3DRoad.cxx.

245 {
246 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
247 {
248 cout << "MucRec3DRoad::GetHit-E1 invalid gap = " << gap << endl;
249 return 0;
250 }
251
252 if ( m_Road0->GetHit( gap ) ) { return m_Road0->GetHit( gap ); }
253 else
254 {
255 if ( m_Road1->GetHit( gap ) ) { return m_Road1->GetHit( gap ); }
256 }
257 return 0;
258}

◆ GetHit() [2/3]

MucRecHit * MucRec3DRoad::GetHit ( const int & gap) const

Get a pointer to the first hit attached in a particular gap.

◆ GetHit() [3/3]

MucRecHit * MucRec3DRoad::GetHit ( const int & gap) const

Get a pointer to the first hit attached in a particular gap.

◆ GetHitsID() [1/3]

vector< Identifier > MucRec3DRoad::GetHitsID ( ) const

Get indices of all hits in the road.

Definition at line 623 of file MucRec3DRoad.cxx.

625{
626 vector<Identifier> idCon;
627 vector<Identifier>::iterator hit;
628 vector<Identifier> hitRoad0 = m_Road0->GetHitsID();
629 vector<Identifier> hitRoad1 = m_Road1->GetHitsID();
630
631 // List will be ordered by orientation.
632
633 // Road0 first ...
634 for ( hit = hitRoad0.begin(); hit != hitRoad0.end(); hit++ )
635 {
636 int index = *hit;
637 idCon.push_back( *hit );
638 // cout << " MucRec3DRoad::HitIndices Road0 = " << index << endl;
639 }
640
641 // ... then Road1.
642 for ( hit = hitRoad1.begin(); hit != hitRoad1.end(); hit++ )
643 {
644 int index = *hit;
645 idCon.push_back( *hit );
646 // cout << " MucRec3DRoad::HitIndices Road1 = " << index << endl;
647 }
648
649 return idCon;
650}

◆ GetHitsID() [2/3]

vector< Identifier > MucRec3DRoad::GetHitsID ( ) const

Get indices of all hits in the road.

◆ GetHitsID() [3/3]

vector< Identifier > MucRec3DRoad::GetHitsID ( ) const

Get indices of all hits in the road.

◆ GetHitsPerGap() [1/3]

int MucRec3DRoad::GetHitsPerGap ( const int & gap) const

How many hits per gap does this road contain?

Definition at line 169 of file MucRec3DRoad.cxx.

169 {
170 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
171 {
172 cout << "MucRec3DRoad::HitsPerGap-E1 invalid gap = " << gap << endl;
173 return 0;
174 }
175
176 return ( m_Road0->GetHitsPerGap( gap ) + m_Road1->GetHitsPerGap( gap ) );
177}

◆ GetHitsPerGap() [2/3]

int MucRec3DRoad::GetHitsPerGap ( const int & gap) const

How many hits per gap does this road contain?

◆ GetHitsPerGap() [3/3]

int MucRec3DRoad::GetHitsPerGap ( const int & gap) const

How many hits per gap does this road contain?

◆ GetIndex() [1/3]

int MucRec3DRoad::GetIndex ( ) const

A unique identifier for this road in the current event.

Definition at line 138 of file MucRec3DRoad.cxx.

138{ return m_Index; }

◆ GetIndex() [2/3]

int MucRec3DRoad::GetIndex ( ) const

A unique identifier for this road in the current event.

◆ GetIndex() [3/3]

int MucRec3DRoad::GetIndex ( ) const

A unique identifier for this road in the current event.

◆ GetInterceptZX() [1/3]

float MucRec3DRoad::GetInterceptZX ( ) const

Get Z-X dimension intercept.

Definition at line 236 of file MucRec3DRoad.cxx.

236{ return m_InterceptZX; }

Referenced by MucRecRoadFinder::execute().

◆ GetInterceptZX() [2/3]

float MucRec3DRoad::GetInterceptZX ( ) const

Get Z-X dimension intercept.

◆ GetInterceptZX() [3/3]

float MucRec3DRoad::GetInterceptZX ( ) const

Get Z-X dimension intercept.

◆ GetInterceptZY() [1/3]

float MucRec3DRoad::GetInterceptZY ( ) const

Get Z-Y dimension intercept.

Definition at line 242 of file MucRec3DRoad.cxx.

242{ return m_InterceptZY; }

Referenced by MucRecRoadFinder::execute().

◆ GetInterceptZY() [2/3]

float MucRec3DRoad::GetInterceptZY ( ) const

Get Z-Y dimension intercept.

◆ GetInterceptZY() [3/3]

float MucRec3DRoad::GetInterceptZY ( ) const

Get Z-Y dimension intercept.

◆ GetLastGap() [1/3]

int MucRec3DRoad::GetLastGap ( ) const

Which gap is the last one with hits attached to this road?

Definition at line 150 of file MucRec3DRoad.cxx.

150{ return m_LastGap; }

Referenced by MucRecRoadFinder::execute().

◆ GetLastGap() [2/3]

int MucRec3DRoad::GetLastGap ( ) const

Which gap is the last one with hits attached to this road?

◆ GetLastGap() [3/3]

int MucRec3DRoad::GetLastGap ( ) const

Which gap is the last one with hits attached to this road?

◆ GetLastGapDelta() [1/3]

int MucRec3DRoad::GetLastGapDelta ( ) const

Difference between the last gap in the two 1-D roads.

Definition at line 210 of file MucRec3DRoad.cxx.

210 {
211 return abs( m_Road0->GetLastGap() - m_Road1->GetLastGap() );
212}

Referenced by MucRecRoadFinder::execute().

◆ GetLastGapDelta() [2/3]

int MucRec3DRoad::GetLastGapDelta ( ) const

Difference between the last gap in the two 1-D roads.

◆ GetLastGapDelta() [3/3]

int MucRec3DRoad::GetLastGapDelta ( ) const

Difference between the last gap in the two 1-D roads.

◆ GetMaxHitsPerGap() [1/3]

int MucRec3DRoad::GetMaxHitsPerGap ( ) const

How many hits were attached in the gap with the most attached hits?

Definition at line 180 of file MucRec3DRoad.cxx.

180 {
181 int nHit0 = m_Road0->GetMaxHitsPerGap();
182 int nHit1 = m_Road1->GetMaxHitsPerGap();
183 if ( nHit0 > nHit1 ) { return nHit0; }
184 else { return nHit1; }
185}

Referenced by MucRecRoadFinder::execute().

◆ GetMaxHitsPerGap() [2/3]

int MucRec3DRoad::GetMaxHitsPerGap ( ) const

How many hits were attached in the gap with the most attached hits?

◆ GetMaxHitsPerGap() [3/3]

int MucRec3DRoad::GetMaxHitsPerGap ( ) const

How many hits were attached in the gap with the most attached hits?

◆ GetNGapsWithHits() [1/3]

int MucRec3DRoad::GetNGapsWithHits ( ) const

How many gaps provide hits attached to this road?

Definition at line 153 of file MucRec3DRoad.cxx.

153 {
154 int count = 0;
155 for ( int gap = 0; gap < (int)MucID::getGapMax(); gap++ )
156 {
157 if ( ( m_Road0->GetHitsPerGap( gap ) > 0 ) || ( m_Road1->GetHitsPerGap( gap ) > 0 ) )
158 { count++; }
159 }
160 return count;
161}
DOUBLE_PRECISION count[3]

Referenced by MucRecRoadFinder::execute().

◆ GetNGapsWithHits() [2/3]

int MucRec3DRoad::GetNGapsWithHits ( ) const

How many gaps provide hits attached to this road?

◆ GetNGapsWithHits() [3/3]

int MucRec3DRoad::GetNGapsWithHits ( ) const

How many gaps provide hits attached to this road?

◆ GetNSharedHits() [1/3]

int MucRec3DRoad::GetNSharedHits ( const MucRec3DRoad * road) const

How many hits do two roads share?

Definition at line 199 of file MucRec3DRoad.cxx.

199 {
200 if ( !road ) { return 0; }
201
202 int count = 0;
203 count += m_Road0->GetNSharedHits( road->Get2DRoad( int( 0 ) ) );
204 count += m_Road1->GetNSharedHits( road->Get2DRoad( int( 1 ) ) );
205
206 return count;
207}
MucRec2DRoad * Get2DRoad(const int &orient=0) const
Is the intersection of a pair of H and V clusters inside a panel?

◆ GetNSharedHits() [2/3]

int MucRec3DRoad::GetNSharedHits ( const MucRec3DRoad * road) const

How many hits do two roads share?

◆ GetNSharedHits() [3/3]

int MucRec3DRoad::GetNSharedHits ( const MucRec3DRoad * road) const

How many hits do two roads share?

◆ GetPart() [1/3]

int MucRec3DRoad::GetPart ( ) const

In which part was this road found?

Definition at line 144 of file MucRec3DRoad.cxx.

144{ return m_Part; }

Referenced by MucRecRoadFinder::execute(), RecMucTrack::LineFit(), and MucRec3DRoad().

◆ GetPart() [2/3]

int MucRec3DRoad::GetPart ( ) const

In which part was this road found?

◆ GetPart() [3/3]

int MucRec3DRoad::GetPart ( ) const

In which part was this road found?

◆ GetReducedChiSquare() [1/3]

float MucRec3DRoad::GetReducedChiSquare ( ) const

Chi-square parameter (per degree of freedom) of the trajectory fit.

Definition at line 223 of file MucRec3DRoad.cxx.

223 {
224 if ( m_DOF < 0 ) { return -1.0; }
225 else
226 {
227 if ( m_DOF == 0 ) { return 0.0; }
228 else { return ( m_Chi2 / m_DOF ); }
229 }
230}

Referenced by MucRecRoadFinder::execute(), and RecMucTrack::LineFit().

◆ GetReducedChiSquare() [2/3]

float MucRec3DRoad::GetReducedChiSquare ( ) const

Chi-square parameter (per degree of freedom) of the trajectory fit.

◆ GetReducedChiSquare() [3/3]

float MucRec3DRoad::GetReducedChiSquare ( ) const

Chi-square parameter (per degree of freedom) of the trajectory fit.

◆ GetSeg() [1/3]

int MucRec3DRoad::GetSeg ( ) const

In which segment was this road found?

Definition at line 147 of file MucRec3DRoad.cxx.

147{ return m_Seg; }

Referenced by MucRecRoadFinder::execute(), and MucRec3DRoad().

◆ GetSeg() [2/3]

int MucRec3DRoad::GetSeg ( ) const

In which segment was this road found?

◆ GetSeg() [3/3]

int MucRec3DRoad::GetSeg ( ) const

In which segment was this road found?

◆ GetSlopeZX() [1/3]

float MucRec3DRoad::GetSlopeZX ( ) const

Get Z-X dimension slope.

Definition at line 233 of file MucRec3DRoad.cxx.

233{ return m_SlopeZX; }

Referenced by MucRecRoadFinder::execute(), and RecMucTrack::LineFit().

◆ GetSlopeZX() [2/3]

float MucRec3DRoad::GetSlopeZX ( ) const

Get Z-X dimension slope.

◆ GetSlopeZX() [3/3]

float MucRec3DRoad::GetSlopeZX ( ) const

Get Z-X dimension slope.

◆ GetSlopeZY() [1/3]

float MucRec3DRoad::GetSlopeZY ( ) const

Get Z-Y dimension slope.

Definition at line 239 of file MucRec3DRoad.cxx.

239{ return m_SlopeZY; }

Referenced by MucRecRoadFinder::execute(), and RecMucTrack::LineFit().

◆ GetSlopeZY() [2/3]

float MucRec3DRoad::GetSlopeZY ( ) const

Get Z-Y dimension slope.

◆ GetSlopeZY() [3/3]

float MucRec3DRoad::GetSlopeZY ( ) const

Get Z-Y dimension slope.

◆ GetTotalHits() [1/3]

int MucRec3DRoad::GetTotalHits ( ) const

How many hits in all does this road contain?

Definition at line 164 of file MucRec3DRoad.cxx.

164 {
165 return ( m_Road0->GetTotalHits() + m_Road1->GetTotalHits() );
166}

Referenced by MucRecRoadFinder::execute().

◆ GetTotalHits() [2/3]

int MucRec3DRoad::GetTotalHits ( ) const

How many hits in all does this road contain?

◆ GetTotalHits() [3/3]

int MucRec3DRoad::GetTotalHits ( ) const

How many hits in all does this road contain?

◆ GetTotalHitsDelta() [1/3]

int MucRec3DRoad::GetTotalHitsDelta ( ) const

Difference between the number of hits in the two 1-D roads.

Definition at line 215 of file MucRec3DRoad.cxx.

215 {
216 return abs( m_Road0->GetTotalHits() - m_Road1->GetTotalHits() );
217}

Referenced by MucRecRoadFinder::execute().

◆ GetTotalHitsDelta() [2/3]

int MucRec3DRoad::GetTotalHitsDelta ( ) const

Difference between the number of hits in the two 1-D roads.

◆ GetTotalHitsDelta() [3/3]

int MucRec3DRoad::GetTotalHitsDelta ( ) const

Difference between the number of hits in the two 1-D roads.

◆ GetVxSign() [1/3]

float MucRec3DRoad::GetVxSign ( const float vk) const

Get sign of vx in TransformPhiRToXY.

Definition at line 720 of file MucRec3DRoad.cxx.

720 {
721 float segmentPhiMin = 0.25 * kPi * ( m_Seg - 2 );
722 float segmentPhiMax = 0.25 * kPi * ( m_Seg + 2 );
723 if ( m_Seg > 4 )
724 {
725 segmentPhiMin -= 2.0 * kPi;
726 segmentPhiMax -= 2.0 * kPi;
727 }
728
729 // vk = tan(theta); theta = atan(vk); -90<theta<90
730 float theta = atan( vk );
731 if ( theta >= segmentPhiMin && theta <= segmentPhiMax ) return 1.0;
732 else return -1.0;
733}

Referenced by TransformPhiRToXY().

◆ GetVxSign() [2/3]

float MucRec3DRoad::GetVxSign ( const float vk) const

Get sign of vx in TransformPhiRToXY.

◆ GetVxSign() [3/3]

float MucRec3DRoad::GetVxSign ( const float vk) const

Get sign of vx in TransformPhiRToXY.

◆ HasHitInGap() [1/3]

bool MucRec3DRoad::HasHitInGap ( const int & gap) const

Does this road contain any hits in the given segment?

Definition at line 188 of file MucRec3DRoad.cxx.

188 {
189 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
190 {
191 cout << "MucRec3DRoad::HasHitInGap-E2 invalid gap = " << gap << endl;
192 return false;
193 }
194
195 return ( m_Road0->HasHitInGap( gap ) || m_Road1->HasHitInGap( gap ) );
196}

◆ HasHitInGap() [2/3]

bool MucRec3DRoad::HasHitInGap ( const int & gap) const

Does this road contain any hits in the given segment?

◆ HasHitInGap() [3/3]

bool MucRec3DRoad::HasHitInGap ( const int & gap) const

Does this road contain any hits in the given segment?

◆ operator=() [1/3]

MucRec3DRoad & MucRec3DRoad::operator= ( const MucRec3DRoad & orig)

Assignment constructor.

◆ operator=() [2/3]

MucRec3DRoad & MucRec3DRoad::operator= ( const MucRec3DRoad & orig)

Assignment constructor.

◆ operator=() [3/3]

MucRec3DRoad & MucRec3DRoad::operator= ( const MucRec3DRoad & orig)

Assignment constructor.

◆ PrintHitsInfo() [1/3]

void MucRec3DRoad::PrintHitsInfo ( )

Print Hits Infomation.

Definition at line 736 of file MucRec3DRoad.cxx.

736 {
737 m_Road0->PrintHitsInfo();
738 m_Road1->PrintHitsInfo();
739
740 cout << "Intersection with each gap : " << endl;
741 for ( int iGap = 0; iGap <= m_LastGap; iGap++ )
742 {
743 float x, y, z, sigmaX, sigmaY, sigmaZ;
744 ProjectWithSigma( iGap, x, y, z, sigmaX, sigmaY, sigmaZ );
745 cout << " gap " << iGap << " (" << x << ", " << y << ", " << z << ")" << endl;
746 }
747}
void ProjectWithSigma(const int &gap, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ)
Where does the trajectory of this road intersect a specific gap?

◆ PrintHitsInfo() [2/3]

void MucRec3DRoad::PrintHitsInfo ( )

Print Hits Infomation.

◆ PrintHitsInfo() [3/3]

void MucRec3DRoad::PrintHitsInfo ( )

Print Hits Infomation.

◆ Project() [1/6]

void MucRec3DRoad::Project ( const int & gap,
const float zx,
const float x0,
const float zy,
const float y0,
float & x1,
float & y1,
float & z1 )

project with assigned pos and dir

Definition at line 521 of file MucRec3DRoad.cxx.

522 {
523 float svx = 0, svy = 0, sx0 = 0, sy0 = 0;
524 float sigmaX, sigmaY, sigmaZ;
525 MucGeoGeneral::Instance()->FindIntersection( m_Part, m_Seg, gap, vx, vy, 1.0, x0, y0, 0.0,
526 svx, svy, 0.0, sx0, sy0, 0.0, x, y, z, sigmaX,
527 sigmaY, sigmaZ );
528}
static MucGeoGeneral * Instance()
Get a pointer to the single instance of MucGeoGeneral.
void FindIntersection(const int part, const int seg, const int gap, const float vx, const float vy, const float vz, const float x0, const float y0, const float z0, const float sigmaVx, const float sigmaVy, const float sigmaVz, const float sigmaX0, const float sigmaY0, const float sigmaZ0, float &x, float &y, float &z, float &sigmaX, float &sigmaY, float &sigmaZ)

◆ Project() [2/6]

void MucRec3DRoad::Project ( const int & gap,
const float zx,
const float x0,
const float zy,
const float y0,
float & x1,
float & y1,
float & z1 )

project with assigned pos and dir

◆ Project() [3/6]

void MucRec3DRoad::Project ( const int & gap,
const float zx,
const float x0,
const float zy,
const float y0,
float & x1,
float & y1,
float & z1 )

project with assigned pos and dir

◆ Project() [4/6]

void MucRec3DRoad::Project ( const int & gap,
float & x1,
float & y1,
float & z1,
float & x2,
float & y2,
float & z2 )

Where does the trajectory of this road intersect two surfaces of a specific gap?

Definition at line 532 of file MucRec3DRoad.cxx.

534{
535 float sigmaX1, sigmaY1, sigmaZ1;
536 float sigmaX2, sigmaY2, sigmaZ2;
537
538 x1 = 0.0;
539 sigmaX1 = 0.0;
540 y1 = 0.0;
541 sigmaY1 = 0.0;
542 z1 = 0.0;
543 sigmaZ1 = 0.0;
544 x2 = 0.0;
545 sigmaX2 = 0.0;
546 y2 = 0.0;
547 sigmaY2 = 0.0;
548 z2 = 0.0;
549 sigmaZ2 = 0.0;
550
551 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
552 {
553 cout << "MucRec3DRoad::Project-E1 invalid gap = " << gap << endl;
554 return;
555 }
556
557 float vx, vy, vk, vr;
558 float x0, y0, k0, r0;
559 float svx, svy, svk, svr;
560 float sx0, sy0, sk0, sr0;
561 int xdof, ydof;
562 float chi2x, chi2y;
563
564 // Determine the projection point of the "simple" fit to the desired gap.
565
566 if ( m_Part == 1 )
567 {
568 m_Road0->GetSimpleFitParams( vr, r0, svr, sr0, chi2x, xdof );
569 m_Road1->GetSimpleFitParams( vk, k0, svk, sk0, chi2y, ydof );
570 TransformPhiRToXY( vk, vr, k0, r0, vx, vy, x0, y0 );
571
572 // cout<<"in MucRec3DRoad after vx,vy"<<endl;
573 TransformPhiRToXY( svk, svr, sk0, sr0, svx, svy, sx0, sy0 );
574 }
575 else
576 {
577 m_Road0->GetSimpleFitParams( vy, y0, svy, sy0, chi2y, ydof );
578 m_Road1->GetSimpleFitParams( vx, x0, svx, sx0, chi2x, xdof );
579 }
580 /*
581 cout << " vr " << vr << " vk " << vk << endl;
582 cout << " r0 " << r0 << " k0 " << k0 << endl;
583 cout << " vx " << vx << " vy " << vy << endl;
584 cout << " x0 " << x0 << " y0 " << y0 << endl;
585 */
586
588 m_Part, m_Seg, gap, vx, vy, 1.0, x0, y0, 0.0, svx, svy, 0.0, sx0, sy0, 0.0, x1, y1, z1,
589 x2, y2, z2, sigmaX1, sigmaY1, sigmaZ1, sigmaX2, sigmaY2, sigmaZ2 );
590
591 float a, b, c;
592 float sa, sb, sc;
593 int whichhalf;
594 // cout<<"in MucRec3DRoad xyz form linefit "<<x1<<" "<<y1<<" "<<z1<<" "<<x2<<" "<<y2<<"
595 // "<<z2<<endl;
596
597 // if this trajectory is parabola!
598 int projectwithquad = 0;
599 if ( m_Part == 1 && projectwithquad )
600 {
601 m_Road1->GetSimpleFitParams( a, b, c, whichhalf, sa, sb, sc, chi2x, ydof );
602
603 // cout<<"in MucRec3DRoad "<<vy<<" "<<y0<<" "<<a<<" "<<b<<" "<<c<<endl;
604 if ( m_Road1->GetQuadFitOk() )
605 {
607 m_Part, m_Seg, gap, vy, x0, y0, 0.0, a, b, c, // y = a*x*x + b*x +c
608 whichhalf, svx, svy, 0.0, sx0, sy0, 0.0, x1, y1, z1, x2, y2, z2, sigmaX1, sigmaY1,
609 sigmaZ1 );
610 }
611 }
612
613 return;
614}
void FindIntersectionSurface(const int part, const int seg, const int gap, const float vx, const float vy, const float vz, const float x0, const float y0, const float z0, const float sigmaVx, const float sigmaVy, const float sigmaVz, const float sigmaX0, const float sigmaY0, const float sigmaZ0, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2, float &sigmaX1, float &sigmaY1, float &sigmaZ1, float &sigmaX2, float &sigmaY2, float &sigmaZ2)
void TransformPhiRToXY(const float &vk, const float &vr, const float &k0, const float &r0, float &vx, float &vy, float &x0, float &y0) const
Where does the trajectory of this road intersect the reference plane?

Referenced by RecMucTrack::LineFit().

◆ Project() [5/6]

void MucRec3DRoad::Project ( const int & gap,
float & x1,
float & y1,
float & z1,
float & x2,
float & y2,
float & z2 )

Where does the trajectory of this road intersect two surfaces of a specific gap?

◆ Project() [6/6]

void MucRec3DRoad::Project ( const int & gap,
float & x1,
float & y1,
float & z1,
float & x2,
float & y2,
float & z2 )

Where does the trajectory of this road intersect two surfaces of a specific gap?

◆ ProjectNoCurrentGap() [1/3]

void MucRec3DRoad::ProjectNoCurrentGap ( const int & gap,
float & x,
float & y,
float & z,
float & sigmaX,
float & sigmaY,
float & sigmaZ,
float & quad_x1,
float & quad_y1,
float & quad_z1,
float & quad_x2,
float & quad_y2,
float & quad_z2 )

Where does the trajectory of this road intersect a specific gap when refit without current gap!!!

if fabs(vr) too big, r0 will be intersection in x coordinate!!!

Definition at line 419 of file MucRec3DRoad.cxx.

422 {
423
424 x = 0.0;
425 sigmaX = 0.0;
426 y = 0.0;
427 sigmaY = 0.0;
428 z = 0.0;
429 sigmaZ = 0.0;
430
431 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
432 {
433 cout << "MucRec3DRoad::Project-E1 invalid gap = " << gap << endl;
434 return;
435 }
436
437 float vx, vy, vk, vr;
438 float x0, y0, k0, r0;
439 float svx, svy, svk, svr;
440 float sx0, sy0, sk0, sr0;
441 int xdof, ydof;
442 float chi2x, chi2y;
443 float spos0, spos1;
444
445 // Determine the projection point of the "simple" fit to the desired gap.
446
447 // now these 2 2D road have been refit without current gap!
448 if ( m_Part == 1 )
449 {
450 m_Road0->SimpleFitNoCurrentGap( gap, vr, r0, svr, sr0, chi2x, xdof );
451 m_Road1->SimpleFitNoCurrentGap( gap, vk, k0, svk, sk0, chi2y, ydof );
452
453 m_Road0->GetPosSigma( spos0 );
454 m_Road1->GetPosSigma( spos1 );
455
456 TransformPhiRToXY( vk, vr, k0, r0, vx, vy, x0, y0 );
457
458 // TransformPhiRToXY(svk, svr, sk0, sr0, svx, svy, sx0, sy0);
459 TransformPhiRToXY( vk + svk, vr + svr, k0 + sk0, r0 + sr0, svx, svy, sx0, sy0 );
460 svx -= vx;
461 svy -= vy;
462 sx0 -= x0;
463 sy0 -= y0;
464 }
465 else
466 {
467 m_Road0->SimpleFitNoCurrentGap( gap, vy, y0, svy, sy0, chi2y, ydof );
468 m_Road1->SimpleFitNoCurrentGap( gap, vx, x0, svx, sx0, chi2x, xdof );
469 m_Road0->GetPosSigma( spos0 );
470 m_Road1->GetPosSigma( spos1 );
471 }
472 /*
473 cout << " vr " << vr << " vk " << vk << endl;
474 cout << " r0 " << r0 << " k0 " << k0 << endl;
475 cout << " vx " << vx << " vy " << vy << endl;
476 cout << " x0 " << x0 << " y0 " << y0 << endl;
477 */
478
479 MucGeoGeneral::Instance()->FindIntersection( m_Part, m_Seg, gap, vx, vy, 1.0, x0, y0, 0.0,
480 svx, svy, 0.0, sx0, sy0, 0.0, x, y, z, sigmaX,
481 sigmaY, sigmaZ );
482 if ( fabs( vr ) > 10000 ) ///////////////////if fabs(vr) too big, r0 will be intersection in
483 /// x coordinate!!!
484 MucGeoGeneral::Instance()->FindIntersection( m_Part, m_Seg, gap, vx, vy, 1.0, x0, y0, r0,
485 svx, svy, 0.0, sx0, sy0, 0.0, x, y, z, sigmaX,
486 sigmaY, sigmaZ );
487
488 sigmaX = spos1;
489 sigmaY = spos0;
490 sigmaZ = 0.0;
491
492 float a, b, c;
493 float sa, sb, sc;
494 int whichhalf;
495
496 // calc orient now
497 int orient = 0;
498 if ( m_Part == 1 && gap % 2 == 0 ) orient = 1;
499 if ( m_Part != 1 && gap % 2 == 1 ) orient = 1;
500
501 if ( orient == 0 )
502 m_Road0->GetSimpleFitParams( a, b, c, whichhalf, sa, sb, sc, chi2x, ydof );
503 else m_Road1->GetSimpleFitParams( a, b, c, whichhalf, sa, sb, sc, chi2x, ydof );
504
505 // cout<<"orient = "<<orient<<" abc: "<<a<<" "<<b<<" "<<c<<endl;
506 quad_x1 = -9999;
507 quad_y1 = -9999;
508 quad_z1 = -9999;
509 quad_x2 = -9999;
510 quad_y2 = -9999;
511 quad_z2 = -9999;
512
513 if ( orient == 0 && m_Road0->GetQuadFitOk() || orient == 1 && m_Road1->GetQuadFitOk() )
515 m_Part, m_Seg, gap, a, b, c, whichhalf, quad_x1, quad_y1, quad_z1, quad_x2, quad_y2,
516 quad_z2, sigmaX, sigmaY, sigmaZ );
517
518 return;
519}
void FindIntersectionQuadLocal(const int part, const int seg, const int gap, const float a, const float b, const float c, const int whichhalf, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2, float &sigmaX, float &sigmaY, float &sigmaZ)

Referenced by RecMucTrack::LineFit().

◆ ProjectNoCurrentGap() [2/3]

void MucRec3DRoad::ProjectNoCurrentGap ( const int & gap,
float & x,
float & y,
float & z,
float & sigmaX,
float & sigmaY,
float & sigmaZ,
float & quad_x1,
float & quad_y1,
float & quad_z1,
float & quad_x2,
float & quad_y2,
float & quad_z2 )

Where does the trajectory of this road intersect a specific gap when refit without current gap!!!

◆ ProjectNoCurrentGap() [3/3]

void MucRec3DRoad::ProjectNoCurrentGap ( const int & gap,
float & x,
float & y,
float & z,
float & sigmaX,
float & sigmaY,
float & sigmaZ,
float & quad_x1,
float & quad_y1,
float & quad_z1,
float & quad_x2,
float & quad_y2,
float & quad_z2 )

Where does the trajectory of this road intersect a specific gap when refit without current gap!!!

◆ ProjectToStrip() [1/6]

vector< Identifier > MucRec3DRoad::ProjectToStrip ( const int & part,
const int & gap,
const HepPoint3D & gPoint,
const Hep3Vector & gDirection )

Definition at line 309 of file MucRec3DRoad.cxx.

311 {
312 if ( ( part < 0 ) || ( part >= (int)MucID::getPartNum() ) )
313 { cout << "MucRec3DRoad::Project-E1 invalid part = " << part << endl; }
314
315 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
316 { cout << "MucRec3DRoad::Project-E1 invalid gap = " << gap << endl; }
317
318 return MucGeoGeneral::Instance()->FindIntersectStrips( part, gap, gPoint, gDirection );
319}
vector< Identifier > FindIntersectStrips(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
static value_type getPartNum()
Definition MucID.cxx:131

Referenced by RecMucTrack::LineFit().

◆ ProjectToStrip() [2/6]

vector< Identifier > MucRec3DRoad::ProjectToStrip ( const int & part,
const int & gap,
const HepPoint3D & gPoint,
const Hep3Vector & gDirection )

◆ ProjectToStrip() [3/6]

vector< Identifier > MucRec3DRoad::ProjectToStrip ( const int & part,
const int & gap,
const HepPoint3D & gPoint,
const Hep3Vector & gDirection )

◆ ProjectToStrip() [4/6]

vector< Identifier > MucRec3DRoad::ProjectToStrip ( const int & part,
const int & gap,
const HepPoint3D & gPoint,
const Hep3Vector & gDirection,
vector< int > & padID,
vector< float > & intersect_x,
vector< float > & intersect_y,
vector< float > & intersect_z )

Definition at line 322 of file MucRec3DRoad.cxx.

325 {
326 if ( ( part < 0 ) || ( part >= (int)MucID::getPartNum() ) )
327 { cout << "MucRec3DRoad::Project-E1 invalid part = " << part << endl; }
328
329 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
330 { cout << "MucRec3DRoad::Project-E1 invalid gap = " << gap << endl; }
331
333 part, gap, gPoint, gDirection, padID, intersect_x, intersect_y, intersect_z );
334}

◆ ProjectToStrip() [5/6]

vector< Identifier > MucRec3DRoad::ProjectToStrip ( const int & part,
const int & gap,
const HepPoint3D & gPoint,
const Hep3Vector & gDirection,
vector< int > & padID,
vector< float > & intersect_x,
vector< float > & intersect_y,
vector< float > & intersect_z )

◆ ProjectToStrip() [6/6]

vector< Identifier > MucRec3DRoad::ProjectToStrip ( const int & part,
const int & gap,
const HepPoint3D & gPoint,
const Hep3Vector & gDirection,
vector< int > & padID,
vector< float > & intersect_x,
vector< float > & intersect_y,
vector< float > & intersect_z )

◆ ProjectWithSigma() [1/3]

void MucRec3DRoad::ProjectWithSigma ( const int & gap,
float & x,
float & y,
float & z,
float & sigmaX,
float & sigmaY,
float & sigmaZ )

Where does the trajectory of this road intersect a specific gap?

Definition at line 337 of file MucRec3DRoad.cxx.

338 {
339 x = 0.0;
340 sigmaX = 0.0;
341 y = 0.0;
342 sigmaY = 0.0;
343 z = 0.0;
344 sigmaZ = 0.0;
345
346 if ( ( gap < 0 ) || ( gap >= (int)MucID::getGapMax() ) )
347 {
348 cout << "MucRec3DRoad::Project-E1 invalid gap = " << gap << endl;
349 return;
350 }
351
352 float vx, vy, vk, vr;
353 float x0, y0, k0, r0;
354 float svx, svy, svk, svr;
355 float sx0, sy0, sk0, sr0;
356 int xdof, ydof;
357 float chi2x, chi2y;
358 float spos0, spos1;
359
360 // Determine the projection point of the "simple" fit to the desired gap.
361 if ( m_Part == 1 )
362 {
363 m_Road0->GetSimpleFitParams( vr, r0, svr, sr0, chi2x, xdof );
364 m_Road1->GetSimpleFitParams( vk, k0, svk, sk0, chi2y, ydof );
365 m_Road0->GetPosSigma( spos0 );
366 m_Road1->GetPosSigma( spos1 );
367
368 TransformPhiRToXY( vk, vr, k0, r0, vx, vy, x0, y0 );
369 // TransformPhiRToXY(svk, svr, sk0, sr0, svx, svy, sx0, sy0);
370 TransformPhiRToXY( vk + svk, vr + svr, k0 + sk0, r0 + sr0, svx, svy, sx0, sy0 );
371 svx -= vx;
372 svy -= vy;
373 sx0 -= x0;
374 sy0 -= y0;
375 }
376 else
377 {
378 m_Road0->GetSimpleFitParams( vy, y0, svy, sy0, chi2y, ydof );
379 m_Road1->GetSimpleFitParams( vx, x0, svx, sx0, chi2x, xdof );
380 m_Road0->GetPosSigma( spos0 );
381 m_Road1->GetPosSigma( spos1 );
382 }
383
384 /*
385 cout << " vr " << vr << " vk " << vk << endl;
386 cout << " r0 " << r0 << " k0 " << k0 << endl;
387 cout << " vx " << vx << " vy " << vy << endl;
388 cout << " x0 " << x0 << " y0 " << y0 << endl;
389 */
390
391 MucGeoGeneral::Instance()->FindIntersection( m_Part, m_Seg, gap, vx, vy, 1.0, x0, y0, 0.0,
392 svx, svy, 0.0, sx0, sy0, 0.0, x, y, z, sigmaX,
393 sigmaY, sigmaZ );
394 /*
395 if(fabs(vr)>10000) ///////////////////if fabs(vr) too big, r0 will be intersection in x
396 coordinate!!! MucGeoGeneral::Instance()->FindIntersection(m_Part, m_Seg, gap, vx, vy, 1.0,
397 x0, y0, r0, svx, svy, 0.0, sx0, sy0, 0.0, x, y, z, sigmaX, sigmaY, sigmaZ);
398 */
399
400 sigmaX = spos1;
401 sigmaY = spos0;
402 sigmaZ = 0.0;
403
404 float a, b, c;
405 float sa, sb, sc;
406 int whichhalf;
407 // cout<<"in MucRec3DRoad xyz form linefit "<<x<<" "<<y<<" "<<z<<endl;
408
409 if ( m_Part == 1 )
410 {
411 m_Road1->GetSimpleFitParams( a, b, c, whichhalf, sa, sb, sc, chi2x, ydof );
412 // cout<<"in MucRec3DRoad "<<vy<<" "<<y0<<" "<<a<<" "<<b<<" "<<c<<endl;
413 }
414
415 return;
416}

Referenced by MucRecRoadFinder::execute(), RecMucTrack::LineFit(), and PrintHitsInfo().

◆ ProjectWithSigma() [2/3]

void MucRec3DRoad::ProjectWithSigma ( const int & gap,
float & x,
float & y,
float & z,
float & sigmaX,
float & sigmaY,
float & sigmaZ )

Where does the trajectory of this road intersect a specific gap?

◆ ProjectWithSigma() [3/3]

void MucRec3DRoad::ProjectWithSigma ( const int & gap,
float & x,
float & y,
float & z,
float & sigmaX,
float & sigmaY,
float & sigmaZ )

Where does the trajectory of this road intersect a specific gap?

◆ RefitNoCurrentGap() [1/3]

int MucRec3DRoad::RefitNoCurrentGap ( const int & gap,
float & slopeZX,
float & interceptZX,
float & slopeZY,
float & interceptZY )

refit the 3D road without the assigned gap

Definition at line 260 of file MucRec3DRoad.cxx.

261 {
262 float vx, vy, vk, vr;
263 float x0, y0, k0, r0;
264 float svx, svy, svk, svr;
265 float sx0, sy0, sk0, sr0;
266 int xdof, ydof;
267 float chi2x, chi2y;
268 float spos0, spos1;
269
270 // Determine the projection point of the "simple" fit to the desired gap.
271 int status1, status2;
272
273 // now these 2 2D road have been refit without current gap!
274 if ( m_Part == 1 )
275 {
276 status1 = m_Road0->SimpleFitNoCurrentGap( gap, vr, r0, svr, sr0, chi2x, xdof );
277 status2 = m_Road1->SimpleFitNoCurrentGap( gap, vk, k0, svk, sk0, chi2y, ydof );
278
279 m_Road0->GetPosSigma( spos0 );
280 m_Road1->GetPosSigma( spos1 );
281
282 TransformPhiRToXY( vk, vr, k0, r0, vx, vy, x0, y0 );
283
284 // TransformPhiRToXY(svk, svr, sk0, sr0, svx, svy, sx0, sy0);
285 TransformPhiRToXY( vk + svk, vr + svr, k0 + sk0, r0 + sr0, svx, svy, sx0, sy0 );
286 svx -= vx;
287 svy -= vy;
288 sx0 -= x0;
289 sy0 -= y0;
290 }
291 else
292 {
293 status1 = m_Road0->SimpleFitNoCurrentGap( gap, vy, y0, svy, sy0, chi2y, ydof );
294 status2 = m_Road1->SimpleFitNoCurrentGap( gap, vx, x0, svx, sx0, chi2x, xdof );
295 m_Road0->GetPosSigma( spos0 );
296 m_Road1->GetPosSigma( spos1 );
297 }
298
299 if ( status1 == -1 || status2 == -1 ) return -1;
300 slopeZX = vx;
301 interceptZX = x0;
302 slopeZY = vy;
303 interceptZY = y0;
304
305 return 0;
306}

Referenced by RecMucTrack::LineFit().

◆ RefitNoCurrentGap() [2/3]

int MucRec3DRoad::RefitNoCurrentGap ( const int & gap,
float & slopeZX,
float & interceptZX,
float & slopeZY,
float & interceptZY )

refit the 3D road without the assigned gap

◆ RefitNoCurrentGap() [3/3]

int MucRec3DRoad::RefitNoCurrentGap ( const int & gap,
float & slopeZX,
float & interceptZX,
float & slopeZY,
float & interceptZY )

refit the 3D road without the assigned gap

◆ SetGroup() [1/3]

void MucRec3DRoad::SetGroup ( const int & Group)

set the group index for this road

Definition at line 124 of file MucRec3DRoad.cxx.

124 {
125 if ( Group >= 0 ) m_Group = Group;
126}

◆ SetGroup() [2/3]

void MucRec3DRoad::SetGroup ( const int & Group)

set the group index for this road

◆ SetGroup() [3/3]

void MucRec3DRoad::SetGroup ( const int & Group)

set the group index for this road

◆ SetIndex() [1/3]

void MucRec3DRoad::SetIndex ( const int & index)

set the index for this road

Definition at line 119 of file MucRec3DRoad.cxx.

119 {
120 if ( index >= 0 ) m_Index = index;
121}

◆ SetIndex() [2/3]

void MucRec3DRoad::SetIndex ( const int & index)

set the index for this road

◆ SetIndex() [3/3]

void MucRec3DRoad::SetIndex ( const int & index)

set the index for this road

◆ SetSimpleFitParams() [1/3]

void MucRec3DRoad::SetSimpleFitParams ( const float & m_SlopeZX,
const float & m_InterceptZX,
const float & m_SlopeZY,
const float & m_InterceptZY )

set the fit parameters : slope and intercept for XZ and YZ.

Definition at line 129 of file MucRec3DRoad.cxx.

130 {
131 m_SlopeZX = slopeZX;
132 m_InterceptZX = interceptZX;
133 m_SlopeZY = slopeZY;
134 m_InterceptZY = interceptZY;
135}

Referenced by MucRecRoadFinder::execute(), and RecMucTrack::LineFit().

◆ SetSimpleFitParams() [2/3]

void MucRec3DRoad::SetSimpleFitParams ( const float & m_SlopeZX,
const float & m_InterceptZX,
const float & m_SlopeZY,
const float & m_InterceptZY )

set the fit parameters : slope and intercept for XZ and YZ.

◆ SetSimpleFitParams() [3/3]

void MucRec3DRoad::SetSimpleFitParams ( const float & m_SlopeZX,
const float & m_InterceptZX,
const float & m_SlopeZY,
const float & m_InterceptZY )

set the fit parameters : slope and intercept for XZ and YZ.

◆ TransformPhiRToXY() [1/3]

void MucRec3DRoad::TransformPhiRToXY ( const float & vk,
const float & vr,
const float & k0,
const float & r0,
float & vx,
float & vy,
float & x0,
float & y0 ) const

Where does the trajectory of this road intersect the reference plane?

Where does the trajectory of this road intersect a z=const plane? Transform the Phi, ZR cord. to ZX, ZY cord.

Definition at line 653 of file MucRec3DRoad.cxx.

655 {
656 vx = 0.0;
657 vy = 0.0;
658 x0 = 0.0;
659 y0 = 0.0;
660
661 // cout << vk << " " << vr << " " << endl;
662
663 // float pi = 3.1415926536;
664 float phi = 0.25 * kPi * m_Seg;
665
666 // From y0 = vk * x0 + k0;
667 // y0 - r0*sin(phi)
668 // ------------------ = tan(phi + 0.5*kPi);
669 // x0 - r0*cos(phi)
670
671 if ( cos( phi ) + vk * sin( phi ) == 0.0 )
672 {
673 cout << " track parallel to gap, some error occurs! " << endl;
674 // m_Seg = 1, and vk = -1;
675 // 2, 0;
676 // 3, 1;
677 // 5, -1;
678 // 6, 0;
679 // 7, 1;
680 }
681 else
682 {
683 /*
684 vx = vr / ( cos(phi) + vk*sin(phi) );
685 vy = vk * vx;
686 x0 = (r0 - k0) / ( cos(phi) + vk );
687 y0 = vk * x0 + k0;
688 */
689
690 float atan_vk = atan( vk );
691 if ( atan_vk < 0 ) atan_vk += kPi;
692
693 // float deltaPhi = fabs(atan(vk)) - int( fabs(atan(vk))/(0.25*kPi) )*0.25*kPi;
694 // if (deltaPhi > 0.125*kPi) deltaPhi = 0.25*kPi - delta
695
696 float deltaPhi = atan_vk - ( m_Seg % 4 ) * ( 0.25 * kPi );
697
698 // vx = vr*cos(deltaPhi)*GetVxSign(vk)/sqrt(1.0+vk*vk); //change to vr/cos()... liangyt
699 // 2007.4.10 I think it should be vr/cos...
700
701 vx = ( vr / fabs( cos( deltaPhi ) ) ) * GetVxSign( vk ) / sqrt( 1.0 + vk * vk );
702 vy = vk * vx;
703 x0 = ( r0 - k0 * sin( phi ) ) / ( vk * sin( phi ) + cos( phi ) );
704 y0 = vk * x0 + k0;
705
706 float safe_vr = vr;
707
708 if ( fabs( vr ) > 10000 )
709 {
710 if ( vr > 0 ) safe_vr = 10000;
711 else safe_vr = -10000;
712 vx = ( safe_vr / fabs( cos( deltaPhi ) ) ) * GetVxSign( vk ) / sqrt( 1.0 + vk * vk );
713 vy = vk * vx;
714 y0 = -vy * r0;
715 x0 = ( y0 - k0 ) / vk;
716 }
717 }
718}
float GetVxSign(const float vk) const
Get sign of vx in TransformPhiRToXY.

Referenced by MucRecRoadFinder::execute(), RecMucTrack::LineFit(), Project(), ProjectNoCurrentGap(), ProjectWithSigma(), and RefitNoCurrentGap().

◆ TransformPhiRToXY() [2/3]

void MucRec3DRoad::TransformPhiRToXY ( const float & vk,
const float & vr,
const float & k0,
const float & r0,
float & vx,
float & vy,
float & x0,
float & y0 ) const

Where does the trajectory of this road intersect the reference plane?

Where does the trajectory of this road intersect a z=const plane? Transform the Phi, ZR cord. to ZX, ZY cord.

◆ TransformPhiRToXY() [3/3]

void MucRec3DRoad::TransformPhiRToXY ( const float & vk,
const float & vr,
const float & k0,
const float & r0,
float & vx,
float & vy,
float & x0,
float & y0 ) const

Where does the trajectory of this road intersect the reference plane?

Where does the trajectory of this road intersect a z=const plane? Transform the Phi, ZR cord. to ZX, ZY cord.


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