/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/JetMETObjects/test/TestCorrections.C
25 строк
1 KB
Slava Krutelyov
code-format
22 июл 2020, 19:27
Не верифицирован
22 июл 2020, 19:27
21e7ea5
Код
Авторство
О чём код?
void TestCorrections(double rawPt, double rawEta, double rawPhi, double rawE, double JPTE, int NPV) { gROOT->ProcessLine("#include <vector>"); gSystem->Load("libFWCoreFWLite.so"); FWLiteEnabler::enable(); ////////////// Construct the JetCorrectorParameters objects /////////////////////// string L1Tag = "../data/Jec11V0_L1Offset_AK5JPT.txt"; string L1JPTTag = "../data/Jec11V0_L1JPTOffset_AK5JPT.txt"; JetCorrectorParameters *L1Par = new JetCorrectorParameters(L1Tag); JetCorrectorParameters *L1JPTPar = new JetCorrectorParameters(L1JPTTag); vector<JetCorrectorParameters> vPar; vPar.push_back(*L1Par); vPar.push_back(*L1JPTPar); ////////////// Construct a FactorizedJetCorrector object ////////////////////// FactorizedJetCorrector *JetCorrector = new FactorizedJetCorrector(vPar); ////////////// Loop over jets ////////////////////// TLorentzVector rawJetP4; rawJetP4.SetPtEtaPhiE(rawPt, rawEta, rawPhi, rawE); JetCorrector->setJPTrawP4(rawJetP4); JetCorrector->setJetE(JPTE); JetCorrector->setNPV(NPV); vector<float> vcor; vcor = JetCorrector->getSubCorrections(); cout << "Correction applied to JPT jet after L1Offset = " << vcor[0] << endl; cout << "Correction applied to JPT jet after L1JPTOffset = " << vcor[1] << endl; }