File indexing completed on 2024-04-06 12:07:07
0001 #ifndef DTTrigGeomUtils_H
0002 #define DTTrigGeomUtils_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "DataFormats/GeometryVector/interface/Pi.h"
0013
0014 #include <cmath>
0015
0016 class DTGeometry;
0017 class DTRecSegment4D;
0018 class DTChamberId;
0019 class L1MuDTChambPhDigi;
0020
0021 class DTTrigGeomUtils {
0022 public:
0023
0024 DTTrigGeomUtils(edm::ESHandle<DTGeometry> muonGeom, bool dirInDeg = true);
0025
0026
0027 virtual ~DTTrigGeomUtils();
0028
0029
0030 void phiRange(const DTChamberId& id, float& min, float& max, int& nbins, float step = 15);
0031
0032
0033 void thetaRange(const DTChamberId& id, float& min, float& max, int& nbins, float step = 15);
0034
0035
0036 void computeSCCoordinates(const DTRecSegment4D* track, int& scsec, float& x, float& xdir, float& y, float& ydir);
0037
0038
0039 float trigPos(const L1MuDTChambPhDigi* trig);
0040
0041
0042 float trigDir(const L1MuDTChambPhDigi* trig);
0043
0044
0045 void trigToSeg(int st, float& x, float dir) { x -= tan(dir / radToDeg_) * zcn_[st - 1]; };
0046
0047
0048 bool hasPosRF(int wh, int sec) { return wh > 0 || (wh == 0 && sec % 4 > 1); };
0049
0050 private:
0051 edm::ESHandle<DTGeometry> muonGeom_;
0052 float zcn_[4];
0053 float radToDeg_;
0054 float xCenter_[2];
0055 };
0056
0057 #endif
0058
0059
0060
0061
0062