Skip to content

Commit

Permalink
Most up-to-date stuffes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannu Siikonen committed Jun 1, 2017
1 parent 3f48b7b commit c3fadec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions IOV.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ namespace jec {

vector<JetCorrectorParameters> vpar;

cout << "Fuuga!" << endl;
// L1FastJet for AK*PF, L1Offset for others
s = Form("%s%sL1FastJet_%s.txt",p,t,a);
if (access(s, F_OK)==-1) {
cout << "The IOV files of " << s << " etc. were not found" << endl;
return;
}
dat.names.push_back(string(s));
vpar.push_back(JetCorrectorParameters(s));

Expand Down
11 changes: 7 additions & 4 deletions fillHistos.C
Original file line number Diff line number Diff line change
Expand Up @@ -715,14 +715,15 @@ void fillHistos::Loop()
} // for i
} // _mc

// Propagate jec to MET
double ucx = -mex;
double ucy = -mey;
// Propagate jec to MET 1 and MET 2
for (int i = 0; i != njt; ++i) {

// Only use jets with corr. pT>25 GeV to equalize data and MC thresholds
if (jtpt[i] > _jp_recopt && fabs(jteta[i])<4.7) {

// MET 1 stuff
// Subtract uncorrected jet pT from met, put back corrected
// Also add RC offset to keep PU isotropic
// Remember that MET is negative vector sum
Expand All @@ -732,10 +733,12 @@ void fillHistos::Loop()
_L1RC->setJetE(jteu[i]);
_L1RC->setJetEta(jteta[i]);
double l1corr = _L1RC->getCorrection();
double dpt = jtpt[i] - l1corr*jtptu[i];
mex -= dpt * cos(jtphi[i]);
mey -= dpt * sin(jtphi[i]);
double dpt = - jtpt[i] + l1corr*jtptu[i];
//double dpt = - jtpt[i] + (l1chs - l1pf + l1corr)*jtptu[i];
mex += dpt * cos(jtphi[i]);
mey += dpt * sin(jtphi[i]);

// MET 2 stuff
// Keep track of remaining pT in unclustered energy, i.e.
// subtract jets from -MET to have the non-jet component
// treat UE and PU underneath jets as unclustered in order
Expand Down
8 changes: 4 additions & 4 deletions settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const bool _debug = false;
// Algorithm to use ("AK4PF" or "AK8PF")
string _jp_algo = "AK4PFchs";
// Data type ("DATA", "MC", or "HW")
string _jp_type = "MC";
string _jp_type = "DATA"
// In case of DATA, choose run ("RunB/C/D/E/Fearly/Flate/G/H")
string _jp_run = "RunG";
// Kostas stored UNCORRECTED four-vector, current status: CORRECTED
Expand Down Expand Up @@ -92,8 +92,8 @@ string _jp_ecalveto = "lumicalc/ecalveto.root";
// Reapply json selection based on the latest one (check lumicalc if false!)
const bool _jp_dojson = true;
// Here: there are slight differences between PromptReco and ReReco in the 2016 run
//string _jp_json = "lumicalc/Cert_271036-284044_13TeV_23Sep2016ReReco_Collisions16_JSON.txt";
string _jp_json = "lumicalc/Cert_271036-282092_13TeV_PromptReco_Collisions16_JSON.txt";
string _jp_json = "lumicalc/Cert_271036-284044_13TeV_23Sep2016ReReco_Collisions16_JSON.txt";
//string _jp_json = "lumicalc/Cert_271036-282092_13TeV_PromptReco_Collisions16_JSON.txt";

// Calculate luminosity on the fly based on .csv file
const bool _jp_dolumi = true;
Expand Down Expand Up @@ -126,7 +126,7 @@ const double _jp_emax = _jp_sqrts/2.; // GeV
//////////////////////////////////

string _jp_jecgt = "Summer16_03Feb2017";// "Summer16_23Sep2016";
string _jp_jecvers = "_V0"; // Summer16_03Feb // "V6"; // Summer16_23Sep // "V2" ; // Spring16
string _jp_jecvers = "_V3"; // Summer16_03Feb // "V6"; // Summer16_23Sep // "V2" ; // Spring16

// Use Intervals-Of-Validity for JEC
const bool _jp_useIOV = true;
Expand Down

0 comments on commit c3fadec

Please sign in to comment.