CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuTriggerScales.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // \class L1MuTriggerScales
4 //
10 //
11 // $Date: 2008/11/24 10:26:31 $
12 // $Revision: 1.5 $
13 //
14 // Original Author :
15 // Hannes Sakulin HEPHY / Vienna
16 //
17 // Migrated to CMSSW:
18 // I. Mikulec
19 //
20 //--------------------------------------------------
21 #ifndef CondFormatsL1TObjects_L1MuTriggerScales_h
22 #define CondFormatsL1TObjects_L1MuTriggerScales_h
23 
25 
26 #include <cmath>
27 #include <iostream>
28 #include <vector>
29 
32 
34  public:
35 
38 
39  L1MuTriggerScales( int nbitPackingDTEta,
40  bool signedPackingDTEta,
41  int nbinsDTEta,
42  float minDTEta,
43  float maxDTEta,
44  int offsetDTEta,
45 
46  int nbitPackingCSCEta,
47  int nbinsCSCEta,
48  float minCSCEta,
49  float maxCSCEta,
50 
51  const std::vector<double>& scaleRPCEta,
52  int nbitPackingBrlRPCEta,
53  bool signedPackingBrlRPCEta,
54  int nbinsBrlRPCEta,
55  int offsetBrlRPCEta,
56  int nbitPackingFwdRPCEta,
57  bool signedPackingFwdRPCEta,
58  int nbinsFwdRPCEta,
59  int offsetFwdRPCEta,
60 
61  int nbitPackingGMTEta,
62  int nbinsGMTEta,
63  const std::vector<double>& scaleGMTEta,
64 
65  int nbitPackingPhi,
66  bool signedPackingPhi,
67  int nbinsPhi,
68  float minPhi,
69  float maxPhi
70 
71 /* int nbitPackingPt, */
72 /* bool signedPackingPt, */
73 /* int nbinsPt, */
74 /* const std::vector<double>& scalePt */
75 
76  ) {
77 
78  //
79  // Regional Muon Trigger Eta Scales
80  //
81 /* const float rpcetabins[34]= { */
82 /* -2.10, -1.97, -1.85, -1.73, -1.61, -1.48, */
83 /* -1.36, -1.24, -1.14, -1.04, -0.93, -0.83, */
84 /* -0.72, -0.58, -0.44, -0.27, -0.07, */
85 /* 0.07, 0.27, 0.44, 0.58, 0.72, */
86 /* 0.83, 0.93, 1.04, 1.14, 1.24, 1.36, */
87 /* 1.48, 1.61, 1.73, 1.85, 1.97, 2.10}; */
88 
89  // DT
90  //m_RegionalEtaScale[0] = L1MuBinnedScale( 6, true, 64, -1.2, 1.2, 32);
91  m_RegionalEtaScale[0] = L1MuBinnedScale( nbitPackingDTEta,
92  signedPackingDTEta,
93  nbinsDTEta,
94  minDTEta,
95  maxDTEta,
96  offsetDTEta );
97 
98  // RPC index -16 .. 16, brl RPC
99  // m_RegionalEtaScale[1] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
100  m_RegionalEtaScale[1] = L1MuBinnedScale (nbitPackingBrlRPCEta,
101  signedPackingBrlRPCEta,
102  nbinsBrlRPCEta,
103  scaleRPCEta,
104  offsetBrlRPCEta ) ;
105 
106  // CSC
108  // // m_RegionalEtaScale[2] = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
109  // m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
110  m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( nbitPackingCSCEta,
111  nbinsCSCEta,
112  minCSCEta,
113  maxCSCEta );
114 
115  // RPC index -16 .. 16, fwd RPC
116  // m_RegionalEtaScale[3] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
117  m_RegionalEtaScale[3] = L1MuBinnedScale (nbitPackingFwdRPCEta,
118  signedPackingFwdRPCEta,
119  nbinsFwdRPCEta,
120  scaleRPCEta,
121  offsetFwdRPCEta );
122 
123  //
124  // Eta scale at GMT output
125  //
126 
127 /* const float gmt_outputetascale[32] = { 0.00, */
128 /* 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, */
129 /* 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, */
130 /* 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, 2.00, 2.05, */
131 /* 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40 }; */
132 
133  // m_GMTEtaScale = L1MuSymmetricBinnedScale (6, 31, gmt_outputetascale);
134  m_GMTEtaScale = L1MuSymmetricBinnedScale (nbitPackingGMTEta,
135  nbinsGMTEta,
136  scaleGMTEta );
137 
138  //
139  // Phi Scale. Common to all Regioanl Muon Triggers and GMT
140  //
141 
142  // m_PhiScale = L1MuBinnedScale (8, false, 144, 0., 2. * M_PI);
143  m_PhiScale = L1MuBinnedScale (nbitPackingPhi,
144  signedPackingPhi,
145  nbinsPhi,
146  minPhi,
147  maxPhi );
148 
149  //
150  // Pt Scale. Common to all Regioanl Muon Triggers and GMT
151  //
152 
153  // pt scale in GeV
154  // low edges of pt bins
155 /* const float ptscale[33] = { */
156 /* -1., 0.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, */
157 /* 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0, */
158 /* 16.0, 18.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, */
159 /* 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0, 1.E6 }; */
160 
161  // m_PtScale = L1MuBinnedScale ( 5, false, 32, ptscale) ;
162 /* m_PtScale = L1MuBinnedScale ( nbitPackingPt, */
163 /* signedPackingPt, */
164 /* nbinsPt, */
165 /* scalePt ) ; */
166 
167  };
168 
169 
171  virtual ~L1MuTriggerScales() {
172 // for (int i=0; i<4; i++)
173 // delete m_RegionalEtaScale[i];
174 
175 // delete m_GMTEtaScale;
176 // delete m_PhiScale;
177 // delete m_PtScale;
178  };
179 
181  const L1MuScale* getRegionalEtaScale(int isys) const {
182  if (isys<0 || isys>3) edm::LogWarning("ScaleRangeViolation") << "Error in L1MuTriggerScales:: isys out of range: " << isys;
183  if( isys == 2 )
184  {
185  return &m_RegionalEtaScaleCSC ;
186  }
187  else
188  {
189  return &( m_RegionalEtaScale[isys] );
190  }
191  };
192 
194  const L1MuScale* getGMTEtaScale() const { return &m_GMTEtaScale ; };
195 
198 
199 
201  const L1MuScale* getPhiScale() const { return &m_PhiScale;};
202 
205 
206 /* /// get the Pt scale */
207 /* const L1MuScale* getPtScale() const { return &m_PtScale;}; */
208 
209 
210  private:
211  L1MuBinnedScale m_RegionalEtaScale[4]; // 2=csc will be empty
215  // L1MuBinnedScale m_PtScale;
216 
218 };
219 
220 
221 #endif
L1MuBinnedScale m_PhiScale
void setGMTEtaScale(const L1MuSymmetricBinnedScale &scale)
set the GMT eta scale
L1MuBinnedScale m_RegionalEtaScale[4]
virtual ~L1MuTriggerScales()
destructor
L1MuTriggerScales(int nbitPackingDTEta, bool signedPackingDTEta, int nbinsDTEta, float minDTEta, float maxDTEta, int offsetDTEta, int nbitPackingCSCEta, int nbinsCSCEta, float minCSCEta, float maxCSCEta, const std::vector< double > &scaleRPCEta, int nbitPackingBrlRPCEta, bool signedPackingBrlRPCEta, int nbinsBrlRPCEta, int offsetBrlRPCEta, int nbitPackingFwdRPCEta, bool signedPackingFwdRPCEta, int nbinsFwdRPCEta, int offsetFwdRPCEta, int nbitPackingGMTEta, int nbinsGMTEta, const std::vector< double > &scaleGMTEta, int nbitPackingPhi, bool signedPackingPhi, int nbinsPhi, float minPhi, float maxPhi)
const L1MuScale * getPhiScale() const
get the phi scale
void setPhiScale(const L1MuBinnedScale &scale)
set the phi scale
L1MuTriggerScales()
constructor
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
L1MuSymmetricBinnedScale m_GMTEtaScale
L1MuSymmetricBinnedScale m_RegionalEtaScaleCSC
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale