CMS 3D CMS Logo

EMTFHit2016Tools.h
Go to the documentation of this file.
1 
2 #ifndef L1Trigger_L1TMuonEndCap_EMTFHit2016Tools_h
3 #define L1Trigger_L1TMuonEndCap_EMTFHit2016Tools_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 L1Trigger_L1TMuonEndCap_EMTFHit2016Tools_h */
float calc_phi_glob_rad_hit(float loc, int sect_ind)
float calc_theta_deg_from_int(int _theta_int)
int calc_subsector(int _station, int _chamber)
int calc_chamber(int _station, int _sector, int _subsector, int _ring, int _csc_ID)
delete x;
Definition: CaloConfig.h:22
float calc_eta_from_theta_rad(float _theta_rad)
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
float calc_theta_rad_from_int(int _theta_int)
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)
constexpr double pi()
Definition: Pi.h:31