11 m_f.reset (TFile::Open(fIn));
19 vector<string> etastr;
20 etastr.push_back(
"_e0");
21 etastr.push_back(
"_e1");
22 etastr.push_back(
"_e2");
23 etastr.push_back(
"_e3");
24 etastr.push_back(
"_e4");
26 vector<string> prefix;
27 prefix.push_back(
"corr");
28 prefix.push_back(
"tagSyst");
29 prefix.push_back(
"fragSyst");
30 prefix.push_back(
"decaySyst");
31 prefix.push_back(
"msSyst");
32 prefix.push_back(
"idSyst");
33 prefix.push_back(
"decayRewSyst");
34 prefix.push_back(
"muRewSyst");
35 prefix.push_back(
"corrIncl");
37 for(
unsigned int j = 0; j<prefix.size(); j++){
38 vector<std::unique_ptr<TH1F> > corr;
39 for(
unsigned int i = 0; i<etastr.size(); i++){
40 corr.emplace_back((TH1F*)
m_f->Get((prefix[j]+etastr[i]).c_str()));
51 const TLorentzVector& mu)
57 const TLorentzVector& mu)
63 const TLorentzVector& mu,
64 const vector<std::unique_ptr<TH1F> >& histos)
66 TLorentzVector jetmu =
jet+mu;
68 float corr =
getResponse(jetmu.Pt(), jetmu.Eta(), histos);
84 indices.push_back((
int) syst);
89 const TLorentzVector& mu,
95 for(
unsigned int i = 0; i<indices1.size(); i++){
105 for(
unsigned int i = 0; i<
m_etas.size()-1; i++){
110 if(histbin == -1) histbin =
h.size()-1;
111 float min =
h[histbin]->GetBinCenter(1);
112 float max =
h[histbin]->GetBinCenter(
h[histbin]->GetNbinsX());
115 if(pt<
min) usePt =
min+0.001;
116 float result =
h[histbin]->Interpolate(usePt);
Scalar eta() const
pseudorapidity method
constexpr int pow(int base, int exp) noexcept
float getResponse(float pt, float eta, const std::vector< std::unique_ptr< TH1F > > &h)
semilCorr(const TString &fIn, const std::string &suffix="", bool DebugIn=false)
std::unique_ptr< TFile > m_f
std::vector< float > m_etas
float getSemilCorrToInclSyst(const TLorentzVector &jet, const TLorentzVector &mu, semilCorr::Systematics syst=semilCorr::ALL)
std::vector< int > getHistoIndices(semilCorr::Systematics syst)
float getSemilCorrToIncl(const TLorentzVector &jet, const TLorentzVector &mu, const std::vector< std::unique_ptr< TH1F > > &histos)
float getBjetCorrToIncl(const TLorentzVector &jet, const TLorentzVector &mu)
std::vector< std::vector< std::unique_ptr< TH1F > > > m_histos