Index: CxAODMaker/Root/TauHandler.cxx =================================================================== --- CxAODMaker/Root/TauHandler.cxx (revision 746958) +++ CxAODMaker/Root/TauHandler.cxx (working copy) @@ -255,6 +255,8 @@ setP4( inTau , outTau ); // + + //Props::BDTCut.copy(inTau, outTau); // For testing Props::isAntiTau.copy(inTau, outTau); Props::passTauSelector.copy(inTau, outTau); Props::TruthMatch.copy(inTau, outTau); @@ -353,7 +355,23 @@ return EL::StatusCode::SUCCESS; } +EL::StatusCode TauHandler::addCPVariations(const std::vector &variations, + const bool filterByTools, const bool /*skipWeightVar*/) { + // add the usual variations, filtered by registered tools if requested + EL_CHECK("FatJetHandler::addCPVariations()", ObjectHandlerBase::addCPVariations(variations, filterByTools)); + // see if we want some additional ones + std::vector addVariations; for (TString variation : variations) { + bool allow = false; + allow |= variation.EqualTo("ANTITAU_BDT_CUT"); + if (!allow) continue; + addVariations.push_back(variation); + } + + // add them to the list w/o further filtering + return ObjectHandlerBase::addCPVariations(addVariations, false); +} + EL::StatusCode TauHandler::decorate(xAOD::TauJet * tau) { @@ -405,7 +423,7 @@ // Props::effSFeveto.set(tau, 1); } - if( bdtscore > 0.35 && !ismed && !istight ){ Props::isAntiTau.set(tau, true); } + if( bdtscore > Props::BDTCut.get(tau) && !ismed && !istight ){ Props::isAntiTau.set(tau, true); } else { Props::isAntiTau.set(tau,false); } EL_CHECK("TauHandler::decorate",TruthMatch(tau)); @@ -659,7 +677,7 @@ if( m_runTruthMatchTool && m_eventInfoHandler.get_isMC()) { CP_CHECK("TauHandler::calibrateCopies()",m_tauTruthMatchingTool->initializeEvent(),m_debug); } - // + // tell tool to apply systematic variation CP_CHECK("TauHandler::calibrateCopies()",m_tauSmearingTool->applySystematicVariation(sysSet),m_debug); CP_CHECK("TauHandler::calibrateCopies()",m_tauEfficiencyCorrections->applySystematicVariation(sysSet),m_debug); @@ -669,7 +687,8 @@ CP_CHECK("TauHandler::calibrateCopies()",m_tauTriggerEffToolLoose25->applySystematicVariation(sysSet),m_debug); CP_CHECK("TauHandler::calibrateCopies()",m_tauTriggerEffToolLoose35->applySystematicVariation(sysSet),m_debug); CP_CHECK("TauHandler::calibrateCopies()",m_tauTriggerEffToolLoose80->applySystematicVariation(sysSet),m_debug); - + + for (xAOD::TauJet * tau : *particles) { //calibration @@ -715,6 +734,13 @@ Props::effSFtriggerLoose35.set(tau, effSF_triggerLoose35); Props::effSFtriggerLoose80.set(tau, effSF_triggerLoose80); + // Antitau low BDT cut variation + if (sysSet.name() == "ANTITAU_BDT_CUT") { + Props::BDTCut.set(tau, 0.45); + } else { + Props::BDTCut.set(tau, 0.35); + } + // decorate tau if ( decorate( tau ) != EL::StatusCode::SUCCESS ) return EL::StatusCode::FAILURE; @@ -728,6 +754,12 @@ bool TauHandler::passLooseTau(xAOD::TauJet * tau) { bool passSel = true; passSel &= Props::passTauSelector.get(tau); + + if (m_antitau) { + float bdtscore = tau->discriminant(xAOD::TauJetParameters::BDTJetScore); + passSel &= (bdtscore > Props::BDTCut.get(tau)); + } + if(m_useTausInMET) Props::forMETRebuild.set(tau,passSel);//useTausInMET is set in the config file for MET rebuilding. Then it includes taus that have passed the default tau selection Props::passPreSel.set(tau, passSel); return passSel; Index: CxAODMaker/CxAODMaker/TauHandler.h =================================================================== --- CxAODMaker/CxAODMaker/TauHandler.h (revision 746958) +++ CxAODMaker/CxAODMaker/TauHandler.h (working copy) @@ -66,6 +66,9 @@ TauAnalysisTools::TauEfficiencyCorrectionsTool * m_tauTriggerEffToolLoose80; TauAnalysisTools::TauTruthMatchingTool * m_tauTruthMatchingTool; + virtual EL::StatusCode addCPVariations(const std::vector &variations, + const bool filterByTools = true, const bool skipWeightVar = false) override; + // selection functions bool passLooseTau(xAOD::TauJet * tau); virtual EL::StatusCode decorateOriginParticle(const xAOD::TauJet * tau) override; Index: CxAODTools/CxAODTools/CommonProperties.h =================================================================== --- CxAODTools/CxAODTools/CommonProperties.h (revision 746958) +++ CxAODTools/CxAODTools/CommonProperties.h (working copy) @@ -139,6 +139,7 @@ PROPERTY( Props , int , isBBTTSignalElectron ) PROPERTY( Props , int , isHHLooseElectron ) PROPERTY( Props , int , isAntiTau ) +PROPERTY( Props , float , BDTCut ) PROPERTY( Props , float , TauORJetPt ) PROPERTY( Props , float , TauORJetEta ) PROPERTY( Props , float , TauORJetPhi ) Index: FrameworkExe_HH_bbtautau/data/framework-run.cfg =================================================================== --- FrameworkExe_HH_bbtautau/data/framework-run.cfg (revision 746958) +++ FrameworkExe_HH_bbtautau/data/framework-run.cfg (working copy) @@ -9,7 +9,7 @@ # # ####################################################################### -int maxEvents = -1 +int maxEvents = 1000 # local running - 13 TeV sample @@ -20,12 +20,12 @@ #string sample_in = /afs/cern.ch/work/a/agbet/public/data15_13TeV.00284484.physics_Main.merge.DAOD_HIGG4D2.f644_m1518_p2425 #string sample_in = /afs/cern.ch/work/a/agbet/public/data15_13TeV.00284213.physics_Main.merge.DAOD_HIGG4D2.f643_m1518_p2524 #string sample_in = /afs/cern.ch/user/c/carquin/public/mc15_13TeV.303396.MadGraphPythia8EvtGen_A14NNPDF23LO_RS_G_hh_bbtt_lh_c10_M300.merge.DAOD_HIGG4D2.e4438_s2608_r6869_r6282_p2419 -#string sample_in = /afs/cern.ch/work/a/agbet/public/mc15_13TeV.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.DAOD_HIGG4D2.e3698_s2608_s2183_r7326_r6282_p2524 +string sample_in = /afs/cern.ch/work/a/agbet/public/mc15_13TeV.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.merge.DAOD_HIGG4D2.e3698_s2608_s2183_r7326_r6282_p2524 #string sample_in = /hepstore/gwilliam/RSG/ # grid running - 13 TeV list #string sample_in = FrameworkSub_HH_bbtautau/In/list_sample_grid.data15_13TeV_data2524.HIGG4D2.txt -string sample_in = FrameworkSub_HH_bbtautau/In/list_sample_grid.mc15_13TeV_a_reduced.HIGG4D2.txt +###string sample_in = FrameworkSub_HH_bbtautau/In/list_sample_grid.mc15_13TeV_a_reduced.HIGG4D2.txt #string sample_in = FrameworkSub_HH_bbtautau/In/list_sample_grid.mc15_13TeV_selected.HIGG4D2.txt #string sample_in = FrameworkSub_HH_bbtautau/In/list_sample_grid.mc15_13TeV_b_leftovers.HIGG4D2.txt @@ -76,7 +76,7 @@ bool doTrigMatch = false #DiTauMassCalc bool DiTauMassCalc = true -bool AntiTau = false +bool AntiTau = true bool isIsoCR = false #needed for running TauAnalysisTools if derivations was run with version prior to 00-01-07 - due to truth matching issues bool runTauTruthMatchTool = true @@ -131,9 +131,9 @@ #string METContainer = MET_Reference_AntiKt4LCTopo #available string truthParticleContainer = TruthParticles string truthVertexContainer = TruthVertices -string mcPeriod = mc15a -#vector prwFilemc15b = $ROOTCOREBIN/data/FrameworkSub_HH_bbtautau/GRL/mc15b_prw.root # MC15b -vector prwFile = $ROOTCOREBIN/data/FrameworkSub_HH_bbtautau/GRL/mc15a_defaults.NotRecommended.prw.root +string mcPeriod = mc15b +vector prwFilemc15b = $ROOTCOREBIN/data/FrameworkSub_HH_bbtautau/GRL/mc15b_prw.root # MC15b +#vector prwFile = $ROOTCOREBIN/data/FrameworkSub_HH_bbtautau/GRL/mc15a_defaults.NotRecommended.prw.root #string grl = $ROOTCOREBIN/data/CxAODMaker/data15_13TeV.periodAllYear_DetStatus-v69-pro19-03_DQDefects-00-01-02_PHYS_StandardGRL_All_Good_25ns.xml #25ns string grl = $ROOTCOREBIN/data/FrameworkSub_HH_bbtautau/GRL/data15_13TeV.periodAllYear_DetStatus-v73-pro19-08_DQDefects-00-01-02_PHYS_StandardGRL_All_Good_25ns.xml #latest 04/12/2015 string ilumicalcFile = $ROOTCOREBIN/data/FrameworkSub_HH_bbtautau/GRL/ilumicalc_histograms_None_276262-284484.root @@ -156,10 +156,12 @@ # "Nominal" is always written -vector variations = JET_GroupedNP_1 JET_GroupedNP_2 JET_GroupedNP_3 JET_JER_SINGLE_NP MUONS_SCALE MUONS_ID MUONS_MS EG_RESOLUTION_ALL EG_SCALE_ALL TAUS_TRUEHADTAU_SME_TES_DETECTOR TAUS_TRUEHADTAU_SME_TES_INSITU TAUS_TRUEHADTAU_SME_TES_MODEL -vector weightVariations = MUON_EFF_STAT MUON_EFF_SYS MUON_ISO_STAT MUON_ISO_SYS EL_EFF_ID_TotalCorrUncertainty EL_EFF_Trigger_TotalCorrUncertainty EL_EFF_Reco_TotalCorrUncertainty EL_EFF_Iso_TotalCorrUncertainty MUON_EFF_TrigSystUncertainty MUON_EFF_TrigStatUncertainty MUON_TTVA_STAT MUON_TTVA_SYS TAUS_TRUEHADTAU_EFF_ELEOLR_TOTAL TAUS_TRUEHADTAU_EFF_JETID_TOTAL TAUS_TRUEHADTAU_EFF_RECO_TOTAL TAUS_TRUEHADTAU_EFF_TRIGGER_TOTAL TAUS_TRUEHADTAU_EFF_RECO_HIGHPT TAUS_TRUEHADTAU_EFF_JETID_HIGHPT -vector oneSideVariations = MET_SoftTrk_ResoPara MET_SoftTrk_ResoPerp MET_SoftTrk_ScaleDown MET_SoftTrk_ScaleUp MET_JetTrk_ScaleDown MET_JetTrk_ScaleUp +#vector variations = JET_GroupedNP_1 JET_GroupedNP_2 JET_GroupedNP_3 JET_JER_SINGLE_NP MUONS_SCALE MUONS_ID MUONS_MS EG_RESOLUTION_ALL EG_SCALE_ALL TAUS_TRUEHADTAU_SME_TES_DETECTOR TAUS_TRUEHADTAU_SME_TES_INSITU TAUS_TRUEHADTAU_SME_TES_MODEL +#vector weightVariations = MUON_EFF_STAT MUON_EFF_SYS MUON_ISO_STAT MUON_ISO_SYS EL_EFF_ID_TotalCorrUncertainty EL_EFF_Trigger_TotalCorrUncertainty EL_EFF_Reco_TotalCorrUncertainty EL_EFF_Iso_TotalCorrUncertainty MUON_EFF_TrigSystUncertainty MUON_EFF_TrigStatUncertainty MUON_TTVA_STAT MUON_TTVA_SYS TAUS_TRUEHADTAU_EFF_ELEOLR_TOTAL TAUS_TRUEHADTAU_EFF_JETID_TOTAL TAUS_TRUEHADTAU_EFF_RECO_TOTAL TAUS_TRUEHADTAU_EFF_TRIGGER_TOTAL TAUS_TRUEHADTAU_EFF_RECO_HIGHPT TAUS_TRUEHADTAU_EFF_JETID_HIGHPT +#vector oneSideVariations = MET_SoftTrk_ResoPara MET_SoftTrk_ResoPerp MET_SoftTrk_ScaleDown MET_SoftTrk_ScaleUp MET_JetTrk_ScaleDown MET_JetTrk_ScaleUp +vector oneSideVariations = ANTITAU_BDT_CUT + # store uncalibrated containers (considered as systematic variations) # -> affects object and event selection bool storeOriginal = false Index: FrameworkSub_HH_bbtautau/bootstrap/release =================================================================== --- FrameworkSub_HH_bbtautau/bootstrap/release (revision 746957) +++ FrameworkSub_HH_bbtautau/bootstrap/release (working copy) @@ -1 +1 @@ -2.3.42 \ No newline at end of file +2.3.49 \ No newline at end of file