CMS 3D CMS Logo

DTTrigGeom.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
11 //
12 //--------------------------------------------------
13 #ifndef DT_TRIG_GEOM_H
14 #define DT_TRIG_GEOM_H
15 
16 //------------------------------------
17 // Collaborating Class Declarations --
18 //------------------------------------
19 
20 //----------------------
21 // Base Class Headers --
22 //----------------------
33 //---------------
34 // C++ Headers --
35 //---------------
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
41 class DTTrigGeom {
42 
43 public:
45  DTTrigGeom(const DTChamber *stat, bool debug);
46 
48  ~DTTrigGeom();
49 
51  inline const DTChamber *stat() const { return _stat; }
52 
54  inline DTChamberId statId() const { return _stat->id(); }
55 
57  void setGeom(const DTChamber *stat);
58 
60  inline int wheel() const { return _stat->id().wheel(); }
61 
63  inline int station() const { return _stat->id().station(); }
64 
66  inline int sector() const { return _stat->id().sector(); }
67 
68  // Access geometrical parameters
69 
71  inline float phiCh() const { return _PHICH; }
72 
74  inline float cellH() const { return _H; }
75 
77  inline float cellPitch() const { return _PITCH; }
78 
80  inline float distSL() const { return fabs(_ZSL[2] - _ZSL[0]); }
81 
83  inline float ZcenterSL() const { return 0.5 * (_ZSL[2] + _ZSL[0]); }
84 
86  float ZSL(int) const;
87 
89  inline int nCell(int sl) const {
90  return (sl > 0 && sl <= 3) * _NCELL[sl - 1];
91  }
92 
93  // NEWGEOmetry update
95  // int layerFEStaggering(int nsl, int nlay) const;
96 
99  int mapTubeInFEch(int nsl, int nlay, int ntube) const;
100 
102  float phiSLOffset();
103 
105  LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const;
106 
108  int posFE(int sl) const;
109 
110  // Local and global position of a trigger object
111 
114  return _stat->surface().toGlobal(p);
115  }
116 
119  return _stat->surface().toGlobal(v);
120  }
121 
124  return _stat->surface().toLocal(p);
125  }
126 
129  return _stat->surface().toLocal(v);
130  }
131 
151  LocalPoint localPosition(const DTBtiId) const;
153 
184  LocalPoint localPosition(const DTTracoId) const;
186 
188  inline GlobalPoint CMSPosition(const DTBtiId obj) const {
189  return toGlobal(localPosition(obj));
190  }
191 
193  inline GlobalPoint CMSPosition(const DTTracoId obj) const {
194  return toGlobal(localPosition(obj));
195  }
196 
198  void dumpGeom() const;
199 
201  void dumpLUT(short int btic);
202  void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp);
203 
204 private:
206  void getGeom();
207 
208 private:
209  const DTChamber *_stat; // Pointer to the chamber
210 
211  // geometrical parameters
212  float _PHICH; // angle of normal to the chamber in CMS frame (rad)
213  float _H; // height of a cell (cm)
214  float _PITCH; // width of a cell (cm)
215  float _ZSL[3]; // Z coordinate of SL centers
216  int _NCELL[3]; // number of cells (BTI) in SL each SL
217  bool _debug;
218 };
219 
220 #endif
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
int sector() const
Return sector number.
Definition: DTTrigGeom.h:66
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:148
DTTrigGeom(const DTChamber *stat, bool debug)
Constructor.
Definition: DTTrigGeom.cc:52
float phiCh() const
Rotation angle of chamber (deg)
Definition: DTTrigGeom.h:71
LocalVector toLocal(const GlobalVector v) const
Go to Local coordinate system for a vector.
Definition: DTTrigGeom.h:128
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:77
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:60
void setGeom(const DTChamber *stat)
Set/Update Geometry.
Definition: DTTrigGeom.cc:207
float _PHICH
Definition: DTTrigGeom.h:212
const DTChamber * _stat
Definition: DTTrigGeom.h:209
bool _debug
Definition: DTTrigGeom.h:217
float _H
Definition: DTTrigGeom.h:213
void dumpLUT(short int btic)
Dump the LUT for this chamber.
Definition: DTTrigGeom.cc:331
GlobalPoint toGlobal(const LocalPoint p) const
Go to CMS coordinate system for a point.
Definition: DTTrigGeom.h:113
float _ZSL[3]
Definition: DTTrigGeom.h:215
void dumpGeom() const
Dump the geometry.
Definition: DTTrigGeom.cc:275
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
float _PITCH
Definition: DTTrigGeom.h:214
GlobalPoint CMSPosition(const DTTracoId obj) const
CMS position of a TRACO.
Definition: DTTrigGeom.h:193
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:80
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:74
LocalPoint toLocal(const GlobalPoint &gp) const
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:33
float ZcenterSL() const
Coordinate of center of the 2 Phi SL.
Definition: DTTrigGeom.h:83
double f[11][100]
int posFE(int sl) const
Front End position : 1=toward negative y, 0=toward positive y.
Definition: DTTrigGeom.cc:196
int station() const
Return station number.
Definition: DTTrigGeom.h:63
#define debug
Definition: HDRShower.cc:19
LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const
Wire position in chamber frame.
Definition: DTTrigGeom.cc:174
float phiSLOffset()
Superlayer offset in chamber front-end frame, in cm.
Definition: DTTrigGeom.cc:68
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:54
void getGeom()
Get the geometry from the station.
Definition: DTTrigGeom.cc:213
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:541
const DTChamber * stat() const
Associated chamber.
Definition: DTTrigGeom.h:51
LocalPoint toLocal(const GlobalPoint p) const
Go to Local coordinate system for a point.
Definition: DTTrigGeom.h:123
int sector() const
Definition: DTChamberId.h:61
GlobalVector toGlobal(const LocalVector v) const
Go to CMS coordinate system for a vector.
Definition: DTTrigGeom.h:118
~DTTrigGeom()
Destructor.
Definition: DTTrigGeom.cc:62
int station() const
Return the station number.
Definition: DTChamberId.h:51
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:514
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:188
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:89
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
Definition: DTTrigGeom.cc:266
int _NCELL[3]
Definition: DTTrigGeom.h:216