CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTScales.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // \class L1MuGMTScales
4 //
10 //
11 // $Date: 2007/03/23 15:22:01 $
12 // $Revision: 1.1 $
13 //
14 //
15 // Original Author :
16 // Hannes Sakulin HEPHY / Vienna
17 //
18 // Migrated to CMSSW:
19 // I. Mikulec
20 //
21 //--------------------------------------------------
22 #ifndef CondFormatsL1TObjects_L1MuGMTScales_h
23 #define CondFormatsL1TObjects_L1MuGMTScales_h
24 
25 #include <cmath>
26 #include <iostream>
27 
29 
31 
33  public:
34 
37 
38  L1MuGMTScales( int nbitPackingReducedEta,
39  int nbinsReducedEta,
40  const std::vector<double>& scaleReducedEtaDT,
41  const std::vector<double>& scaleReducedEtaBrlRPC,
42  const std::vector<double>& scaleReducedEtaCSC,
43  const std::vector<double>& scaleReducedEtaFwdRPC,
44 
45  int nbitPackingDeltaEta,
46  bool signedPackingDeltaEta,
47  int nbinsDeltaEta,
48  float minDeltaEta,
49  float maxDeltaEta,
50  int offsetDeltaEta,
51 
52  int nbitPackingDeltaPhi,
53  bool signedPackingDeltaPhi,
54  int nbinsDeltaPhi,
55  float minDeltaPhi,
56  float maxDeltaPhi,
57  int offsetDeltaPhi,
58 
59  int nbitPackingOvlEtaDT,
60  int nbinsOvlEtaDT,
61  float minOvlEtaDT,
62  float maxOvlEtaDT,
63 
64  int nbitPackingOvlEtaCSC,
65  int nbinsOvlEtaCSC,
66  float minOvlEtaCSC,
67  float maxOvlEtaCSC,
68 
69  const std::vector<double>& scaleOvlEtaRPC,
70  int nbitPackingOvlEtaBrlRPC,
71  int nbinsOvlEtaBrlRPC,
72  int nbitPackingOvlEtaFwdRPC,
73  int nbinsOvlEtaFwdRPC
74 
75  ) {
76 
77  // used as a Singleton, the constructor is run when the GMT is first used.
78  //
79 
80 
81 /* const float reducedetabins[4][9] = { */
82 /* { 0.00, 0.22, 0.27, 0.58, 0.77, 0.87, 0.92, 1.24, 1.3 }, // DT */
83 /* { 0.00, 0.06, 0.25, 0.41, 0.54, 0.70, 0.83, 0.93, 1.04}, // bRPC */
84 /* { 0.9, 1.06, 1.26, 1.46, 1.66, 1.86, 2.06, 2.26, 2.5 }, // CSC */
85 /* { 1.04, 1.24, 1.36, 1.48, 1.61, 1.73, 1.85, 1.97, 2.10} // fRPC */
86 /* }; */
87 
88 /* for (int i=0; i<4; i++) */
89 /* m_ReducedEtaScale[i] = L1MuSymmetricBinnedScale(4, 8, reducedetabins[i]); */
90 
91  m_ReducedEtaScale[0] = L1MuSymmetricBinnedScale( nbitPackingReducedEta,
92  nbinsReducedEta,
93  scaleReducedEtaDT ) ;
94  m_ReducedEtaScale[1] = L1MuSymmetricBinnedScale( nbitPackingReducedEta,
95  nbinsReducedEta,
96  scaleReducedEtaBrlRPC ) ;
97  m_ReducedEtaScale[2] = L1MuSymmetricBinnedScale( nbitPackingReducedEta,
98  nbinsReducedEta,
99  scaleReducedEtaCSC ) ;
100  m_ReducedEtaScale[3] = L1MuSymmetricBinnedScale( nbitPackingReducedEta,
101  nbinsReducedEta,
102  scaleReducedEtaFwdRPC ) ;
103 
104  //
105  // Scales used in Matching Units
106  //
107 /* float deta_unit = 0.04; */
108 /* float deta_min = -7.5 * deta_unit; */
109 /* float deta_max = 7.5 * deta_unit; */
110 /* m_DeltaEtaScale[0] = L1MuBinnedScale (4, true, 15, deta_min, deta_max, 7); // DT-RPC */
111 /* m_DeltaEtaScale[1] = L1MuBinnedScale (4, true, 15, deta_min, deta_max, 7); // CSC-RPC */
112 /* m_DeltaEtaScale[2] = L1MuBinnedScale (4, true, 15, deta_min, deta_max, 7); // DT-CSC */
113 /* m_DeltaEtaScale[3] = L1MuBinnedScale (4, true, 15, deta_min, deta_max, 7); // CSC-DT */
114 /* m_DeltaEtaScale[4] = L1MuBinnedScale (4, true, 15, deta_min, deta_max, 7); // CSC-bRPC */
115 /* m_DeltaEtaScale[5] = L1MuBinnedScale (4, true, 15, deta_min, deta_max, 7); // DT-fRPC */
116 
117  for( int i = 0 ; i < 6 ; ++i )
118  m_DeltaEtaScale[i] = L1MuBinnedScale( nbitPackingDeltaEta,
119  signedPackingDeltaEta,
120  nbinsDeltaEta,
121  minDeltaEta,
122  maxDeltaEta,
123  offsetDeltaEta ) ;
124 
125  // delta phi scale
126  // m_DeltaPhiScale = L1MuBinnedScale (3, true, 8, -11.25 * M_PI/180., 8.75 * M_PI/180.0, 4);
127  m_DeltaPhiScale = L1MuBinnedScale( nbitPackingDeltaPhi,
128  signedPackingDeltaPhi,
129  nbinsDeltaPhi,
130  minDeltaPhi,
131  maxDeltaPhi,
132  offsetDeltaPhi ) ;
133 
134  //
135  // reduced eta scale for matching in the overlap region
136  //
137  // reserve highest code for Out Of Range
138  //
139 /* const float RpcOvlEtaBins[8] = { */
140 /* 0.72, 0.83, 0.93, 1.04, 1.14, 1.24, 1.36, 1.48 }; */
141 
142 /* m_OvlEtaScale[0] = L1MuSymmetricBinnedScale (4, 7, 1.3 * 18./32. , 1.3); // DT */
143 /* // FIXME **** dt scale: two original bins in one new bin */
144 /* // one-to-one mapping should be possible with new eta scale */
145 
146 /* m_OvlEtaScale[1] = L1MuSymmetricBinnedScale (4, 7, RpcOvlEtaBins) ; // bRPC */
147 /* m_OvlEtaScale[2] = L1MuSymmetricBinnedScale (4, 7, 0.9, 1.25); // CSC */
148 /* m_OvlEtaScale[3] = L1MuSymmetricBinnedScale (4, 7, RpcOvlEtaBins) ; // fRPC */
149 
150  m_OvlEtaScale[0] = L1MuSymmetricBinnedScale (nbitPackingOvlEtaDT,
151  nbinsOvlEtaDT,
152  minOvlEtaDT,
153  maxOvlEtaDT); // DT
154  // FIXME **** dt scale: two original bins in one new bin
155  // one-to-one mapping should be possible with new eta scale
156 
157  m_OvlEtaScale[1] = L1MuSymmetricBinnedScale (nbitPackingOvlEtaBrlRPC,
158  nbinsOvlEtaBrlRPC,
159  scaleOvlEtaRPC) ; // bRPC
160  m_OvlEtaScale[2] = L1MuSymmetricBinnedScale (nbitPackingOvlEtaCSC,
161  nbinsOvlEtaCSC,
162  minOvlEtaCSC,
163  maxOvlEtaCSC); // CSC
164  m_OvlEtaScale[3] = L1MuSymmetricBinnedScale (nbitPackingOvlEtaFwdRPC,
165  nbinsOvlEtaFwdRPC,
166  scaleOvlEtaRPC) ; // fRPC
167 
168  //
169 /* float caloEtaBounds[15] = { */
170 /* -3.000, -2.172, -1.740, -1.392, -1.044, -0.696, -0.348, 0., */
171 /* 0.348, 0.696, 1.044, 1.392, 1.740, 2.172, 3.000 }; */
172 
173 /* std::vector<double> caloEtaBounds ; */
174 /* caloEtaBounds.push_back(-3.000) ; */
175 /* caloEtaBounds.push_back(-2.172) ; */
176 /* caloEtaBounds.push_back(-1.740) ; */
177 /* caloEtaBounds.push_back(-1.392) ; */
178 /* caloEtaBounds.push_back(-1.044) ; */
179 /* caloEtaBounds.push_back(-0.696) ; */
180 /* caloEtaBounds.push_back(-0.348) ; */
181 /* caloEtaBounds.push_back(0.) ; */
182 /* caloEtaBounds.push_back(0.348) ; */
183 /* caloEtaBounds.push_back(0.696) ; */
184 /* caloEtaBounds.push_back(1.044) ; */
185 /* caloEtaBounds.push_back(1.392) ; */
186 /* caloEtaBounds.push_back(1.740) ; */
187 /* caloEtaBounds.push_back(2.172) ; */
188 /* caloEtaBounds.push_back(3.000) ; */
189 
190 /* m_CaloEtaScale = L1MuBinnedScale (4, false, 14, caloEtaBounds); */
191  };
192 
194  virtual ~L1MuGMTScales() {
195 // for (int i=0; i<4; i++) {
196 // delete m_ReducedEtaScale[i];
197 // delete m_OvlEtaScale[i];
198 // }
199 // for (int i=0; i<6; i++) {
200 // delete m_DeltaEtaScale[i];
201 // }
202 
203 // delete m_DeltaPhiScale;
204 // delete m_CaloEtaScale;
205  };
206 
208  const L1MuScale* getReducedEtaScale(int isys) const {
209  if (isys<0 || isys>3) edm::LogWarning("GMTScaleRangeViolation") << "Error in L1MuGMTScales:: isys out of range: " << isys;
210  return &( m_ReducedEtaScale[isys] );
211  };
212 
214  const L1MuScale* getDeltaEtaScale(int idx) const {
215  if (idx<0 || idx>5) edm::LogWarning("GMTScaleRangeViolation") << "Error in L1MuGMTScales:: isys out of range: " << idx;
216  return &( m_DeltaEtaScale[idx] );
217  };
218 
220  const L1MuScale* getDeltaPhiScale() const { return &m_DeltaPhiScale; };
221 
223  const L1MuScale* getOvlEtaScale(int isys) const {
224  if (isys<0 || isys>3) edm::LogWarning("GMTScaleRangeViolation") << "Error in L1MuGMTScales:: isys out of range: " << isys;
225  return &( m_OvlEtaScale[isys] );
226  };
227 
228 
229 /* /// get the calorimeter eta scale */
230 /* const L1MuScale *getCaloEtaScale() const { return &m_CaloEtaScale;}; */
231 
232 
233  private:
238 /* L1MuBinnedScale m_CaloEtaScale; */
239 };
240 
241 
242 #endif
int i
Definition: DBlmapReader.cc:9
L1MuSymmetricBinnedScale m_ReducedEtaScale[4]
L1MuSymmetricBinnedScale m_OvlEtaScale[4]
L1MuGMTScales()
constructor
Definition: L1MuGMTScales.h:36
L1MuBinnedScale m_DeltaEtaScale[6]
const L1MuScale * getReducedEtaScale(int isys) const
get the recuced eta scale for matching in the overlap region (4 bit); isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC)
L1MuBinnedScale m_DeltaPhiScale
const L1MuScale * getDeltaPhiScale() const
get the delta phi scale ( 3 bits)
L1MuGMTScales(int nbitPackingReducedEta, int nbinsReducedEta, const std::vector< double > &scaleReducedEtaDT, const std::vector< double > &scaleReducedEtaBrlRPC, const std::vector< double > &scaleReducedEtaCSC, const std::vector< double > &scaleReducedEtaFwdRPC, int nbitPackingDeltaEta, bool signedPackingDeltaEta, int nbinsDeltaEta, float minDeltaEta, float maxDeltaEta, int offsetDeltaEta, int nbitPackingDeltaPhi, bool signedPackingDeltaPhi, int nbinsDeltaPhi, float minDeltaPhi, float maxDeltaPhi, int offsetDeltaPhi, int nbitPackingOvlEtaDT, int nbinsOvlEtaDT, float minOvlEtaDT, float maxOvlEtaDT, int nbitPackingOvlEtaCSC, int nbinsOvlEtaCSC, float minOvlEtaCSC, float maxOvlEtaCSC, const std::vector< double > &scaleOvlEtaRPC, int nbitPackingOvlEtaBrlRPC, int nbinsOvlEtaBrlRPC, int nbitPackingOvlEtaFwdRPC, int nbinsOvlEtaFwdRPC)
Definition: L1MuGMTScales.h:38
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
virtual ~L1MuGMTScales()
destructor
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)
const L1MuScale * getOvlEtaScale(int isys) const
get the overlap eta scale (4 bits); isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC)