-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30872 from slava77/patch-77
drop wrong default params in TLorentzVector in TestCorrections.C
- Loading branch information
Showing
1 changed file
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
void TestCorrections(double rawPt, double rawEta, double rawPhi, double rawE, double JPTE, int NPV) | ||
{ | ||
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); | ||
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(0); | ||
rawJetP4.SetPtEtaPhiE(rawPt,rawEta,rawPhi,rawE); | ||
JetCorrector->setJPTrawP4(rawJetP4); | ||
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; | ||
cout << "Correction applied to JPT jet after L1Offset = " << vcor[0] << endl; | ||
cout << "Correction applied to JPT jet after L1JPTOffset = " << vcor[1] << endl; | ||
} |