12#ifndef MUC_GEO_GENERAL_H
13#define MUC_GEO_GENERAL_H
15#include <CLHEP/Geometry/Plane3D.h>
16#include <CLHEP/Geometry/Point3D.h>
17#include <CLHEP/Vector/Rotation.h>
18#include <CLHEP/Vector/ThreeVector.h>
24#include "Identifier/Identifier.h"
25#include "Identifier/MucID.h"
26#include "MucGeomSvc/MucGeoGap.h"
27#include "MucGeomSvc/MucGeoStrip.h"
29#ifndef ENABLE_BACKWARDS_COMPATIBILITY
32#ifndef ENABLE_BACKWARDS_COMPATIBILITY
95 return m_StripNumInGap[part][seg][gap];
104 const Hep3Vector gDirection );
110 const Hep3Vector gDirection );
113 const HepPoint3D gPoint,
const Hep3Vector gDirection,
114 vector<int>& padID, vector<float>& intersection_x,
115 vector<float>& intersection_y,
116 vector<float>& intersection_z );
121 const Hep3Vector gDirection );
129 const float vy,
const float vz,
const float x0,
const float y0,
130 const float z0,
const float sigmaVx,
const float sigmaVy,
131 const float sigmaVz,
const float sigmaX0,
const float sigmaY0,
132 const float sigmaZ0,
float& x,
float& y,
float& z,
float& sigmaX,
133 float& sigmaY,
float& sigmaZ );
136 const float b,
const float c,
138 float& x1,
float& y1,
float& z1,
float& x2,
float& y2,
139 float& z2,
float& sigmaX,
float& sigmaY,
float& sigmaZ );
147 const float x0,
const float y0,
const float z0,
const float a,
148 const float b,
const float c,
150 const float sigmaVx,
const float sigmaVy,
const float sigmaVz,
151 const float sigmaX0,
const float sigmaY0,
const float sigmaZ0,
152 float& x1,
float& y1,
float& z1,
float& x2,
float& y2,
float& z2,
153 float& sigmaX,
float& sigmaY,
float& sigmaZ );
156 const float vy,
const float vz,
const float x0,
const float y0,
157 const float z0,
const float sigmaVx,
const float sigmaVy,
158 const float sigmaVz,
const float sigmaX0,
const float sigmaY0,
159 const float sigmaZ0,
float& x1,
float& y1,
float& z1,
160 float& x2,
float& y2,
float& z2,
float& sigmaX1,
161 float& sigmaY1,
float& sigmaZ1,
float& sigmaX2,
float& sigmaY2,
170 const float x0,
const float y0,
const float z0,
const float a,
171 const float b,
const float c,
173 const float sigmaVx,
const float sigmaVy,
const float sigmaVz,
174 const float sigmaX0,
const float sigmaY0,
const float sigmaZ0,
175 float& x1,
float& y1,
float& z1,
float& x2,
float& y2,
176 float& z2,
float& sigmaX,
float& sigmaY,
float& sigmaZ );
183 static int m_gGeometryInit;
188 static map<Identifier, MucGeoGap*> m_gpMucGeoGap;
190 static map<Identifier, MucGeoStrip*> m_gpMucGeoStrip;
192 static const int m_kPartNum = 3;
193 static const int m_kSegMax = 8;
194 static const int m_kGapMax = 9;
195 static const int m_kStripMax = 112;
199 int m_StripNumInGap[m_kPartNum][m_kSegMax][m_kGapMax];
HepGeom::Vector3D< double > HepVector3D
HepGeom::Point3D< double > HepPoint3D
HepGeom::Point3D< double > HepPoint3D
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)
static MucGeoGeneral * Instance()
Get a pointer to the single instance of MucGeoGeneral.
MucGeoGap * GetGap(const Identifier id) const
Get a pointer to the gap identified by Indentifier.
vector< Identifier > FindIntersectStrips(const int part, const int gap, const HepPoint3D gPoint, const Hep3Vector gDirection, vector< int > &padID, vector< float > &intersection_x, vector< float > &intersection_y, vector< float > &intersection_z)
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.
MucGeoStrip * GetStrip(const Identifier id) const
Get a pointer to the strip identified by Indentifier.
~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 vy, const float x0, const float y0, const float z0, const float a, const float b, const float c, const int whichhalf, 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 &sigmaX, float &sigmaY, float &sigmaZ)
void FindIntersection(const int part, const int seg, const int gap, const float vy, const float x0, const float y0, const float z0, const float a, const float b, const float c, const int whichhalf, 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 &sigmaX, float &sigmaY, float &sigmaZ)
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.
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)