StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtGeom.h
1 // \class StFgtGeom
2 
3 // \author Jan Balewski
4 // \date July 2007
5 // Modified Oct 2008 WMZ
6 #ifndef StFgtGeom_h
7 #define StFgtGeom_h
8 /*********************************************************************
9  * $Id: StFgtGeom.h,v 1.1 2011/04/07 19:31:22 balewski Exp $
10  *********************************************************************
11  * Description:
12  * STAR Forward Gem Tracker Geometry Class
13  * across all FGT internal code we will use indexing of disks, quadrants, strips from 0 to N-1.
14  * The outside world will count disks 1 to 6, quads A to D, strips 1 to Nphi and 1 to Nrad.
15 *********************************************************************
16  */
17 
18 #include <TObject.h>
19 #include <TVector3.h>
20 
21 //global constants
22 enum { kFgtMxDisk=8, /* # of normal FGT disks @ STAR */
23  kFgtMxQuad=4, /* # of quadrants in single FGT disk */
24 };
25 
26 // Strip geometry config
27  //---------------- 800(rad)/600(phi) strips
28 const double kFgtRout = 37.1; // cm
29 const double kFgtRmid = 18.8; // cm
30 const double kFgtRin = 11.5; // cm
31 const double kFgtRadPitch = 0.08; // 800 mu
32 const double kFgtPhiPitch = 0.06; // 600 mu
33 const double kFgtDeadQuadEdge = 0.1; // cm
34 
35 
36 class StFgtGeom : public TObject {
37  // WARN: use double for all coordinates operation!
38  // phi-strips deliver phi-coordinate
39  // rad-strips deliver Rxy info
40 
41  double pi,dpi, halfpi;
42 
43  // include the 9th disk
44  double mDiskZ[kFgtMxDisk+1];
45 
46  double mRadStripOff; // strip offset in Rad
47  double mPhiStripOff; // strip offset in Phi
48 
49  int mRadStripLOCId_number; // calculated in class init
50  int mPhiStripLOCId_number; // calculated in class init
51  int mRadStripGBLId_number, mPhiStripGBLId_number; // in a disk
52 
53 
54  void initialize();
55 
56  public:
57  StFgtGeom();
58  ~StFgtGeom(){};
59 
60  bool inDisk(TVector3 rLab);
61  int getQuad(double phiLab);
62 
63  double Rin() { return kFgtRin; }
64  double Rmid() { return kFgtRmid; }
65  double Rout() { return kFgtRout; }
66 
67  double radStrip_pitch() { return kFgtRadPitch;} // cm
68  double phiStrip_pitch() { return kFgtPhiPitch/Rout();} // rad
69 
70  double yLimit() { return kFgtRout; }
71 
72  double deadQuadEdge() { return kFgtDeadQuadEdge; } // cm, local ref frame
73  double maxTof() {return 80.e-9; } //sec
74  double minPmag() {return 0.005; } //GeV of the track momentum
75  double diskZ(int iDisk) { return mDiskZ[iDisk]; }
76 
77  double radStripOff() { return mRadStripOff;}
78  double phiStripOff() { return mPhiStripOff;}
79 
80  int radStripLOCId_number() { return mRadStripLOCId_number;} // in a quad
81  int phiStripLOCId_number() { return mPhiStripLOCId_number;} // in a quad
82 
83 
84  int radStripGBLId_number(){ return mRadStripGBLId_number;} // in a disk, used in digRad
85  int phiStripGBLId_number(){ return mPhiStripGBLId_number;} // in a disk used in digPhi
86 
87 
88  double phiQuadXaxis(int iquad);// orientation of local X-axis in LAB,[-pi,pi]
89 
90  bool localXYtoStripID( int iquad, double x, double y,int &iRadID,int & iPhiID, int dbg=0); // false if out of range
91 
92  // reverse functions
93  double stripID2Rxy( double fRadBin );// interpolates between bins
94  double stripID2PhiLoc( double fPhiBin );// interpolates between bins
95  double stripID2PhiLab( double fPhiBin );// interpolates between bins
96 
97  void printParam();
98 
99  // methods involving local IDs
100  private:
101  int rad2LocalStripId( double rad, double *binFrac=0); // return -1 on error
102  int phiLoc2LocalStripId( double phiLoc, double *binFrac=0); // return -1 on error
103  int phiLab2LocalStripId( int iquad, double phiLab, double *binFrac=0); // return -1 on error
104 
105  int radIdGlobal2Local( int radId ) { return radId % radStripLOCId_number(); }
106  int phiIdGlobal2Local( int phiId ) { return phiId % phiStripLOCId_number(); }
107  int radIdLocal2Global( int iquad, int radId ) {
108  return radId + radStripLOCId_number() * iquad;
109  }
110  int phiIdLocal2Global( int iquad, int phiId ) {
111  return phiId + phiStripLOCId_number() * iquad;
112  }
113 
114  ClassDef(StFgtGeom,1)
115 
116 };
117 
118 #endif
119 
120 
121 /*********************************************************************
122  * $Log: StFgtGeom.h,v $
123  * Revision 1.1 2011/04/07 19:31:22 balewski
124  * start
125  *
126  * Revision 1.24 2005/07/15 20:53:09 balewski
127  * more get methods
128  *
129  */