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
Vector3DBase
Definition: Vector3DBase.h:8
DTChamber::id
DTChamberId id() const
Return the DTChamberId of this chamber.
Definition: DTChamber.cc:32
DTTrigGeom::wheel
int wheel() const
Return wheel number.
Definition: DTTrigGeom.h:59
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
DTLayerId.h
DTTrigGeom::toGlobal
GlobalVector toGlobal(const LocalVector v) const
Go to CMS coordinate system for a vector.
Definition: DTTrigGeom.h:113
DTTrigGeom::phiSLOffset
float phiSLOffset()
Superlayer offset in chamber front-end frame, in cm.
Definition: DTTrigGeom.cc:64
DTChamber
Definition: DTChamber.h:24
DTBtiId.h
DTTracoId.h
DTTrigGeom::toGlobal
GlobalPoint toGlobal(const LocalPoint p) const
Go to CMS coordinate system for a point.
Definition: DTTrigGeom.h:110
DTTrigGeom::mapTubeInFEch
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::~DTTrigGeom
~DTTrigGeom()
Destructor.
Definition: DTTrigGeom.cc:58
findQualityFiles.v
v
Definition: findQualityFiles.py:179
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
DTTrigGeom::toLocal
LocalVector toLocal(const GlobalVector v) const
Go to Local coordinate system for a vector.
Definition: DTTrigGeom.h:119
DTTrigGeom::CMSPosition
GlobalPoint CMSPosition(const DTTracoId obj) const
CMS position of a TRACO.
Definition: DTTrigGeom.h:180
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
DTTrigGeom::getGeom
void getGeom()
Get the geometry from the station.
Definition: DTTrigGeom.cc:208
debug
#define debug
Definition: HDRShower.cc: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
DTTrigGeom::IEEE32toDSP
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
Definition: DTTrigGeom.cc:482
Point3DBase< float, LocalTag >
DTChamberId.h
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
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::setGeom
void setGeom(const DTChamber *stat)
Set/Update Geometry.
Definition: DTTrigGeom.cc:203
DTTrigGeom::_PHICH
float _PHICH
Definition: DTTrigGeom.h:197
DTTrigGeom::DTTrigGeom
DTTrigGeom(const DTChamber *stat, bool debug)
Constructor.
Definition: DTTrigGeom.cc:52
DTConfig.h
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
DTTrigGeom::posFE
int posFE(int sl) const
Front End position : 1=toward negative y, 0=toward positive y.
Definition: DTTrigGeom.cc:192
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
DTWireId.h
DTTrigGeom::toLocal
LocalPoint toLocal(const GlobalPoint p) const
Go to Local coordinate system for a point.
Definition: DTTrigGeom.h:116
LocalPoint.h
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
DTTrigGeom
Definition: DTTrigGeom.h:41
DTTrigGeom::_debug
bool _debug
Definition: DTTrigGeom.h:202
DTChamber.h
DTTrigGeom::dumpLUT
void dumpLUT(short int btic)
Dump the LUT for this chamber.
Definition: DTTrigGeom.cc:316
DTTrigGeom::_ZSL
float _ZSL[3]
Definition: DTTrigGeom.h:200
DTTrigGeom::_PITCH
float _PITCH
Definition: DTTrigGeom.h:199
DTChamberId
Definition: DTChamberId.h:14
DTTrigGeom::statId
DTChamberId statId() const
Identifier of the associated chamber.
Definition: DTTrigGeom.h:53
DTSuperLayerId.h
GlobalPoint.h
DTTrigGeom::station
int station() const
Return station number.
Definition: DTTrigGeom.h:62
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
DTTrigGeom::dumpGeom
void dumpGeom() const
Dump the geometry.
Definition: DTTrigGeom.cc:266
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