test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EMTFTrackTools.h
Go to the documentation of this file.
1 
2 #ifndef EMTFTrackTools_h
3 #define EMTFTrackTools_h
4 
6 
7 namespace l1t {
8 
9  int calc_uGMT_chamber( int _csc_ID, int _subsector, int _neighbor, int _station);
10 
11  // phi_loc gives the exact phi value (marked "phi_full" in the EMTF DAQ format document)
12  // phi_GMT (the value used by GMT) is a rough estimate, with offsets of 1-2 degrees for some phi values
13  // The conversion used is: phi_GMT = (360/576)*phi_GMT_int + (180/576)
14  // More accurate would be: phi_GMT = 1.0208*(360/576)*phi_GMT_int + 1.0208*(180/576) + 0.552
15  inline float calc_pt(int bits) { return (bits - 1) * 0.5; }
16  inline int calc_pt_GMT(float val) { return (val * 2) + 1; }
17  inline float calc_eta(int bits) { return bits * 0.010875; }
18  inline int calc_eta_GMT(float val) { return val / 0.010875; }
19  inline float calc_theta_deg(float _eta) { return 2*atan( exp(-1*_eta) ) * (180/Geom::pi()); }
20  inline float calc_theta_rad(float _eta) { return 2*atan( exp(-1*_eta) ); }
21  inline float calc_phi_loc_deg(int bits) { return (bits / 60.0) - 22.0; }
22  inline float calc_phi_loc_rad(int bits) { return (bits * Geom::pi() / 10800) - (22 * Geom::pi() / 180); }
23  inline int calc_phi_loc_int(float val) { return (val + 2) * 60; }
24  inline float calc_phi_GMT_deg(int bits) { return (bits * 0.625) + 0.3125; } /* x (360/576) + (180/576) */
25  inline float calc_phi_GMT_deg_corr(int bits) { return (bits * 0.625 * 1.0208) + 0.3125 * 1.0208 + 0.552; } /* AWB mod 09.02.16 */
26  inline float calc_phi_GMT_rad(int bits) { return (bits * Geom::pi() / 288) + (Geom::pi() / 576); } /* x (2*pi/576) + (pi/576) */
27  inline int calc_phi_GMT_int(float val) { return (val - 0.3125) / 0.625; } /* - (180/576) / (360/576) */
28  inline float calc_phi_glob_deg(float loc, int sect) { float tmp = loc + 15 + (sect - 1)*60; return (tmp < 180) ? tmp : tmp - 360; }
29  inline float calc_phi_glob_rad(float loc, int sect) { float tmp = loc + (Geom::pi()/12) + (sect - 1)*(Geom::pi()/3); return (tmp < Geom::pi()) ? tmp : tmp - 2*Geom::pi(); }
30  inline int calc_sector_GMT (int _sector) { return _sector - 1; }
31  inline int calc_sector_from_index(int index) { return (index < 6) ? index + 1 : index - 5; }
32 
33 }
34 
35 #endif /* define EMTFTrackTools_h */
float calc_theta_rad(float _eta)
int calc_phi_GMT_int(float val)
float calc_theta_deg(float _eta)
float calc_phi_GMT_rad(int bits)
float calc_phi_loc_rad(int bits)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
int calc_uGMT_chamber(int _csc_ID, int _subsector, int _neighbor, int _station)
int calc_sector_GMT(int _sector)
int calc_sector_from_index(int index)
float calc_phi_GMT_deg_corr(int bits)
float calc_phi_loc_deg(int bits)
int calc_phi_loc_int(float val)
float calc_phi_GMT_deg(int bits)
int calc_pt_GMT(float val)
int calc_eta_GMT(float val)
float calc_phi_glob_rad(float loc, int sect)
float calc_eta(int bits)
float calc_pt(int bits)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
float calc_phi_glob_deg(float loc, int sect)
constexpr double pi()
Definition: Pi.h:31