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