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  * $Date: 2009/08/03 16:08:37 $
8  * $Revision: 1.2 $
9  * \author C. Battilana - CIEMAT
10  *
11 */
12 
15 
16 #include<cmath>
17 
18 class DTGeometry;
19 class DTRecSegment4D;
20 class DTChamberId;
21 class L1MuDTChambPhDigi;
22 
24 
25  public:
26 
28  DTTrigGeomUtils(edm::ESHandle<DTGeometry> muonGeom, bool dirInDeg=true);
29 
31  virtual ~DTTrigGeomUtils();
32 
34  void phiRange(const DTChamberId& id, float& min, float& max, int&nbins, float step=15);
35 
37  void thetaRange(const DTChamberId& id, float& min, float& max, int& nbins, float step=15);
38 
40  void computeSCCoordinates(const DTRecSegment4D* track, int& scsec, float& x, float& xdir, float& y, float& ydir);
41 
43  float trigPos(const L1MuDTChambPhDigi* trig);
44 
46  float trigDir(const L1MuDTChambPhDigi* trig);
47 
49  void trigToSeg(int st, float& x, float dir) { x -= tan(dir/radToDeg_)*zcn_[st-1]; };
50 
52  bool hasPosRF(int wh, int sec) { return wh>0 || (wh==0 && sec%4>1); };
53 
54  private:
55 
57  float zcn_[4];
58  float radToDeg_;
59  float xCenter_[2]; // 0=4/13 - 1=10/14
60 
61 };
62 
63 #endif
virtual ~DTTrigGeomUtils()
Destructor.
void thetaRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute theta range in local chamber coordinates.
list step
Definition: launcher.py:15
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
#define min(a, b)
Definition: mlp_lapack.h:161
DTTrigGeomUtils(edm::ESHandle< DTGeometry > muonGeom, bool dirInDeg=true)
Constructor.
const T & max(const T &a, const T &b)
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
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_
dbl *** dir
Definition: mlp_gen.cc:35
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
x
Definition: VDTMath.h:216
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.