CMS 3D CMS Logo

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