12#ifndef MUC_GEO_GENERAL_H
13#define MUC_GEO_GENERAL_H
19#include <CLHEP/Vector/ThreeVector.h>
20#include <CLHEP/Geometry/Point3D.h>
21#include <CLHEP/Geometry/Plane3D.h>
22#include <CLHEP/Vector/Rotation.h>
24#include "Identifier/Identifier.h"
25#include "Identifier/MucID.h"
26#include "MucGeomSvc/MucGeoStrip.h"
27#include "MucGeomSvc/MucGeoGap.h"
29#ifndef ENABLE_BACKWARDS_COMPATIBILITY
32#ifndef ENABLE_BACKWARDS_COMPATIBILITY
97 {
return m_StripNumInGap[part][seg][gap]; }
105 const HepPoint3D gPoint,
const Hep3Vector gDirection);
110 const HepPoint3D gPoint,
const Hep3Vector gDirection);
113 const HepPoint3D gPoint,
const Hep3Vector gDirection,
114 vector<int> &padID, vector<float> &intersection_x,
115 vector<float> &intersection_y,vector<float> &intersection_z);
120 const HepPoint3D gPoint,
const Hep3Vector gDirection);
128 const float vx,
const float vy,
const float vz,
129 const float x0,
const float y0,
const float z0,
130 const float sigmaVx,
const float sigmaVy,
const float sigmaVz,
131 const float sigmaX0,
const float sigmaY0,
const float sigmaZ0,
132 float& x,
float&
y,
float& z,
133 float& sigmaX,
float& sigmaY,
float& sigmaZ);
137 const float a,
const float b,
const float c,
139 float& x1,
float& y1,
float& z1,
140 float& x2,
float& y2,
float& z2,
141 float& sigmaX,
float& sigmaY,
float& sigmaZ);
153 const float x0,
const float y0,
const float z0,
154 const float a,
const float b,
const float c,
156 const float sigmaVx,
const float sigmaVy,
const float sigmaVz,
157 const float sigmaX0,
const float sigmaY0,
const float sigmaZ0,
158 float& x1,
float& y1,
float& z1,
159 float& x2,
float& y2,
float& z2,
160 float& sigmaX,
float& sigmaY,
float& sigmaZ);
164 const float vx,
const float vy,
const float vz,
165 const float x0,
const float y0,
const float z0,
166 const float sigmaVx,
const float sigmaVy,
const float sigmaVz,
167 const float sigmaX0,
const float sigmaY0,
const float sigmaZ0,
168 float& x1,
float& y1,
float& z1,
169 float& x2,
float& y2,
float& z2,
170 float& sigmaX1,
float& sigmaY1,
float& sigmaZ1,
171 float& sigmaX2,
float& sigmaY2,
float& sigmaZ2);
180 const float x0,
const float y0,
const float z0,
181 const float a,
const float b,
const float c,
183 const float sigmaVx,
const float sigmaVy,
const float sigmaVz,
184 const float sigmaX0,
const float sigmaY0,
const float sigmaZ0,
185 float& x1,
float& y1,
float& z1,
186 float& x2,
float& y2,
float& z2,
187 float& sigmaX,
float& sigmaY,
float& sigmaZ);
196 static int m_gGeometryInit;
201 static map<Identifier, MucGeoGap*> m_gpMucGeoGap;
203 static map<Identifier, MucGeoStrip*> m_gpMucGeoStrip;
205 static const int m_kPartNum = 3;
206 static const int m_kSegMax = 8;
207 static const int m_kGapMax = 9;
208 static const int m_kStripMax = 112;
212 int m_StripNumInGap[m_kPartNum][m_kSegMax][m_kGapMax];
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
ostream & operator<<(ostream &s, const MucGeoGeneral &geom)
int GetStripNumTotal()
Get total number of strips.
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)
void Init()
Initialize the instance of MucGeoGeneral.
MucGeoStrip * GetStrip(const int part, const int seg, const int gap, const int strip) const
Get a pointer to the strip identified by (part,seg,gap,strip).
vector< HepPoint3D > FindIntersections(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
void InitFromXML()
Initialize from xml.
void InitFromASCII()
Initialize form ASCII.
int GetStripNumInGap(const int part, const int seg, const int gap)
MucGeoGap * GetGap(const int part, const int seg, const int gap) const
Get a pointer to the gap identified by (part,seg,gap).
MucGeoGeneral()
Constructor.
~MucGeoGeneral()
Destructor.
vector< Identifier > FindIntersectGaps(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
vector< Identifier > FindIntersectStrips(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection)
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 Clear()
Clear the fgpMucGeoGap and fgpMucGeoStrip vector containers.
void Destroy()
Destroy the single instance of MucGeoGeneral.
MucGeoGeneral & operator=(const MucGeoGeneral &orig)
Assignment constructor.
MucGeoGeneral(const MucGeoGeneral &orig)
Copy constructor.
static MucGeoGeneral * Instance()
Get a pointer to the single instance of MucGeoGeneral.
void InitFromDatabase()
Initialize from database.
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)