Exemple #1
0
test_JER::test_JER(uhh2::Context& ctx){

  //// CONFIGURATION

  const bool isMC = (ctx.get("dataset_type") == "MC");

  ////

  //// OBJ CLEANING
  const JetId jetID(JetPFID(JetPFID::WP_LOOSE));

  std::vector<std::string> JEC_AK4, JEC_AK8;
  if(isMC){

    JEC_AK4 = JERFiles::Summer16_23Sep2016_V4_L123_AK4PFchs_MC;
    JEC_AK8 = JERFiles::Summer16_23Sep2016_V4_L123_AK4PFchs_MC;
  }
  else {

    JEC_AK4 = JERFiles::Summer16_23Sep2016_V4_BCD_L123_AK4PFchs_DATA;
    JEC_AK8 = JERFiles::Summer16_23Sep2016_V4_BCD_L123_AK4PFchs_DATA;
  }

  jet_IDcleaner.reset(new JetCleaner(ctx, jetID));
  jet_corrector.reset(new JetCorrector(ctx, JEC_AK4));
  if(isMC) jetER_smearer1.reset(new        JetResolutionSmearer(ctx));
  //if(isMC) jetER_smearer2.reset(new GenericJetResolutionSmearer(ctx, "jets", "genjets", false));

  ctx.declare_event_input<std::vector<Particle> >(ctx.get("TopJetCollectionGEN"), "topjetsGEN");

  topjet_IDcleaner.reset(new JetCleaner(ctx, jetID));
  topjet_corrector.reset(new TopJetCorrector(ctx, JEC_AK8));
  topjet_subjet_corrector.reset(new SubJetCorrector(ctx, JEC_AK4));
  if(isMC) topjetER_smearer.reset(new GenericJetResolutionSmearer(ctx, "topjets", "topjetsGEN", false, JERSmearing::SF_13TeV_2016, "Spring16_25nsV10_MC_PtResolution_AK8PFchs.txt"));
  ////
}
Exemple #2
0
test_JLCkey::test_JLCkey(uhh2::Context& ctx){

  //// CONFIGURATION

  const bool isMC = (ctx.get("dataset_type") == "MC");

  ////

  //// OBJ CLEANING
  const     MuonId muo(AndId<Muon>    (PtEtaCut  (50., 2.1), MuonIDTight()));
  const ElectronId ele(AndId<Electron>(PtEtaSCCut(50., 2.5), ElectronID_Spring15_25ns_tight_noIso));

  muo_cleaner.reset(new     MuonCleaner(muo));
  ele_cleaner.reset(new ElectronCleaner(ele));
  //

  const JetId jetID(JetPFID(JetPFID::WP_LOOSE));

  std::vector<std::string> JEC_AK4, JEC_AK8;
  if(isMC){

    JEC_AK4 = JERFiles::Summer15_25ns_L123_AK4PFchs_MC;
    JEC_AK8 = JERFiles::Summer15_25ns_L123_AK8PFchs_MC;
  }
  else {

    JEC_AK4 = JERFiles::Summer15_25ns_L123_AK4PFchs_DATA;
    JEC_AK8 = JERFiles::Summer15_25ns_L123_AK8PFchs_DATA;
  }

  jet_IDcleaner.reset(new JetCleaner(ctx, jetID));
  jet_corrector.reset(new JetCorrector(ctx,JEC_AK4));
  jetlepton_cleaner1.reset(new JetLeptonCleaner(ctx,JEC_AK4));
  jetlepton_cleaner1->set_drmax(.4);
  jetlepton_cleaner2.reset(new JetLeptonCleaner_by_KEYmatching(ctx, JEC_AK4));
  ////
}