17#include <CLHEP/Vector/ThreeVector.h>
18#include <CLHEP/Geometry/Point3D.h>
19#include <CLHEP/Geometry/Plane3D.h>
20#include <CLHEP/Vector/Rotation.h>
21#include <CLHEP/Matrix/Matrix.h>
23#include "TGeoMatrix.h"
24#include "TGeoPhysicalNode.h"
26#ifndef ENABLE_BACKWARDS_COMPATIBILITY
29#ifndef ENABLE_BACKWARDS_COMPATIBILITY
60 const float xTarget1Global,
61 const float yTarget1Global,
62 const float zTarget1Global,
63 const float xTarget2Global,
64 const float yTarget2Global,
65 const float zTarget2Global,
66 const float xTarget3Global,
67 const float yTarget3Global,
68 const float zTarget3Global,
69 const float dzHighEdge,
70 const float dzFarFrontGas,
71 const float dzNearFrontGas,
72 const float dzNearBackGas,
73 const float dzFarBackGas,
74 const float dxTarget1ToFiducial,
75 const float dyTarget1ToFiducial,
76 const float dxFiducialToCenter,
77 const float dyFiducialToCenter);
85 const TGeoPhysicalNode *gapPhyscialNode,
86 const float ironThickness);
98 int Part()
const {
return m_Part; }
101 int Seg()
const {
return m_Seg; }
104 int Gap()
const {
return m_Gap; }
140 void GetSize(
float &xSize,
float &ySize,
float &zSize)
const;
144 float &thetaY,
float &phiY,
145 float &thetaZ,
float &phiZ)
const;
153 const Hep3Vector gVect)
const;
156 const Hep3Vector gVect,
158 const Hep3Vector gVectSigma,
164 const Hep3Vector gVect,
169 const int orient,
const float a,
170 const float b,
const float c,
const int whichhalf,
178 const float vy,
const float y0,
const float a,
179 const float b,
const float c,
const int whichhalf,
185 const float vy,
const float y0,
const float a,
186 const float b,
const float c,
const int whichhalf,
192 const float a,
const float b,
const float c )
const;
208 bool IsInGap(
const float x,
const float y,
const float z)
const;
234 float m_dzFarFrontGas;
235 float m_dzNearFrontGas;
236 float m_dzNearBackGas;
237 float m_dzFarBackGas;
239 float m_IronThickness;
242 HepRotation m_Rotation;
243 HepRotation m_RotationT;
244 Hep3Vector m_Translation;
249 TGeoPhysicalNode *m_PhyNode;
251 vector<MucGeoStrip*> m_pMucGeoStrip;
HepGeom::Point3D< double > HepPoint3D
ostream & operator<<(ostream &s, const MucGeoGap &gap)
HepGeom::Vector3D< double > HepVector3D
void GetSize(float &xSize, float &ySize, float &zSize) const
Get size of this gap.
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.
int GetStripNum() const
Get SoftID.
MucGeoGap()
Default constructor.
int GuessStrip(const float x, const float y, const float z) const
bool GetHitStatus() const
Get whether this gap is hit.
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 GetCenter() const
Get gap center position in global coordinate.
float GetdzNearFrontGas() const
Get m_dzNearFrontGas;.
float GetdzFarFrontGas() const
Get m_dzFarFrontGas;.
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
Given parabola, and a line, find the intersection with two surface of the gap in the global.
int Seg() const
Get seg identifier (0-7).
float GetdzNearBackGas() const
Get m_dzNearBackGas;.
HepPoint3D ProjectToGap(const HepPoint3D gPoint, const Hep3Vector gVect) const
Given a line, find the intersection with the gap in the global.
MucGeoStrip * AddStrip(const int strip)
Add a strip to the gap.
int Gap() const
Get gap identifier (0-8).
int Part() const
Get part identifier (0,2 for cap, 1 for barrel).
void SetHitStatus(const bool hit)
Set SoftID of the gap.
MucGeoGap(const int part, const int seg, const int gap, const int orient, const int stripNum, const TGeoPhysicalNode *gapPhyscialNode, const float ironThickness)
ROOT constructor.
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.
HepPoint3D ProjectToGapWithSigma(const HepPoint3D gPoint, const Hep3Vector gVect, const HepPoint3D gPointSigma, const Hep3Vector gVectSigma, HepPoint3D &gCross, HepPoint3D &gCrossSigma) const
MucGeoGap & operator=(const MucGeoGap &orig)
Assignment 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 MucGeoGap &orig)
Copy constructor.
float GetIronThickness() const
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 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 TransformToGap(const HepPoint3D gPoint) const
Transform a point from global coordinate to gap coordinate.
MucGeoStrip * GetStrip(const int strip) const
Point to a strip within this gap.
float GetdzFarBackGas() const
Get m_dzFarFrontGas;.
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.