forked from cms-jet/TopTaggingScaleFactors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cxx
29 lines (25 loc) · 798 Bytes
/
test.cxx
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
#include <cmath>
#include <iostream>
#include <vector>
#include <TMath.h>
#include <TString.h>
#include <TFile.h>
#include "readScaleFactors.h"
int main()
{
double f = ToptaggingSFs::readScaleFactor(ToptaggingSFs::PUPPI_wp2_btag, true, 2016, ToptaggingSFs::mergedTop, 453.0, ToptaggingSFs::nominal);
std::cout << "f = " << f << std::endl;
}
// pseudo code for how to use this in analysis:
//
// std::vector<genTop> tops;
// std::vector<Jet> tagged_jets;
// double weight = 1;
//
// for(const auto & jet: tagged_jets){
// ToptaggingSFs::eCategory cat = getTopTaggingMatch(tops, jet);
// weight *= ToptaggingSFs::readScaleFactor(ToptaggingSFs::PUPPI_wp2_btag, true, 2016, cat, jet.pt(), ToptaggingSFs::nominal);
// }
//
// now multiply this weight with all other reco event weights
//