00001 #ifndef Geometry_h 00002 #define Geometry_h 00003 00004 #include <string> 00005 #include <vector> 00006 #include <map> 00007 #include <iostream> 00008 #include "TMatrix.h" 00009 #include "TRotation.h" 00010 #include "TVector3.h" 00011 #include "TBID.h" 00012 00013 #define MAX_HEC_CELLS 400 //what to do here? 00014 #define MAX_EMEC_CELLS 1200 00015 /*! -Class: Geometry 00016 - Author: Ian Gable (igable@uvic.ca) 00017 - Date: 05/09/2002 00018 - Description: Geometry can be used to determine the z, eta, and phi coords given 00019 a particular febno. It reads a specific geometry file of a specific format 00020 which is passed to the class in the constructor. 00021 - Notes: This class will not operate properly if the file format is changed. 00022 */ 00023 00024 using std::vector; 00025 using std::map; 00026 using std::multimap; 00027 using std::string; 00028 using std::cout; 00029 using std::endl; 00030 using std::pair; 00031 00032 class Geometry { 00033 00034 public: 00035 00036 /** Constructor 00037 * @param hecGeoFileName The name of the Hec Geometry File. Can be relative or absolute path. 00038 * @param emecGeoFileName The name of the Emec Geometry file. Can be relative or absolute path. 00039 * @param globalGeoFileName The name of the file used to make the transformation betweem detector 00040 * local and 'nominal test beam' coordinate systems. 00041 */ 00042 00043 Geometry(string hecGeoFileName, string emecGeoFileName, string globalGeoFileName); 00044 00045 // ==== public hec methods ======================= 00046 00047 //! get the hec integer eta index (test beam) 00048 int hec_ieta(int febno); 00049 00050 //! get the hec integer phi index (test beam) 00051 int hec_iphi(int febno); 00052 00053 //! get the hec integer z index (test beam) 00054 int hec_iz(int febno); 00055 00056 //! get the hec interger module index (test beam) 00057 int hec_imod(int febno); 00058 00059 //! get the hec eta (median) coordinate 00060 float hec_eta(int febno); 00061 00062 //! get the hec phi (median) coordinate (rad) 00063 float hec_phi(int febno); 00064 00065 //! get the hec z (median) coordinate (cm) 00066 float hec_z(int febno); 00067 00068 //! get the hec delta eta 00069 float hec_deta(int febno); 00070 00071 //! get the hec delta phi (rad) 00072 float hec_dphi(int febno); 00073 00074 //! get the hec delta z (cm) 00075 float hec_dz(int febno); 00076 00077 //! is the cell with febno Connected in the Hec 00078 bool hec_isConnected(int febno) ; 00079 00080 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00081 * hec keyed with febno. The TVector3 is a ROOT object containing 00082 * the (median) center x,y,z in the hec local detector coordinate system 00083 */ 00084 map<int,TVector3> hec_LocalCenterMap(); 00085 00086 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00087 * hec keyed with febno. The TVector3 is a ROOT object containing 00088 * the (median) center x,y,z in the test beam coordinate system 00089 */ 00090 map<int,TVector3> hec_TBCenterMap(); 00091 00092 /** Return the TVector3 object which is the (median) center of the cell in the 00093 * hec local detector coordinate system 00094 * @param febno The febno of the cell. 00095 */ 00096 TVector3 hec_LocalCenter(int febno); 00097 00098 /** Return the TVector3 object which is the (median) center of the cell in the 00099 * test beam coordinate system 00100 * @param febno The febno of the cell. 00101 */ 00102 TVector3 hec_TBCenter(int febno); 00103 00104 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00105 * hec keyed with febno. The TVector3 is a ROOT object containing 00106 * the GeoCenter of the cell in the hec local detector coordinate system 00107 */ 00108 map<int,TVector3> hec_LocalGeoCenterMap(); 00109 00110 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00111 * hec keyed with febno. The TVector3 is a ROOT object containing 00112 * the GeoCenter of the cell in the test beam coordinate system 00113 */ 00114 map<int,TVector3> hec_TBGeoCenterMap(); 00115 00116 /** Return the TVector3 object which is the GeoCenter of the cell in the 00117 * hec local detector coordinate system 00118 * @param febno The febno of the cell. 00119 */ 00120 TVector3 hec_LocalGeoCenter(int febno); 00121 00122 /** Return the TVector3 object which is the GeoCenter of the cell in the 00123 * test beam coordinate system 00124 * @param febno The febno of the cell. 00125 */ 00126 TVector3 hec_TBGeoCenter(int febno); 00127 00128 /** Return the volume (cm^3) of the cell 00129 * @param febno The febno of the cell. 00130 */ 00131 double hec_Volume(int febno); 00132 00133 /** Return a STL multimap which has as the key a double which is the distance 00134 * to the nearest neighbors in the Hec. The second thing in the map is 00135 * the febno of that cell. All calculations done in the test beam coordinate system 00136 * using the (median) center of cells. 00137 * @param point The point in the test beam system which you wish to 00138 * calculate the nearest neighbors of. 00139 * 00140 */ 00141 multimap< double,int > hec_neighbors(TVector3 point); 00142 00143 /** Return a STL multimap which has as the key a double which is the distance 00144 * to the nearest neighbors in the hec for a particular layer. The second thing in the map is 00145 * the febno of that cell. All calculations done in the test beam coordinate system 00146 * using the (median) center of cells. 00147 * @param point The point in the test beam coordinate system which you wish to 00148 * calculate the nearest neighbors of. 00149 * @param layer The layer which you want the search confined to. 00150 * 00151 */ 00152 multimap< double,int > hec_neighbors(TVector3 point, int layer); 00153 00154 /** Return a STL multimap which has as the key a double which is the shortest distance 00155 * to the line given by the input line parameterization from the median of the cell. The second 00156 * thing in the map is the febno of that cell. All calculations done in the test beam 00157 * coordinate system using the (median) center of cells. 00158 * @param lineParameters The line parameterized by the four numbers contained in the 00159 * vector in order a0, b0, a1, b1. 00160 * 00161 */ 00162 multimap< double,int > hec_neighbors(vector<float> lineParameters); 00163 00164 /** Return a STL multimap which has as the key a double which is the shortest distance 00165 * to the line given by the input line parameterization from the median of the cell. The second 00166 * thing in the map is the febno of that cell. All calculations done in the test beam 00167 * coordinate system using the (median) center of cells. 00168 * @param lineParameters The line parameterized by the four numbers contained in the 00169 * vector in order a0, b0, a1, b1. 00170 * @param layer The layer which you want the search confined to. 00171 * 00172 */ 00173 multimap< double,int > hec_neighbors(vector<float> lineParameters, int layer); 00174 00175 /** Produce a vector of feb numbers which is a list of cells which are in direct 00176 * contact with the cell passed to the function on a per layer basis. The list will have 2,3, or 4 00177 * elements in it. 00178 * @param febno The cell which you wish to find it's touching neighbors 00179 * @param layer The layer which you with to have the search confined. 00180 */ 00181 vector<int> hec_neighbors(int febno); 00182 00183 /** Produce a vector of feb numbers which is a list of cells which are in direct 00184 * contact with the cell passed to the function on a per layer basis. The list will have 2,3, or 4 00185 * elements in it. 00186 * @param febno The cell which you wish to find it's touching neighbors 00187 * @param layer The layer which you with to have the search confined. 00188 */ 00189 vector<int> hec_neighbors(int febno, int layer); 00190 00191 /** Take a point in the hec local detector coordinate system and transform it to 00192 * the test beam coordinate system 00193 * @param local A TVector3 in the hec local detector coordinate system which you 00194 * transform to the test beam system. 00195 */ 00196 TVector3 hec_LocalToTB(TVector3 local); 00197 00198 /** Take a point in the test beam coordinate system and transform it to 00199 * the hec local detector system 00200 * @param tb A TVector3 in the hec test beam coordinate system which you 00201 * transform to the Local coordinate system. 00202 */ 00203 TVector3 hec_TBToLocal(TVector3 tb); 00204 00205 00206 /** Draw the pad artwork of the HEC at all three layers and fill each cell with a color \ 00207 * contour histogram. 00208 * @param inputMap A STL map with key the febno of the cell and the value being any 00209 * particular value you wish to plot on the hec. 00210 * @param canID The number assigned to a particular canvas. Assigning a number other then 00211 * zero will cause the canvas with that particular ID to be over written. If zero is given 00212 * then a new canvas with a new number will be created. 00213 * @param lockScale Set to true if you want this scale between all the layers to be the same. 00214 * @param scaleLower Set a user defined lower limit to the scale. 00215 * @param scaleUpper Set a user defined upper limit to the scale. If scalleUpper = scaleLower = 0 00216 * then a scale range is automatically picked. 00217 */ 00218 void draw2DHec(map<int,float> inputMap, int canID=0, bool lockScale=false, float scaleLower=0, float scaleUpper=0,string userTitle = ""); 00219 00220 /** Draw the pad artwork of the HEC at all 3 layers on 3 seperate cavases 00221 * and fill each cell with a color contour histogram. 00222 * @param inputMap A STL map with key the febno of the cell and the value being any 00223 * particular value you wish to plot on the emec. 00224 * @param canID The number assigned to a particular canvas. Assigning a number other then 00225 * zero will cause the canvas with that particular ID to be over written. If zero is given 00226 * then a new canvas with a new number will be created. 00227 * @param lockScale Set to true if you want this scale between all the layers to be the same. 00228 * @param scaleLower Set a user defined lower limit to the scale. 00229 * @param scaleUpper Set a user defined upper limit to the scale. If scalleUpper = scaleLower = 0 00230 * then a scale range is automatically picked. 00231 */ 00232 void draw2DHecDetail(map<int,float> inputMap, int canID=0, bool lockScale=false, float scaleLower=0, float scaleUpper=0, string userTitle = ""); 00233 00234 00235 // ==== public emec methods ======================= 00236 00237 //! get the emec integer eta index (test beam) 00238 int emec_ieta(int febno); 00239 00240 //! get the emec integer phi index (test beam) 00241 int emec_iphi(int febno); 00242 00243 //! get the emec integer z index (test beam) 00244 int emec_iz(int febno); 00245 00246 //! get the emec eta (median) coordinate 00247 float emec_eta(int febno); 00248 00249 //! get the emec phi (median) coordinate (rad) 00250 float emec_phi(int febno); 00251 00252 //! get the emec z (median) coordinate (cm) 00253 float emec_z(int febno); 00254 00255 //! get the emec delta eta 00256 float emec_deta(int febno); 00257 00258 //! get the emec delta phi (rad) 00259 float emec_dphi(int febno); 00260 00261 //! get the emec delta z (cm) 00262 float emec_dz(int febno); 00263 00264 //! is the cell with febno Connected in the emec 00265 bool emec_isConnected(int febno) ; 00266 00267 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00268 * emec keyed with febno. The TVector3 is a ROOT object containing 00269 * the (median) center x,y,z in the emec local detector coordinate system 00270 */ 00271 map<int,TVector3> emec_LocalCenterMap(); 00272 00273 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00274 * emec keyed with febno. The TVector3 is a ROOT object containing 00275 * the (median) center x,y,z in the test beam coordinate system 00276 */ 00277 map<int,TVector3> emec_TBCenterMap(); 00278 00279 /** Return the TVector3 object which the (median) center of the cell in the 00280 * emec local detector coordinate system 00281 * @param febno The febno of the cell. 00282 */ 00283 TVector3 emec_LocalCenter(int febno); 00284 00285 /** Return the TVector3 object which the (median) center of the cell in the 00286 * test beam coordinate system 00287 * @param febno The febno of the cell. 00288 */ 00289 TVector3 emec_TBCenter(int febno); 00290 00291 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00292 * emec keyed with febno. The TVector3 is a ROOT object containing 00293 * the GeoCenter of the cell in the emec local detector coordinate system 00294 */ 00295 map<int,TVector3> emec_LocalGeoCenterMap(); 00296 00297 /** Return a map<int,TVector3> which is a complete list of all the cells in the 00298 * emec keyed with febno. The TVector3 is a ROOT object containing 00299 * the GeoCenter of the cell in the test beam coordinate system 00300 */ 00301 map<int,TVector3> emec_TBGeoCenterMap(); 00302 00303 /** Return the TVector3 object which is the GeoCenter of the cell in the 00304 * emec local detector coordinate system 00305 * @param febno The febno of the cell. 00306 */ 00307 TVector3 emec_LocalGeoCenter(int febno); 00308 00309 /** Return the TVector3 object which is the GeoCenter of the cell in the 00310 * test beam coordinate system 00311 * @param febno The febno of the cell. 00312 */ 00313 TVector3 emec_TBGeoCenter(int febno); 00314 00315 /** Return the volume (cm^3) of the cell 00316 * @param febno The febno of the cell. 00317 */ 00318 double emec_Volume(int febno); 00319 00320 /** Return a STL multimap which has as the key a double which is the distance 00321 * to the nearest neighbors in the emec. The second thing in the map is 00322 * the febno of that cell. All calculations done in the test beam coordinate system 00323 * using the (median) center of cells. 00324 * @param point The point in the test beam coordinate system which you wish to 00325 * calculate the nearest neighbors of. 00326 * 00327 */ 00328 multimap< double,int > emec_neighbors(TVector3 point); 00329 00330 /** Return a STL multimap which has as the key a double which is the distance 00331 * to the nearest neighbors in the emec for a particular layer. The second thing in the map is 00332 * the febno of that cell. All calculations done in the test beam coordinate system 00333 * using the (median) center of cells. 00334 * @param point The point in the test beam coordinate system which you wish to 00335 * calculate the nearest neighbors of. 00336 * @param layer The layer which what the search confined to. 00337 * 00338 */ 00339 multimap< double,int > emec_neighbors(TVector3 point, int layer); 00340 00341 /** Return a STL multimap which has as the key a double which is the shortest distance 00342 * to the line given by the input line parameterization from the median of the cell. The second 00343 * thing in the map is the febno of that cell. All calculations done in the test beam 00344 * coordinate system using the (median) center of cells. 00345 * @param lineParameters The line parameterized by the four numbers contained in the 00346 * vector in order a0, b0, a1, b1. 00347 * 00348 */ 00349 multimap< double,int > emec_neighbors(vector<float> lineParameters); 00350 00351 /** Return a STL multimap which has as the key a double which is the shortest distance 00352 * to the line given by the input line parameterization from the median of the cell. The second 00353 * thing in the map is the febno of that cell. All calculations done in the test beam 00354 * coordinate system using the (median) center of cells. 00355 * @param lineParameters The line parameterized by the four numbers contained in the 00356 * vector in order a0, b0, a1, b1. 00357 * @param layer The layer which you want the search confined to. 00358 * 00359 */ 00360 multimap< double,int > emec_neighbors(vector<float> lineParameters, int layer); 00361 00362 /** Produce a vector of feb numbers which is a list of cells which are in direct 00363 * contact with the cell passed to the function. The method works in 3D 00364 * elements in it. 00365 * @param febno The cell which you wish to find it's touching neighbors 00366 */ 00367 vector<int> emec_neighbors(int febno); 00368 00369 /** Produce a vector of feb numbers which is a list of cells which are in direct 00370 * contact with the cell passed to the function on a per layer basis. The list will have 2,3, or 4 00371 * elements in it. 00372 * @param febno The cell which you wish to find it's touching neighbors 00373 * @param layer The layer which you with to have the search confined. 00374 */ 00375 vector<int> emec_neighbors(int febno, int layer); 00376 00377 /** Take a point in the emec local detector coordinate system and transform it to 00378 * the test beam system 00379 * @param local A TVector3 in the emec local detector coordinate system which you 00380 * transform to the test beam system. 00381 */ 00382 TVector3 emec_LocalToTB(TVector3 local); 00383 00384 /** Take a point in the test beam coordinate system and transform it to 00385 * the emec local detector coordinate system 00386 * @param tb A TVector3 in the test beam coordinate system which you wish to 00387 * transform to the emec local detector coordinate system. 00388 */ 00389 TVector3 emec_TBToLocal(TVector3 tb); 00390 00391 /** Draw the pad artwork of the EMEC at all four layers on a single canvas without numbering the cells 00392 * and fill each cell with a color contour histogram. 00393 * @param inputMap A STL map with key the febno of the cell and the value being any 00394 * particular value you wish to plot on the emec. 00395 * @param canID The number assigned to a particular canvas. Assigning a number other then 00396 * zero will cause the canvas with that particular ID to be over written. If zero is given 00397 * then a new canvas with a new number will be created. 00398 * @param lockScale Set to true if you want this scale between all the layers to be the same. 00399 * @param scaleLower Set a user defined lower limit to the scale. 00400 * @param scaleUpper Set a user defined upper limit to the scale. If scalleUpper = scaleLower = 0 00401 * then a scale range is automatically picked. 00402 */ 00403 void draw2DEmec(map<int,float> inputMap, int canID=0, bool lockScale=false, float scaleLower=0, float scaleUpper=0, string userTitle = ""); 00404 00405 /** Draw the pad artwork of the EMEC at all four layers on four seperate cavases 00406 * and fill each cell with a color contour histogram. 00407 * @param inputMap A STL map with key the febno of the cell and the value being any 00408 * particular value you wish to plot on the emec. 00409 * @param canID The number assigned to a particular canvas. Assigning a number other then 00410 * zero will cause the canvas with that particular ID to be over written. If zero is given 00411 * then a new canvas with a new number will be created. 00412 * @param lockScale Set to true if you want this scale between all the layers to be the same. 00413 * @param scaleLower Set a user defined lower limit to the scale. 00414 * @param scaleUpper Set a user defined upper limit to the scale. If scalleUpper = scaleLower = 0 00415 * then a scale range is automatically picked. 00416 */ 00417 void draw2DEmecDetail(map<int,float> inputMap, int canID=0, bool lockScale=false, float scaleLower=0, float scaleUpper=0, string userTitle = ""); 00418 00419 //==== pan-detector public methods ========== 00420 00421 /** Draw the complete 3D geometry of the of the 2002 combined beam test. 00422 */ 00423 void draw3DGeometry(); 00424 00425 /** Return the FEB Serial Channel Number for the corresponding interger coordinates 00426 * (idet,ieta,iphi,iz). If the cell does not exist -1 is returned ( there are no negative FEB Serial 00427 * Channel Numbers). 00428 *@param idet Detector id: hec = 2, emec = 1 00429 *@param ieta hec = [ 1,14], emec = [ 0,67] 00430 *@param iphi hec=[ 1, 6], emec = [ 0,31] 00431 *@param iz hec = [ 1, 3], emec = [ 0, 3] 00432 */ 00433 int FEBSerialChannelNumber(int idet, int ieta, int iphi, int iz ); 00434 00435 /** Return the FEB Serial Channel Number for the corresponding TBID. 00436 * If the cell does not exist -1 is returned ( there are no negative FEB Serial 00437 * Channel Numbers). 00438 *@param id The TBID of the cell for which you wish to get the febno. 00439 */ 00440 int FEBSerialChannelNumber(TBID id); 00441 00442 /** Return the TBID which corresponds to the input idet(hec = 2, emec = 1) and febno 00443 *@param idet the detector id(hec = 2, emec = 1); 00444 *@param febno the febno of the cell 00445 */ 00446 TBID getTBID(int idet, int febno); 00447 00448 00449 // ==== Other public methods ======== 00450 00451 /** Take (eta, phi, z) coords and transform them to (x,y,z) coords 00452 * @param eta The eta coordinate 00453 * @param phi The this coordinate 00454 * @param z The z coordinate 00455 */ 00456 TVector3 epzTOxyz(double eta, double phi, double z); 00457 00458 /** Take a TVector3 which is packed with (rho,phi,z) coordinates and transform 00459 * them xyz coordinates 00460 * @param rhoPhi the TVector3 which contains the coords you wish to transform 00461 */ 00462 TVector3 Geometry::rpzTOxyz(TVector3 rhoPhi); 00463 00464 00465 private: 00466 00467 void loadHecGeometryFile(string geoFileName); 00468 void loadEmecGeometryFile(string geoFileName); 00469 void loadGlobalGeometryFile(string geoFileName); 00470 00471 //======== private HEC variables and methods ========== 00472 void hecGeo();// intialization of the Hec geometry 00473 void buildTouchingNeighborsHec(); 00474 00475 void hecNotConnected(int febno); // simple warning 00476 bool hecCheckBounds(int febno,string msg); // febno bound checking 00477 00478 TVector3 hecLocalGeoCenter(int febno); // compute the GeoCenter of a hec cell 00479 double hecVolume(int febno); // compute the volume of a hec cell (cm^3) 00480 // there are 1 or 2 (pad) families per readout cell 00481 // family == 1: first (lowest local z) family 00482 int hecNumberOfFamilies(int febno); // number of hec families 00483 double hecFamilyZ(int febno, int family); // GeoCenter Z of a hec family (cm) 00484 double hecFamilyRhoMin(int febno, int family); // minimum rho of a hec family (cm) 00485 double hecFamilyRhoMax(int febno, int family); // maximum rho of a hec family (cm) 00486 double hecFamilyRho(int febno, int family); // GeoCenter rho of a hec family (cm) 00487 double hecFamilyVolume(int febno, int family); // volume of a hec family (cm^3) 00488 00489 vector<TVector2> hecCalculate4Corners(int febno); // get the 4 corners for a 2D hec display 00490 00491 short m_hec_adc[MAX_HEC_CELLS]; 00492 short m_hec_ieta[MAX_HEC_CELLS]; 00493 short m_hec_iphi[MAX_HEC_CELLS]; 00494 short m_hec_iz[MAX_HEC_CELLS]; 00495 float m_hec_eta[MAX_HEC_CELLS]; 00496 float m_hec_phi[MAX_HEC_CELLS]; 00497 float m_hec_z[MAX_HEC_CELLS]; 00498 float m_hec_deta[MAX_HEC_CELLS]; 00499 float m_hec_dphi[MAX_HEC_CELLS]; 00500 float m_hec_dz[MAX_HEC_CELLS]; 00501 00502 double m_tbHecPhiEuler; 00503 double m_tbHecThetaEuler; 00504 double m_tbHecPsiEuler; 00505 00506 double m_tbHecXTrans; 00507 double m_tbHecYTrans; 00508 double m_tbHecZTrans; 00509 00510 double m_hecInnerRhoMin; // the inner hec rho in the first layer (cm) 00511 double m_hecInnerRhoMax; // the inner hec rho in all but the first layer (cm) 00512 double m_hecOuterRho; // the outer hec rho (cm) 00513 00514 map<int,TVector3> m_hecLocalCenterMap; // febno keyed map of (median) center x,y,z (local) 00515 map<int,TVector3> m_hecTBCenterMap; // febno keyed map of (median) center x,y,z (TB) 00516 00517 map<int,TVector3> m_hecLocalGeoCenterMap; // febno keyed map of GeoCenter x,y,z (local) 00518 map<int,TVector3> m_hecTBGeoCenterMap; // febno keyed map of GeoCenter x,y,z (TB) 00519 00520 map<int,double> m_hecVolumeMap; // febno keyed map of cell volumes (cm^3) 00521 00522 map<int, vector<int> > m_hecTouch; // a list which contains the cells touching per layer 00523 00524 TRotation* m_tbHecRotation; 00525 TVector3* m_tbHecVectorTrans; 00526 00527 short m_numHecCells; // the number of cells according to the geometry file 00528 short m_hecFirstFebno; // the first hec febno (=1) 00529 short m_hecLastFebno ; // the last hec febno (=m_numHecCells) 00530 short m_hec2DcanvasNumber; 00531 short m_hec2DcanvasNumberDetail; 00532 00533 00534 //======== private EMEC variables and methods ========== 00535 00536 void emecGeo(); // initialization of the Emec geometry 00537 00538 void emecNotConnected(int febno); // simple warning 00539 bool emecCheckBounds(int febno,string msg); // febno bound checking 00540 00541 TVector3 emecLocalGeoCenter(int febno); // compute the GeoCenter of an emec cell 00542 double emecVolume(int febno); // compute the volume of an emec cell (cm^3) 00543 00544 void buildTouchingNeighborsEmec(); 00545 00546 short m_emec_adc[MAX_EMEC_CELLS]; 00547 short m_emec_ieta[MAX_EMEC_CELLS]; 00548 short m_emec_iphi[MAX_EMEC_CELLS]; 00549 short m_emec_iz[MAX_EMEC_CELLS]; 00550 float m_emec_eta[MAX_EMEC_CELLS]; 00551 float m_emec_phi[MAX_EMEC_CELLS]; 00552 float m_emec_z[MAX_EMEC_CELLS]; 00553 float m_emec_deta[MAX_EMEC_CELLS]; 00554 float m_emec_dphi[MAX_EMEC_CELLS]; 00555 float m_emec_dz[MAX_EMEC_CELLS]; 00556 00557 double m_tbEmecPhiEuler; 00558 double m_tbEmecThetaEuler; 00559 double m_tbEmecPsiEuler; 00560 00561 double m_tbEmecXTrans; 00562 double m_tbEmecYTrans; 00563 double m_tbEmecZTrans; 00564 00565 map<int,TVector3> m_emecLocalCenterMap; // febno keyed map of (median) center x,y,z (local) 00566 map<int,TVector3> m_emecTBCenterMap; // febno keyed map of (median) center x,y,z (TB) 00567 00568 map<int,TVector3> m_emecLocalGeoCenterMap; // febno keyed map of GeoCenter x,y,z (local) 00569 map<int,TVector3> m_emecTBGeoCenterMap; // febno keyed map of GeoCenter x,y,z (TB) 00570 00571 map<int,double> m_emecVolumeMap; // febno keyed map of cell volumes (cm^3) 00572 00573 map<int, vector<int> > m_emecTouch; // a list which contains the cells touching per layer 00574 00575 TRotation* m_tbEmecRotation; 00576 TVector3* m_tbEmecVectorTrans; 00577 00578 short m_numEmecCells; // the number of cells according to the geometry file 00579 short m_emecFirstFebno; // the first emec febno (=0) 00580 short m_emecLastFebno ; // the last emec febno (m_numEmecCells-1) 00581 short m_emec2DcanvasNumber; 00582 short m_emec2DcanvasNumberDetail; 00583 00584 //======== pan-detector private variables and methods ========== 00585 00586 void buildIDMap(); 00587 00588 void addRange(int detectorType,int etaLow, int etaHigh, int phiLow, int phiHigh, int z, int febno); 00589 00590 void addTouch(int detectorType, int source, int target); 00591 00592 map<TBID, int> m_idMap; 00593 00594 //==== various testing methods =========== 00595 void drawJunk(); 00596 void histoEmecLayers(); 00597 TMatrix* constructRotationMatrix(double t, double p, double s); 00598 void test(); 00599 }; 00600 00601 #endif