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 public:
44  DTTrigGeom(const DTChamber *stat, bool debug);
45 
47  ~DTTrigGeom();
48 
50  inline const DTChamber *stat() const { return _stat; }
51 
53  inline DTChamberId statId() const { return _stat->id(); }
54 
56  void setGeom(const DTChamber *stat);
57 
59  inline int wheel() const { return _stat->id().wheel(); }
60 
62  inline int station() const { return _stat->id().station(); }
63 
65  inline int sector() const { return _stat->id().sector(); }
66 
67  // Access geometrical parameters
68 
70  inline float phiCh() const { return _PHICH; }
71 
73  inline float cellH() const { return _H; }
74 
76  inline float cellPitch() const { return _PITCH; }
77 
79  inline float distSL() const { return fabs(_ZSL[2] - _ZSL[0]); }
80 
82  inline float ZcenterSL() const { return 0.5 * (_ZSL[2] + _ZSL[0]); }
83 
85  float ZSL(int) const;
86 
88  inline int nCell(int sl) const { return (sl > 0 && sl <= 3) * _NCELL[sl - 1]; }
89 
90  // NEWGEOmetry update
92  // int layerFEStaggering(int nsl, int nlay) const;
93 
96  int mapTubeInFEch(int nsl, int nlay, int ntube) const;
97 
99  float phiSLOffset();
100 
102  LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const;
103 
105  int posFE(int sl) const;
106 
107  // Local and global position of a trigger object
108 
110  GlobalPoint toGlobal(const LocalPoint p) const { return _stat->surface().toGlobal(p); }
111 
113  GlobalVector toGlobal(const LocalVector v) const { return _stat->surface().toGlobal(v); }
114 
116  LocalPoint toLocal(const GlobalPoint p) const { return _stat->surface().toLocal(p); }
117 
119  LocalVector toLocal(const GlobalVector v) const { return _stat->surface().toLocal(v); }
120 
140  LocalPoint localPosition(const DTBtiId) const;
142 
173  LocalPoint localPosition(const DTTracoId) const;
175 
177  inline GlobalPoint CMSPosition(const DTBtiId obj) const { return toGlobal(localPosition(obj)); }
178 
180  inline GlobalPoint CMSPosition(const DTTracoId obj) const { return toGlobal(localPosition(obj)); }
181 
183  void dumpGeom() const;
184 
186  void dumpLUT(short int btic);
187  void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp);
188 
189 private:
191  void getGeom();
192 
193 private:
194  const DTChamber *_stat; // Pointer to the chamber
195 
196  // geometrical parameters
197  float _PHICH; // angle of normal to the chamber in CMS frame (rad)
198  float _H; // height of a cell (cm)
199  float _PITCH; // width of a cell (cm)
200  float _ZSL[3]; // Z coordinate of SL centers
201  int _NCELL[3]; // number of cells (BTI) in SL each SL
202  bool _debug;
203 };
204 
205 #endif
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:81
int sector() const
Return sector number.
Definition: DTTrigGeom.h:65
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
DTTrigGeom(const DTChamber *stat, bool debug)
Constructor.
Definition: DTTrigGeom.cc:52
float phiCh() const
Rotation angle of chamber (deg)
Definition: DTTrigGeom.h:70
LocalVector toLocal(const GlobalVector v) const
Go to Local coordinate system for a vector.
Definition: DTTrigGeom.h:119
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:76
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
void setGeom(const DTChamber *stat)
Set/Update Geometry.
Definition: DTTrigGeom.cc:203
float _PHICH
Definition: DTTrigGeom.h:197
const DTChamber * _stat
Definition: DTTrigGeom.h:194
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
GlobalPoint toGlobal(const LocalPoint p) const
Go to CMS coordinate system for a point.
Definition: DTTrigGeom.h:110
float _ZSL[3]
Definition: DTTrigGeom.h:200
void dumpGeom() const
Dump the geometry.
Definition: DTTrigGeom.cc:266
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
float _PITCH
Definition: DTTrigGeom.h:199
GlobalPoint CMSPosition(const DTTracoId obj) const
CMS position of a TRACO.
Definition: DTTrigGeom.h:180
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:79
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:73
LocalPoint toLocal(const GlobalPoint &gp) const
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:32
float ZcenterSL() const
Coordinate of center of the 2 Phi SL.
Definition: DTTrigGeom.h:82
double f[11][100]
int posFE(int sl) const
Front End position : 1=toward negative y, 0=toward positive y.
Definition: DTTrigGeom.cc:192
int station() const
Return station number.
Definition: DTTrigGeom.h:62
#define debug
Definition: HDRShower.cc:19
LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const
Wire position in chamber frame.
Definition: DTTrigGeom.cc:170
float phiSLOffset()
Superlayer offset in chamber front-end frame, in cm.
Definition: DTTrigGeom.cc:64
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:53
void getGeom()
Get the geometry from the station.
Definition: DTTrigGeom.cc:208
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
LocalPoint toLocal(const GlobalPoint p) const
Go to Local coordinate system for a point.
Definition: DTTrigGeom.h:116
int sector() const
Definition: DTChamberId.h:49
GlobalVector toGlobal(const LocalVector v) const
Go to CMS coordinate system for a vector.
Definition: DTTrigGeom.h:113
~DTTrigGeom()
Destructor.
Definition: DTTrigGeom.cc:58
int station() const
Return the station number.
Definition: DTChamberId.h:42
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:482
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
Definition: DTTrigGeom.h:177
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:88
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
Definition: DTTrigGeom.cc:257
int _NCELL[3]
Definition: DTTrigGeom.h:201