CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EMTFHitTools.h
Go to the documentation of this file.
1 
2 #ifndef EMTFHitTools_h
3 #define EMTFHitTools_h
4 
6 
7 namespace l1t {
8 
9  int calc_ring (int _station, int _csc_ID, int _strip);
10  int calc_chamber (int _station, int _sector, int _subsector, int _ring, int _csc_ID);
11 
12  inline int calc_subsector (int _station, int _chamber ) { // Why does emulator have the following csc_ID dependence? - AWB 11.04.16
13  if ( _station == 1 ) return ( (_chamber % 6) > 2 ) ? 1 : 2; // "if(station == 1 && id > 3 && id < 7)" - AWB 11.04.16
14  else if ( _station < 0 || _chamber < 0 ) return -999; // Function works because first 3 chambers in sector 1 are 3/4/5,
15  else return -1; } // while the last 3 in sector 6 are 36/1/2
16  inline float calc_theta_deg_from_int (int _theta_int) { return _theta_int * 0.2851562 + 8.5; }
17  inline float calc_theta_rad_from_int (int _theta_int) { return (_theta_int * 0.2851562 + 8.5) * (Geom::pi() / 180); }
18  inline float calc_eta_from_theta_rad (float _theta_rad) { return -1 * log( tan( _theta_rad / 2 ) ); }
19  inline float calc_phi_glob_deg_hit(float loc, int sect_ind) {
20  float tmp = loc + 15 + (sect_ind < 6 ? sect_ind : sect_ind - 6)*60;
21  return (tmp < 180) ? tmp : tmp - 360; }
22  inline float calc_phi_glob_rad_hit(float loc, int sect_ind) {
23  float tmp = loc + (Geom::pi()/12) + (sect_ind < 6 ? sect_ind : sect_ind - 6)*(Geom::pi()/3);
24  return (tmp < Geom::pi()) ? tmp : tmp - 2*Geom::pi(); }
25 
26 } // End namespace l1t
27 
28 #endif /* define EMTFHitTools_h */
float calc_phi_glob_rad_hit(float loc, int sect_ind)
Definition: EMTFHitTools.h:22
float calc_theta_deg_from_int(int _theta_int)
Definition: EMTFHitTools.h:16
int calc_subsector(int _station, int _chamber)
Definition: EMTFHitTools.h:12
int calc_chamber(int _station, int _sector, int _subsector, int _ring, int _csc_ID)
float calc_eta_from_theta_rad(float _theta_rad)
Definition: EMTFHitTools.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float calc_theta_rad_from_int(int _theta_int)
Definition: EMTFHitTools.h:17
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int calc_ring(int _station, int _csc_ID, int _strip)
float calc_phi_glob_deg_hit(float loc, int sect_ind)
Definition: EMTFHitTools.h:19
double pi()
Definition: Pi.h:31