CMS 3D CMS Logo

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