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