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: */
DTGeometry
Definition: DTGeometry.h:28
DDAxes::y
DTRecSegment4D
Definition: DTRecSegment4D.h:23
DTTrigGeomUtils::trigDir
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
Definition: DTTrigGeomUtils.cc:138
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
DTTrigGeomUtils::xCenter_
float xCenter_[2]
Definition: DTTrigGeomUtils.h:54
ESHandle.h
step
step
Definition: StallMonitor.cc:94
min
T min(T a, T b)
Definition: MathUtil.h:58
DTTrigGeomUtils::radToDeg_
float radToDeg_
Definition: DTTrigGeomUtils.h:53
DTTrigGeomUtils::muonGeom_
edm::ESHandle< DTGeometry > muonGeom_
Definition: DTTrigGeomUtils.h:48
DTTrigGeomUtils::trigPos
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
Definition: DTTrigGeomUtils.cc:98
DTTrigGeomUtils::zcn_
float zcn_[4]
Definition: DTTrigGeomUtils.h:52
DDAxes::x
ydir
Definition: DeviationsFromFileSensor2D.cc:15
edm::ESHandle< DTGeometry >
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
DTTrigGeomUtils::phiRange
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
Definition: DTTrigGeomUtils.cc:67
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
Pi.h
DTTrigGeomUtils::thetaRange
void thetaRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute theta range in local chamber coordinates.
Definition: DTTrigGeomUtils.cc:86
DTTrigGeomUtils::trigToSeg
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
Definition: DTTrigGeomUtils.h:45
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
DTTrigGeomUtils::computeSCCoordinates
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
Definition: DTTrigGeomUtils.cc:52
xdir
Definition: DeviationsFromFileSensor2D.cc:15
ClusterTask_cfi.trig
trig
Definition: ClusterTask_cfi.py:398
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:87
DTTrigGeomUtils::DTTrigGeomUtils
DTTrigGeomUtils(edm::ESHandle< DTGeometry > muonGeom, bool dirInDeg=true)
Constructor.
Definition: DTTrigGeomUtils.cc:30
DTTrigGeomUtils
Definition: DTTrigGeomUtils.h:21
DTChamberId
Definition: DTChamberId.h:14
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31
DTTrigGeomUtils::~DTTrigGeomUtils
virtual ~DTTrigGeomUtils()
Destructor.
Definition: DTTrigGeomUtils.cc:50
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
DTTrigGeomUtils::hasPosRF
bool hasPosRF(int wh, int sec)
Checks id the chamber has positive RF;.
Definition: DTTrigGeomUtils.h:48