CMS 3D CMS Logo

DTTrigGeomUtils.h
Go to the documentation of this file.
1 #ifndef DTTrigGeomUtils_H
2 #define DTTrigGeomUtils_H
3 
4 /*
5  * \file DTTrigGeomUtils.h
6  *
7  * \author C. Battilana - CIEMAT
8  *
9 */
10 
13 
14 #include <cmath>
15 
16 class DTGeometry;
17 class DTRecSegment4D;
18 class DTChamberId;
19 class L1MuDTChambPhDigi;
20 
22 public:
24  DTTrigGeomUtils(edm::ESHandle<DTGeometry> muonGeom, bool dirInDeg = true);
25 
27  virtual ~DTTrigGeomUtils();
28 
30  void phiRange(const DTChamberId& id, float& min, float& max, int& nbins, float step = 15);
31 
33  void thetaRange(const DTChamberId& id, float& min, float& max, int& nbins, float step = 15);
34 
36  void computeSCCoordinates(const DTRecSegment4D* track, int& scsec, float& x, float& xdir, float& y, float& ydir);
37 
39  float trigPos(const L1MuDTChambPhDigi* trig);
40 
42  float trigDir(const L1MuDTChambPhDigi* trig);
43 
45  void trigToSeg(int st, float& x, float dir) { x -= tan(dir / radToDeg_) * zcn_[st - 1]; };
46 
48  bool hasPosRF(int wh, int sec) { return wh > 0 || (wh == 0 && sec % 4 > 1); };
49 
50 private:
52  float zcn_[4];
53  float radToDeg_;
54  float xCenter_[2]; // 0=4/13 - 1=10/14
55 };
56 
57 #endif
58 
59 /* Local Variables: */
60 /* show-trailing-whitespace: t */
61 /* truncate-lines: t */
62 /* End: */
virtual ~DTTrigGeomUtils()
Destructor.
void thetaRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute theta range in local chamber coordinates.
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
DTTrigGeomUtils(edm::ESHandle< DTGeometry > muonGeom, bool dirInDeg=true)
Constructor.
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
T min(T a, T b)
Definition: MathUtil.h:58
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
bool hasPosRF(int wh, int sec)
Checks id the chamber has positive RF;.
edm::ESHandle< DTGeometry > muonGeom_
step
Definition: StallMonitor.cc:94
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.