-
Notifications
You must be signed in to change notification settings - Fork 0
/
HadWMassFitter.h
executable file
·130 lines (85 loc) · 3.42 KB
/
HadWMassFitter.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef HadWMassFitter_H
#define HadWMassFitter_H
#include <TObject.h>
#include <TLorentzVector.h>
#include <TMath.h>
#include <TString.h>
#include <TStyle.h>
#include <TLegend.h>
#include <TCanvas.h>
#include <TSystem.h>
#include <TMinuit.h>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include "MassAnaInput.h"
#include "WFormat.h"
#include "PseudoExp.h"
class FitVectors : public TObject {
public:
FitVectors(){}
~FitVectors(){}
TLorentzVector jv1;
TLorentzVector jv2;
//ClassDef(FitVectors, 1);
} ;
class HadWMassFitter : public TObject {
private:
vector<double> jetCuts;
vector<double> muonCuts;
vector<double> M2M3Cut;
double LepM2tCutL ;
double dM3Cut ;
double JESv ;
double sigma1;
double sigma2;
double zigma1;
double zigma2;
double wmass;
double bTh;
int n_btag;
int JESType;
string dataLike ;
string Inclusive ;
bool inclu ;
bool normMCData ;
MassAnaInput* fitInput;
PseudoExp* pseudoExp;
TCanvas* c1;
TCanvas* c2;
string hfolder;
public:
HadWMassFitter();
~HadWMassFitter();
void FitW( TLorentzVector jetv1, TLorentzVector jetv2, Double_t* pars, Double_t* errs, bool isJES );
static void WMFCN(Int_t &npar, Double_t *, Double_t &wChi2, Double_t *par, Int_t iflag);
double ReFitWMass( TLorentzVector v1, TLorentzVector v2, Double_t *par, Double_t *ProbW );
double ReFitHadTopMass( TLorentzVector v1, TLorentzVector v2, TLorentzVector v3, Double_t *par );
double ReFitLepTopMass( TLorentzVector v1, TLorentzVector v2, TLorentzVector v3, Double_t *par );
double KinematicProb( vector<TLorentzVector> nvlist, TLorentzVector mV4, TLorentzVector nV4, Double_t *par, Double_t* wtX = NULL );
double Get2BodySigma( TLorentzVector v1, TLorentzVector v2 );
double Get3BodySigma( TLorentzVector v1, TLorentzVector v2, TLorentzVector v3 );
double BTagProbability( double bCut[], int NofB, int jid[], bool isJES = false );
vector<TLorentzVector> newVector( TLorentzVector v1, TLorentzVector v2, TLorentzVector v3, TLorentzVector v4, Double_t *par );
double jetAngle( TLorentzVector v1, TLorentzVector v2 );
double minTheta_WDecay( TLorentzVector v1, TLorentzVector v2 );
vector<TLorentzVector> NeuP4Solution( TLorentzVector muP4, TLorentzVector neuP4 ) ;
vector<TLorentzVector> GetLorentzVector( jlist Ls, double jpx[], double jpy[], double jpz[], double jE[] );
vector<TLorentzVector> GetLorentzVector( vector<TLorentzVector>& oblist, jlist Ls );
vector<TLorentzVector> GetEventObjects( int nj, double jpx[], double jpy[], double jpz[], double jE[], double mpx, double mpy, double mpz, double mE );
void ResetCuts( double m2L = -1, double m2H = -1, double m3L = -1, double m3H = -1, double lepM2tL = -1, double lepM2tH = -1, bool GetDefault = false );
void SetMCNormalization( bool normMC ) ;
void SetJESType( int jetType_ ) ;
void SetMuonCuts( double pt_, double eta_, double iso_ );
void SetJetCuts( double pt_, double eta_, int nj_ );
// methods for old soltree
double ReFitSolution( string mName, recoObj* wObj, int nJets, double scale = 1., vector<int>* evtlist = NULL, int evtSplit = 0, bool smearing = false );
void MCSolution( string fileName, recoObj* wObj );
double EvtScaling( int NJets, string fileName );
//ClassDef(HadWMassFitter, 1);
};
//#if !defined(__CINT__)
// ClassImp(HadWMassFitter);
#endif