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 // $Date: 2007/04/02 15:45:38 $
8 // $Revision: 1.3 $
9 //
10 // Author :
11 // H. Sakulin HEPHY Vienna
12 //
13 // Migrated to CMSSW:
14 // I. Mikulec
15 //
16 //--------------------------------------------------
17 
18 //-----------------------
19 // This Class's Header --
20 //-----------------------
22 
23 //------------------------------------
24 // Collaborating Class Declarations --
25 //------------------------------------
30 
32 }
33 
34 unsigned L1MuGMTLFDeltaEtaLUT::TheLookupFunction (int idx, unsigned eta_dtcsc, unsigned eta_rpc) const {
35  const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
36  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
37 
38  // idx is DTRPC CSCRPC
39 
40  float etaValue_dtcsc = theTriggerScales->getRegionalEtaScale(idx*2)->getCenter(eta_dtcsc);
41  float etaValue_rpc = theTriggerScales->getRegionalEtaScale(idx*2+1)->getCenter(eta_rpc);
42 
43  float delta_eta = etaValue_dtcsc - etaValue_rpc;
44 
45 
46  unsigned delta_eta_4bit = 0;
47 
48  // check out of range
49  if (delta_eta < theGMTScales->getDeltaEtaScale(idx)->getScaleMin() ||
50  delta_eta > theGMTScales->getDeltaEtaScale(idx)->getScaleMax()) {
52  delta_eta_4bit = pack.packedFromIdx (-8);
53  }
54  else {
55  delta_eta_4bit = theGMTScales->getDeltaEtaScale(idx)->getPacked( delta_eta );
56  }
57 
58  // cout << "delta-eta LUT : idx= " << idx
59  // << ", etaValue_dtcsc = " << etaValue_dtcsc
60  // << ", etaValue_rpc = " << etaValue_rpc
61  // << ", delta_eta = " << delta_eta
62  // << ", packed = " << delta_eta_4bit
63  // << endl;
64 
65 
66  return delta_eta_4bit;
67 }
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
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:94
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()
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)