Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GeomSvc.h
Go to the documentation of this file.
1 /*
2 GeomSvc.h
3 
4 Definition of the class GeomSvc, which provide geometry service to the
5 whole tracking system.
6 
7 For now the drift time is not used so as to avoid left-right ambiguity
8 
9 Author: Kun Liu, liuk@fnal.gov
10 Created: 10-18-2011
11 
12 Updated by Kun Liu on 07-03-2012
13 --- Support all detector planes including chambers, hodoscopes, and prop.
14 tubes
15 --- The convention of detector plane ID is: firstly chambers, then hodos,
16 and then prop. tubes
17 */
18 
19 #ifndef _GEOMSVC_H
20 #define _GEOMSVC_H
21 
22 #include <iostream>
23 #include <vector>
24 #include <string>
25 #include <map>
26 
27 #include <TVector3.h>
28 #include <TVectorD.h>
29 #include <TMatrixD.h>
30 #include <TSpline.h>
31 
32 #include <GlobalConsts.h>
33 #include <phool/recoConsts.h>
34 
35 class Plane
36 {
37 public:
38  //Default constructor
39  Plane();
40 
41  //Get interception with track
42  double intercept(double tx, double ty, double x0_track, double y0_track) const;
43 
44  //X, Y, U, V conversion
45  double getX(double w, double y) const { return w/costheta - y*tantheta; }
46  double getY(double x, double w) const { return w/sintheta - x/tantheta; }
47  double getW(double x, double y) const { return x*costheta + y*sintheta; }
48 
49  //Get wire position by elementID
50  double getWirePosition(int elementID) const;
51 
52  //Get end point vector by elementID
53  TVectorD getEndPoint(int elementID, int sign = -1) const;
54 
55  //Calculate the internal variables
56  void update();
57 
58  //Debugging output
59  friend std::ostream& operator << (std::ostream& os, const Plane& plane);
60 
61 public:
62  //Detector identifier
64  std::string detectorName;
65  int planeType; //X = 1, angleFromVert > 0 = 2, angleFromVert < 0 = 3, Y = 4
66 
67  //Ideal properties
68  int nElements;
69  double spacing;
70  double cellWidth;
71  double xoffset;
72  double overlap;
73  double angleFromVert;
74  double sintheta;
75  double costheta;
76  double tantheta;
77 
78  //Survey info
79  double x0; //x0, y0, z0 define the center of detector
80  double y0;
81  double z0;
82  double x1; //x1, y1 define the lower/left edge of detector
83  double y1;
84  double z1; //z1 is the upstream z position of the detector
85  double x2; //x2, y2 define the upper/right edge of detector
86  double y2;
87  double z2; //z2 is the downstream z position of the detector
88  double thetaX;
89  double thetaY;
90  double thetaZ;
91 
92  //Alignment info
93  double deltaX;
94  double deltaY;
95  double deltaZ;
96  double deltaW; //for chambers and hodos
97  double deltaW_module[9]; //for prop. tubes only
98  double rotX;
99  double rotY;
100  double rotZ;
101  double resolution;
102 
103  //Final position/rotation
104  double xc;
105  double yc;
106  double zc;
107  double wc;
108  double rX;
109  double rY;
110  double rZ;
111 
112  //Geometric setup
113  TVectorD nVec = TVectorD(3); //Perpendicular to plane
114  TVectorD uVec = TVectorD(3); //measuring direction
115  TVectorD vVec = TVectorD(3); //wire direction
116  TVectorD xVec = TVectorD(3); //X direction
117  TVectorD yVec = TVectorD(3); //Y direction
118  TMatrixD rotM = TMatrixD(3, 3); //rotation matrix
119 
120  //Calibration info
121  double tmin;
122  double tmax;
123  TSpline3* rtprofile;
124 
125  //Vector to contain the wire positions
126  std::vector<double> elementPos;
127 };
128 
129 class GeomSvc
130 {
131 public:
133  static GeomSvc* instance();
134 
136  void init();
137  void initPlaneDirect();
138  void initPlaneDbSvc();
139  void initWireLUT();
140  void loadCalibration(const std::string& calibrateFile);
141  void loadAlignment(const std::string& alignmentFile_chamber, const std::string& alignmentFile_hodo, const std::string& alignmentFile_prop);
142  void loadMilleAlignment(const std::string& alignmentFile_mille);
143 
145  void close();
146 
148  void toLocalDetectorName(std::string& detectorName, int& eID);
149 
151  void setDetectorX0(const std::string detectorName, const double val) {
152  int index = getDetectorID(detectorName);
153  planes[index].x0 = val;
154  planes[index].update();
155  initWireLUT();
156  }
157  void setDetectorY0(const std::string detectorName, const double val) {
158  int index = getDetectorID(detectorName);
159  planes[index].y0 = val;
160  planes[index].update();
161  initWireLUT();
162  }
163  void setDetectorZ0(const std::string detectorName, const double val) {
164  int index = getDetectorID(detectorName);
165  planes[index].z0 = val;
166  planes[index].update();
167  initWireLUT();
168  }
169 
170  double getDetectorX0(const std::string detectorName) const {
171  int index = getDetectorID(detectorName);
172  return planes[index].x0;
173  }
174  double getDetectorY0(const std::string detectorName) const {
175  int index = getDetectorID(detectorName);
176  return planes[index].y0;
177  }
178  double getDetectorZ0(const std::string detectorName) const {
179  int index = getDetectorID(detectorName);
180  return planes[index].z0;
181  }
182 
184  int getDetectorID(const std::string & detectorName) const
185  {
186  return map_detectorID.find(detectorName)!=map_detectorID.end() ? map_detectorID.at(detectorName) : 0;
187  }
188  std::string getDetectorName(const int & detectorID) const
189  {
190  return map_detectorName.find(detectorID)!=map_detectorName.end() ? map_detectorName.at(detectorID) : "";
191  }
192 
193  std::vector<int> getDetectorIDs(std::string pattern);
194  bool findPatternInDetector(int detectorID, std::string pattern);
195 
196  Plane getPlane(int detectorID) const { return planes[detectorID]; }
197  double getPlanePosition(int detectorID) const { return planes[detectorID].zc; }
198  double getPlaneSpacing(int detectorID) const { return planes[detectorID].spacing; }
199  double getPlaneOverlap(int detectorID) const { return planes[detectorID].overlap; }
200  double getCellWidth(int detectorID) { return planes[detectorID].cellWidth; }
201  double getCostheta(int detectorID) const { return planes[detectorID].costheta; }
202  double getSintheta(int detectorID) const { return planes[detectorID].sintheta; }
203  double getTantheta(int detectorID) const { return planes[detectorID].tantheta; }
204  double getPlaneScaleX(int detectorID) { return planes[detectorID].x2 - planes[detectorID].x1; }
205  double getPlaneScaleY(int detectorID) { return planes[detectorID].y2 - planes[detectorID].y1; }
206  double getPlaneScaleZ(int detectorID) { return planes[detectorID].z2 - planes[detectorID].z1; }
207  int getTriggerLv(int detectorID) { return map_detid_triggerlv[detectorID]; }
208  int getPlaneNElements(int detectorID) { return planes[detectorID].nElements; }
209  double getPlaneResolution(int detectorID) const { return planes[detectorID].resolution; }
210 
211  double getPlaneCenterX(int detectorID) { return planes[detectorID].xc; }
212  double getPlaneCenterY(int detectorID) { return planes[detectorID].yc; }
213  double getPlaneCenterZ(int detectorID) { return planes[detectorID].zc; }
214  double getRotationInX(int detectorID) { return planes[detectorID].rX; }
215  double getRotationInY(int detectorID) { return planes[detectorID].rY; }
216  double getRotationInZ(int detectorID) { return planes[detectorID].rZ; }
217 
218  double getPlaneZOffset(int detectorID) { return planes[detectorID].deltaZ; }
219  double getPlanePhiOffset(int detectorID) { return planes[detectorID].rotZ; }
220  double getPlaneWOffset(int detectorID) { return planes[detectorID].deltaW; }
221  double getPlaneWOffset(int detectorID, int moduleID) { return planes[detectorID].deltaW_module[moduleID]; }
222 
223  int getPlaneType(int detectorID) const { return planes[detectorID].planeType; }
224  int getHodoStation(const int detectorID) const; //< Return a station number (1-4) for hodo planes or "0" for others.
225  int getHodoStation(const std::string detectorName) const; //< Return a station number (1-4) for hodo planes or "0" for others.
226 
227  double getKMAGCenter() { return (zmin_kmag + zmax_kmag)/2.; }
228  double getKMAGUpstream() { return zmin_kmag; }
229  double getKMAGDownstream() { return zmax_kmag; }
230 
232  double getInterception(int detectorID, double tx, double ty, double x0, double y0) const { return planes[detectorID].intercept(tx, ty, x0, y0); }
233  double getInterceptionFast(int detectorID, double tx, double ty, double x0, double y0) const;
234  double getInterceptionFast(int detectorID, double x_exp, double y_exp) const { return planes[detectorID].getW(x_exp, y_exp); }
235  double getDCA(int detectorID, int elementID, double tx, double ty, double x0, double y0);
236 
238  void getMeasurement(int detectorID, int elementID, double& measurement, double& dmeasurement);
239  double getMeasurement(int detectorID, int elementID);
240  void getEndPoints(int detectorID, int elementID, TVectorD& ep1, TVectorD& ep2);
241  void getEndPoints(int detectorID, int elementID, TVector3& ep1, TVector3& ep2);
242  void get2DBoxSize(int detectorID, int elementID, double& x_min, double& x_max, double& y_min, double& y_max);
243  void getWireEndPoints(int detectorID, int elementID, double& x_min, double& x_max, double& y_min, double& y_max);
244  int getExpElementID(int detectorID, double pos_exp);
245 
247  bool isCalibrationLoaded() { return calibration_loaded; }
248  double getDriftDistance(int detectorID, double tdcTime);
249  bool isInTime(int detectorID, double tdcTime);
250  TSpline3* getRTCurve(int detectorID) { return planes[detectorID].rtprofile; }
251 
253  double getYinStereoPlane(int detectorID, double x, double u) { return planes[detectorID].getY(x, u); }
254  double getUinStereoPlane(int detectorID, double x, double y) { return planes[detectorID].getW(x, y); }
255  double getXinStereoPlane(int detectorID, double u, double y) { return planes[detectorID].getX(u, y); }
256 
258  bool isInPlane(int detectorID, double x, double y);
259  bool isInElement(int detectorID, int elementID, double x, double y, double tolr = 0.);
260  bool isInKMAG(double x, double y);
261 
263  double Z_KMAG_BEND() const { return rc->get_DoubleFlag("Z_KMAG_BEND"); }
264  void Z_KMAG_BEND(const double v) { rc->set_DoubleFlag("Z_KMAG_BEND", v); }
265  double Z_FMAG_BEND() const { return rc->get_DoubleFlag("Z_FMAG_BEND"); }
266  void Z_FMAG_BEND(const double v) { rc->set_DoubleFlag("Z_FMAG_BEND", v); }
267  double Z_KFMAG_BEND() const { return rc->get_DoubleFlag("Z_KFMAG_BEND"); }
268  void Z_KFMAG_BEND(const double v) { rc->set_DoubleFlag("Z_KFMAG_BEND", v); }
269  double ELOSS_KFMAG() const { return rc->get_DoubleFlag("ELOSS_KFMAG"); }
270  void ELOSS_KFMAG(const double v) { rc->set_DoubleFlag("ELOSS_KFMAG", v); }
271  double ELOSS_ABSORBER() const { return rc->get_DoubleFlag("ELOSS_ABSORBER"); }
272  void ELOSS_ABSORBER(const double v) { rc->set_DoubleFlag("ELOSS_ABSORBER", v); }
273  double Z_ST2() const { return rc->get_DoubleFlag("Z_ST2"); }
274  void Z_ST2(const double v) { rc->set_DoubleFlag("Z_ST2", v); }
275  double Z_ABSORBER() const { return rc->get_DoubleFlag("Z_ABSORBER"); }
276  void Z_ABSORBER(const double v) { rc->set_DoubleFlag("Z_ABSORBER", v); }
277  double Z_REF() const { return rc->get_DoubleFlag("Z_REF"); }
278  void Z_REF(const double v) { rc->set_DoubleFlag("Z_REF", v); }
279  double Z_TARGET() const { return rc->get_DoubleFlag("Z_TARGET"); }
280  void Z_TARGET(const double v) { rc->set_DoubleFlag("Z_TARGET", v); }
281  double Z_DUMP() const { return rc->get_DoubleFlag("Z_DUMP"); }
282  void Z_DUMP(const double v) { rc->set_DoubleFlag("Z_DUMP", v); }
283  double Z_ST1() const { return rc->get_DoubleFlag("Z_ST1"); }
284  void Z_ST1(const double v) { rc->set_DoubleFlag("Z_ST1", v); }
285  double Z_ST3() const { return rc->get_DoubleFlag("Z_ST3"); }
286  void Z_ST3(const double v) { rc->set_DoubleFlag("Z_ST3", v); }
287  double FMAG_HOLE_LENGTH() const { return rc->get_DoubleFlag("FMAG_HOLE_LENGTH"); }
288  void FMAG_HOLE_LENGTH(const double v) { rc->set_DoubleFlag("FMAG_HOLE_LENGTH", v); }
289  double FMAG_HOLE_RADIUS() const { return rc->get_DoubleFlag("FMAG_HOLE_RADIUS"); }
290  void FMAG_HOLE_RADIUS(const double v) { rc->set_DoubleFlag("FMAG_HOLE_RADIUS", v); }
291  double FMAG_LENGTH() const { return rc->get_DoubleFlag("FMAG_LENGTH"); }
292  void FMAG_LENGTH(const double v) { rc->set_DoubleFlag("FMAG_LENGTH", v); }
293  double Z_UPSTREAM() const { return rc->get_DoubleFlag("Z_UPSTREAM"); }
294  void Z_UPSTREAM(const double v) { rc->set_DoubleFlag("Z_UPSTREAM", v); }
295  double Z_DOWNSTREAM() const { return rc->get_DoubleFlag("Z_DOWNSTREAM"); }
296  void Z_DOWNSTREAM(const double v) { rc->set_DoubleFlag("Z_DOWNSTREAM", v); }
297 
299  void printAlignPar();
300  void printTable();
301  void printWirePosition();
302 
303  static void UseDbSvc(const bool val) { use_dbsvc = val; }
304  static bool UseDbSvc() { return use_dbsvc; }
305 
306 private:
307 
308  //All the detector planes
310 
311  //flag of loading calibration parameters
312  bool calibration_loaded;
313 
314  //Position of KMag
315  double xmin_kmag, xmax_kmag;
316  double ymin_kmag, ymax_kmag;
317  double zmin_kmag, zmax_kmag;
318 
319  //Mapping of detectorName to detectorID, and vice versa
320  std::map<std::string, int> map_detectorID;
321  std::map<int, std::string> map_detectorName;
322 
324  std::map<int, int> map_detid_triggerlv;
325 
326  //Mapping to wire position
327  std::map<std::pair<int, int>, double> map_wirePosition;
328 
329  //Mapping to wire end position - wire actually includes all detectors
330  std::map<std::pair<int, int>, TVectorD> map_endPoint1;
331  std::map<std::pair<int, int>, TVectorD> map_endPoint2;
332 
333  //Pointer to the reco constants
334  recoConsts* rc;
335 
336  //singleton pointor
337  static GeomSvc* p_geometrySvc;
338 
339  static bool use_dbsvc;
340 };
341 
342 #endif
void loadMilleAlignment(const std::string &alignmentFile_mille)
Definition: GeomSvc.cxx:1052
void ELOSS_ABSORBER(const double v)
Definition: GeomSvc.h:272
virtual void set_DoubleFlag(const std::string &name, const double flag)
Definition: PHFlag.cc:77
int getTriggerLv(int detectorID)
Definition: GeomSvc.h:207
double rotY
Definition: GeomSvc.h:99
double Z_FMAG_BEND() const
Definition: GeomSvc.h:265
double deltaW_module[9]
Definition: GeomSvc.h:97
std::string getDetectorName(const int &detectorID) const
Definition: GeomSvc.h:188
void initWireLUT()
Definition: GeomSvc.cxx:675
void printAlignPar()
Debugging print of the content.
Definition: GeomSvc.cxx:1154
double getPlaneWOffset(int detectorID)
Definition: GeomSvc.h:220
double resolution
Definition: GeomSvc.h:101
double getWirePosition(int elementID) const
Definition: GeomSvc.cxx:144
int detectorID
Definition: GeomSvc.h:63
void init()
Initialization, either from MySQL or from ascii file.
Definition: GeomSvc.cxx:239
double getInterceptionFast(int detectorID, double x_exp, double y_exp) const
Definition: GeomSvc.h:234
double getDetectorY0(const std::string detectorName) const
Definition: GeomSvc.h:174
TSpline3 * rtprofile
Definition: GeomSvc.h:123
double getSintheta(int detectorID) const
Definition: GeomSvc.h:202
double getCellWidth(int detectorID)
Definition: GeomSvc.h:200
double intercept(double tx, double ty, double x0_track, double y0_track) const
Definition: GeomSvc.cxx:127
double getTantheta(int detectorID) const
Definition: GeomSvc.h:203
void Z_REF(const double v)
Definition: GeomSvc.h:278
double wc
Definition: GeomSvc.h:107
double getYinStereoPlane(int detectorID, double x, double u)
Convert the stereo hits to Y value.
Definition: GeomSvc.h:253
double getPlaneWOffset(int detectorID, int moduleID)
Definition: GeomSvc.h:221
double Z_ST1() const
Definition: GeomSvc.h:283
#define nPropPlanes
Definition: GlobalConsts.h:8
std::vector< double > elementPos
Definition: GeomSvc.h:126
void initPlaneDbSvc()
Definition: GeomSvc.cxx:566
double getW(double x, double y) const
Definition: GeomSvc.h:47
double x0
Definition: GeomSvc.h:79
double getPlaneCenterX(int detectorID)
Definition: GeomSvc.h:211
double ELOSS_KFMAG() const
Definition: GeomSvc.h:269
void setDetectorZ0(const std::string detectorName, const double val)
Definition: GeomSvc.h:163
virtual double get_DoubleFlag(const std::string &name) const
Definition: PHFlag.cc:49
double tmax
Definition: GeomSvc.h:122
double getPlaneCenterY(int detectorID)
Definition: GeomSvc.h:212
double getUinStereoPlane(int detectorID, double x, double y)
Definition: GeomSvc.h:254
double getRotationInX(int detectorID)
Definition: GeomSvc.h:214
double z2
Definition: GeomSvc.h:87
double z1
Definition: GeomSvc.h:84
double getPlaneResolution(int detectorID) const
Definition: GeomSvc.h:209
TVectorD getEndPoint(int elementID, int sign=-1) const
Definition: GeomSvc.cxx:149
double y2
Definition: GeomSvc.h:86
std::string detectorName
Definition: GeomSvc.h:64
double yc
Definition: GeomSvc.h:105
double getX(double w, double y) const
Definition: GeomSvc.h:45
double FMAG_LENGTH() const
Definition: GeomSvc.h:291
double getKMAGDownstream()
Definition: GeomSvc.h:229
double deltaX
Definition: GeomSvc.h:93
double Z_ABSORBER() const
Definition: GeomSvc.h:275
void get2DBoxSize(int detectorID, int elementID, double &x_min, double &x_max, double &y_min, double &y_max)
Definition: GeomSvc.cxx:830
double Z_UPSTREAM() const
Definition: GeomSvc.h:293
void printWirePosition()
Definition: GeomSvc.cxx:1134
void Z_ST1(const double v)
Definition: GeomSvc.h:284
Plane()
Definition: GeomSvc.cxx:31
double Z_ST2() const
Definition: GeomSvc.h:273
Definition: GeomSvc.h:35
double getDetectorX0(const std::string detectorName) const
Definition: GeomSvc.h:170
double Z_REF() const
Definition: GeomSvc.h:277
TVectorD xVec
Definition: GeomSvc.h:116
void Z_UPSTREAM(const double v)
Definition: GeomSvc.h:294
#define nHodoPlanes
Definition: GlobalConsts.h:7
double deltaW
Definition: GeomSvc.h:96
double zc
Definition: GeomSvc.h:106
double Z_TARGET() const
Definition: GeomSvc.h:279
bool isInTime(int detectorID, double tdcTime)
Definition: GeomSvc.cxx:1129
TVectorD nVec
Definition: GeomSvc.h:113
static bool UseDbSvc()
Definition: GeomSvc.h:304
void Z_ST2(const double v)
Definition: GeomSvc.h:274
void Z_KFMAG_BEND(const double v)
Definition: GeomSvc.h:268
bool isInElement(int detectorID, int elementID, double x, double y, double tolr=0.)
Definition: GeomSvc.cxx:760
double Z_KFMAG_BEND() const
Definition: GeomSvc.h:267
double getPlaneOverlap(int detectorID) const
Definition: GeomSvc.h:199
void initPlaneDirect()
Definition: GeomSvc.cxx:407
double xoffset
Definition: GeomSvc.h:71
TVectorD yVec
Definition: GeomSvc.h:117
double deltaY
Definition: GeomSvc.h:94
int planeType
Definition: GeomSvc.h:65
double z0
Definition: GeomSvc.h:81
TVectorD uVec
Definition: GeomSvc.h:114
int nElements
Definition: GeomSvc.h:68
double tmin
Definition: GeomSvc.h:121
void close()
Close the geometry service before exit or starting a new one.
Definition: GeomSvc.cxx:222
TMatrixD rotM
Definition: GeomSvc.h:118
void loadCalibration(const std::string &calibrateFile)
Definition: GeomSvc.cxx:1091
TSpline3 * getRTCurve(int detectorID)
Definition: GeomSvc.h:250
void Z_ABSORBER(const double v)
Definition: GeomSvc.h:276
double ELOSS_ABSORBER() const
Definition: GeomSvc.h:271
double rX
Definition: GeomSvc.h:108
double thetaY
Definition: GeomSvc.h:89
double getInterception(int detectorID, double tx, double ty, double x0, double y0) const
Get the interception of a line an a plane.
Definition: GeomSvc.h:232
double x1
Definition: GeomSvc.h:82
bool findPatternInDetector(int detectorID, std::string pattern)
Definition: GeomSvc.cxx:744
void FMAG_LENGTH(const double v)
Definition: GeomSvc.h:292
void Z_DUMP(const double v)
Definition: GeomSvc.h:282
double getDCA(int detectorID, int elementID, double tx, double ty, double x0, double y0)
Definition: GeomSvc.cxx:940
double x2
Definition: GeomSvc.h:85
double getPlaneZOffset(int detectorID)
Definition: GeomSvc.h:218
double getRotationInZ(int detectorID)
Definition: GeomSvc.h:216
double tantheta
Definition: GeomSvc.h:76
double getY(double x, double w) const
Definition: GeomSvc.h:46
bool isInKMAG(double x, double y)
Definition: GeomSvc.cxx:773
TVectorD vVec
Definition: GeomSvc.h:115
double rY
Definition: GeomSvc.h:109
double getPlaneSpacing(int detectorID) const
Definition: GeomSvc.h:198
double getInterceptionFast(int detectorID, double tx, double ty, double x0, double y0) const
Definition: GeomSvc.cxx:935
friend std::ostream & operator<<(std::ostream &os, const Plane &plane)
Definition: GeomSvc.cxx:178
int getPlaneType(int detectorID) const
Definition: GeomSvc.h:223
double getPlaneScaleX(int detectorID)
Definition: GeomSvc.h:204
double rotZ
Definition: GeomSvc.h:100
double Z_ST3() const
Definition: GeomSvc.h:285
std::vector< int > getDetectorIDs(std::string pattern)
Definition: GeomSvc.cxx:724
void printTable()
Definition: GeomSvc.cxx:1164
void setDetectorX0(const std::string detectorName, const double val)
TODO temp solution to overwrite the y0 of a plane.
Definition: GeomSvc.h:151
double getPlaneScaleZ(int detectorID)
Definition: GeomSvc.h:206
double costheta
Definition: GeomSvc.h:75
double getKMAGUpstream()
Definition: GeomSvc.h:228
void update()
Definition: GeomSvc.cxx:76
double getPlaneScaleY(int detectorID)
Definition: GeomSvc.h:205
double getRotationInY(int detectorID)
Definition: GeomSvc.h:215
double getCostheta(int detectorID) const
Definition: GeomSvc.h:201
void Z_ST3(const double v)
Definition: GeomSvc.h:286
#define nChamberPlanes
Definition: GlobalConsts.h:6
double getKMAGCenter()
Definition: GeomSvc.h:227
static GeomSvc * instance()
singlton instance
Definition: GeomSvc.cxx:211
double cellWidth
Definition: GeomSvc.h:70
double FMAG_HOLE_LENGTH() const
Definition: GeomSvc.h:287
void Z_KMAG_BEND(const double v)
Definition: GeomSvc.h:264
void toLocalDetectorName(std::string &detectorName, int &eID)
Convert the official detectorName to local detectorName.
Definition: GeomSvc.cxx:865
static void UseDbSvc(const bool val)
Definition: GeomSvc.h:303
int getExpElementID(int detectorID, double pos_exp)
Definition: GeomSvc.cxx:807
int getDetectorID(const std::string &detectorName) const
Get the plane position.
Definition: GeomSvc.h:184
double getPlaneCenterZ(int detectorID)
Definition: GeomSvc.h:213
double FMAG_HOLE_RADIUS() const
Definition: GeomSvc.h:289
void getEndPoints(int detectorID, int elementID, TVectorD &ep1, TVectorD &ep2)
Definition: GeomSvc.cxx:792
double xc
Definition: GeomSvc.h:104
Plane getPlane(int detectorID) const
Definition: GeomSvc.h:196
double thetaX
Definition: GeomSvc.h:88
int getPlaneNElements(int detectorID)
Definition: GeomSvc.h:208
double getXinStereoPlane(int detectorID, double u, double y)
Definition: GeomSvc.h:255
double overlap
Definition: GeomSvc.h:72
void Z_TARGET(const double v)
Definition: GeomSvc.h:280
double getPlanePhiOffset(int detectorID)
Definition: GeomSvc.h:219
void getMeasurement(int detectorID, int elementID, double &measurement, double &dmeasurement)
Convert the detectorID and elementID to the actual hit position.
Definition: GeomSvc.cxx:781
double angleFromVert
Definition: GeomSvc.h:73
void FMAG_HOLE_RADIUS(const double v)
Definition: GeomSvc.h:290
#define nDarkPhotonPlanes
Definition: GlobalConsts.h:9
double Z_DOWNSTREAM() const
Definition: GeomSvc.h:295
double Z_KMAG_BEND() const
Getter/setters for a set of fixed parameters - should not be changed unless absolutely necessary...
Definition: GeomSvc.h:263
bool isInPlane(int detectorID, double x, double y)
See if a point is in a plane.
Definition: GeomSvc.cxx:752
double rotX
Definition: GeomSvc.h:98
bool isCalibrationLoaded()
Calibration related.
Definition: GeomSvc.h:247
void getWireEndPoints(int detectorID, int elementID, double &x_min, double &x_max, double &y_min, double &y_max)
Definition: GeomSvc.cxx:855
void Z_FMAG_BEND(const double v)
Definition: GeomSvc.h:266
void setDetectorY0(const std::string detectorName, const double val)
Definition: GeomSvc.h:157
double getDriftDistance(int detectorID, double tdcTime)
Definition: GeomSvc.cxx:909
void ELOSS_KFMAG(const double v)
Definition: GeomSvc.h:270
double spacing
Definition: GeomSvc.h:69
double Z_DUMP() const
Definition: GeomSvc.h:281
double thetaZ
Definition: GeomSvc.h:90
double deltaZ
Definition: GeomSvc.h:95
double y1
Definition: GeomSvc.h:83
void Z_DOWNSTREAM(const double v)
Definition: GeomSvc.h:296
double y0
Definition: GeomSvc.h:80
double rZ
Definition: GeomSvc.h:110
double getDetectorZ0(const std::string detectorName) const
Definition: GeomSvc.h:178
double getPlanePosition(int detectorID) const
Definition: GeomSvc.h:197
double sintheta
Definition: GeomSvc.h:74
void loadAlignment(const std::string &alignmentFile_chamber, const std::string &alignmentFile_hodo, const std::string &alignmentFile_prop)
Definition: GeomSvc.cxx:954
int getHodoStation(const int detectorID) const
Definition: GeomSvc.cxx:897
void FMAG_HOLE_LENGTH(const double v)
Definition: GeomSvc.h:288