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

#include <MucGeoGap.h>

Public Member Functions

 MucGeoGap ()
 Default constructor.
 MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const float xSize, const float ySize, const float zSize, const float xTarget1Global, const float yTarget1Global, const float zTarget1Global, const float xTarget2Global, const float yTarget2Global, const float zTarget2Global, const float xTarget3Global, const float yTarget3Global, const float zTarget3Global, const float dzHighEdge, const float dzFarFrontGas, const float dzNearFrontGas, const float dzNearBackGas, const float dzFarBackGas, const float dxTarget1ToFiducial, const float dyTarget1ToFiducial, const float dxFiducialToCenter, const float dyFiducialToCenter)
 Real constructor (construct strips externally).
 MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const TGeoPhysicalNode *gapPhyscialNode, const float ironThickness)
 ROOT constructor.
MucGeoGapoperator= (const MucGeoGap &orig)
 Assignment constructor.
 MucGeoGap (const MucGeoGap &orig)
 Copy constructor.
 ~MucGeoGap ()
 Desctructor.
int Part () const
 Get part identifier (0,2 for cap, 1 for barrel).
int Seg () const
 Get seg identifier (0-7).
int Gap () const
 Get gap identifier (0-8).
int Orient () const
int GetStripNum () const
 Get SoftID.
float GetIronThickness () const
bool GetHitStatus () const
 Get whether this gap is hit.
float GetdzFarFrontGas () const
 Get m_dzFarFrontGas;.
float GetdzNearFrontGas () const
 Get m_dzNearFrontGas;.
float GetdzFarBackGas () const
 Get m_dzFarFrontGas;.
float GetdzNearBackGas () const
 Get m_dzNearBackGas;.
MucGeoStripGetStrip (const int strip) const
 Point to a strip within this gap.
HepPoint3D GetCenter () const
 Get gap center position in global coordinate.
void GetSize (float &xSize, float &ySize, float &zSize) const
 Get size of this gap.
void GetRotationMatrix (float &thetaX, float &phiX, float &thetaY, float &phiY, float &thetaZ, float &phiZ) const
 Get the rotation angles (in degrees) of the gap in global coordinate.
int GuessStrip (const float x, const float y, const float z) const
HepPoint3D ProjectToGap (const HepPoint3D gPoint, const Hep3Vector gVect) const
 Given a line, find the intersection with the gap in the global.
HepPoint3D ProjectToGapWithSigma (const HepPoint3D gPoint, const Hep3Vector gVect, const HepPoint3D gPointSigma, const Hep3Vector gVectSigma, HepPoint3D &gCross, HepPoint3D &gCrossSigma) const
void ProjectToGapSurface (const HepPoint3D gPoint, const Hep3Vector gVect, HepPoint3D &cross1, HepPoint3D &cross2) const
 Given a line, find the intersection with two surface of the gap in the global.
HepPoint3D ProjectToGapQuadLocal (const int part, const int orient, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
HepPoint3D ProjectToGap (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
 Given parabola, and a line, find the intersection with the gap in the global.
void ProjectToGapSurface (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
HepPoint3D CompareIntersection (const int whichhalf, const HepPoint3D gCross1, const HepPoint3D gCross2, const float a, const float b, const float c) const
Hep3Vector RotateToGlobal (const Hep3Vector pVect) const
 Rotate a vector from gap coordinate to global coordinate.
Hep3Vector RotateToGap (const Hep3Vector gVect) const
 Rotate a vector from global coordinate to gap coordinate.
HepPoint3D TransformToGlobal (const HepPoint3D pPoint) const
 Transform a point from gap coordinate to global coordinate.
HepPoint3D TransformToGap (const HepPoint3D gPoint) const
 Transform a point from global coordinate to gap coordinate.
bool IsInGap (const float x, const float y, const float z) const
 Check if the point (given in gap coordinate) is within the gap boundary.
MucGeoStripAddStrip (const int strip)
 Add a strip to the gap.
void SetHitStatus (const bool hit)
 Set SoftID of the gap.
 MucGeoGap ()
 Default constructor.
 MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const float xSize, const float ySize, const float zSize, const float xTarget1Global, const float yTarget1Global, const float zTarget1Global, const float xTarget2Global, const float yTarget2Global, const float zTarget2Global, const float xTarget3Global, const float yTarget3Global, const float zTarget3Global, const float dzHighEdge, const float dzFarFrontGas, const float dzNearFrontGas, const float dzNearBackGas, const float dzFarBackGas, const float dxTarget1ToFiducial, const float dyTarget1ToFiducial, const float dxFiducialToCenter, const float dyFiducialToCenter)
 Real constructor (construct strips externally).
 MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const TGeoPhysicalNode *gapPhyscialNode, const float ironThickness)
 ROOT constructor.
MucGeoGapoperator= (const MucGeoGap &orig)
 Assignment constructor.
 MucGeoGap (const MucGeoGap &orig)
 Copy constructor.
 ~MucGeoGap ()
 Desctructor.
int Part () const
 Get part identifier (0,2 for cap, 1 for barrel).
int Seg () const
 Get seg identifier (0-7).
int Gap () const
 Get gap identifier (0-8).
int Orient () const
int GetStripNum () const
 Get SoftID.
float GetIronThickness () const
bool GetHitStatus () const
 Get whether this gap is hit.
float GetdzFarFrontGas () const
 Get m_dzFarFrontGas;.
float GetdzNearFrontGas () const
 Get m_dzNearFrontGas;.
float GetdzFarBackGas () const
 Get m_dzFarFrontGas;.
float GetdzNearBackGas () const
 Get m_dzNearBackGas;.
MucGeoStripGetStrip (const int strip) const
 Point to a strip within this gap.
HepPoint3D GetCenter () const
 Get gap center position in global coordinate.
void GetSize (float &xSize, float &ySize, float &zSize) const
 Get size of this gap.
void GetRotationMatrix (float &thetaX, float &phiX, float &thetaY, float &phiY, float &thetaZ, float &phiZ) const
 Get the rotation angles (in degrees) of the gap in global coordinate.
int GuessStrip (const float x, const float y, const float z) const
HepPoint3D ProjectToGap (const HepPoint3D gPoint, const Hep3Vector gVect) const
 Given a line, find the intersection with the gap in the global.
HepPoint3D ProjectToGapWithSigma (const HepPoint3D gPoint, const Hep3Vector gVect, const HepPoint3D gPointSigma, const Hep3Vector gVectSigma, HepPoint3D &gCross, HepPoint3D &gCrossSigma) const
void ProjectToGapSurface (const HepPoint3D gPoint, const Hep3Vector gVect, HepPoint3D &cross1, HepPoint3D &cross2) const
 Given a line, find the intersection with two surface of the gap in the global.
HepPoint3D ProjectToGapQuadLocal (const int part, const int orient, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
HepPoint3D ProjectToGap (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
 Given parabola, and a line, find the intersection with the gap in the global.
void ProjectToGapSurface (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
HepPoint3D CompareIntersection (const int whichhalf, const HepPoint3D gCross1, const HepPoint3D gCross2, const float a, const float b, const float c) const
Hep3Vector RotateToGlobal (const Hep3Vector pVect) const
 Rotate a vector from gap coordinate to global coordinate.
Hep3Vector RotateToGap (const Hep3Vector gVect) const
 Rotate a vector from global coordinate to gap coordinate.
HepPoint3D TransformToGlobal (const HepPoint3D pPoint) const
 Transform a point from gap coordinate to global coordinate.
HepPoint3D TransformToGap (const HepPoint3D gPoint) const
 Transform a point from global coordinate to gap coordinate.
bool IsInGap (const float x, const float y, const float z) const
 Check if the point (given in gap coordinate) is within the gap boundary.
MucGeoStripAddStrip (const int strip)
 Add a strip to the gap.
void SetHitStatus (const bool hit)
 Set SoftID of the gap.
 MucGeoGap ()
 Default constructor.
 MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const float xSize, const float ySize, const float zSize, const float xTarget1Global, const float yTarget1Global, const float zTarget1Global, const float xTarget2Global, const float yTarget2Global, const float zTarget2Global, const float xTarget3Global, const float yTarget3Global, const float zTarget3Global, const float dzHighEdge, const float dzFarFrontGas, const float dzNearFrontGas, const float dzNearBackGas, const float dzFarBackGas, const float dxTarget1ToFiducial, const float dyTarget1ToFiducial, const float dxFiducialToCenter, const float dyFiducialToCenter)
 Real constructor (construct strips externally).
 MucGeoGap (const int part, const int seg, const int gap, const int orient, const int stripNum, const TGeoPhysicalNode *gapPhyscialNode, const float ironThickness)
 ROOT constructor.
MucGeoGapoperator= (const MucGeoGap &orig)
 Assignment constructor.
 MucGeoGap (const MucGeoGap &orig)
 Copy constructor.
 ~MucGeoGap ()
 Desctructor.
int Part () const
 Get part identifier (0,2 for cap, 1 for barrel).
int Seg () const
 Get seg identifier (0-7).
int Gap () const
 Get gap identifier (0-8).
int Orient () const
int GetStripNum () const
 Get SoftID.
float GetIronThickness () const
bool GetHitStatus () const
 Get whether this gap is hit.
float GetdzFarFrontGas () const
 Get m_dzFarFrontGas;.
float GetdzNearFrontGas () const
 Get m_dzNearFrontGas;.
float GetdzFarBackGas () const
 Get m_dzFarFrontGas;.
float GetdzNearBackGas () const
 Get m_dzNearBackGas;.
MucGeoStripGetStrip (const int strip) const
 Point to a strip within this gap.
HepPoint3D GetCenter () const
 Get gap center position in global coordinate.
void GetSize (float &xSize, float &ySize, float &zSize) const
 Get size of this gap.
void GetRotationMatrix (float &thetaX, float &phiX, float &thetaY, float &phiY, float &thetaZ, float &phiZ) const
 Get the rotation angles (in degrees) of the gap in global coordinate.
int GuessStrip (const float x, const float y, const float z) const
HepPoint3D ProjectToGap (const HepPoint3D gPoint, const Hep3Vector gVect) const
 Given a line, find the intersection with the gap in the global.
HepPoint3D ProjectToGapWithSigma (const HepPoint3D gPoint, const Hep3Vector gVect, const HepPoint3D gPointSigma, const Hep3Vector gVectSigma, HepPoint3D &gCross, HepPoint3D &gCrossSigma) const
void ProjectToGapSurface (const HepPoint3D gPoint, const Hep3Vector gVect, HepPoint3D &cross1, HepPoint3D &cross2) const
 Given a line, find the intersection with two surface of the gap in the global.
HepPoint3D ProjectToGapQuadLocal (const int part, const int orient, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
HepPoint3D ProjectToGap (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
 Given parabola, and a line, find the intersection with the gap in the global.
void ProjectToGapSurface (const HepPoint3D gPoint, const float vy, const float y0, const float a, const float b, const float c, const int whichhalf, HepPoint3D &cross1, HepPoint3D &cross2) const
HepPoint3D CompareIntersection (const int whichhalf, const HepPoint3D gCross1, const HepPoint3D gCross2, const float a, const float b, const float c) const
Hep3Vector RotateToGlobal (const Hep3Vector pVect) const
 Rotate a vector from gap coordinate to global coordinate.
Hep3Vector RotateToGap (const Hep3Vector gVect) const
 Rotate a vector from global coordinate to gap coordinate.
HepPoint3D TransformToGlobal (const HepPoint3D pPoint) const
 Transform a point from gap coordinate to global coordinate.
HepPoint3D TransformToGap (const HepPoint3D gPoint) const
 Transform a point from global coordinate to gap coordinate.
bool IsInGap (const float x, const float y, const float z) const
 Check if the point (given in gap coordinate) is within the gap boundary.
MucGeoStripAddStrip (const int strip)
 Add a strip to the gap.
void SetHitStatus (const bool hit)
 Set SoftID of the gap.

Detailed Description

Constructor & Destructor Documentation

◆ MucGeoGap() [1/12]

MucGeoGap::MucGeoGap ( )

Default constructor.

Definition at line 24 of file MucGeoGap.cxx.

25 : m_Part( -1 )
26 , m_Seg( -1 )
27 , m_Gap( -1 )
28 , m_StripNum( -1 )
29 , m_XSize( -1.0 )
30 , m_YSize( -1.0 )
31 , m_ZSize( -1.0 ) {
32 // Default constructor.
33}

Referenced by MucGeoGap(), and operator=().

◆ MucGeoGap() [2/12]

MucGeoGap::MucGeoGap ( const int part,
const int seg,
const int gap,
const int orient,
const int stripNum,
const float xSize,
const float ySize,
const float zSize,
const float xTarget1Global,
const float yTarget1Global,
const float zTarget1Global,
const float xTarget2Global,
const float yTarget2Global,
const float zTarget2Global,
const float xTarget3Global,
const float yTarget3Global,
const float zTarget3Global,
const float dzHighEdge,
const float dzFarFrontGas,
const float dzNearFrontGas,
const float dzNearBackGas,
const float dzFarBackGas,
const float dxTarget1ToFiducial,
const float dyTarget1ToFiducial,
const float dxFiducialToCenter,
const float dyFiducialToCenter )

Real constructor (construct strips externally).

Definition at line 35 of file MucGeoGap.cxx.

44 : m_Part( part )
45 , m_Seg( seg )
46 , m_Gap( gap )
47 , m_StripNum( stripNum )
48 , m_Orient( orient )
49 , m_XSize( xSize )
50 , m_YSize( ySize )
51 , m_ZSize( zSize )
52 , m_dzHighEdge( dzHighEdge )
53 , m_dzFarFrontGas( dzFarFrontGas )
54 , m_dzNearFrontGas( dzNearFrontGas )
55 , m_dzNearBackGas( dzNearBackGas )
56 , m_dzFarBackGas( dzFarBackGas )
57 , m_pMucGeoStrip( MucID::getStripNum( part, seg, gap ) ) {
58 // Real constructor (construct strips externally).
59
60 // v1Global, v2Global, v3Global are position vectors of the three survey targets in the
61 // Bes global coordinate system.
62 // cout << m_dzHighEdge << " " << m_dzFarFrontGas << " " << m_dzNearFrontGas << " " <<
63 // dzNearBackGas << " " << dzFarBackGas << endl;
64 Hep3Vector v1Global( xTarget1Global, yTarget1Global, zTarget1Global );
65 Hep3Vector v2Global( xTarget2Global, yTarget2Global, zTarget2Global );
66 Hep3Vector v3Global( xTarget3Global, yTarget3Global, zTarget3Global );
67
68 Hep3Vector v2To1Global = v1Global - v2Global;
69 Hep3Vector v3To1Global = v1Global - v3Global;
70
71 // v1Gap is the position vector of target1 in the gap coordinate system.
72 Hep3Vector v1Gap( dxTarget1ToFiducial + dxFiducialToCenter,
73 dyTarget1ToFiducial + dyFiducialToCenter, 0.0 );
74
75 // Make rotaiton and translation matrix.
76 Hep3Vector newX( 1, 0, 0 ), newY( 0, 1, 0 ), newZ( 0, 0, 1 );
77 HepRotation rotateGap( newX, newY, newZ );
78
79 if ( part == 1 )
80 {
81 newX = v2To1Global;
82 newX.setMag( 1.0 );
83 newY = v3To1Global;
84 newY.setMag( 1.0 );
85 newZ = newX.cross( newY );
86 }
87 if ( part != 1 )
88 {
89 newY = -1.0 * v2To1Global;
90 newY.setMag( 1.0 );
91 newZ = v3To1Global.cross( newY );
92 newZ.setMag( 1.0 );
93 newX = newY.cross( newZ );
94 }
95
96 HepRotation rotateGlobal( newX, newY, newZ );
97 HepRotation rotateGapToGlobal( rotateGlobal * rotateGap );
98
99 Hep3Vector translateGapToGlobal( v1Global - rotateGapToGlobal * v1Gap );
100
101 m_Rotation = rotateGapToGlobal;
102 m_Translation = translateGapToGlobal;
103 m_Center = m_Translation;
104
105 // cout << " Rotation : " << endl << m_Rotation.xx() << " " << m_Rotation.xy() << " " <<
106 // m_Rotation.xz() << endl << m_Rotation.yx() << " " << m_Rotation.yy() << " " <<
107 // m_Rotation.yz() << endl << m_Rotation.zx() << " " << m_Rotation.zy() << " " <<
108 // m_Rotation.zz() << endl; cout << " Center : " << m_Center << endl;
109
110 HepMatrix rM( 3, 3 ), rMT( 3, 3 );
111 for ( int i = 0; i < 3; i++ )
112 {
113 for ( int j = 0; j < 3; j++ ) { rM[i][j] = m_Rotation( i, j ); }
114 }
115 rMT = rM.T();
116
117 Hep3Vector newXT( rMT( 1, 1 ), rMT( 2, 1 ), rMT( 3, 1 ) );
118 Hep3Vector newYT( rMT( 1, 2 ), rMT( 2, 2 ), rMT( 3, 2 ) );
119 Hep3Vector newZT( rMT( 1, 3 ), rMT( 2, 3 ), rMT( 3, 3 ) );
120 HepRotation rotateGlobalToGap( newXT, newYT, newZT );
121
122 m_RotationT = rotateGlobalToGap;
123}
static value_type getStripNum(int part, int seg, int gap)
Definition MucID.cxx:148

◆ MucGeoGap() [3/12]

MucGeoGap::MucGeoGap ( const int part,
const int seg,
const int gap,
const int orient,
const int stripNum,
const TGeoPhysicalNode * gapPhyscialNode,
const float ironThickness )

ROOT constructor.

Definition at line 126 of file MucGeoGap.cxx.

129 : m_Part( part )
130 , m_Seg( seg )
131 , m_Gap( gap )
132 , m_StripNum( stripNum )
133 , m_Orient( orient )
134 , m_pMucGeoStrip( MucID::getStripNum( part, seg, gap ) )
135 , m_IronThickness( ironThickness )
136
137{
138 TGeoBBox* gapBox = (TGeoBBox*)gapPhysicalNode->GetShape();
139
140 m_XSize = gapBox->GetDX() * 2.0;
141 m_YSize = gapBox->GetDY() * 2.0;
142 m_ZSize = gapBox->GetDZ() * 2.0;
143
144 m_dzHighEdge = 20.0;
145 m_dzFarFrontGas = -4.5;
146 m_dzNearFrontGas = -2.5;
147 m_dzNearBackGas = 2.5;
148 m_dzFarBackGas = 4.5;
149
150 double eRot[9], *pRot;
151 pRot = eRot;
152 pRot = gapPhysicalNode->GetMatrix()->GetRotationMatrix();
153
154 // cout << "part " << part << " seg " << seg << " gap " << gap << endl;
155 // cout << pRot[0] << " " << pRot[1] << " " << pRot[2] << endl
156 // << pRot[3] << " " << pRot[4] << " " << pRot[5] << endl
157 // << pRot[6] << " " << pRot[7] << " " << pRot[8] << endl;
158 Hep3Vector rotX( pRot[0], pRot[3], pRot[6] );
159 Hep3Vector rotY( pRot[1], pRot[4], pRot[7] );
160 Hep3Vector rotZ( pRot[2], pRot[5], pRot[8] );
161 HepRotation rotateGapToGlobal( rotX, rotY, rotZ );
162 m_Rotation = rotateGapToGlobal;
163
164 Hep3Vector rotTX( pRot[0], pRot[1], pRot[2] );
165 Hep3Vector rotTY( pRot[3], pRot[4], pRot[5] );
166 Hep3Vector rotTZ( pRot[6], pRot[7], pRot[8] );
167 HepRotation rotateGlobalToGap( rotTX, rotTY, rotTZ );
168 m_RotationT = rotateGlobalToGap;
169
170 double eTrans[3], *pTrans;
171 pTrans = eTrans;
172 pTrans = gapPhysicalNode->GetMatrix()->GetTranslation();
173
174 Hep3Vector translateGapToGlobal( pTrans[0], pTrans[1], pTrans[2] );
175 m_Translation = translateGapToGlobal;
176 m_Center = m_Translation;
177
178 double eTrans_gap[3], *pTrans_gap; // pTran is for box now!!!
179 pTrans_gap = eTrans_gap;
180 pTrans_gap = gapPhysicalNode->GetMatrix( 2 )->GetTranslation();
181 // std::cout <<"gap position: "<<pTrans_gap[0]<< " " << pTrans_gap[1] << " " << pTrans_gap[2]
182 // << std::endl;
183
184 Hep3Vector GapSurface1, GapSurface2;
185 Hep3Vector GapCenter( pTrans_gap[0], pTrans_gap[1], pTrans_gap[2] );
186 GapSurface1 = GapCenter - rotZ * 20; // Gap thickness/2= 20
187 GapSurface2 = GapCenter + rotZ * 20; // Gap thickness/2= 20
188
189 m_SurfaceInner = GapSurface1;
190 m_SurfaceOuter = GapSurface2;
191 if ( GapSurface1.mag() > GapSurface2.mag() ) // keep Inner be the little one
192 {
193 m_SurfaceInner = GapSurface2;
194 m_SurfaceOuter = GapSurface1;
195 }
196
197 // std::cout <<"sur1 position: "<<GapSurface1[0]<<" "<<GapSurface1[1]<<"
198 // "<<GapSurface1[2]<<std::endl;
199 // std::cout <<"sur2 position: "<<GapSurface2[0]<<" "<<GapSurface2[1]<<"
200 // "<<GapSurface2[2]<<std::endl; std::cout <<"box position: "<< pTrans[0] << " " <<
201 // pTrans[1] << " " << pTrans[2] << std::endl;
202}

◆ MucGeoGap() [4/12]

MucGeoGap::MucGeoGap ( const MucGeoGap & orig)

Copy constructor.

Definition at line 237 of file MucGeoGap.cxx.

238 : m_Part( orig.m_Part )
239 , m_Seg( orig.m_Seg )
240 , m_Gap( orig.m_Gap )
241 , m_StripNum( orig.m_StripNum )
242 , m_Orient( orig.m_Orient )
243 , m_HitStatus( orig.m_HitStatus )
244 , m_XSize( orig.m_XSize )
245 , m_YSize( orig.m_YSize )
246 , m_ZSize( orig.m_ZSize )
247 , m_dzHighEdge( orig.m_dzHighEdge )
248 , m_dzFarFrontGas( orig.m_dzFarFrontGas )
249 , m_dzNearFrontGas( orig.m_dzNearFrontGas )
250 , m_dzNearBackGas( orig.m_dzNearBackGas )
251 , m_dzFarBackGas( orig.m_dzFarBackGas )
252 , m_Center( orig.m_Center )
253 , m_Rotation( orig.m_Rotation )
254 , m_RotationT( orig.m_RotationT )
255 , m_Translation( orig.m_Translation )
256 , m_IronThickness( orig.m_IronThickness ) {
257 // Copy constructor.
258 m_pMucGeoStrip = orig.m_pMucGeoStrip;
259}

◆ ~MucGeoGap() [1/3]

MucGeoGap::~MucGeoGap ( )

Desctructor.

Definition at line 261 of file MucGeoGap.cxx.

261 {
262 // Destructor.
263 MucGeoStrip* pStrip = 0;
264 while ( m_pMucGeoStrip.size() > 0 )
265 {
266 pStrip = m_pMucGeoStrip.back();
267 delete pStrip;
268 m_pMucGeoStrip.pop_back();
269 }
270}

◆ MucGeoGap() [5/12]

MucGeoGap::MucGeoGap ( )

Default constructor.

◆ MucGeoGap() [6/12]

MucGeoGap::MucGeoGap ( const int part,
const int seg,
const int gap,
const int orient,
const int stripNum,
const float xSize,
const float ySize,
const float zSize,
const float xTarget1Global,
const float yTarget1Global,
const float zTarget1Global,
const float xTarget2Global,
const float yTarget2Global,
const float zTarget2Global,
const float xTarget3Global,
const float yTarget3Global,
const float zTarget3Global,
const float dzHighEdge,
const float dzFarFrontGas,
const float dzNearFrontGas,
const float dzNearBackGas,
const float dzFarBackGas,
const float dxTarget1ToFiducial,
const float dyTarget1ToFiducial,
const float dxFiducialToCenter,
const float dyFiducialToCenter )

Real constructor (construct strips externally).

◆ MucGeoGap() [7/12]

MucGeoGap::MucGeoGap ( const int part,
const int seg,
const int gap,
const int orient,
const int stripNum,
const TGeoPhysicalNode * gapPhyscialNode,
const float ironThickness )

ROOT constructor.

◆ MucGeoGap() [8/12]

MucGeoGap::MucGeoGap ( const MucGeoGap & orig)

Copy constructor.

◆ ~MucGeoGap() [2/3]

MucGeoGap::~MucGeoGap ( )

Desctructor.

◆ MucGeoGap() [9/12]

MucGeoGap::MucGeoGap ( )

Default constructor.

◆ MucGeoGap() [10/12]

MucGeoGap::MucGeoGap ( const int part,
const int seg,
const int gap,
const int orient,
const int stripNum,
const float xSize,
const float ySize,
const float zSize,
const float xTarget1Global,
const float yTarget1Global,
const float zTarget1Global,
const float xTarget2Global,
const float yTarget2Global,
const float zTarget2Global,
const float xTarget3Global,
const float yTarget3Global,
const float zTarget3Global,
const float dzHighEdge,
const float dzFarFrontGas,
const float dzNearFrontGas,
const float dzNearBackGas,
const float dzFarBackGas,
const float dxTarget1ToFiducial,
const float dyTarget1ToFiducial,
const float dxFiducialToCenter,
const float dyFiducialToCenter )

Real constructor (construct strips externally).

◆ MucGeoGap() [11/12]

MucGeoGap::MucGeoGap ( const int part,
const int seg,
const int gap,
const int orient,
const int stripNum,
const TGeoPhysicalNode * gapPhyscialNode,
const float ironThickness )

ROOT constructor.

◆ MucGeoGap() [12/12]

MucGeoGap::MucGeoGap ( const MucGeoGap & orig)

Copy constructor.

◆ ~MucGeoGap() [3/3]

MucGeoGap::~MucGeoGap ( )

Desctructor.

Member Function Documentation

◆ AddStrip() [1/3]

MucGeoStrip * MucGeoGap::AddStrip ( const int strip)

Add a strip to the gap.

Definition at line 592 of file MucGeoGap.cxx.

592 {
593 // Add a strip to the gap.
594 MucGeoStrip* pStrip;
595 MucGeoStrip* neighbor;
596
597 if ( strip >= int( m_pMucGeoStrip.size() ) )
598 {
599 cout << " MucGeoGap::AddStrip strip number " << strip << " outside of expected range "
600 << m_pMucGeoStrip.size() << endl;
601 return 0;
602 }
603
604 if ( ( strip + 1 ) > m_StripNum ) m_StripNum = strip + 1;
605
606 if ( m_pMucGeoStrip[strip] )
607 {
608 // The strip object has already been created; don't create a new one.
609 return m_pMucGeoStrip[strip];
610 }
611
612 pStrip = new MucGeoStrip( strip, this );
613
614 m_pMucGeoStrip[strip] = pStrip;
615 pStrip->SetLeftNeighbor( 0L );
616 pStrip->SetRightNeighbor( 0L );
617
618 // Make this strip and the previous one neighbors.
619 if ( strip > 0 )
620 {
621 neighbor = m_pMucGeoStrip[strip - 1];
622 if ( neighbor )
623 {
624 neighbor->SetRightNeighbor( pStrip );
625 pStrip->SetLeftNeighbor( neighbor );
626 }
627 }
628
629 return pStrip;
630}
void SetLeftNeighbor(MucGeoStrip *p)
Set pointer to the adjacent strip on the -X or -Y side of this one.
void SetRightNeighbor(MucGeoStrip *p)
Set pointer to the adjacent strip on the +X or +Y side of this one.

◆ AddStrip() [2/3]

MucGeoStrip * MucGeoGap::AddStrip ( const int strip)

Add a strip to the gap.

◆ AddStrip() [3/3]

MucGeoStrip * MucGeoGap::AddStrip ( const int strip)

Add a strip to the gap.

◆ CompareIntersection() [1/3]

HepPoint3D MucGeoGap::CompareIntersection ( const int whichhalf,
const HepPoint3D gCross1,
const HepPoint3D gCross2,
const float a,
const float b,
const float c ) const

Definition at line 519 of file MucGeoGap.cxx.

521 {
522 bool found = false;
523 bool found1 = false;
524 bool found2 = false;
525 int good = 0;
526
527 HepPoint3D localCross = TransformToGap( gCross1 );
528 if ( IsInGap( localCross.x(), localCross.y(), 0.0 ) )
529 {
530 good = 1;
531 found1 = true;
532 }
533
534 localCross = TransformToGap( gCross2 );
535 if ( IsInGap( localCross.x(), localCross.y(), 0.0 ) )
536 {
537 good = 2;
538 found2 = true;
539 }
540 if ( found1 && found2 )
541 {
542 float center = b / ( -2 * a );
543 if ( whichhalf == 2 )
544 {
545 if ( gCross1.x() > center ) good = 1;
546 if ( gCross2.x() > center ) good = 2;
547 }
548 if ( whichhalf == 1 )
549 {
550 if ( gCross1.x() < center ) good = 1;
551 if ( gCross2.x() < center ) good = 2;
552 }
553 }
554
555 if ( good == 1 ) return gCross1;
556 else if ( good == 2 ) return gCross2;
557 else
558 {
559 HepPoint3D Empty( -9999, -9999, -9999 );
560 cout << "in MucGeoGap:: both intersection position are bad!!!" << endl;
561 return Empty;
562 }
563}
HepGeom::Point3D< double > HepPoint3D
bool IsInGap(const float x, const float y, const float z) const
Check if the point (given in gap coordinate) is within the gap boundary.
HepPoint3D TransformToGap(const HepPoint3D gPoint) const
Transform a point from global coordinate to gap coordinate.

Referenced by ProjectToGapSurface().

◆ CompareIntersection() [2/3]

HepPoint3D MucGeoGap::CompareIntersection ( const int whichhalf,
const HepPoint3D gCross1,
const HepPoint3D gCross2,
const float a,
const float b,
const float c ) const

◆ CompareIntersection() [3/3]

HepPoint3D MucGeoGap::CompareIntersection ( const int whichhalf,
const HepPoint3D gCross1,
const HepPoint3D gCross2,
const float a,
const float b,
const float c ) const

◆ Gap() [1/3]

int MucGeoGap::Gap ( ) const
inline

Get gap identifier (0-8).

Definition at line 82 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

82{ return m_Gap; }

Referenced by RecMucTrack::ComputeDistanceMatch(), and operator<<().

◆ Gap() [2/3]

int MucGeoGap::Gap ( ) const
inline

Get gap identifier (0-8).

Definition at line 82 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

82{ return m_Gap; }

◆ Gap() [3/3]

int MucGeoGap::Gap ( ) const
inline

Get gap identifier (0-8).

Definition at line 82 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

82{ return m_Gap; }

◆ GetCenter() [1/3]

HepPoint3D MucGeoGap::GetCenter ( ) const
inline

Get gap center position in global coordinate.

Definition at line 115 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

115{ return m_Center; }

Referenced by MucRecLineFit::LineFit(), and operator<<().

◆ GetCenter() [2/3]

HepPoint3D MucGeoGap::GetCenter ( ) const
inline

Get gap center position in global coordinate.

Definition at line 115 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

115{ return m_Center; }

◆ GetCenter() [3/3]

HepPoint3D MucGeoGap::GetCenter ( ) const
inline

Get gap center position in global coordinate.

Definition at line 115 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

115{ return m_Center; }

◆ GetdzFarBackGas() [1/3]

float MucGeoGap::GetdzFarBackGas ( ) const
inline

Get m_dzFarFrontGas;.

Definition at line 106 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

106{ return m_dzFarBackGas; }

Referenced by MucGeoStrip::SetStrip(), and MucGeoStrip::SetStrip().

◆ GetdzFarBackGas() [2/3]

float MucGeoGap::GetdzFarBackGas ( ) const
inline

Get m_dzFarFrontGas;.

Definition at line 106 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

106{ return m_dzFarBackGas; }

◆ GetdzFarBackGas() [3/3]

float MucGeoGap::GetdzFarBackGas ( ) const
inline

Get m_dzFarFrontGas;.

Definition at line 106 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

106{ return m_dzFarBackGas; }

◆ GetdzFarFrontGas() [1/3]

float MucGeoGap::GetdzFarFrontGas ( ) const
inline

Get m_dzFarFrontGas;.

Definition at line 100 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

100{ return m_dzFarFrontGas; }

Referenced by MucGeoStrip::SetStrip(), and MucGeoStrip::SetStrip().

◆ GetdzFarFrontGas() [2/3]

float MucGeoGap::GetdzFarFrontGas ( ) const
inline

Get m_dzFarFrontGas;.

Definition at line 100 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

100{ return m_dzFarFrontGas; }

◆ GetdzFarFrontGas() [3/3]

float MucGeoGap::GetdzFarFrontGas ( ) const
inline

Get m_dzFarFrontGas;.

Definition at line 100 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

100{ return m_dzFarFrontGas; }

◆ GetdzNearBackGas() [1/3]

float MucGeoGap::GetdzNearBackGas ( ) const
inline

Get m_dzNearBackGas;.

Definition at line 109 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

109{ return m_dzNearBackGas; }

Referenced by MucGeoStrip::SetStrip(), and MucGeoStrip::SetStrip().

◆ GetdzNearBackGas() [2/3]

float MucGeoGap::GetdzNearBackGas ( ) const
inline

Get m_dzNearBackGas;.

Definition at line 109 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

109{ return m_dzNearBackGas; }

◆ GetdzNearBackGas() [3/3]

float MucGeoGap::GetdzNearBackGas ( ) const
inline

Get m_dzNearBackGas;.

Definition at line 109 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

109{ return m_dzNearBackGas; }

◆ GetdzNearFrontGas() [1/3]

float MucGeoGap::GetdzNearFrontGas ( ) const
inline

Get m_dzNearFrontGas;.

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

103{ return m_dzNearFrontGas; }

Referenced by MucGeoStrip::SetStrip(), and MucGeoStrip::SetStrip().

◆ GetdzNearFrontGas() [2/3]

float MucGeoGap::GetdzNearFrontGas ( ) const
inline

Get m_dzNearFrontGas;.

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

103{ return m_dzNearFrontGas; }

◆ GetdzNearFrontGas() [3/3]

float MucGeoGap::GetdzNearFrontGas ( ) const
inline

Get m_dzNearFrontGas;.

Definition at line 103 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

103{ return m_dzNearFrontGas; }

◆ GetHitStatus() [1/3]

bool MucGeoGap::GetHitStatus ( ) const
inline

Get whether this gap is hit.

Definition at line 97 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

97{ return m_HitStatus; }

◆ GetHitStatus() [2/3]

bool MucGeoGap::GetHitStatus ( ) const
inline

Get whether this gap is hit.

Definition at line 97 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

97{ return m_HitStatus; }

◆ GetHitStatus() [3/3]

bool MucGeoGap::GetHitStatus ( ) const
inline

Get whether this gap is hit.

Definition at line 97 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

97{ return m_HitStatus; }

◆ GetIronThickness() [1/3]

float MucGeoGap::GetIronThickness ( ) const
inline

Definition at line 94 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

94{ return m_IronThickness; }

Referenced by RecMucTrack::ComputeDepth(), and RecMucTrack::ComputeDepth().

◆ GetIronThickness() [2/3]

float MucGeoGap::GetIronThickness ( ) const
inline

Definition at line 94 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

94{ return m_IronThickness; }

◆ GetIronThickness() [3/3]

float MucGeoGap::GetIronThickness ( ) const
inline

Definition at line 94 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

94{ return m_IronThickness; }

◆ GetRotationMatrix() [1/3]

void MucGeoGap::GetRotationMatrix ( float & thetaX,
float & phiX,
float & thetaY,
float & phiY,
float & thetaZ,
float & phiZ ) const

Get the rotation angles (in degrees) of the gap in global coordinate.

Definition at line 298 of file MucGeoGap.cxx.

299 {
300 // Get the rotation angles (in degrees) of the gap in the global coordinate system.
301 Hep3Vector x( m_Rotation.colX() );
302 Hep3Vector y( m_Rotation.colY() );
303 Hep3Vector z( m_Rotation.colZ() );
304
305 thetaX = kRad * x.theta();
306 phiX = kRad * x.phi();
307 thetaY = kRad * y.theta();
308 phiY = kRad * y.phi();
309 thetaZ = kRad * z.theta();
310 phiZ = kRad * z.phi();
311
312 // cout << "Gap rotation matrix : " << endl
313 // << "X: theta = " << thetaX << " phi = " << phiX << endl
314 // << "Y: theta = " << thetaY << " phi = " << phiY << endl
315 // << "Z: theta = " << thetaZ << " phi = " << phiZ << endl;
316
317 return;
318}
const Double_t kRad
Definition BesTView.cxx:34
Double_t x[10]

Referenced by ExtMucKal::GetRoationMatrix().

◆ GetRotationMatrix() [2/3]

void MucGeoGap::GetRotationMatrix ( float & thetaX,
float & phiX,
float & thetaY,
float & phiY,
float & thetaZ,
float & phiZ ) const

Get the rotation angles (in degrees) of the gap in global coordinate.

◆ GetRotationMatrix() [3/3]

void MucGeoGap::GetRotationMatrix ( float & thetaX,
float & phiX,
float & thetaY,
float & phiY,
float & thetaZ,
float & phiZ ) const

Get the rotation angles (in degrees) of the gap in global coordinate.

◆ GetSize() [1/3]

void MucGeoGap::GetSize ( float & xSize,
float & ySize,
float & zSize ) const

Get size of this gap.

Definition at line 289 of file MucGeoGap.cxx.

289 {
290 // Get size of this gap.
291 xSize = m_XSize;
292 ySize = m_YSize;
293 zSize = m_ZSize;
294
295 return;
296}

Referenced by operator<<().

◆ GetSize() [2/3]

void MucGeoGap::GetSize ( float & xSize,
float & ySize,
float & zSize ) const

Get size of this gap.

◆ GetSize() [3/3]

void MucGeoGap::GetSize ( float & xSize,
float & ySize,
float & zSize ) const

Get size of this gap.

◆ GetStrip() [1/3]

MucGeoStrip * MucGeoGap::GetStrip ( const int strip) const

Point to a strip within this gap.

Definition at line 272 of file MucGeoGap.cxx.

272 {
273 // Point to a strip within this gap.
274 if ( strip < 0 || strip >= int( m_pMucGeoStrip.size() ) )
275 {
276 std::cout << "Error: MucGeoGap::GetStrip() strip " << strip << " exceed strip range"
277 << endl;
278 return 0;
279 }
280 if ( !m_pMucGeoStrip[strip] )
281 {
282 std::cout << "Error: MucGeoGap::GetStrip() strip " << strip << " not found" << endl;
283 return 0;
284 }
285
286 return m_pMucGeoStrip[strip];
287}

Referenced by MucGeoGeneral::FindIntersectStrips(), MucGeoGeneral::FindIntersectStrips(), and GuessStrip().

◆ GetStrip() [2/3]

MucGeoStrip * MucGeoGap::GetStrip ( const int strip) const

Point to a strip within this gap.

◆ GetStrip() [3/3]

MucGeoStrip * MucGeoGap::GetStrip ( const int strip) const

Point to a strip within this gap.

◆ GetStripNum() [1/3]

int MucGeoGap::GetStripNum ( ) const
inline

Get SoftID.

Get number of strips in this gap.

Definition at line 92 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

92{ return m_StripNum; }

Referenced by MucGeoGeneral::FindIntersectStrips(), MucGeoGeneral::FindIntersectStrips(), and operator<<().

◆ GetStripNum() [2/3]

int MucGeoGap::GetStripNum ( ) const
inline

Get SoftID.

Get number of strips in this gap.

Definition at line 92 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

92{ return m_StripNum; }

◆ GetStripNum() [3/3]

int MucGeoGap::GetStripNum ( ) const
inline

Get SoftID.

Get number of strips in this gap.

Definition at line 92 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

92{ return m_StripNum; }

◆ GuessStrip() [1/3]

int MucGeoGap::GuessStrip ( const float x,
const float y,
const float z ) const

Given a position (gap coordinate), guess the approximate strip containing the position, as there are intervals between the strips.

Definition at line 320 of file MucGeoGap.cxx.

320 {
321 // Given a position (gap coordinate), find the approximate strip containing the position, as
322 // there are intervals between the strips.
323 float x0, y0, z0; // XYZ position of the strip NO min.
324 float xn, yn, zn; // XYZ position of the strip NO max.
325 float dx; // Approximate width of a strip and a interval.
326 int n, iGuess;
327
328 n = m_StripNum - 1;
329
330 GetStrip( 0 )->GetCenterPos( x0, y0, z0 );
331 GetStrip( n )->GetCenterPos( xn, yn, zn );
332
333 // cout << n << endl;
334 // cout << "x0 " << x0 << " xn " << xn << " x " << x << endl;
335 // cout << "y0 " << y0 << " yn " << yn << " y " << y << endl;
336 // cout << "orient " << m_Orient << endl;
337
338 if ( m_Orient == 0 )
339 {
340 dx = ( yn - y0 ) / n;
341 iGuess = int( ( y - y0 ) / dx + 0.5 );
342 return iGuess;
343 }
344 else
345 {
346 dx = ( xn - x0 ) / n;
347 iGuess = int( ( x - x0 ) / dx + 0.5 );
348 return iGuess;
349 }
350}
const Int_t n
MucGeoStrip * GetStrip(const int strip) const
Point to a strip within this gap.
void GetCenterPos(float &x, float &y, float &z) const
Get center position of this strip (in the gap coordinate system).

Referenced by MucGeoGeneral::FindIntersectStrips(), MucGeoGeneral::FindIntersectStrips(), and ExtMucKal::MucKalIniti().

◆ GuessStrip() [2/3]

int MucGeoGap::GuessStrip ( const float x,
const float y,
const float z ) const

Given a position (gap coordinate), guess the approximate strip containing the position, as there are intervals between the strips.

◆ GuessStrip() [3/3]

int MucGeoGap::GuessStrip ( const float x,
const float y,
const float z ) const

Given a position (gap coordinate), guess the approximate strip containing the position, as there are intervals between the strips.

◆ IsInGap() [1/3]

bool MucGeoGap::IsInGap ( const float x,
const float y,
const float z ) const

Check if the point (given in gap coordinate) is within the gap boundary.

Definition at line 585 of file MucGeoGap.cxx.

585 {
586 // Check if the point (given in gap coordinate) is within the gap boundary.
587 return ( ( x > -0.5 * m_XSize - kGapEdge ) && ( x < 0.5 * m_XSize + kGapEdge ) &&
588 ( y > -0.5 * m_YSize - kGapEdge ) && ( y < 0.5 * m_YSize + kGapEdge ) &&
589 ( z > ( m_dzHighEdge - m_ZSize ) ) && ( z < m_dzHighEdge ) );
590}

Referenced by CompareIntersection(), MucGeoGeneral::FindIntersectGaps(), MucGeoGeneral::FindIntersections(), and ProjectToGap().

◆ IsInGap() [2/3]

bool MucGeoGap::IsInGap ( const float x,
const float y,
const float z ) const

Check if the point (given in gap coordinate) is within the gap boundary.

◆ IsInGap() [3/3]

bool MucGeoGap::IsInGap ( const float x,
const float y,
const float z ) const

Check if the point (given in gap coordinate) is within the gap boundary.

◆ operator=() [1/3]

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

Assignment constructor.

Definition at line 204 of file MucGeoGap.cxx.

204 {
205 // Assignment operator.
206 if ( this != &orig )
207 { // Watch out for self-assignment!
208 m_Part = orig.m_Part;
209 m_Seg = orig.m_Seg;
210 m_Gap = orig.m_Gap;
211 m_StripNum = orig.m_StripNum;
212 m_Orient = orig.m_Orient;
213 m_HitStatus = orig.m_HitStatus;
214
215 m_XSize = orig.m_XSize;
216 m_YSize = orig.m_YSize;
217 m_ZSize = orig.m_ZSize;
218
219 m_dzHighEdge = orig.m_dzHighEdge;
220 m_dzFarFrontGas = orig.m_dzFarFrontGas;
221 m_dzNearFrontGas = orig.m_dzNearFrontGas;
222 m_dzNearBackGas = orig.m_dzNearBackGas;
223 m_dzFarBackGas = orig.m_dzFarBackGas;
224
225 m_Center = orig.m_Center;
226 m_Rotation = orig.m_Rotation;
227 m_RotationT = orig.m_RotationT;
228 m_Translation = orig.m_Translation;
229
230 m_IronThickness = orig.m_IronThickness;
231
232 m_pMucGeoStrip = orig.m_pMucGeoStrip;
233 }
234 return *this;
235}

◆ operator=() [2/3]

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

Assignment constructor.

◆ operator=() [3/3]

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

Assignment constructor.

◆ Orient() [1/3]

◆ Orient() [2/3]

int MucGeoGap::Orient ( ) const
inline

Get orientation of strips in this gap ( 0 for strips parrel to x axis, 1 for strips parrel to y axis. in gap coordinate).

Definition at line 86 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

86{ return m_Orient; }

◆ Orient() [3/3]

int MucGeoGap::Orient ( ) const
inline

Get orientation of strips in this gap ( 0 for strips parrel to x axis, 1 for strips parrel to y axis. in gap coordinate).

Definition at line 86 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

86{ return m_Orient; }

◆ Part() [1/3]

int MucGeoGap::Part ( ) const
inline

Get part identifier (0,2 for cap, 1 for barrel).

Definition at line 76 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

76{ return m_Part; }

Referenced by RecMucTrack::ComputeDistanceMatch(), and operator<<().

◆ Part() [2/3]

int MucGeoGap::Part ( ) const
inline

Get part identifier (0,2 for cap, 1 for barrel).

Definition at line 76 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

76{ return m_Part; }

◆ Part() [3/3]

int MucGeoGap::Part ( ) const
inline

Get part identifier (0,2 for cap, 1 for barrel).

Definition at line 76 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

76{ return m_Part; }

◆ ProjectToGap() [1/6]

HepPoint3D MucGeoGap::ProjectToGap ( const HepPoint3D gPoint,
const float vy,
const float y0,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given parabola, and a line, find the intersection with the gap in the global.

Definition at line 436 of file MucGeoGap.cxx.

440 {
441 // Given a line by basepoint gPoint and direction gDirection,
442 // find the intersection with the gap (in global coordinate).
443 Hep3Vector gapVect = m_Rotation.colZ();
444
445 HepPlane3D plane( gapVect, m_Center );
446 MucGeometron geometron;
447 // bool getPoint =
448 geometron.GetIntersectionQuadPlane( gPoint, vy, y0, a, b, c, plane, gCross1, gCross2 );
449
450 HepPoint3D localCross = TransformToGap( gCross1 );
451
452 bool found = false;
453 bool found1 = false;
454 bool found2 = false;
455 HepPoint3D temp;
456 int good = 0;
457
458 if ( IsInGap( localCross.x(), localCross.y(), localCross.z() ) )
459 {
460 good = 1;
461 found1 = true;
462 }
463
464 localCross = TransformToGap( gCross2 );
465 if ( IsInGap( localCross.x(), localCross.y(), localCross.z() ) )
466 {
467 good = 2;
468 found2 = true;
469 }
470 if ( found1 && found2 )
471 {
472 float center = b / ( -2 * a );
473 if ( whichhalf == 2 )
474 {
475 if ( gCross1.x() > center ) good = 1;
476 if ( gCross2.x() > center ) good = 2;
477 }
478 if ( whichhalf == 1 )
479 {
480 if ( gCross1.x() < center ) good = 1;
481 if ( gCross2.x() < center ) good = 2;
482 }
483 }
484 if ( good == 2 )
485 {
486 temp = gCross1;
487 gCross1 = gCross2;
488 gCross2 = temp;
489 } // keep gCross1 be the good one!
490 // cout<<"detail: "<<whichhalf<<" "<<gCross1<<" & "<<gCross2<<" "<<a<<" "<<b<<" "<<c<<endl;
491
492 return gCross1;
493}
HepGeom::Plane3D< double > HepPlane3D
bool GetIntersectionQuadPlane(const HepPoint3D pLine, const float vy, const float y0, const float a, const float b, const float c, const HepPlane3D plane, HepPoint3D &cross1, HepPoint3D &cross2)

◆ ProjectToGap() [2/6]

HepPoint3D MucGeoGap::ProjectToGap ( const HepPoint3D gPoint,
const float vy,
const float y0,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given parabola, and a line, find the intersection with the gap in the global.

◆ ProjectToGap() [3/6]

HepPoint3D MucGeoGap::ProjectToGap ( const HepPoint3D gPoint,
const float vy,
const float y0,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given parabola, and a line, find the intersection with the gap in the global.

◆ ProjectToGap() [4/6]

HepPoint3D MucGeoGap::ProjectToGap ( const HepPoint3D gPoint,
const Hep3Vector gVect ) const

Given a line, find the intersection with the gap in the global.

Definition at line 352 of file MucGeoGap.cxx.

353 {
354 // Given a line by basepoint gPoint and direction gDirection,
355 // find the intersection with the gap (in global coordinate).
356 Hep3Vector gapVect = m_Rotation.colZ();
357 HepPoint3D gCross( 0, 0, 0 );
358
359 HepPlane3D plane( gapVect, m_Center );
360 MucGeometron geometron;
361 // bool getPoint =
362 geometron.GetIntersectionLinePlane( gPoint, gDirection, plane, gCross );
363
364 return gCross;
365}
bool GetIntersectionLinePlane(const HepPoint3D pLine, const Hep3Vector vectLine, const HepPlane3D plane, HepPoint3D &cross)
Get intersection of a line and a plane.

Referenced by MucGeoGeneral::FindIntersectGaps(), MucGeoGeneral::FindIntersection(), MucGeoGeneral::FindIntersection(), MucGeoGeneral::FindIntersections(), MucGeoGeneral::FindIntersectStrips(), MucGeoGeneral::FindIntersectStrips(), and ExtMucKal::MucKalIniti().

◆ ProjectToGap() [5/6]

HepPoint3D MucGeoGap::ProjectToGap ( const HepPoint3D gPoint,
const Hep3Vector gVect ) const

Given a line, find the intersection with the gap in the global.

◆ ProjectToGap() [6/6]

HepPoint3D MucGeoGap::ProjectToGap ( const HepPoint3D gPoint,
const Hep3Vector gVect ) const

Given a line, find the intersection with the gap in the global.

◆ ProjectToGapQuadLocal() [1/3]

HepPoint3D MucGeoGap::ProjectToGapQuadLocal ( const int part,
const int orient,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Definition at line 395 of file MucGeoGap.cxx.

399 {
400 Hep3Vector gapVect, center_local;
401 if ( part == 1 && orient == 1 )
402 {
403 gapVect = m_Rotation.colZ();
404 center_local = m_Center;
405 }
406 else if ( part == 1 && orient == 0 )
407 { // in this orientation, the fitting is done in local coordinate.
408 gapVect.setX( 0 );
409 gapVect.setY( 1 );
410 gapVect.setZ( 0 );
411 center_local.setX( 0 );
412 center_local.setY( m_Center.mag() );
413 center_local.setZ( 0 );
414 }
415 else
416 { // in this orientation, the fitting is done in local coordinate.
417 gapVect.setX( 1 );
418 gapVect.setY( 0 );
419 gapVect.setZ( 0 );
420 center_local.setX( m_Center.z() );
421 center_local.setY( 0 );
422 center_local.setZ( 0 );
423 }
424
425 // cout<<"in mucgeogap: part = "<<part<<" o: "<<orient<<" gapvect: "<<gapVect<<" center =
426 // "<<m_Center<<endl; cout<<"in mucgeogap: center local = "<<center_local<<endl;
427
428 HepPlane3D plane( gapVect, center_local );
429
430 MucGeometron geometron;
431 geometron.GetIntersectionQuadPlaneLocal( part, orient, a, b, c, plane, gCross1, gCross2 );
432
433 return HepPoint3D( 0, 0, 0 );
434}
bool GetIntersectionQuadPlaneLocal(const int part, const int orient, const float a, const float b, const float c, const HepPlane3D plane, HepPoint3D &cross1, HepPoint3D &cross2)

Referenced by MucGeoGeneral::FindIntersectionQuadLocal().

◆ ProjectToGapQuadLocal() [2/3]

HepPoint3D MucGeoGap::ProjectToGapQuadLocal ( const int part,
const int orient,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

◆ ProjectToGapQuadLocal() [3/3]

HepPoint3D MucGeoGap::ProjectToGapQuadLocal ( const int part,
const int orient,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

◆ ProjectToGapSurface() [1/6]

void MucGeoGap::ProjectToGapSurface ( const HepPoint3D gPoint,
const float vy,
const float y0,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given parabola, and a line, find the intersection with two surface of the gap in the global.

Definition at line 495 of file MucGeoGap.cxx.

499 {
500 // Given a line by basepoint gPoint and direction gDirection,
501 // find the intersection with the gap (in global coordinate).
502
503 HepPoint3D cross1, cross2, cross3, cross4;
504
505 Hep3Vector gapVect = m_Rotation.colZ();
506
507 HepPlane3D planeInner( gapVect, m_SurfaceInner );
508 HepPlane3D planeOuter( gapVect, m_SurfaceOuter );
509
510 MucGeometron geometron;
511 // bool getPoint =
512 geometron.GetIntersectionQuadPlane( gPoint, vy, y0, a, b, c, planeInner, cross1, cross2 );
513 geometron.GetIntersectionQuadPlane( gPoint, vy, y0, a, b, c, planeOuter, cross3, cross4 );
514
515 gCross1 = CompareIntersection( whichhalf, cross1, cross2, a, b, c );
516 gCross2 = CompareIntersection( whichhalf, cross3, cross4, a, b, c );
517}
HepPoint3D CompareIntersection(const int whichhalf, const HepPoint3D gCross1, const HepPoint3D gCross2, const float a, const float b, const float c) const

◆ ProjectToGapSurface() [2/6]

void MucGeoGap::ProjectToGapSurface ( const HepPoint3D gPoint,
const float vy,
const float y0,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given parabola, and a line, find the intersection with two surface of the gap in the global.

◆ ProjectToGapSurface() [3/6]

void MucGeoGap::ProjectToGapSurface ( const HepPoint3D gPoint,
const float vy,
const float y0,
const float a,
const float b,
const float c,
const int whichhalf,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given parabola, and a line, find the intersection with two surface of the gap in the global.

◆ ProjectToGapSurface() [4/6]

void MucGeoGap::ProjectToGapSurface ( const HepPoint3D gPoint,
const Hep3Vector gVect,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given a line, find the intersection with two surface of the gap in the global.

Definition at line 380 of file MucGeoGap.cxx.

381 {
382 // Given a line by basepoint gPoint and direction gDirection,
383 // find the intersection with the gap (in global coordinate).
384 Hep3Vector gapVect = m_Rotation.colZ();
385
386 HepPlane3D planeInner( gapVect, m_SurfaceInner );
387 HepPlane3D planeOuter( gapVect, m_SurfaceOuter );
388 MucGeometron geometron;
389 // bool getPoint =
390
391 geometron.GetIntersectionLinePlane( gPoint, gDirection, planeInner, gCross1 );
392 geometron.GetIntersectionLinePlane( gPoint, gDirection, planeOuter, gCross2 );
393}

Referenced by MucGeoGeneral::FindIntersectionSurface(), and MucGeoGeneral::FindIntersectionSurface().

◆ ProjectToGapSurface() [5/6]

void MucGeoGap::ProjectToGapSurface ( const HepPoint3D gPoint,
const Hep3Vector gVect,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given a line, find the intersection with two surface of the gap in the global.

◆ ProjectToGapSurface() [6/6]

void MucGeoGap::ProjectToGapSurface ( const HepPoint3D gPoint,
const Hep3Vector gVect,
HepPoint3D & cross1,
HepPoint3D & cross2 ) const

Given a line, find the intersection with two surface of the gap in the global.

◆ ProjectToGapWithSigma() [1/3]

HepPoint3D MucGeoGap::ProjectToGapWithSigma ( const HepPoint3D gPoint,
const Hep3Vector gVect,
const HepPoint3D gPointSigma,
const Hep3Vector gVectSigma,
HepPoint3D & gCross,
HepPoint3D & gCrossSigma ) const

Definition at line 367 of file MucGeoGap.cxx.

369 {
370 Hep3Vector gapVect = m_Rotation.colZ();
371
372 HepPlane3D plane( gapVect, m_Center );
373 MucGeometron geometron;
374 geometron.GetIntersectionLinePlaneWithSigma( gPoint, gDirection, gPointSigma,
375 gDirectionSigma, plane, gCross, gCrossSigma );
376
377 return gCross;
378}
bool GetIntersectionLinePlaneWithSigma(const HepPoint3D pLine, const Hep3Vector vectLine, const HepPoint3D pLineSigma, const Hep3Vector vectLineSigma, const HepPlane3D plane, HepPoint3D &cross, HepPoint3D &crossSigma)

◆ ProjectToGapWithSigma() [2/3]

HepPoint3D MucGeoGap::ProjectToGapWithSigma ( const HepPoint3D gPoint,
const Hep3Vector gVect,
const HepPoint3D gPointSigma,
const Hep3Vector gVectSigma,
HepPoint3D & gCross,
HepPoint3D & gCrossSigma ) const

◆ ProjectToGapWithSigma() [3/3]

HepPoint3D MucGeoGap::ProjectToGapWithSigma ( const HepPoint3D gPoint,
const Hep3Vector gVect,
const HepPoint3D gPointSigma,
const Hep3Vector gVectSigma,
HepPoint3D & gCross,
HepPoint3D & gCrossSigma ) const

◆ RotateToGap() [1/3]

Hep3Vector MucGeoGap::RotateToGap ( const Hep3Vector gVect) const

Rotate a vector from global coordinate to gap coordinate.

Definition at line 570 of file MucGeoGap.cxx.

570 {
571 // Rotate a vector from Bes global coordinate to gap coordinate.
572 return m_RotationT * gVect;
573}

Referenced by MucGeoGeneral::FindIntersectStrips(), and MucGeoGeneral::FindIntersectStrips().

◆ RotateToGap() [2/3]

Hep3Vector MucGeoGap::RotateToGap ( const Hep3Vector gVect) const

Rotate a vector from global coordinate to gap coordinate.

◆ RotateToGap() [3/3]

Hep3Vector MucGeoGap::RotateToGap ( const Hep3Vector gVect) const

Rotate a vector from global coordinate to gap coordinate.

◆ RotateToGlobal() [1/3]

Hep3Vector MucGeoGap::RotateToGlobal ( const Hep3Vector pVect) const

Rotate a vector from gap coordinate to global coordinate.

Definition at line 565 of file MucGeoGap.cxx.

565 {
566 // Rotate a vector from gap coordinate to Bes global coordinate.
567 return m_Rotation * pVect;
568}

◆ RotateToGlobal() [2/3]

Hep3Vector MucGeoGap::RotateToGlobal ( const Hep3Vector pVect) const

Rotate a vector from gap coordinate to global coordinate.

◆ RotateToGlobal() [3/3]

Hep3Vector MucGeoGap::RotateToGlobal ( const Hep3Vector pVect) const

Rotate a vector from gap coordinate to global coordinate.

◆ Seg() [1/3]

int MucGeoGap::Seg ( ) const
inline

Get seg identifier (0-7).

Definition at line 79 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

79{ return m_Seg; }

Referenced by RecMucTrack::ComputeDistanceMatch(), and operator<<().

◆ Seg() [2/3]

int MucGeoGap::Seg ( ) const
inline

Get seg identifier (0-7).

Definition at line 79 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

79{ return m_Seg; }

◆ Seg() [3/3]

int MucGeoGap::Seg ( ) const
inline

Get seg identifier (0-7).

Definition at line 79 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

79{ return m_Seg; }

◆ SetHitStatus() [1/3]

void MucGeoGap::SetHitStatus ( const bool hit)
inline

Set SoftID of the gap.

Tell whether or not this gap registered a signal in this event.

Definition at line 181 of file InstallArea/x86_64-el9-gcc13-dbg/include/MucGeomSvc/MucGeoGap.h.

181{ m_HitStatus = hit; }

◆ SetHitStatus() [2/3]

void MucGeoGap::SetHitStatus ( const bool hit)
inline

Set SoftID of the gap.

Tell whether or not this gap registered a signal in this event.

Definition at line 181 of file InstallArea/x86_64-el9-gcc13-opt/include/MucGeomSvc/MucGeoGap.h.

181{ m_HitStatus = hit; }

◆ SetHitStatus() [3/3]

void MucGeoGap::SetHitStatus ( const bool hit)
inline

Set SoftID of the gap.

Tell whether or not this gap registered a signal in this event.

Definition at line 181 of file Muc/MucGeomSvc/include/MucGeomSvc/MucGeoGap.h.

181{ m_HitStatus = hit; }

◆ TransformToGap() [1/3]

◆ TransformToGap() [2/3]

HepPoint3D MucGeoGap::TransformToGap ( const HepPoint3D gPoint) const

Transform a point from global coordinate to gap coordinate.

◆ TransformToGap() [3/3]

HepPoint3D MucGeoGap::TransformToGap ( const HepPoint3D gPoint) const

Transform a point from global coordinate to gap coordinate.

◆ TransformToGlobal() [1/3]

HepPoint3D MucGeoGap::TransformToGlobal ( const HepPoint3D pPoint) const

Transform a point from gap coordinate to global coordinate.

Definition at line 575 of file MucGeoGap.cxx.

575 {
576 // Transform a point from gap coordinate to Bes global coordinate.
577 return m_Rotation * pPoint + m_Translation;
578}

Referenced by RecMucTrack::CalculateInsct(), and main().

◆ TransformToGlobal() [2/3]

HepPoint3D MucGeoGap::TransformToGlobal ( const HepPoint3D pPoint) const

Transform a point from gap coordinate to global coordinate.

◆ TransformToGlobal() [3/3]

HepPoint3D MucGeoGap::TransformToGlobal ( const HepPoint3D pPoint) const

Transform a point from gap coordinate to global coordinate.


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