CMS 3D CMS Logo

DTTrigGeom.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTrigGeom
4 //
5 // Description: Muon Barrel Trigger Geometry
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // S. Vanini : NEWGEO implementation
12 // S. Vanini 090902 : dumpLUT method implemented
13 // A. Gozzelino May 11th 2012: IEEE32toDSP method bug fix
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
20 
21 //-------------
22 // C Headers --
23 //-------------
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 #include <cstring>
29 #include <fstream>
30 #include <iomanip>
31 #include <iostream>
32 #include <sstream>
33 
34 //-------------------------------
35 // Collaborating Class Headers --
36 //-------------------------------
45 
46 using namespace std;
47 
48 //----------------
49 // Constructors --
50 //----------------
51 
52 DTTrigGeom::DTTrigGeom(const DTChamber *stat, bool debug) : _stat(stat), _debug(debug) { getGeom(); }
53 
54 //--------------
55 // Destructor --
56 //--------------
57 
59 
60 //--------------
61 // Operations --
62 //--------------
63 
65  // sl1 offset respect to sl3 - in Front End view!!
66  float x1 = tubePosInCh(1, 1, 1).x();
67  float x3 = tubePosInCh(3, 1, 1).x();
68  float offset = x1 - x3;
69  // if(posFE(1)==1) // Obsolete in
70  // offset = - offset; // CMSSW
71 
72  return offset;
73 }
74 
75 /* OBSOLETE - MAYBE - 19/06/06
76 int
77 DTTrigGeom::layerFEStaggering(int nsl, int nlay) const {
78 
79  NB the staggering is in FE view!
80  return cell staggering respect to first wire in layer 1 in cell units
81  the following is the default: staggering 0 of each layer
82  +---------+---------+---------+
83  | 1 o | 2 o | 3 o |
84  +----+----+----+----+----+----+
85  | 1 o | 2 o |
86  +----+----+----+----+----+
87  | 1 o | 2 o |
88  +----+----+----+----+----+
89  | 1 o | 2 o |
90  +---------+---------+ ------------> x (y coming out of video) in SL
91 frame
92 
93 
94  int stag = 0;
95 
96  if(station()==4 && nsl==2){
97  std::cout << "No theta superlayer in station 4!" << std::endl;
98  return 0;
99  }
100  //position in chamber of wire 1 in layer 1
101  LocalPoint posInCh_lay1 = tubePosInCh(nsl,1,1);
102  //position in chamber of wire 1 in layer nlay
103  int n1stwire = (nlay==4 ? 2 : 1);
104  LocalPoint posInCh_lay = tubePosInCh(nsl,nlay,n1stwire);
105 
106  cout << endl;
107  cout << nlay << posInCh_lay1 << posInCh_lay << endl;
108  cout <<endl ;
109 
110 
111  //NB PITCH-0.01 for computer approximation bug
112  if(nsl==2){//SL2: first wire is toward positive y
113  stag = static_cast<int>((-posInCh_lay.y()+posInCh_lay1.y())/(_PITCH-0.01) +
114 0.5*(fmod(nlay,2.)==0?1:0));
115  }
116  else{//SL1 and SL3: first wire is toward negative x
117  if (nlay==4) {
118  stag =
119 static_cast<int>((+posInCh_lay.x()-posInCh_lay1.x()+_PITCH)/(_PITCH-0.01) +
120 0.5*(fmod(nlay,2.)==0?1:0));
121  }
122  else {
123  stag =
124 static_cast<int>((+posInCh_lay.x()-posInCh_lay1.x())/(_PITCH-0.01) +
125 0.5*(fmod(nlay,2.)==0?1:0));
126  }
127  }
128 
129  //FEP=1 means in y negative in layer frame
130  const DTLayer* lay =
131 _stat->superLayer(DTSuperLayerId(statId(),nsl))->layer(DTLayerId(statId(),nsl,nlay));
132  const DTLayer* lay1 =
133 _stat->superLayer(DTSuperLayerId(statId(),nsl))->layer(DTLayerId(statId(),nsl,1));
134 
135  if(lay->getFEPosition()==1){ //FE staggering is reverted //MODIFICARE
136 DOPO!!!!!! int nWire = lay->specificTopology().channels(); int nWire1 =
137 lay1->specificTopology().channels(); stag = - nWire + nWire1 - stag +
138 (fmod(nlay,2.)==0?1:0);
139  }
140  return stag;
141 }
142 */
143 
144 int DTTrigGeom::mapTubeInFEch(int nsl, int nlay, int ntube) const {
145  int nch = 0;
146  if (station() == 4 && nsl == 2) {
147  std::cout << "No theta superlayer in station 4!" << std::endl;
148  } else {
149  // obsolete 19/06/2006 const DTLayer* lay =
150  // _stat->superLayer(DTSuperLayerId(statId(),nsl))->layer(DTLayerId(statId(),nsl,nlay));
151 
152  /* obsolete 19/6/06
153  if(lay->getFEPosition()==0) //FE is in Y negative: opposite
154  numbering nch = lay->specificTopology().channels() - ntube + 1;
155  // if(lay->getFEPosition()==1) //FE is in Y positive: same
156  numbering digi-trig
157  // nch = ntube;
158  // }
159  */
160  // in new geometry depends on SL: theta tube numbering is reverted wrt
161  // hardware
162  nch = ntube;
163  /* if(nsl==2){
164  nch = lay->specificTopology().channels() - ntube + 1;
165  }*/
166  }
167  return nch;
168 }
169 
170 LocalPoint DTTrigGeom::tubePosInCh(int nsl, int nlay, int ntube) const {
171  if (nlay == 4 && ntube == 1) {
172  std::cout << "ATTENTION: no wire nuber 1 for 4th layer!!!" << std::endl;
173  LocalPoint dummyLP(0, 0, 0);
174  return dummyLP;
175  }
176  const DTSuperLayer *sl = _stat->superLayer(DTSuperLayerId(statId(), nsl));
177  const DTLayer *lay = sl->layer(DTLayerId(statId(), nsl, nlay));
178 
179  float localX = lay->specificTopology().wirePosition(ntube);
180  LocalPoint posInLayer(localX, 0, 0);
181  LocalPoint posInChamber = _stat->surface().toLocal(lay->toGlobal(posInLayer));
182  // obsolete 19/06/2006 GlobalPoint posInCMS = lay->toGlobal(posInLayer);
183 
184  /* cout <<endl;
185  cout << "tube " << ntube << " nlay " << nlay << endl;
186  cout << "posinlayer " << posInLayer << "posinchamb " << posInChamber <<
187  "posinCMS " << posInCMS << endl;*/
188 
189  return posInChamber;
190 }
191 
192 int DTTrigGeom::posFE(int sl) const {
193  if (station() != 4 || sl != 2) {
194  // obsolete 19/0602006 const DTLayer* lay =
195  // _stat->superLayer(DTSuperLayerId(statId(),sl))->layer(DTLayerId(statId(),sl,1));
196  return 1 /*lay->getFEPosition()*/;
197  } else {
198  std::cout << "No theta superlayer in station 4!" << std::endl;
199  return 0;
200  }
201 }
202 
204  _stat = stat;
205  getGeom();
206 }
207 
209  // Geometrical constants of chamber
210  // Cell width (cm)
211  _PITCH = 4.2;
212  // Cell height (cm)
213  _H = 1.3;
214  // azimuthal angle of normal to the chamber
215  _PHICH = _stat->surface().toGlobal(LocalVector(0, 0, -1)).phi();
216 
217  // superlayer positions and number of cells
218  DTSuperLayer const *sl[3];
219  DTLayer const *l1[3];
220  int i = 0;
221  for (i = 0; i < 3; i++) {
222  if (station() == 4 && i == 1) { // No theta SL in MB4
223  _ZSL[i] = -999;
224  _NCELL[i] = 0;
225  } else {
226  sl[i] = _stat->superLayer(DTSuperLayerId(statId(), i + 1));
227  l1[i] = sl[i]->layer(DTLayerId(statId(), i + 1, 1));
228  _ZSL[i] = _stat->surface().toLocal(sl[i]->position()).z(); // - 1.5 * _H;
229  // LocalPoint posInLayer=l1[i]->layType()->getWire(1)->positionInLayer();
230  const DTTopology &tp = l1[i]->specificTopology();
231  float posX = tp.wirePosition(tp.firstChannel());
232  LocalPoint posInLayer(posX, 0, 0);
233  _NCELL[i] = l1[i]->specificTopology().channels();
234  }
235  }
236 
237  // debugging
238  if (_debug) {
239  std::cout << setiosflags(std::ios::showpoint | std::ios::fixed) << std::setw(4) << std::setprecision(1);
240  std::cout << "Identification: wheel=" << wheel();
241  std::cout << ", station=" << station();
242  std::cout << ", sector=" << sector() << std::endl;
243  GlobalPoint pp = _stat->toGlobal(LocalPoint(0, 0, 0));
244  std::cout << "Position: Mag=" << pp.mag() << "cm, Phi=" << pp.phi() * 180 / 3.14159;
245  std::cout << " deg, Z=" << pp.z() << " cm" << std::endl;
246  std::cout << "Rotation: ANGLE=" << phiCh() * 180 / 3.14159 << std::endl;
247  // if(wheel()==2&&sector()==2){ // only 1 sector-wheel
248  std::cout << "Z of superlayers: phi=" << ZSL(1) << ", ";
249  std::cout << ZSL(3) << " theta=" << ZSL(2);
250  std::cout << " (DeltaY = " << distSL() << ")" << std::endl;
251  std::cout << " ncell: sl 1 " << nCell(1) << " sl 2 " << nCell(2) << " sl 3 " << nCell(3) << std::endl;
252  //}
253  }
254  // end debugging
255 }
256 
257 float DTTrigGeom::ZSL(int sl) const {
258  if (sl < 1 || sl > 3) {
259  std::cout << "DTTrigGeom::ZSL: wrong SL number: " << sl;
260  std::cout << -999 << " returned" << std::endl;
261  return -999;
262  }
263  return _ZSL[sl - 1];
264 }
265 
266 void DTTrigGeom::dumpGeom() const {
267  std::cout << "Identification: wheel=" << wheel();
268  std::cout << ", station=" << station();
269  std::cout << ", sector=" << sector() << std::endl;
270  GlobalPoint pp = _stat->toGlobal(LocalPoint(0, 0, 0));
271  std::cout << "Position: Mag=" << pp.mag() << "cm, Phi=" << pp.phi() * 180 / 3.14159;
272  std::cout << " deg, Z=" << pp.z() << " cm" << std::endl;
273  std::cout << "Rotation: ANGLE=" << phiCh() * 180 / 3.14159 << std::endl;
274  std::cout << "Z of superlayers: phi=" << ZSL(1) << ", ";
275  std::cout << ZSL(3) << " theta=" << ZSL(2) << std::endl;
276  std::cout << "Number of cells: SL1=" << nCell(1) << " SL2=" << nCell(2) << " SL3=" << nCell(3) << std::endl;
277  std::cout << "First wire positions:" << std::endl;
278  int ii = 0;
279  int jj = 0;
280  for (ii = 1; ii <= 3; ii++) {
281  if (station() != 4 || ii != 2) {
282  for (jj = 1; jj <= 4; jj++) {
283  std::cout << " SL=" << ii << ", lay=" << jj << ", wire 1 position=";
284  if (jj == 4)
285  std::cout << tubePosInCh(ii, jj, 2) << std::endl;
286  else
287  std::cout << tubePosInCh(ii, jj, 1) << std::endl;
288  }
289  }
290  }
291 
292  GlobalPoint gp1 = CMSPosition(DTBtiId(statId(), 1, 1));
293 
294  std::cout << "First BTI position:";
295  std::cout << " SL1:" << localPosition(DTBtiId(statId(), 1, 1)) << std::endl;
296  std::cout << " Position: R=" << gp1.perp() << "cm, Phi=" << gp1.phi() * 180 / 3.14159 << " deg, Z=" << gp1.z()
297  << " cm" << std::endl;
298 
299  if (station() != 4) {
300  GlobalPoint gp2 = CMSPosition(DTBtiId(statId(), 2, 1));
301  std::cout << " SL2:" << localPosition(DTBtiId(statId(), 2, 1)) << std::endl;
302  std::cout << " Position: R=" << gp2.perp() << "cm, Phi=" << gp2.phi() * 180 / 3.14159 << " deg, Z=" << gp2.z()
303  << " cm" << std::endl;
304  }
305 
306  GlobalPoint gp3 = CMSPosition(DTBtiId(statId(), 3, 1));
307  std::cout << " SL3:" << localPosition(DTBtiId(statId(), 3, 1)) << std::endl;
308  std::cout << " Position: R=" << gp3.perp() << "cm, Phi=" << gp3.phi() * 180 / 3.14159 << " deg, Z=" << gp3.z()
309  << " cm" << std::endl;
310 
311  std::cout << "First TRACO position:";
312  std::cout << localPosition(DTTracoId(statId(), 1)) << std::endl;
313  std::cout << "******************************************************" << std::endl;
314 }
315 
316 void DTTrigGeom::dumpLUT(short int btic) {
317  // chamber id
318  int wh = wheel();
319  int st = station();
320  int se = sector();
321 
322  // open txt file
323  string name = "Lut_from_CMSSW_geom";
324  /* name += "_wh_";
325  if(wh<0)
326  name += "-";
327  name += abs(wh) + '0';
328  name += "_st_";
329  name += st + '0';
330  name += "_se_";
331  if(se<10)
332  name += se + '0';
333  else
334  {
335  name += 1 + '0';
336  name += (se-10) + '0';
337  }
338  */
339  name += ".txt";
340 
341  ofstream fout;
342  fout.open(name.c_str(), ofstream::app);
343 
344  // *** dump file header
345  // fout << "Identification: wheel\t" << wh;
346  // fout << "\tstation\t" << st;
347  // fout << "\tsector\t" << se;
348  fout << wh;
349  fout << "\t" << st;
350  fout << "\t" << se;
351 
352  // SL shift
353  float xBTI1_3 = localPosition(DTBtiId(DTSuperLayerId(wheel(), station(), sector(), 3), 1)).x();
354  float xBTI1_1 = localPosition(DTBtiId(DTSuperLayerId(wheel(), station(), sector(), 1), 1)).x();
355  float SL_shift = xBTI1_3 - xBTI1_1;
356  // std::cout << " SL shift " << SL_shift << std::endl;
357 
358  // traco 1 and 2 global position
359  LocalPoint traco1 = localPosition(DTTracoId(statId(), 1));
360  LocalPoint traco2 = localPosition(DTTracoId(statId(), 2));
361  GlobalPoint traco_1 = toGlobal(traco1);
362  GlobalPoint traco_2 = toGlobal(traco2);
363  // std::cout << " tr1 x " << traco_1.x() << " tr2 x " << traco_2.x() <<
364  // std::endl;
365 
366  float d;
367  float xcn;
368  int xcn_sign;
370  // std::cout << "Position: x=" << pp.x() << "cm, y=" << pp.y() << "cm, z=" <<
371  // pp.z() << std::endl;
372 
373  if (sector() == 1 || sector() == 7) {
374  d = fabs(traco_1.x());
375  xcn = fabs(traco_1.y());
376  // 110208 SV comment: this was inserted for a TRACO hardware bug
377  if (SL_shift > 0)
378  xcn = xcn + SL_shift;
379  xcn_sign = static_cast<int>(pp.y() / fabs(pp.y())) * static_cast<int>(traco_1.y() / fabs(traco_1.y()));
380  if (station() == 2 || (station() == 4 && sector() == 1))
381  xcn_sign = -xcn_sign;
382  xcn = xcn * xcn_sign;
383  } else {
384  float m1 = (traco_2.y() - traco_1.y()) / (traco_2.x() - traco_1.x());
385  float q1 = traco_1.y() - m1 * traco_1.x();
386  float m = tan(phiCh());
387  float xn = q1 / (m - m1);
388  float yn = m * xn;
389 
390  d = sqrt(xn * xn + yn * yn);
391  xcn = sqrt((xn - traco_1.x()) * (xn - traco_1.x()) + (yn - traco_1.y()) * (yn - traco_1.y()));
392  // 110208 SV comment: this was inserted for a TRACO hardware bug
393  if (SL_shift > 0)
394  xcn = xcn + SL_shift;
395 
396  float diff = (pp.x() - traco_1.x()) * traco_1.y();
397  xcn_sign = static_cast<int>(diff / fabs(diff));
398  xcn = xcn * xcn_sign;
399  }
400  // std::cout << " d " << d << " xcn " << xcn << " sign " << xcn_sign <<
401  // std::endl;
402  // fout << "\td\t" << d << "\txcn\t" << xcn << "\t";
403  // fout << "btic\t" << btic << "\t";
404 
405  // *** dump TRACO LUT command
406  fout << "\tA8";
407  // short int btic = 31;
408  // cout << "CHECK BTIC " << btic << endl;
409  short int Low_byte = (btic & 0x00FF); // output in hex bytes format with zero padding
410  short int High_byte = (btic >> 8 & 0x00FF);
411  fout << setw(2) << setfill('0') << hex << High_byte << setw(2) << setfill('0') << Low_byte;
412 
413  // convert parameters from IEE32 float to DSP float format
414  short int DSPmantissa = 0;
415  short int DSPexp = 0;
416 
417  // d parameter conversion and dump
418  IEEE32toDSP(d, DSPmantissa, DSPexp);
419  Low_byte = (DSPmantissa & 0x00FF); // output in hex bytes format with zero padding
420  High_byte = (DSPmantissa >> 8 & 0x00FF);
421  fout << setw(2) << setfill('0') << hex << High_byte << setw(2) << setfill('0') << Low_byte;
422  Low_byte = (DSPexp & 0x00FF);
423  High_byte = (DSPexp >> 8 & 0x00FF);
424  fout << setw(2) << setfill('0') << High_byte << setw(2) << setfill('0') << Low_byte;
425 
426  // xnc parameter conversion and dump
427  DSPmantissa = 0;
428  DSPexp = 0;
429  IEEE32toDSP(xcn, DSPmantissa, DSPexp);
430  Low_byte = (DSPmantissa & 0x00FF); // output in hex bytes format with zero padding
431  High_byte = (DSPmantissa >> 8 & 0x00FF);
432  fout << setw(2) << setfill('0') << hex << High_byte << setw(2) << setfill('0') << Low_byte;
433  Low_byte = (DSPexp & 0x00FF);
434  High_byte = (DSPexp >> 8 & 0x00FF);
435  fout << setw(2) << setfill('0') << High_byte << setw(2) << setfill('0') << Low_byte;
436 
437  // sign bits
438  Low_byte = (xcn_sign & 0x00FF); // output in hex bytes format with zero padding
439  High_byte = (xcn_sign >> 8 & 0x00FF);
440  fout << setw(2) << setfill('0') << hex << High_byte << setw(2) << setfill('0') << Low_byte << dec << "\n";
441 
442  fout.close();
443 
444  return;
445 }
446 
447 /*
448 // A. Gozzelino May 11th 2012: Old and wrong definition
449 void
450 DTTrigGeom::IEEE32toDSP(float f, short int & DSPmantissa, short int & DSPexp)
451 {
452  long int *pl=0, lm;
453  bool sign=false;
454 
455  DSPmantissa = 0;
456  DSPexp = 0;
457 
458  if( f!=0.0 )
459  {
460  memcpy(pl,&f,sizeof(float));
461 
462  if((*pl & 0x80000000)!=0)
463  sign=true;
464  lm = ( 0x800000 | (*pl & 0x7FFFFF)); // [1][23bit mantissa]
465  lm >>= 9; //reduce to 15bits
466  lm &= 0x7FFF;
467  DSPexp = ((*pl>>23)&0xFF)-126;
468  DSPmantissa = (short)lm;
469  if(sign)
470  DSPmantissa = - DSPmantissa; // convert negative value in 2.s
471 complement
472 
473  }
474  return;
475 }
476 */
477 
478 //*******************
479 // A.Gozzelino May 11th 2012: bug fix in method IEEE32toDSP
480 //******************
481 
482 void DTTrigGeom::IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp) {
483  long int lm;
484  long int pl = 0;
485 
486  bool sign = false;
487 
488  DSPmantissa = 0;
489  DSPexp = 0;
490 
491  if (f != 0.0) {
492  memcpy(&pl, &f, sizeof(float));
493 
494  if ((pl & 0x80000000) != 0)
495  sign = true;
496  lm = (0x800000 | (pl & 0x7FFFFF)); // [1][23bit mantissa]
497  lm >>= 9; // reduce to 15bits
498  lm &= 0x7FFF;
499  DSPexp = ((pl >> 23) & 0xFF) - 126;
500  DSPmantissa = (short)lm;
501  if (sign)
502  DSPmantissa = -DSPmantissa; // convert negative value in 2.s complement
503  }
504  return;
505 }
506 //********************** end bug fix ****************
507 
509  /* obsolete!
510  float x = 0;
511  float y = 0;
512  float z = ZSL(id.superlayer());
513  if(id.superlayer()==2){
514  // SL 2: Reverse numbering -------V
515  y = Xwire1BTI1SL(id.superlayer()) - ((float)(id.bti()-1)-0.5)*cellPitch();
516  } else {
517  x = Xwire1BTI1SL(id.superlayer()) + ((float)(id.bti()-1)-0.5)*cellPitch();
518  }
519  */
520 
521  // NEWGEO
522  /* int nsl = id.superlayer();
523  int tube = mapTubeInFEch(nsl,1,id.bti());
524  LocalPoint p = tubePosInCh(nsl,1,tube);
525  //traslation because z axes is in middle of SL, x/y axes on left I of first
526  cell
527 
528  LocalPoint p1 = tubePosInCh (nsl,1,1);
529  LocalPoint p2 = tubePosInCh (nsl,2,1);
530  cout << "nbti " << id.bti() << " tube " << tube << " localpoint" << p <<
531  endl; cout << "localpoint layer 1" << p1 << " localpoint layer 2" << p2 <<
532  endl;
533 
534  float xt = 0;
535  float yt = 0;
536  float zt = - cellH() * 3./2.;
537  if(nsl==2)
538  yt = - cellPitch()/2.;
539  else
540  xt = + cellPitch()/2.;
541 
542  if(posFE(nsl)==0){//FE in positive y
543  xt = - xt;
544  yt = - yt;
545  }
546 
547  cout << "localpoint " << p << ' ' << xt << ' ' << yt << endl;
548 
549  return LocalPoint(p.x()+xt,p.y()+yt,p.z()+zt);*/
550 
551  int nsl = id.superlayer();
552  const DTSuperLayer *sl = _stat->superLayer(DTSuperLayerId(statId(), nsl));
553  const DTLayer *lay = sl->layer(DTLayerId(statId(), nsl, 1));
554  int tube = id.bti();
555  float localX = lay->specificTopology().wirePosition(tube);
556  float xt = -cellPitch() / 2.;
557  float zt = -cellH() * 3. / 2.;
558  // LocalPoint posInLayer1(localX+xt,yt,0); //Correction now y is left I of
559  // first cell of layer 1 y=0 and z in the middle of SL,
560  LocalPoint posInLayer1(localX + xt, 0, zt);
561  LocalPoint posInChamber = _stat->surface().toLocal(lay->toGlobal(posInLayer1));
562  // GlobalPoint posInCMS = lay->toGlobal(posInLayer1);
563 
564  /* cout <<endl;
565  cout << "tube " << ntube << " nlay " << nlay << endl;
566  cout << "posinlayer " << posInLayer1 << "posinchamb " << posInChamber <<
567  "posinCMS " << posInCMS << endl;*/
568 
569  return posInChamber;
570 }
571 
573  /* obsolete
574  float x = Xwire1BTI1SL(1) +
575  ( ( (float)(id.traco()) - 0.5 ) * DTConfig::NBTITC - 0.5 )*cellPitch();
576  // half cell shift in SL1 of MB1 (since cmsim116)
577  if(station()==1) x -= 0.5*cellPitch();
578  float y = 0;
579  float z = ZcenterSL();
580  */
581  // NEWGEO
582  // position of first BTI in sl 3 on X
583  float x = localPosition(DTBtiId(DTSuperLayerId(wheel(), station(), sector(), 3), 1)).x();
584  // 10/7/06 May be not needed anymore in new geometry
585  // if(posFE(3)==1)
586  // x -= (id.traco()-2)*DTConfig::NBTITC * cellPitch();
587  // if(posFE(3)==0)
588  x += (id.traco() - 2) * DTConfig::NBTITC * cellPitch();
589 
590  float y = 0;
591  float z = ZcenterSL();
592 
593  return LocalPoint(x, y, z);
594 }
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:508
const DTChamber * stat() const
Associated chamber.
Definition: DTTrigGeom.h:50
int sector() const
Return sector number.
Definition: DTTrigGeom.h:65
Local3DVector LocalVector
Definition: LocalVector.h:12
T perp() const
Definition: PV3DBase.h:69
DTTrigGeom(const DTChamber *stat, bool debug)
Constructor.
Definition: DTTrigGeom.cc:52
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
int posFE(int sl) const
Front End position : 1=toward negative y, 0=toward positive y.
Definition: DTTrigGeom.cc:192
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:76
void setGeom(const DTChamber *stat)
Set/Update Geometry.
Definition: DTTrigGeom.cc:203
float _PHICH
Definition: DTTrigGeom.h:197
T z() const
Definition: PV3DBase.h:61
const DTChamber * _stat
Definition: DTTrigGeom.h:194
float phiCh() const
Rotation angle of chamber (deg)
Definition: DTTrigGeom.h:70
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
bool _debug
Definition: DTTrigGeom.h:202
float _H
Definition: DTTrigGeom.h:198
void dumpLUT(short int btic)
Dump the LUT for this chamber.
Definition: DTTrigGeom.cc:316
float _ZSL[3]
Definition: DTTrigGeom.h:200
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
LocalPoint toLocal(const GlobalPoint &gp) const
float const *__restrict__ zt
float _PITCH
Definition: DTTrigGeom.h:199
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:53
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:79
T sqrt(T t)
Definition: SSEVec.h:19
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void dumpGeom() const
Dump the geometry.
Definition: DTTrigGeom.cc:266
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:53
double f[11][100]
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
d
Definition: ztail.py:151
int station() const
Return station number.
Definition: DTTrigGeom.h:62
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
ii
Definition: cuy.py:589
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
float ZcenterSL() const
Coordinate of center of the 2 Phi SL.
Definition: DTTrigGeom.h:82
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:73
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
#define debug
Definition: HDRShower.cc:19
float phiSLOffset()
Superlayer offset in chamber front-end frame, in cm.
Definition: DTTrigGeom.cc:64
void getGeom()
Get the geometry from the station.
Definition: DTTrigGeom.cc:208
int mapTubeInFEch(int nsl, int nlay, int ntube) const
Staggering of first wire of layer respect to default: obsolete 19/6/06.
Definition: DTTrigGeom.cc:144
static int position[264][3]
Definition: ReadPGInfo.cc:289
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
Definition: DTTrigGeom.cc:257
GlobalPoint toGlobal(const LocalPoint p) const
Go to CMS coordinate system for a point.
Definition: DTTrigGeom.h:110
~DTTrigGeom()
Destructor.
Definition: DTTrigGeom.cc:58
static const int NBTITC
Definition: DTConfig.h:37
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:482
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:76
int _NCELL[3]
Definition: DTTrigGeom.h:201
LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const
Wire position in chamber frame.
Definition: DTTrigGeom.cc:170
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:63
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:88