11 m_f = 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++){
39 for(
unsigned int i = 0; i<etastr.size(); i++){
40 corr.push_back((TH1F*)
m_f->Get((prefix[j]+etastr[i]).c_str()));
48 for(
unsigned int i = 0; i<
m_histos.size();i++){
49 for(
unsigned int j = 0; j<
m_histos[i].size();j++){
58 const TLorentzVector& mu)
64 const TLorentzVector& mu)
70 const TLorentzVector& mu,
71 const vector<TH1F*>& histos)
73 TLorentzVector jetmu =
jet+mu;
75 float corr =
getResponse(jetmu.Pt(), jetmu.Eta(), histos);
91 indices.push_back((
int) syst);
96 const TLorentzVector& mu,
102 for(
unsigned int i = 0; i<indices1.size(); i++){
112 for(
unsigned int i = 0; i<
m_etas.size()-1; i++){
117 if(histbin == -1) histbin =
h.size()-1;
118 float min =
h[histbin]->GetBinCenter(1);
119 float max =
h[histbin]->GetBinCenter(
h[histbin]->GetNbinsX());
122 if(pt<
min) usePt =
min+0.001;
123 float result =
h[histbin]->Interpolate(usePt);
Scalar eta() const
pseudorapidity method
constexpr int pow(int base, int exp) noexcept
semilCorr(const TString &fIn, const std::string &suffix="", bool DebugIn=false)
float getResponse(float pt, float eta, const std::vector< TH1F * > &h)
std::vector< std::vector< TH1F * > > m_histos
float getSemilCorrToIncl(const TLorentzVector &jet, const TLorentzVector &mu, const std::vector< TH1F * > &histos)
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 getBjetCorrToIncl(const TLorentzVector &jet, const TLorentzVector &mu)