CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTTrigGeom Class Reference

#include <DTTrigGeom.h>

Public Member Functions

float cellH () const
 Height of a cell (cm) More...
 
float cellPitch () const
 Width of a cell (cm) i.e. distance between ywo wires. More...
 
GlobalPoint CMSPosition (const DTBtiId obj) const
 CMS position of a BTI. More...
 
GlobalPoint CMSPosition (const DTTracoId obj) const
 CMS position of a TRACO. More...
 
float distSL () const
 Distance between the phi view superlayers (cms) More...
 
 DTTrigGeom (const DTChamber *stat, bool debug)
 Constructor. More...
 
void dumpGeom () const
 Dump the geometry. More...
 
void dumpLUT (short int btic)
 Dump the LUT for this chamber. More...
 
void IEEE32toDSP (float f, short int &DSPmantissa, short int &DSPexp)
 
LocalPoint localPosition (const DTBtiId) const
 Local position in chamber of a BTI. More...
 
LocalPoint localPosition (const DTTracoId) const
 Local position in chamber of a TRACO. More...
 
int mapTubeInFEch (int nsl, int nlay, int ntube) const
 Staggering of first wire of layer respect to default: obsolete 19/6/06. More...
 
int nCell (int sl) const
 Number of BTIs in a required superlayer (i.e. nCells in lay 1) More...
 
float phiCh () const
 Rotation angle of chamber (deg) More...
 
float phiSLOffset ()
 Superlayer offset in chamber front-end frame, in cm. More...
 
int posFE (int sl) const
 Front End position : 1=toward negative y, 0=toward positive y. More...
 
int sector () const
 Return sector number. More...
 
void setGeom (const DTChamber *stat)
 Set/Update Geometry. More...
 
const DTChamberstat () const
 Associated chamber. More...
 
DTChamberId statId () const
 Identifier of the associated chamber. More...
 
int station () const
 Return station number. More...
 
GlobalPoint toGlobal (const LocalPoint p) const
 Go to CMS coordinate system for a point. More...
 
GlobalVector toGlobal (const LocalVector v) const
 Go to CMS coordinate system for a vector. More...
 
LocalPoint toLocal (const GlobalPoint p) const
 Go to Local coordinate system for a point. More...
 
LocalVector toLocal (const GlobalVector v) const
 Go to Local coordinate system for a vector. More...
 
LocalPoint tubePosInCh (int nsl, int nlay, int ntube) const
 Wire position in chamber frame. More...
 
int wheel () const
 Return wheel number. More...
 
float ZcenterSL () const
 Coordinate of center of the 2 Phi SL. More...
 
float ZSL (int) const
 Radial coordinate in chamber frame of center of a superlayer. More...
 
 ~DTTrigGeom ()
 Destructor. More...
 

Private Member Functions

void getGeom ()
 Get the geometry from the station. More...
 

Private Attributes

bool _debug
 
float _H
 
int _NCELL [3]
 
float _PHICH
 
float _PITCH
 
const DTChamber_stat
 
float _ZSL [3]
 

Detailed Description

Muon Barrel Trigger Geometry

Author
C.Grandi \modifications S.Vanini

Definition at line 41 of file DTTrigGeom.h.

Constructor & Destructor Documentation

◆ DTTrigGeom()

DTTrigGeom::DTTrigGeom ( const DTChamber stat,
bool  debug 
)

Constructor.

Definition at line 52 of file DTTrigGeom.cc.

52 : _stat(stat), _debug(debug) { getGeom(); }

References getGeom().

◆ ~DTTrigGeom()

DTTrigGeom::~DTTrigGeom ( )

Destructor.

Definition at line 58 of file DTTrigGeom.cc.

58 {}

Member Function Documentation

◆ cellH()

float DTTrigGeom::cellH ( ) const
inline

Height of a cell (cm)

Definition at line 73 of file DTTrigGeom.h.

73 { return _H; }

References _H.

Referenced by DTBtiChip::DTBtiChip(), DTBtiCard::localDirection(), localPosition(), DTTracoChip::setTracoAcceptances(), DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

◆ cellPitch()

float DTTrigGeom::cellPitch ( ) const
inline

◆ CMSPosition() [1/2]

GlobalPoint DTTrigGeom::CMSPosition ( const DTBtiId  obj) const
inline

CMS position of a BTI.

Definition at line 177 of file DTTrigGeom.h.

177 { return toGlobal(localPosition(obj)); }

References localPosition(), getGTfromDQMFile::obj, and toGlobal().

Referenced by DTBtiChip::CMSPosition(), DTTracoChip::CMSPosition(), DTBtiChip::DTBtiChip(), and dumpGeom().

◆ CMSPosition() [2/2]

GlobalPoint DTTrigGeom::CMSPosition ( const DTTracoId  obj) const
inline

CMS position of a TRACO.

Definition at line 180 of file DTTrigGeom.h.

180 { return toGlobal(localPosition(obj)); }

References localPosition(), getGTfromDQMFile::obj, and toGlobal().

◆ distSL()

float DTTrigGeom::distSL ( ) const
inline

Distance between the phi view superlayers (cms)

Definition at line 79 of file DTTrigGeom.h.

79 { return fabs(_ZSL[2] - _ZSL[0]); }

References _ZSL.

Referenced by getGeom(), DTTracoCard::localDirection(), DTTracoCard::localPosition(), DTTracoChip::setTracoAcceptances(), DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().

◆ dumpGeom()

void DTTrigGeom::dumpGeom ( ) const

Dump the geometry.

Definition at line 266 of file DTTrigGeom.cc.

266  {
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 }

References _stat, CMSPosition(), gather_cfg::cout, cuy::ii, findQualityFiles::jj, localPosition(), nCell(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phiCh(), createTree::pp, sector(), statId(), station(), GeomDet::toGlobal(), tubePosInCh(), wheel(), PV3DBase< T, PVType, FrameType >::z(), and ZSL().

Referenced by DTSCTrigUnit::dumpGeom().

◆ dumpLUT()

void DTTrigGeom::dumpLUT ( short int  btic)

Dump the LUT for this chamber.

Definition at line 316 of file DTTrigGeom.cc.

316  {
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 }

References _stat, ztail::d, TauDecayModes::dec, change_name::diff, groupFilesInBlocks::fout, IEEE32toDSP(), localPosition(), visualization-live-secondInstance_cfg::m, Skims_PA_cff::name, phiCh(), createTree::pp, q1, sector(), mathSSE::sqrt(), statId(), station(), funct::tan(), GeomDet::toGlobal(), toGlobal(), wheel(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and ZcenterSL().

Referenced by DTSCTrigUnit::dumpLUT().

◆ getGeom()

void DTTrigGeom::getGeom ( )
private

Get the geometry from the station.

Definition at line 208 of file DTTrigGeom.cc.

208  {
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 }

References _debug, _H, _NCELL, _PHICH, _PITCH, _stat, _ZSL, DTTopology::channels(), gather_cfg::cout, distSL(), alignBH_cfg::fixed, mps_fire::i, DTSuperLayer::layer(), nCell(), PV3DBase< T, PVType, FrameType >::phi(), phiCh(), position, RecoTauValidation_cfi::posX, createTree::pp, sector(), DTLayer::specificTopology(), statId(), station(), DTChamber::superLayer(), GeomDet::surface(), GeomDet::toGlobal(), Surface::toGlobal(), GloballyPositioned< T >::toLocal(), cmsswSequenceInfo::tp, wheel(), PV3DBase< T, PVType, FrameType >::z(), and ZSL().

Referenced by DTTrigGeom(), and setGeom().

◆ IEEE32toDSP()

void DTTrigGeom::IEEE32toDSP ( float  f,
short int &  DSPmantissa,
short int &  DSPexp 
)

Definition at line 482 of file DTTrigGeom.cc.

482  {
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 }

References f, and Validation_hcalonly_cfi::sign.

Referenced by dumpLUT().

◆ localPosition() [1/2]

LocalPoint DTTrigGeom::localPosition ( const DTBtiId  id) const

Local position in chamber of a BTI.

NB: attention: in NEWGEO definition has changed:

 +---------+---------+---------+
 | 1  o    | 5  o    | 9  o    |
 +----+----+----+----+----+----+
      | 3  o    |  7 o    |
 +----+----+----+----+----+ - - - -> x/-x
 | 2  o    | 6  o    |
 +----+----+----+----+----+
      | 4  o    | 8  o    |
      +---------+---------+
      ^
      |
     x=0

Definition at line 508 of file DTTrigGeom.cc.

508  {
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 }

References _stat, cellH(), cellPitch(), DTSuperLayer::layer(), phase1PixelTopology::localX(), DTLayer::specificTopology(), statId(), DTChamber::superLayer(), GeomDet::surface(), GeomDet::toGlobal(), GloballyPositioned< T >::toLocal(), DTTopology::wirePosition(), and gpuVertexFinder::zt.

Referenced by CMSPosition(), DTTracoChip::DTTracoChip(), dumpGeom(), dumpLUT(), DTBtiCard::localDirection(), DTBtiCard::localPosition(), DTTracoCard::localPosition(), DTBtiChip::localPosition(), DTTracoChip::localPosition(), and localPosition().

◆ localPosition() [2/2]

LocalPoint DTTrigGeom::localPosition ( const DTTracoId  id) const

Local position in chamber of a TRACO.

\verbatim

NB: attention: in NEWGEO definition has changed:

+----+----+----+----+----+----+----+----+----+----+----+----+
|  5 |  6 |  7 |  8 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
+----+----+----+----+----+----+----+----+----+----+----+----+
\                                                           /
| \                                                       /
|   \                                                   /
|     \                                               /
|       \                                           /

-—|----------------------------------------------------------------—> | \ / | \ / | \ / | \ / | \ / | +-—+-—+-—+-—+ | | 1 | 2 | 3 | 4 | | +-—+-—+-—+-—+ X=0 ^ | traco position

Definition at line 572 of file DTTrigGeom.cc.

572  {
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 }

References cellPitch(), localPosition(), DTConfig::NBTITC, sector(), station(), wheel(), x, PV3DBase< T, PVType, FrameType >::x(), y, z, and ZcenterSL().

◆ mapTubeInFEch()

int DTTrigGeom::mapTubeInFEch ( int  nsl,
int  nlay,
int  ntube 
) const

Staggering of first wire of layer respect to default: obsolete 19/6/06.

Map tube number into hw wire number, and reverse hw num->tube (nb NOT in bti hardware number, this depends on connectors)

Definition at line 144 of file DTTrigGeom.cc.

144  {
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 }

References gather_cfg::cout, and station().

Referenced by DTBtiCard::loadBTI().

◆ nCell()

int DTTrigGeom::nCell ( int  sl) const
inline

Number of BTIs in a required superlayer (i.e. nCells in lay 1)

Definition at line 88 of file DTTrigGeom.h.

88 { return (sl > 0 && sl <= 3) * _NCELL[sl - 1]; }

References _NCELL.

Referenced by DTBtiCard::activeGetBTI(), DTBtiChip::add_digi(), dumpGeom(), getGeom(), and DTBtiChip::run().

◆ phiCh()

float DTTrigGeom::phiCh ( ) const
inline

Rotation angle of chamber (deg)

Definition at line 70 of file DTTrigGeom.h.

70 { return _PHICH; }

References _PHICH.

Referenced by DTTracoChip::calculateAngles(), dumpGeom(), dumpLUT(), and getGeom().

◆ phiSLOffset()

float DTTrigGeom::phiSLOffset ( )

Superlayer offset in chamber front-end frame, in cm.

Definition at line 64 of file DTTrigGeom.cc.

64  {
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 }

References hltrates_dqm_sourceclient-live_cfg::offset, tubePosInCh(), PV3DBase< T, PVType, FrameType >::x(), and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by DTTracoChip::DTTracoChip(), and DTTracoChip::setTracoAcceptances().

◆ posFE()

int DTTrigGeom::posFE ( int  sl) const

Front End position : 1=toward negative y, 0=toward positive y.

Definition at line 192 of file DTTrigGeom.cc.

192  {
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 }

References gather_cfg::cout, and station().

◆ sector()

int DTTrigGeom::sector ( void  ) const
inline

◆ setGeom()

void DTTrigGeom::setGeom ( const DTChamber stat)

Set/Update Geometry.

Definition at line 203 of file DTTrigGeom.cc.

203  {
204  _stat = stat;
205  getGeom();
206 }

References _stat, getGeom(), and stat().

Referenced by DTSCTrigUnit::setGeom().

◆ stat()

const DTChamber* DTTrigGeom::stat ( ) const
inline

Associated chamber.

Definition at line 50 of file DTTrigGeom.h.

50 { return _stat; }

References _stat.

Referenced by setGeom(), DTGeomSupplier::stat(), and DTSCTrigUnit::stat().

◆ statId()

DTChamberId DTTrigGeom::statId ( ) const
inline

◆ station()

int DTTrigGeom::station ( ) const
inline

◆ toGlobal() [1/2]

GlobalPoint DTTrigGeom::toGlobal ( const LocalPoint  p) const
inline

Go to CMS coordinate system for a point.

Definition at line 110 of file DTTrigGeom.h.

110 { return _stat->surface().toGlobal(p); }

References _stat, AlCaHLTBitMon_ParallelJobs::p, GeomDet::surface(), and Surface::toGlobal().

Referenced by DTGeomSupplier::CMSDirection(), DTGeomSupplier::CMSPosition(), CMSPosition(), and dumpLUT().

◆ toGlobal() [2/2]

GlobalVector DTTrigGeom::toGlobal ( const LocalVector  v) const
inline

Go to CMS coordinate system for a vector.

Definition at line 113 of file DTTrigGeom.h.

113 { return _stat->surface().toGlobal(v); }

References _stat, GeomDet::surface(), Surface::toGlobal(), and findQualityFiles::v.

◆ toLocal() [1/2]

LocalPoint DTTrigGeom::toLocal ( const GlobalPoint  p) const
inline

Go to Local coordinate system for a point.

Definition at line 116 of file DTTrigGeom.h.

116 { return _stat->surface().toLocal(p); }

References _stat, AlCaHLTBitMon_ParallelJobs::p, GeomDet::surface(), and GloballyPositioned< T >::toLocal().

◆ toLocal() [2/2]

LocalVector DTTrigGeom::toLocal ( const GlobalVector  v) const
inline

Go to Local coordinate system for a vector.

Definition at line 119 of file DTTrigGeom.h.

119 { return _stat->surface().toLocal(v); }

References _stat, GeomDet::surface(), GloballyPositioned< T >::toLocal(), and findQualityFiles::v.

◆ tubePosInCh()

LocalPoint DTTrigGeom::tubePosInCh ( int  nsl,
int  nlay,
int  ntube 
) const

Wire position in chamber frame.

Definition at line 170 of file DTTrigGeom.cc.

170  {
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 }

References _stat, gather_cfg::cout, DTSuperLayer::layer(), phase1PixelTopology::localX(), DTLayer::specificTopology(), statId(), DTChamber::superLayer(), GeomDet::surface(), GeomDet::toGlobal(), GloballyPositioned< T >::toLocal(), and DTTopology::wirePosition().

Referenced by dumpGeom(), and phiSLOffset().

◆ wheel()

int DTTrigGeom::wheel ( ) const
inline

◆ ZcenterSL()

float DTTrigGeom::ZcenterSL ( ) const
inline

Coordinate of center of the 2 Phi SL.

Definition at line 82 of file DTTrigGeom.h.

82 { return 0.5 * (_ZSL[2] + _ZSL[0]); }

References _ZSL.

Referenced by dumpLUT(), and localPosition().

◆ ZSL()

float DTTrigGeom::ZSL ( int  sl) const

Radial coordinate in chamber frame of center of a superlayer.

Definition at line 257 of file DTTrigGeom.cc.

257  {
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 }

References _ZSL, and gather_cfg::cout.

Referenced by dumpGeom(), and getGeom().

Member Data Documentation

◆ _debug

bool DTTrigGeom::_debug
private

Definition at line 202 of file DTTrigGeom.h.

Referenced by getGeom().

◆ _H

float DTTrigGeom::_H
private

Definition at line 198 of file DTTrigGeom.h.

Referenced by cellH(), and getGeom().

◆ _NCELL

int DTTrigGeom::_NCELL[3]
private

Definition at line 201 of file DTTrigGeom.h.

Referenced by getGeom(), and nCell().

◆ _PHICH

float DTTrigGeom::_PHICH
private

Definition at line 197 of file DTTrigGeom.h.

Referenced by getGeom(), and phiCh().

◆ _PITCH

float DTTrigGeom::_PITCH
private

Definition at line 199 of file DTTrigGeom.h.

Referenced by cellPitch(), and getGeom().

◆ _stat

const DTChamber* DTTrigGeom::_stat
private

◆ _ZSL

float DTTrigGeom::_ZSL[3]
private

Definition at line 200 of file DTTrigGeom.h.

Referenced by distSL(), getGeom(), ZcenterSL(), and ZSL().

DTChamber::id
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:32
change_name.diff
diff
Definition: change_name.py:13
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DDAxes::y
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
DTTrigGeom::wheel
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
mps_fire.i
i
Definition: mps_fire.py:428
DTTracoId
Definition: DTTracoId.h:34
DTTrigGeom::ZcenterSL
float ZcenterSL() const
Coordinate of center of the 2 Phi SL.
Definition: DTTrigGeom.h:82
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DTTrigGeom::cellH
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:73
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTTopology::channels
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:76
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
DTTrigGeom::toGlobal
GlobalPoint toGlobal(const LocalPoint p) const
Go to CMS coordinate system for a point.
Definition: DTTrigGeom.h:110
DDAxes::x
DTSuperLayer
Definition: DTSuperLayer.h:24
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
findQualityFiles.v
v
Definition: findQualityFiles.py:179
gpuVertexFinder::zt
float const *__restrict__ zt
Definition: gpuClusterTracksDBSCAN.h:34
DTTrigGeom::_NCELL
int _NCELL[3]
Definition: DTTrigGeom.h:201
DTTrigGeom::ZSL
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
Definition: DTTrigGeom.cc:257
DTTopology
Definition: DTTopology.h:28
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
DTTopology::wirePosition
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
DTTrigGeom::getGeom
void getGeom()
Get the geometry from the station.
Definition: DTTrigGeom.cc:208
debug
#define debug
Definition: HDRShower.cc:19
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DTTrigGeom::tubePosInCh
LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const
Wire position in chamber frame.
Definition: DTTrigGeom.cc:170
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
DDAxes::z
DTTrigGeom::IEEE32toDSP
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:482
RecoTauValidation_cfi.posX
posX
Definition: RecoTauValidation_cfi.py:287
Point3DBase< float, GlobalTag >
DTLayerId
Definition: DTLayerId.h:12
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
DTTrigGeom::_stat
const DTChamber * _stat
Definition: DTTrigGeom.h:194
DTTrigGeom::phiCh
float phiCh() const
Rotation angle of chamber (deg)
Definition: DTTrigGeom.h:70
phase1PixelTopology::localX
constexpr uint16_t localX(uint16_t px)
Definition: phase1PixelTopology.h:142
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
q1
double q1[4]
Definition: TauolaWrapper.h:87
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DTTrigGeom::nCell
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:88
DTTrigGeom::localPosition
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:508
DTTrigGeom::stat
const DTChamber * stat() const
Associated chamber.
Definition: DTTrigGeom.h:50
DTTrigGeom::sector
int sector() const
Return sector number.
Definition: DTTrigGeom.h:65
DTTrigGeom::_H
float _H
Definition: DTTrigGeom.h:198
DTTrigGeom::_PHICH
float _PHICH
Definition: DTTrigGeom.h:197
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
DTTrigGeom::cellPitch
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:76
DTBtiId
Definition: DTBtiId.h:32
DTLayer
Definition: DTLayer.h:25
DTTrigGeom::CMSPosition
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DTTrigGeom::_debug
bool _debug
Definition: DTTrigGeom.h:202
DTSuperLayer::layer
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54
DTLayer::specificTopology
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
ztail.d
d
Definition: ztail.py:151
DTTrigGeom::_ZSL
float _ZSL[3]
Definition: DTTrigGeom.h:200
DTTrigGeom::_PITCH
float _PITCH
Definition: DTTrigGeom.h:199
DTTrigGeom::statId
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:53
createTree.pp
pp
Definition: createTree.py:17
DTChamber::superLayer
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:53
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
DTTrigGeom::station
int station() const
Return station number.
Definition: DTTrigGeom.h:62
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
DTConfig::NBTITC
static const int NBTITC
Definition: DTConfig.h:37
cuy.ii
ii
Definition: cuy.py:589
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
DTTrigGeom::distSL
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:79
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42