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 
24 #include <cmath>
25 #include <iostream>
26 #include <vector>
27 
30 
32  public:
33 
36 
37  L1MuTriggerScales( int nbitPackingDTEta,
38  bool signedPackingDTEta,
39  int nbinsDTEta,
40  float minDTEta,
41  float maxDTEta,
42  int offsetDTEta,
43 
44  int nbitPackingCSCEta,
45  int nbinsCSCEta,
46  float minCSCEta,
47  float maxCSCEta,
48 
49  const std::vector<double>& scaleRPCEta,
50  int nbitPackingBrlRPCEta,
51  bool signedPackingBrlRPCEta,
52  int nbinsBrlRPCEta,
53  int offsetBrlRPCEta,
54  int nbitPackingFwdRPCEta,
55  bool signedPackingFwdRPCEta,
56  int nbinsFwdRPCEta,
57  int offsetFwdRPCEta,
58 
59  int nbitPackingGMTEta,
60  int nbinsGMTEta,
61  const std::vector<double>& scaleGMTEta,
62 
63  int nbitPackingPhi,
64  bool signedPackingPhi,
65  int nbinsPhi,
66  float minPhi,
67  float maxPhi
68 
69 /* int nbitPackingPt, */
70 /* bool signedPackingPt, */
71 /* int nbinsPt, */
72 /* const std::vector<double>& scalePt */
73 
74  ) {
75 
76  //
77  // Regional Muon Trigger Eta Scales
78  //
79 /* const float rpcetabins[34]= { */
80 /* -2.10, -1.97, -1.85, -1.73, -1.61, -1.48, */
81 /* -1.36, -1.24, -1.14, -1.04, -0.93, -0.83, */
82 /* -0.72, -0.58, -0.44, -0.27, -0.07, */
83 /* 0.07, 0.27, 0.44, 0.58, 0.72, */
84 /* 0.83, 0.93, 1.04, 1.14, 1.24, 1.36, */
85 /* 1.48, 1.61, 1.73, 1.85, 1.97, 2.10}; */
86 
87  // DT
88  //m_RegionalEtaScale[0] = L1MuBinnedScale( 6, true, 64, -1.2, 1.2, 32);
89  m_RegionalEtaScale[0] = L1MuBinnedScale( nbitPackingDTEta,
90  signedPackingDTEta,
91  nbinsDTEta,
92  minDTEta,
93  maxDTEta,
94  offsetDTEta );
95 
96  // RPC index -16 .. 16, brl RPC
97  // m_RegionalEtaScale[1] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
98  m_RegionalEtaScale[1] = L1MuBinnedScale (nbitPackingBrlRPCEta,
99  signedPackingBrlRPCEta,
100  nbinsBrlRPCEta,
101  scaleRPCEta,
102  offsetBrlRPCEta ) ;
103 
104  // CSC
106  // // m_RegionalEtaScale[2] = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
107  // m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( 6, 32, 0.9, 2.5);
108  m_RegionalEtaScaleCSC = L1MuSymmetricBinnedScale ( nbitPackingCSCEta,
109  nbinsCSCEta,
110  minCSCEta,
111  maxCSCEta );
112 
113  // RPC index -16 .. 16, fwd RPC
114  // m_RegionalEtaScale[3] = L1MuBinnedScale (6, true, 33, rpcetabins, 16);
115  m_RegionalEtaScale[3] = L1MuBinnedScale (nbitPackingFwdRPCEta,
116  signedPackingFwdRPCEta,
117  nbinsFwdRPCEta,
118  scaleRPCEta,
119  offsetFwdRPCEta );
120 
121  //
122  // Eta scale at GMT output
123  //
124 
125 /* const float gmt_outputetascale[32] = { 0.00, */
126 /* 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, */
127 /* 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, */
128 /* 1.70, 1.75, 1.80, 1.85, 1.90, 1.95, 2.00, 2.05, */
129 /* 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40 }; */
130 
131  // m_GMTEtaScale = L1MuSymmetricBinnedScale (6, 31, gmt_outputetascale);
132  m_GMTEtaScale = L1MuSymmetricBinnedScale (nbitPackingGMTEta,
133  nbinsGMTEta,
134  scaleGMTEta );
135 
136  //
137  // Phi Scale. Common to all Regioanl Muon Triggers and GMT
138  //
139 
140  // m_PhiScale = L1MuBinnedScale (8, false, 144, 0., 2. * M_PI);
141  m_PhiScale = L1MuBinnedScale (nbitPackingPhi,
142  signedPackingPhi,
143  nbinsPhi,
144  minPhi,
145  maxPhi );
146 
147  //
148  // Pt Scale. Common to all Regioanl Muon Triggers and GMT
149  //
150 
151  // pt scale in GeV
152  // low edges of pt bins
153 /* const float ptscale[33] = { */
154 /* -1., 0.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, */
155 /* 4.5, 5.0, 6.0, 7.0, 8.0, 10.0, 12.0, 14.0, */
156 /* 16.0, 18.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, */
157 /* 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0, 1.E6 }; */
158 
159  // m_PtScale = L1MuBinnedScale ( 5, false, 32, ptscale) ;
160 /* m_PtScale = L1MuBinnedScale ( nbitPackingPt, */
161 /* signedPackingPt, */
162 /* nbinsPt, */
163 /* scalePt ) ; */
164 
165  };
166 
167 
169  virtual ~L1MuTriggerScales() {
170 // for (int i=0; i<4; i++)
171 // delete m_RegionalEtaScale[i];
172 
173 // delete m_GMTEtaScale;
174 // delete m_PhiScale;
175 // delete m_PtScale;
176  };
177 
179  const L1MuScale* getRegionalEtaScale(int isys) const {
180  if (isys<0 || isys>3) edm::LogWarning("ScaleRangeViolation") << "Error in L1MuTriggerScales:: isys out of range: " << isys;
181  if( isys == 2 )
182  {
183  return &m_RegionalEtaScaleCSC ;
184  }
185  else
186  {
187  return &( m_RegionalEtaScale[isys] );
188  }
189  };
190 
192  const L1MuScale* getGMTEtaScale() const { return &m_GMTEtaScale ; };
193 
196 
197 
199  const L1MuScale* getPhiScale() const { return &m_PhiScale;};
200 
203 
204 /* /// get the Pt scale */
205 /* const L1MuScale* getPtScale() const { return &m_PtScale;}; */
206 
207 
208  private:
209  L1MuBinnedScale m_RegionalEtaScale[4]; // 2=csc will be empty
213  // L1MuBinnedScale m_PtScale;
214 };
215 
216 
217 #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