-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJetBin.h
53 lines (43 loc) · 1.6 KB
/
JetBin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! \brief Class for jet bins
//!
//! \author Hartmut Stadie
//!
//! \date 2010/05/10
//!
//! $Id: JetBin.h,v 1.6 2010/12/13 10:38:28 stadie Exp $
#ifndef JETBIN_H
#define JETBIN_H
#include "Function.h"
#include "CalibData.h"
class CorFactors;
class Jet;
class JetBin
{
public:
JetBin(const Function& f,
float (*errfunc)(const float *x, const Measurement *xorig, float err),
const Function& gf)
: sumMess_(),sumPt2_(0), sumGenPt_(0), sumGenPt2_(0), sumdR_(0), sumL1_(0), sumL2_(0), sumL3_(0),
sumLres_(0),sumL4_(0), sumL5_(0), sumJPT_(0), sumJPTL2L3_(0), njets_(0), f_(&f), gf_(&gf),
errf_(errfunc)
{}
virtual ~JetBin() {}
void addJet(float Et, float EmEt, float HadEt ,float OutEt, float E,
float eta,float phi, float phiphi, float etaeta,
float genPt, float dR, const CorFactors& corFactors);
void addJet(const Jet* jet);
Jet* jet() const { return createJet(); }
float genPt() const { return njets_ ? sumGenPt_/njets_ : 0;}
int nJets() const { return njets_;}
protected:
Jet* createJet() const;
Measurement sumMess_;//!< sums for Measurement
float sumPt2_;
float sumGenPt_,sumGenPt2_, sumdR_; //!< sums for Jet
float sumL1_, sumL2_, sumL3_, sumLres_, sumL4_, sumL5_, sumJPT_, sumJPTL2L3_; //!< sums for CorFactor
int njets_; //!< number of jets in this bin
const Function* f_; //!< Jet correction function
const Function* gf_; //!< Global jet correction function
float (*errf_)(const float *x, const Measurement *xorig, float err); //!< Error function
};
#endif