#include <TopObjectSel.h>
Inheritance diagram for TopObjectSel:
Public Member Functions | |
TopObjectSel (SCycleBase *parent, const std::string datapileupfile="PileupMu/ilumicalc_histograms_None_178044-183347.root") | |
Constructor specifying the parent of the tool and the name of the data pileup file (assumed it is prefixed by topUtils/data/). | |
virtual | ~TopObjectSel () |
Destructor. | |
bool | doMuonElectronJetObjectSelection (MEventTool *event) |
Run standard top object selection - returns false if an event level veto is failed (currently muon-electron trk overlap). | |
void | SetMuonSmear (int flag) |
Choose muon smearing mode. | |
void | SetMuonScale (const int flag) |
Choose muon re-scaling mode. | |
void | UseJESUncertainties (const int flag) |
Run with JES uncertainties. | |
void | SetSumJets (unsigned int flag) |
Create a jet container for sumjets into the Fitter. | |
void | UseJERSmearing (const int flag) |
Run with extra JER smaearing. | |
bool | hasElectronMuonTrkOverlap (const std::vector< const manchester::MMuon * > *muons, const std::vector< const manchester::MElectron * > *electrons) |
Function to check if any muons have an ID trk that overlaps with one of the electrons. | |
bool | hasElectronMuonTrkOverlap (const manchester::MMuon &muon, const manchester::MElectron &em) |
Function to check if muon & electron ID track are the same. | |
void | sortSelectedObjectsByPt (const bool flag) |
Toggle sorting of selected objects by pT. | |
void | usingData (bool flag) |
Tell the tool if we are running on data or MC - needed for EM OTX maps. | |
bool | hasBadJet (const MEventTool *event) const |
Check for bad jets. | |
bool | hasBadJet (const std::vector< const manchester::MJet * > *jets) const |
Check for bad jets. | |
void | setElectronEnergyCorrection (const int &sw) |
set the mode for the data electron energy correction | |
void | setElectronEnergySmearing (const int &sw) |
set the mode for the MC energy smearing | |
double | getPileUpWeight (double mu) |
const Analysis::CalibrationDataInterfaceROOT * | GetSV0BTagSFTool () const |
provide access to the SV0 B-tagging SF tool | |
void | SetSV0RandomMode (const int sw) |
set the mode for SV0 random bjet dropping | |
void | dropJetsUsingEffEstimator (MEventTool *event) |
Drop jets according to the prescription in JetEfficiencyEstimator. | |
void | SetJetEffDroppingMode (const int sw) |
set mode for jet efficiency dropping | |
void | SetFracDataLArProb (const double frac) |
set the fraction of the data affected by the LAr problem | |
bool | SimulatingLArProblems () const |
ask the tool if we are simulating LAr problems - must call doMuonElectronJetObjectSelection first | |
const egammaOQ * | EgammaOQTool () const |
give users access to egamma OQ tool | |
bool | hasJetinLArHole (MEventTool *event) |
function to check for jets in the LAr Hole | |
Static Public Member Functions | |
static bool | isLooseBadJet (const manchester::MJet &jet) |
function to apply the loose bad jet requirements | |
Protected Member Functions | |
void | varyJES (MEventTool *event) |
vary jets by JES | |
void | doJER (MEventTool *event) |
apply JER to all jets | |
void | doJER (manchester::MJet &jet) |
apply JER to single jet | |
void | doMuonSmear (std::vector< manchester::MMuon > *muons, MEventTool *event) |
void | correctElectrons (MEventTool *event) |
correct electron energies | |
Protected Attributes | |
double | m_muonPtCut |
double | m_muonPt03ConeCut |
double | m_muonEt03ConeCut |
double | m_jetPtCut |
double | m_jetLowPtCut |
double | m_emPtCut |
double | m_emEtCone20C1 |
double | m_emEtCone20C2 |
double | m_jvfCut |
double | m_sv0Cut |
SmearingClass * | m_mcp_muonsmear |
MCP Rel16 muon smearing. | |
std::string | m_muonsmear_option |
smearing option | |
bool | m_apply_muonsmear |
apply or not | |
int | m_muonscale_mode |
scaling option | |
Root::TPileupReweighting * | m_tPileUp |
bool | m_realData |
Flag to determine if we are using real data or MC (needed for EM OTX maps). | |
MultijetJESUncertaintyProvider * | m_JES_uncertainty_tool |
JES uncertainty tool. | |
int | m_JES_uncertainty_flag |
Flag for JES uncertainty mode. | |
bool | m_create_sumjets |
To turn on or off creating jet container at lower pt. | |
bool | smeared |
EnergyRescaler * | m_egamma_ERescaler |
int | m_ERescaler_mode |
flag for electron energy rescaling | |
int | m_EMSmear_mode |
flag for electron energy smearing | |
bool | m_sortByPt |
Flag to decide whether to sort the selected objects by pT. | |
Analysis::CalibrationDataInterfaceROOT * | m_sv0_calibTool |
b-tagging calibration tool for SV0 | |
BTagRandomiser * | m_sv0_randtool |
btag randomiser for SV0 tags | |
int | m_sv0_rand_flag |
flag for bjet randomising | |
JERProvider * | m_JER_tool |
JER provider. | |
int | m_JER_flag |
flag for JER smearing | |
TRandom3 | m_rand_JER |
random object for JER smearing | |
JetEfficiencyEstimator * | m_jeteff_tool |
Jet efficiency provider. | |
int | m_jeteff_flag |
flag for dropping jets using the efficiency estimator - 0=off, 1=on | |
egammaOQ * | m_egammaOQ |
egamma object quality tool | |
TRandom3 | m_rand_lar |
random object for LAr issues | |
double | m_frac_lar_problems |
fraction of MC we want to simulate LAr issues in | |
bool | m_simulate_lar_problems |
store whether this event is bad LAr or not (users may need it) | |
MET_Cleaning_Utils * | m_met_clean_utils |
MET cleaning tools. |
TopObjectSel::TopObjectSel | ( | SCycleBase * | parent, | |
const std::string | datapileupfile = "PileupMu/ilumicalc_histograms_None_178044-183347.root" | |||
) |
Constructor specifying the parent of the tool and the name of the data pileup file (assumed it is prefixed by topUtils/data/).
Constructor - for now the values of cuts & flags are hard coded.
TopObjectSel::~TopObjectSel | ( | ) | [virtual] |
Destructor.
Destructor deletes any pointers we own
void TopObjectSel::correctElectrons | ( | MEventTool * | event | ) | [protected] |
correct electron energies
Apply the electron energy corrections & smearing if requested
void TopObjectSel::doJER | ( | manchester::MJet & | jet | ) | [protected] |
apply JER to single jet
Smear input jet using JER tool.
void TopObjectSel::doJER | ( | MEventTool * | event | ) | [protected] |
apply JER to all jets
Smear all jets using the JER tool
bool TopObjectSel::doMuonElectronJetObjectSelection | ( | MEventTool * | event | ) |
Run standard top object selection - returns false if an event level veto is failed (currently muon-electron trk overlap).
Can apply smearings / shiftings to energy scale first (see various flags). The function stores the selected electrons & jets into the MEventTool. They can be retrieved like:
const vector<const MElectron*>* sel_em = m_event->getUserElectrons(10);
const vector<const MMuon*>* sel_muons = m_event->getUserMuons(10);
const vector<const MJet*>* sel_jets = m_event->getUserJets(10);
const vector<const MJet*>* sel_bjets = m_event->getUserJets(11);
The function returns false if any event level veto is failed.
The event level vetos implemented are:
Electron - muon track overlap.
event | the MEventTool object that contains the ntuple objects |
OQ for LAr issue
Reimplemented in WZObjectSel.
bool TopObjectSel::hasBadJet | ( | const std::vector< const manchester::MJet * > * | jets | ) | const |
Check for bad jets.
See if any of the jets are bad (using LooseBad)
jets | - Jets to check |
bool TopObjectSel::hasBadJet | ( | const MEventTool * | event | ) | const |
Check for bad jets.
See if any of the jets are bad (using LooseBad)
event | - Event tool from where jets are extracted (event->getJets()) |
bool TopObjectSel::hasElectronMuonTrkOverlap | ( | const manchester::MMuon & | muon, | |
const manchester::MElectron & | em | |||
) |
Function to check if muon & electron ID track are the same.
Function checks the muon ID track overlaps with the electron ID track. returns true if an overlap is found
bool TopObjectSel::hasElectronMuonTrkOverlap | ( | const std::vector< const manchester::MMuon * > * | muons, | |
const std::vector< const manchester::MElectron * > * | electrons | |||
) |
Function to check if any muons have an ID trk that overlaps with one of the electrons.
Function checks if any of the muons have an ID track that overlaps with any of the ID tracks from the electrons. returns true if an overlap is found
bool TopObjectSel::hasJetinLArHole | ( | MEventTool * | event | ) |
function to check for jets in the LAr Hole
This function implements the Top MET recommendation for looking for bad jets in the LAr hole. Returns true if there is a bad jet (should reject event) Need to fix BCH variables.
void TopObjectSel::setElectronEnergyCorrection | ( | const int & | sw | ) |
set the mode for the data electron energy correction
Set the mode for the data electron energy correction.
Possible flag values:
-1 = no energy correction.
0 = default energy correction.
+1 = -1sigma energy correction.
+2 = +1sigma energy correction.
void TopObjectSel::setElectronEnergySmearing | ( | const int & | sw | ) |
set the mode for the MC energy smearing
Set the mode the the MC electron energy smearing.
Possible flag values:
-1 = no smearing.
0 = default smearing.
+1 = -1sigma smearing.
+2 = +1sigma smearing.
void TopObjectSel::SetFracDataLArProb | ( | const double | frac | ) |
set the fraction of the data affected by the LAr problem
Set the fraction of the data affected by the LAr issues.
We use this to determine how often to apply, e.g. the extra egamma OQ cuts.
void TopObjectSel::SetJetEffDroppingMode | ( | const int | sw | ) |
set mode for jet efficiency dropping
Set mode for jet dropping according to efficiency uncertainty:
Possible flag values:
0 - off
1 - on
void TopObjectSel::SetMuonScale | ( | const int | flag | ) |
Choose muon re-scaling mode.
Control muon momentum scaling.
Possible flag values:
0 = default
+1 = +1sigma
-1 = -1sigma
+2 = no-scaling
void TopObjectSel::SetMuonSmear | ( | int | flag | ) |
Choose muon smearing mode.
Control muon momentum smearing.
Possible flag values:
-1 = no smearing
0 = default
1 = +1sigma MS
2 = -1sigma MS
3 = +1sigma ID
4 = -1sigma ID
void TopObjectSel::SetSumJets | ( | unsigned int | flag | ) |
Create a jet container for sumjets into the Fitter.
Control creation of addition userjets with lower pt cut.
Possible flag values:
0 = Do not create
1 = Create
void TopObjectSel::SetSV0RandomMode | ( | const int | sw | ) |
set the mode for SV0 random bjet dropping
Set mode for the B-tag scale factor tool (which randomly drops b-tags according to the SF).
Possible flag values:
-1 = Do not use B-tag scale factor tool.
0 = Use default data-MC scale factor.
+1 = Use +1sigma data-MC scale factor.
+2 = Use -1sigma data-MC scale factor.
void TopObjectSel::UseJERSmearing | ( | const int | flag | ) |
Run with extra JER smaearing.
Use extra JER smearing.
Possible flag values:
0 - smearing off
1 - smearing on
void TopObjectSel::UseJESUncertainties | ( | const int | flag | ) |
Run with JES uncertainties.
Run with JES uncertainties Possible flag values:
0 = do not use uncertainties
1 = +1 sigma
-1 = -1 sigma
void TopObjectSel::usingData | ( | bool | flag | ) |
Tell the tool if we are running on data or MC - needed for EM OTX maps.
Tell the tool if we are running on data or MC - needed for EM OTX maps
flag | - set true for data, false for MC. |
void TopObjectSel::varyJES | ( | MEventTool * | event | ) | [protected] |
vary jets by JES
This function varies the energy of the jets by the uncertainty on the JES according to the value of m_JES_uncertainty_flag.
loop over all other jets to see if we have a close-by-jet