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 //
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:
44 
46  DTTrigGeom(const DTChamber* stat, bool debug);
47 
49  ~DTTrigGeom();
50 
52  inline const DTChamber* stat() const { return _stat; }
53 
55  inline DTChamberId statId() const { return _stat->id(); }
56 
58  void setGeom(const DTChamber* stat);
59 
61  inline int wheel() const { return _stat->id().wheel(); }
62 
64  inline int station() const { return _stat->id().station(); }
65 
67  inline int sector() const { return _stat->id().sector(); }
68 
69  // Access geometrical parameters
70 
72  inline float phiCh() const { return _PHICH; }
73 
75  inline float cellH() const { return _H; }
76 
78  inline float cellPitch() const { return _PITCH; }
79 
81  inline float distSL() const { return fabs(_ZSL[2]-_ZSL[0]); }
82 
84  inline float ZcenterSL() const { return 0.5*(_ZSL[2]+_ZSL[0]); }
85 
87  float ZSL(int) const;
88 
90  inline int nCell(int sl) const {
91  return (sl>0&&sl<=3)*_NCELL[sl-1];
92  }
93 
94  // NEWGEOmetry update
96  // int layerFEStaggering(int nsl, int nlay) const;
97 
100  int mapTubeInFEch(int nsl, int nlay, int ntube) const;
101 
103  float phiSLOffset();
104 
106  LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const;
107 
109  int posFE(int sl) const;
110 
111 
112  // Local and global position of a trigger object
113 
115  GlobalPoint toGlobal(const LocalPoint p) const { return _stat->surface().toGlobal(p); }
116 
118  GlobalVector toGlobal(const LocalVector v) const { return _stat->surface().toGlobal(v); }
119 
121  LocalPoint toLocal(const GlobalPoint p) const { return _stat->surface().toLocal(p); }
122 
124  LocalVector toLocal(const GlobalVector v) const { return _stat->surface().toLocal(v); }
125 
145  LocalPoint localPosition(const DTBtiId) const;
147 
178  LocalPoint localPosition(const DTTracoId) const;
180 
182  inline GlobalPoint CMSPosition(const DTBtiId obj) const {
183  return toGlobal(localPosition(obj));
184  }
185 
187  inline GlobalPoint CMSPosition(const DTTracoId obj) const {
188  return toGlobal(localPosition(obj));
189  }
190 
192  void dumpGeom() const;
193 
195  void dumpLUT(short int btic);
196  void IEEE32toDSP(float f, short int & DSPmantissa, short int & DSPexp);
197 
198  private:
199 
201  void getGeom();
202 
203  private:
204 
205  const DTChamber* _stat; // Pointer to the chamber
206 
207  // geometrical parameters
208  float _PHICH; // angle of normal to the chamber in CMS frame (rad)
209  float _H; // height of a cell (cm)
210  float _PITCH; // width of a cell (cm)
211  float _ZSL[3]; // Z coordinate of SL centers
212  int _NCELL[3]; // number of cells (BTI) in SL each SL
213  bool _debug;
214 
215 };
216 
217 #endif
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
int sector() const
Return sector number.
Definition: DTTrigGeom.h:67
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:72
LocalVector toLocal(const GlobalVector v) const
Go to Local coordinate system for a vector.
Definition: DTTrigGeom.h:124
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
Definition: DTTrigGeom.h:78
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:61
void setGeom(const DTChamber *stat)
Set/Update Geometry.
Definition: DTTrigGeom.cc:203
float _PHICH
Definition: DTTrigGeom.h:208
const DTChamber * _stat
Definition: DTTrigGeom.h:205
bool _debug
Definition: DTTrigGeom.h:213
float _H
Definition: DTTrigGeom.h:209
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:115
float _ZSL[3]
Definition: DTTrigGeom.h:211
void dumpGeom() const
Dump the geometry.
Definition: DTTrigGeom.cc:276
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
float _PITCH
Definition: DTTrigGeom.h:210
GlobalPoint CMSPosition(const DTTracoId obj) const
CMS position of a TRACO.
Definition: DTTrigGeom.h:187
float distSL() const
Distance between the phi view superlayers (cms)
Definition: DTTrigGeom.h:81
float cellH() const
Height of a cell (cm)
Definition: DTTrigGeom.h:75
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:84
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:64
#define debug
Definition: HDRShower.cc:19
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:55
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:52
LocalPoint toLocal(const GlobalPoint p) const
Go to Local coordinate system for a point.
Definition: DTTrigGeom.h:121
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:63
int station() const
Return the station number.
Definition: DTChamberId.h:51
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:493
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:182
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
Definition: DTTrigGeom.h:90
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
Definition: DTTrigGeom.cc:265
int _NCELL[3]
Definition: DTTrigGeom.h:212