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