|
ATLAS Offline Software
|
Go to the documentation of this file.
11 m_f = TFile::Open(
fIn);
13 m_etas.push_back(0.8);
14 m_etas.push_back(1.2);
15 m_etas.push_back(1.7);
16 m_etas.push_back(2.1);
17 m_etas.push_back(2.5);
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");
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()));
42 m_histos.push_back(corr);
48 for(
unsigned int i = 0;
i<m_histos.size();
i++){
49 for(
unsigned int j = 0; j<m_histos[
i].size();j++){
50 delete m_histos[
i][j];
58 const TLorentzVector&
mu)
60 return getSemilCorrToIncl(
jet,
mu,m_histos[0]);
64 const TLorentzVector&
mu)
66 return getSemilCorrToIncl(
jet,
mu,m_histos[8]);
70 const TLorentzVector&
mu,
71 const vector<TH1F*>&
histos)
73 TLorentzVector jetmu =
jet+
mu;
75 float corr = getResponse(jetmu.Pt(), jetmu.Eta(),
histos);
96 const TLorentzVector&
mu,
100 vector<int> indices1 = getHistoIndices(syst);
102 for(
unsigned int i = 0;
i<indices1.size();
i++){
103 systr +=
pow(getSemilCorrToIncl(
jet,
mu,m_histos[indices1[
i]]),2);
112 for(
unsigned int i = 0;
i<m_etas.size()-1;
i++){
113 if(fabs(
eta)>=m_etas[
i] && fabs(
eta)<m_etas[
i+1])
117 if(histbin == -1) histbin =
h.size()-1;
118 float min =
h[histbin]->GetBinCenter(1);
119 float max =
h[histbin]->GetBinCenter(
h[histbin]->GetNbinsX());
123 float result =
h[histbin]->Interpolate(usePt);
float getSemilCorrToIncl(const TLorentzVector &jet, const TLorentzVector &mu, const std::vector< TH1F * > &histos)
float getBjetCorrToIncl(const TLorentzVector &jet, const TLorentzVector &mu)
Scalar eta() const
pseudorapidity method
std::pair< long int, long int > indices
float getSemilCorrToInclSyst(const TLorentzVector &jet, const TLorentzVector &mu, semilCorr::Systematics syst=semilCorr::ALL)
semilCorr(const TString &fIn, const std::string &suffix="", bool DebugIn=false)
float getResponse(float pt, float eta, const std::vector< TH1F * > &h)
std::vector< int > getHistoIndices(semilCorr::Systematics syst)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
constexpr int pow(int base, int exp) noexcept