CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFDeltaEtaLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFDeltaEtaLUT
4 //
5 // this class was automatically generated by L1MuGMTLUT::MakeSubClass()
6 //
7 //
8 // Author :
9 // H. Sakulin HEPHY Vienna
10 //
11 // Migrated to CMSSW:
12 // I. Mikulec
13 //
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
20 
21 //------------------------------------
22 // Collaborating Class Declarations --
23 //------------------------------------
28 
30 }
31 
32 unsigned L1MuGMTLFDeltaEtaLUT::TheLookupFunction (int idx, unsigned eta_dtcsc, unsigned eta_rpc) const {
33  const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
34  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
35 
36  // idx is DTRPC CSCRPC
37 
38  float etaValue_dtcsc = theTriggerScales->getRegionalEtaScale(idx*2)->getCenter(eta_dtcsc);
39  float etaValue_rpc = theTriggerScales->getRegionalEtaScale(idx*2+1)->getCenter(eta_rpc);
40 
41  float delta_eta = etaValue_dtcsc - etaValue_rpc;
42 
43 
44  unsigned delta_eta_4bit = 0;
45 
46  // check out of range
47  if (delta_eta < theGMTScales->getDeltaEtaScale(idx)->getScaleMin() ||
48  delta_eta > theGMTScales->getDeltaEtaScale(idx)->getScaleMax()) {
50  delta_eta_4bit = pack.packedFromIdx (-8);
51  }
52  else {
53  delta_eta_4bit = theGMTScales->getDeltaEtaScale(idx)->getPacked( delta_eta );
54  }
55 
56  // cout << "delta-eta LUT : idx= " << idx
57  // << ", etaValue_dtcsc = " << etaValue_dtcsc
58  // << ", etaValue_rpc = " << etaValue_rpc
59  // << ", delta_eta = " << delta_eta
60  // << ", packed = " << delta_eta_4bit
61  // << endl;
62 
63 
64  return delta_eta_4bit;
65 }
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
virtual float getScaleMax() const =0
get the upper edge of the last bin
double delta_eta(double eta1, double eta2)
Definition: AnglesUtil.h:98
virtual unsigned packedFromIdx(int idx) const
get the packed notation of a value, check range
Definition: L1MuPacking.h:95
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
unsigned TheLookupFunction(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const
The lookup function - here the functionality of the LUT is implemented.
static const L1MuGMTScales * getGMTScales()
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
static const L1MuTriggerScales * getTriggerScales()
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
virtual unsigned getPacked(float value) const =0
pack a value
const L1MuScale * getDeltaEtaScale(int idx) const
get the delta eta scale; idx = 0(DT=RPC), 1(CSC-RPC), 2(DT-CSC), 3(CSC-DT), 4(bRPC-CSC), 5(fRPC-DT)