CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1RCTParameters.h
Go to the documentation of this file.
1 #ifndef L1TObjects_L1RCTParameters_h
2 #define L1TObjects_L1RCTParameters_h
3 // -*- C++ -*-
4 //
5 // Package: L1TObjects
6 // Class : L1RCTParameters
7 //
16 //
17 // Author: Sridhara Dasu
18 // Created: Thu Jun 07 06:35 PDT 2007
19 // $Id:
20 //
21 
22 #include <boost/cstdint.hpp>
23 #include <vector>
24 #include <ostream>
25 
27 
28  public:
29 
30  // constructor
32 
34  double jetMETLSB,
35  double eMinForFGCut,
36  double eMaxForFGCut,
37  double hOeCut,
38  double eMinForHoECut,
39  double eMaxForHoECut,
40  double hMinForHoECut,
41  double eActivityCut,
42  double hActivityCut,
43  unsigned eicIsolationThreshold,
44  unsigned jscQuietThresholdBarrel,
45  unsigned jscQuietThresholdEndcap,
46  bool noiseVetoHB,
47  bool noiseVetoHEplus,
48  bool noiseVetoHEminus,
49  bool useLindsey,
50  const std::vector<double>& eGammaECalScaleFactors,
51  const std::vector<double>& eGammaHCalScaleFactors,
52  const std::vector<double>& jetMETECalScaleFactors,
53  const std::vector<double>& jetMETHCalScaleFactors,
54  const std::vector<double>& ecal_calib,
55  const std::vector<double>& hcal_calib,
56  const std::vector<double>& hcal_high_calib,
57  const std::vector<double>& cross_terms,
58  const std::vector<double>& lowHoverE_smear,
59  const std::vector<double>& highHoverE_smear
60  );
61 
62  // destructor -- no virtual methods in this class
64 
65  // accessors
66 
67  double eGammaLSB() const {return eGammaLSB_;}
68  double jetMETLSB() const {return jetMETLSB_;}
69  double eMinForFGCut() const {return eMinForFGCut_;}
70  double eMaxForFGCut() const {return eMaxForFGCut_;}
71  double hOeCut() const {return hOeCut_;}
72  double eMinForHoECut() const {return eMinForHoECut_;}
73  double eMaxForHoECut() const {return eMaxForHoECut_;}
74  double hMinForHoECut() const {return hMinForHoECut_;}
75  double eActivityCut() const {return eActivityCut_;}
76  double hActivityCut() const {return hActivityCut_;}
77  unsigned eicIsolationThreshold() const {return eicIsolationThreshold_;}
80  bool noiseVetoHB() const {return noiseVetoHB_;}
81  bool noiseVetoHEplus() const {return noiseVetoHEplus_;}
82  bool noiseVetoHEminus() const {return noiseVetoHEminus_;}
83  const std::vector<double>& eGammaECalScaleFactors() const {return eGammaECalScaleFactors_;}
84  const std::vector<double>& eGammaHCalScaleFactors() const {return eGammaHCalScaleFactors_;}
85  const std::vector<double>& jetMETECalScaleFactors() const {return jetMETECalScaleFactors_;}
86  const std::vector<double>& jetMETHCalScaleFactors() const {return jetMETHCalScaleFactors_;}
87 
88  // Helper methods to convert from trigger tower (iphi, ieta)
89  // to RCT (crate, card, tower)
90 
91  unsigned short calcCrate(unsigned short rct_iphi, short ieta) const;
92  unsigned short calcCard(unsigned short rct_iphi, unsigned short absIeta) const;
93  unsigned short calcTower(unsigned short rct_iphi, unsigned short absIeta) const;
94  short calcIEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const; // negative eta is used
95  unsigned short calcIPhi(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const;
96  unsigned short calcIAbsEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const;
97 
98  // Sum ecal and hcal TPGs using JetMET / EGamma Correactions and Lindsey's Calibration if flag is set
99  float JetMETTPGSum(const float& ecal, const float& hcal, const unsigned& iAbsEta) const;
100  float EGammaTPGSum(const float& ecal, const float& hcal, const unsigned& iAbsEta) const;
101 
102  void print(std::ostream& s) const;
103 
104  private:
105 
106  // default constructor is not implemented
107 
108  //L1RCTParameters();
109 
110  // LSB of the eGamma object corresponds to this ET (in GeV)
111 
112  double eGammaLSB_;
113 
114  // LSB of the jetMET object corresponds to this ET (in GeV)
115 
116  double jetMETLSB_;
117 
118  // Minimum ET of the eGamma object below which FG cut is ignored (in GeV)
119 
121 
122  // Maximum ET of the eGamma object above which FG cut is ignored (in GeV)
123 
125 
126  // H/E ratio cut
127 
128  double hOeCut_;
129 
130  // Minimum ET of the ecal (in GeV) below which H/E always passes
131 
133 
134  // Maximum ET of the ecal (in GeV) above which H/E always passes
135 
137 
138  // Minimum ET of the hcal (in GeV) above which H/E always fails (veto true)
139 
141 
142  // If the ET of the ECAL trigger tower is above this value
143  // the tower is deemed active (in GeV) -- these are used
144  // for tau pattern logic
145 
147 
148  // If the ET of the HCAL trigger tower is above this value
149  // the tower is deemed active (in GeV) -- these are used
150  // for tau pattern logic
151 
153 
154  // This parameter is used for the five-tower-corner isolation
155  // algorithm in the electron isolation card. If one corner
156  // set of five neighbor towers falls below this threshold,
157  // the electron candidate is isolated.
158 
160 
161  // 9-bit threshold below which quiet bit is set for a barrel region in JSC
162  // (i.e. receiver cards 0-3)
163 
165 
166  // 9-bit threshold below which quiet bit is set for an endcap region in JSC
167  // (i.e. receiver cards 4-6)
168 
170 
171  // Ignores HCAL barrel energy if no ECAL energy in corresponding
172  // tower -- to reduce HCAL noise. Endcaps enabled separately
173  // to allow for lack of one/both ECAL endcaps.
174 
176 
177  // Ignores HCAL energy in plus endcap if no ECAL energy in
178  // corresponding tower.
179 
181 
182  // Ignores HCAL energy in minus endcap if no ECAL energy in
183  // corresponding tower.
184 
186 
187  // Use Cubic Fitting Corrections ?
189 
190  // eGamma object ET is computed using the trigger tower ET defined as
191  // ecal * eGammaECalScaleFactors[iEta] + hcal * eGammaHCalScaleFactors[iEta]
192  // The result is then digitized using the eGamma LSB
193 
194  std::vector<double> eGammaECalScaleFactors_;
195  std::vector<double> eGammaHCalScaleFactors_;
196 
197  // jetMET object ET is computed using the trigger tower ET defined as
198  // ecal * jetMETECalScaleFactors[iEta] + hcal * jetMETHCalScaleFactors[iEta]
199  // The result is then digitized using the jetMET LSB
200 
201  std::vector<double> jetMETECalScaleFactors_;
202  std::vector<double> jetMETHCalScaleFactors_;
203 
204 
205  // Applies Lindsey's calibration to HCAL and ECAL (ECAL must corrected by eGamma scale factors)
206  // Provides corrected Et sum.
207  float correctedTPGSum(const float& ecal, const float& hcal, const unsigned& index) const;
208 
209  // Lindsey's Calibration Coefficients
210  // Basically a higher order approximation of the energy response of the calorimeters.
211  // Powers in ecal and hcal Et are defined below.
212  std::vector<std::vector<double> > ecal_calib_; // [0] = ecal^3, [1] = ecal^2, [2] = ecal
213  std::vector<std::vector<double> > hcal_calib_; // [0] = hcal^3, [1] = hcal^2, [2] = hcal
214  std::vector<std::vector<double> > hcal_high_calib_; // same as above but used to capture Et dependence for large Et
215  std::vector<std::vector<double> > cross_terms_; // [0] = ecal^2*hcal, [1] = hcal^2*ecal, [2] = ecal*hcal
216  // [3] = ecal^3*hcal, [1] = hcal^3*ecal, [2] = ecal^2*hcal^2
217  // These two sets of correction factors help to center the corrected
218  // Et distributions for different values of H/E.
219  std::vector<double> HoverE_smear_low_;
220  std::vector<double> HoverE_smear_high_;
221 
222 
223 };
224 
225 #endif
const std::vector< double > & eGammaHCalScaleFactors() const
const std::vector< double > & jetMETHCalScaleFactors() const
void print(std::ostream &s) const
double eMaxForFGCut() const
std::vector< double > jetMETECalScaleFactors_
const std::vector< double > & eGammaECalScaleFactors() const
unsigned eicIsolationThreshold() const
short calcIEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
double eMinForFGCut() const
unsigned jscQuietThresholdBarrel_
bool noiseVetoHEminus() const
std::vector< double > eGammaECalScaleFactors_
double eActivityCut() const
std::vector< std::vector< double > > cross_terms_
std::vector< std::vector< double > > hcal_high_calib_
std::vector< double > HoverE_smear_low_
unsigned jscQuietThresholdEndcap() const
float correctedTPGSum(const float &ecal, const float &hcal, const unsigned &index) const
bool noiseVetoHEplus() const
unsigned short calcTower(unsigned short rct_iphi, unsigned short absIeta) const
float EGammaTPGSum(const float &ecal, const float &hcal, const unsigned &iAbsEta) const
unsigned jscQuietThresholdEndcap_
const std::vector< double > & jetMETECalScaleFactors() const
double hActivityCut() const
double eMinForHoECut() const
std::vector< double > jetMETHCalScaleFactors_
double jetMETLSB() const
unsigned short calcIAbsEta(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
std::vector< std::vector< double > > hcal_calib_
bool noiseVetoHB() const
unsigned short calcIPhi(unsigned short iCrate, unsigned short iCard, unsigned short iTower) const
double eGammaLSB() const
double hOeCut() const
std::vector< double > HoverE_smear_high_
unsigned short calcCard(unsigned short rct_iphi, unsigned short absIeta) const
std::vector< double > eGammaHCalScaleFactors_
std::vector< std::vector< double > > ecal_calib_
unsigned eicIsolationThreshold_
double eMaxForHoECut() const
unsigned short calcCrate(unsigned short rct_iphi, short ieta) const
unsigned jscQuietThresholdBarrel() const
float JetMETTPGSum(const float &ecal, const float &hcal, const unsigned &iAbsEta) const
double hMinForHoECut() const