CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTrigGeom.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
13 //
14 //--------------------------------------------------
15 #ifndef DT_TRIG_GEOM_H
16 #define DT_TRIG_GEOM_H
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
21 
22 //----------------------
23 // Base Class Headers --
24 //----------------------
35 //---------------
36 // C++ Headers --
37 //---------------
38 
39 // ---------------------
40 // -- Class Interface --
41 // ---------------------
42 
43 class DTTrigGeom {
44 
45  public:
46 
49 
51  ~DTTrigGeom();
52 
54  inline const DTChamber* stat() const { return _stat; }
55 
57  inline DTChamberId statId() const { return _stat->id(); }
58 
60  void setGeom(const DTChamber* stat);
61 
63  inline int wheel() const { return _stat->id().wheel(); }
64 
66  inline int station() const { return _stat->id().station(); }
67 
69  inline int sector() const { return _stat->id().sector(); }
70 
71  // Access geometrical parameters
72 
74  inline float phiCh() const { return _PHICH; }
75 
77  inline float cellH() const { return _H; }
78 
80  inline float cellPitch() const { return _PITCH; }
81 
83  inline float distSL() const { return fabs(_ZSL[2]-_ZSL[0]); }
84 
86  inline float ZcenterSL() const { return 0.5*(_ZSL[2]+_ZSL[0]); }
87 
89  float ZSL(int) const;
90 
92  inline int nCell(int sl) const {
93  return (sl>0&&sl<=3)*_NCELL[sl-1];
94  }
95 
96  // NEWGEOmetry update
98  // int layerFEStaggering(int nsl, int nlay) const;
99 
102  int mapTubeInFEch(int nsl, int nlay, int ntube) const;
103 
105  float phiSLOffset();
106 
108  LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const;
109 
111  int posFE(int sl) const;
112 
113 
114  // Local and global position of a trigger object
115 
117  GlobalPoint toGlobal(const LocalPoint p) const { return _stat->surface().toGlobal(p); }
118 
120  GlobalVector toGlobal(const LocalVector v) const { return _stat->surface().toGlobal(v); }
121 
123  LocalPoint toLocal(const GlobalPoint p) const { return _stat->surface().toLocal(p); }
124 
126  LocalVector toLocal(const GlobalVector v) const { return _stat->surface().toLocal(v); }
127 
147  LocalPoint localPosition(const DTBtiId) const;
149 
180  LocalPoint localPosition(const DTTracoId) const;
182 
184  inline GlobalPoint CMSPosition(const DTBtiId obj) const {
185  return toGlobal(localPosition(obj));
186  }
187 
189  inline GlobalPoint CMSPosition(const DTTracoId obj) const {
190  return toGlobal(localPosition(obj));
191  }
192 
194  void dumpGeom() const;
195 
197  void dumpLUT(short int btic);
198  void IEEE32toDSP(float f, short int & DSPmantissa, short int & DSPexp);
199 
200  private:
201 
203  void getGeom();
204 
205  private:
206 
207  const DTChamber* _stat; // Pointer to the chamber
208 
209  // geometrical parameters
210  float _PHICH; // angle of normal to the chamber in CMS frame (rad)
211  float _H; // height of a cell (cm)
212  float _PITCH; // width of a cell (cm)
213  float _ZSL[3]; // Z coordinate of SL centers
214  int _NCELL[3]; // number of cells (BTI) in SL each SL
215  bool _debug;
216 
217 };
218 
219 #endif
DTTrigGeom(DTChamber *stat, bool debug)
Constructor.
Definition: DTTrigGeom.cc:52
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
int sector() const
Return sector number.
Definition: DTTrigGeom.h:69
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
float phiCh() const
Rotation angle of chamber (deg)
Definition: DTTrigGeom.h:74
LocalVector toLocal(const GlobalVector v) const
Go to Local coordinate system for a vector.
Definition: DTTrigGeom.h:126
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
void setGeom(const DTChamber *stat)
Set/Update Geometry.
Definition: DTTrigGeom.cc:203
float _PHICH
Definition: DTTrigGeom.h:210
const DTChamber * _stat
Definition: DTTrigGeom.h:207
bool _debug
Definition: DTTrigGeom.h:215
float _H
Definition: DTTrigGeom.h:211
void dumpLUT(short int btic)
Dump the LUT for this chamber.
Definition: DTTrigGeom.cc:327
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:276
float _PITCH
Definition: DTTrigGeom.h:212
GlobalPoint CMSPosition(const DTTracoId obj) const
CMS position of a TRACO.
Definition: DTTrigGeom.h:189
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
LocalPoint toLocal(const GlobalPoint &gp) const
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:35
float ZcenterSL() const
Coordinate of center of the 2 Phi SL.
Definition: DTTrigGeom.h:86
double f[11][100]
int posFE(int sl) const
Front End position : 1=toward negative y, 0=toward positive y.
Definition: DTTrigGeom.cc:191
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:169
float phiSLOffset()
Superlayer offset in chamber front-end frame, in cm.
Definition: DTTrigGeom.cc:71
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:57
void getGeom()
Get the geometry from the station.
Definition: DTTrigGeom.cc:211
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
Definition: DTTrigGeom.cc:523
const DTChamber * stat() const
Associated chamber.
Definition: DTTrigGeom.h:54
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
LocalPoint toLocal(const GlobalPoint p) const
Go to Local coordinate system for a point.
Definition: DTTrigGeom.h:123
int sector() const
Definition: DTChamberId.h:63
GlobalVector toGlobal(const LocalVector v) const
Go to CMS coordinate system for a vector.
Definition: DTTrigGeom.h:120
~DTTrigGeom()
Destructor.
Definition: DTTrigGeom.cc:63
int station() const
Return the station number.
Definition: DTChamberId.h:53
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:493
#define debug
Definition: MEtoEDMFormat.h:34
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
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
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
Definition: DTTrigGeom.cc:265
int _NCELL[3]
Definition: DTTrigGeom.h:214
mathSSE::Vec4< T > v