-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJetTruthEvent.h
63 lines (54 loc) · 2.78 KB
/
JetTruthEvent.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
54
55
56
57
58
59
60
61
62
63
//
// Class for all events with one jet and truth informatio
//
// first version: Hartmut Stadie 2008/12/14
// $Id: JetTruthEvent.h,v 1.23 2013/05/08 14:38:27 kirschen Exp $
//
#ifndef JETTRUTHEVENT_H
#define JETTRUTHEVENT_H
#include"CalibData.h"
#include "Jet.h"
//interface to Data
class JetTruthEvent : public Event
{
public:
JetTruthEvent(Jet *j, double t, float w, float pthat = 0, short npu = 0, float nputruth = 0, float rho = 0, double thirdjetfractionplain =0, bool binned = false) : Event(w,pthat,npu,nputruth,0,0,0,0,0,0,0,0,0,rho),jet_(j),truth_(t),chi2plots_(1000.),flagged_bad_(false), thirdjetfractionplain_(thirdjetfractionplain), binned_(binned) {}
~JetTruthEvent();
//interface from Event
Measurement *mess() const {return jet_;}
double truth() const { return truth_;}
double ThirdJetFractionPlain() const { return thirdjetfractionplain_;}
double parametrizedMess() const { return jet_->correctedEt(jet_->Et());}
void setParameters(Parameters* param) { jet_->setParameters(param);}
DataType type() const { return GammaJet;}
Jet* jet() const {return jet_;}
double chi2() const;
double chi2_plots() const { return chi2plots_; }
double chi2_fast(double * temp_derivative1, double * temp_derivative2, double * temp_derivative3, double * temp_derivative4, const double* epsilon) const {
if(! binned_) {
chi2plots_ = chi2_log_fast_invert(temp_derivative1,temp_derivative2,temp_derivative3,temp_derivative4,epsilon);
} else {
chi2plots_ = chi2_fast_scaled(temp_derivative1,temp_derivative2,temp_derivative3,temp_derivative4,epsilon);
}
return chi2plots_;
}
double chi2_fast_blobel(double * temp_derivative1, double * temp_derivative2, const double* epsilon) const;
double chi2_fast_scaled(double * temp_derivative1, double * temp_derivative2, double * temp_derivative3, double * temp_derivative4, const double* epsilon) const;
double chi2_fast_simple_scaled(double * temp_derivative1, double * temp_derivative2, const double* epsilon) const;
double chi2_fast_simple(double * temp_derivative1, double * temp_derivative2, const double* epsilon) const;
double chi2_fast_invert(double * temp_derivative1, double * temp_derivative2, const double* epsilon) const;
double chi2_log_fast_invert(double * temp_derivative1, double * temp_derivative2, double * temp_derivative3, double * temp_derivative4, const double* epsilon) const;
void updateError() {}
bool flaggedBad() const { return flagged_bad_; } //!< Status from inversion procedure
static int nFlagged() { return nflagged_;}
static void printStats();
private:
Jet* jet_;
double truth_;
mutable double chi2plots_; //!< Store chi2 value from last iteration for plots
mutable bool flagged_bad_;
double thirdjetfractionplain_;
bool binned_;
static int nflagged_;
};
#endif