File indexing completed on 2023-10-25 09:54:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef DT_TRIG_GEOM_H
0014 #define DT_TRIG_GEOM_H
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0024 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0025 #include "DataFormats/MuonDetId/interface/DTBtiId.h"
0026 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0027 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0028 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
0029 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
0030 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0031 #include "Geometry/DTGeometry/interface/DTChamber.h"
0032 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h"
0033
0034
0035
0036
0037
0038
0039
0040
0041 class DTTrigGeom {
0042 public:
0043
0044 DTTrigGeom(const DTChamber *stat, bool debug);
0045
0046
0047 ~DTTrigGeom();
0048
0049
0050 inline const DTChamber *stat() const { return _stat; }
0051
0052
0053 inline DTChamberId statId() const { return _stat->id(); }
0054
0055
0056 void setGeom(const DTChamber *stat);
0057
0058
0059 inline int wheel() const { return _stat->id().wheel(); }
0060
0061
0062 inline int station() const { return _stat->id().station(); }
0063
0064
0065 inline int sector() const { return _stat->id().sector(); }
0066
0067
0068
0069
0070 inline float phiCh() const { return _PHICH; }
0071
0072
0073 inline float cellH() const { return _H; }
0074
0075
0076 inline float cellPitch() const { return _PITCH; }
0077
0078
0079 inline float distSL() const { return fabs(_ZSL[2] - _ZSL[0]); }
0080
0081
0082 inline float ZcenterSL() const { return 0.5 * (_ZSL[2] + _ZSL[0]); }
0083
0084
0085 float ZSL(int) const;
0086
0087
0088 inline int nCell(int sl) const { return (sl > 0 && sl <= 3) * _NCELL[sl - 1]; }
0089
0090
0091
0092
0093
0094
0095
0096 int mapTubeInFEch(int nsl, int nlay, int ntube) const;
0097
0098
0099 float phiSLOffset();
0100
0101
0102 LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const;
0103
0104
0105 int posFE(int sl) const;
0106
0107
0108
0109
0110 GlobalPoint toGlobal(const LocalPoint p) const { return _stat->surface().toGlobal(p); }
0111
0112
0113 GlobalVector toGlobal(const LocalVector v) const { return _stat->surface().toGlobal(v); }
0114
0115
0116 LocalPoint toLocal(const GlobalPoint p) const { return _stat->surface().toLocal(p); }
0117
0118
0119 LocalVector toLocal(const GlobalVector v) const { return _stat->surface().toLocal(v); }
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141 LocalPoint localPosition(const DTBtiId) const;
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174 LocalPoint localPosition(const DTTracoId) const;
0175
0176
0177 inline GlobalPoint CMSPosition(const DTBtiId obj) const { return toGlobal(localPosition(obj)); }
0178
0179
0180 inline GlobalPoint CMSPosition(const DTTracoId obj) const { return toGlobal(localPosition(obj)); }
0181
0182
0183 void dumpGeom() const;
0184
0185
0186 void dumpLUT(short int btic);
0187 void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp);
0188
0189 private:
0190
0191 void getGeom();
0192
0193 private:
0194 const DTChamber *_stat;
0195
0196
0197 float _PHICH;
0198 float _H;
0199 float _PITCH;
0200 float _ZSL[3];
0201 int _NCELL[3];
0202 bool _debug;
0203 };
0204
0205 #endif