CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
23  public:
24 
26  DTTrigGeomUtils(edm::ESHandle<DTGeometry> muonGeom, bool dirInDeg=true);
27 
29  virtual ~DTTrigGeomUtils();
30 
32  void phiRange(const DTChamberId& id, float& min, float& max, int&nbins, float step=15);
33 
35  void thetaRange(const DTChamberId& id, float& min, float& max, int& nbins, float step=15);
36 
38  void computeSCCoordinates(const DTRecSegment4D* track, int& scsec, float& x, float& xdir, float& y, float& ydir);
39 
41  float trigPos(const L1MuDTChambPhDigi* trig);
42 
44  float trigDir(const L1MuDTChambPhDigi* trig);
45 
47  void trigToSeg(int st, float& x, float dir) { x -= tan(dir/radToDeg_)*zcn_[st-1]; };
48 
50  bool hasPosRF(int wh, int sec) { return wh>0 || (wh==0 && sec%4>1); };
51 
52  private:
53 
55  float zcn_[4];
56  float radToDeg_;
57  float xCenter_[2]; // 0=4/13 - 1=10/14
58 
59 };
60 
61 #endif
62 
63 /* Local Variables: */
64 /* show-trailing-whitespace: t */
65 /* truncate-lines: t */
66 /* 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
dbl *** dir
Definition: mlp_gen.cc:35
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.