ATLAS Offline Software
|
TopConfig A simple configuration that is NOT a singleton. More...
Namespaces | |
KLFitterJetSelection | |
Some additional enums. | |
PartonHistoryUtils | |
truth | |
Classes | |
class | AbsoluteIsolationDC14 |
These should give you access to xAOD::Iso::topoetcone20, 30, 40 and ptcone20, 30, 40. More... | |
class | AnalysisTrackingHelper |
Helper for collecting data for analysis tracking. More... | |
class | AntiMuon |
Select muons based on some early suggestions. More... | |
class | AntiMuonIsolation |
Apply the cuts relevant for Anti-muon model. More... | |
class | ApproxPTVarCone |
Danilo's approximation of mini-isolation which has been calculated in AnalysisTop and applied as a decoration to the objects. More... | |
class | BoostedTaggingCPTools |
class | BTagScaleFactorCalculator |
class | CalcTbbarPartonHistory |
class | CalcThqPartonHistory |
class | CalcTopPartonHistory |
class | CalcTtbarGammaPartonHistory |
class | CalcTtbarLightPartonHistory |
class | CalcTtbarPartonHistory |
class | CalcTthPartonHistory |
class | CalcTTZPartonHistory |
class | CalcTzqPartonHistory |
class | CalcWlvPartonHistory |
class | CalcWtbPartonHistory |
class | Chi2LJets |
Not complete. More... | |
class | ConfigurationSettings |
Hold the configuration information for the whole run. More... | |
class | EgammaCPTools |
class | EgammaObjectCollectionMaker |
class | ElectronInJetSubtractionAlgorithm |
class | ElectronInJetSubtractionCollectionMaker |
class | ElectronLikelihood |
To select electrons based on the "likelihood" definition. More... | |
class | ElectronScaleFactorCalculator |
class | ElectronSelectionBase |
Base class for implementing an electron selection. More... | |
class | Event |
Very simple class to hold event data after reading from a file. More... | |
class | EventCleaningSelection |
class | EventSaverBase |
A base class so users can write their own event saving stuff. More... | |
class | EventSaverFlatNtuple |
Some code that writes out a 'standard' flat ntuple. More... | |
class | EventSaverxAOD |
Write out the selected events in xAOD format. More... | |
class | EventSaverxAODNext |
Write out the selected events in xAOD format. More... | |
class | EventSelection |
Perform the event selection on a top::Event object. More... | |
class | EventSelectionManager |
Maybe you want to run multiple selections (e+jets, mu+jets) on the same input files at the same time. More... | |
class | EventSelectorBase |
This should apply event-level cuts and perform simple plotting on top::Event objects. More... | |
class | ExamplePlots |
An example of how to quickly make some plots at a certain point in the cutflow. More... | |
class | FakesMMConfigs |
An example of how to quickly make some plots at a certain point in the cutflow. More... | |
class | FitInfo |
Hold the information that is required for the chi^2 minimisation. More... | |
class | FlavorTaggingCPTools |
class | FwdElectronScaleFactorCalculator |
class | FwdElectronSelectionBase |
Base class for implementing an electron selection. More... | |
class | GhostTrackCPTools |
class | GhostTrackSystematicsMaker |
class | GlobalLeptonTriggerCalculator |
class | GlobalTrigDecisionSelector |
class | GlobalTrigMatchSelector |
class | GoodCaloSelector |
Select data events with good Tile and LAr calorimeters. More... | |
class | GRLSelector |
Select events if they are on a GRL specified by the parameter GRLFilename in the configuration file. More... | |
class | HTSelector |
Apply a cut on the event HT. More... | |
class | InitialSelector |
A cut that accepts all events, more useful than you might think. More... | |
class | IsolationBase |
A common base for implementing isolation cuts. More... | |
class | IsolationCPTools |
class | Jet |
A class that performs object cuts on Jets (of any size!). More... | |
class | JetCleaningSelector |
Event selection using the official jet cleaning tool. More... | |
class | JetFlavorPlots |
An example of how to quickly make some plots at a certain point in the cutflow. More... | |
class | JetFtagEffPlots |
An example of how to quickly make some plots at a certain point in the cutflow. More... | |
class | JetGhostTrackSelection |
class | JetGhostTrackSelectionBase |
class | JetMETCPTools |
class | JetNGhostSelector |
class | JetObjectCollectionMaker |
class | JetResponsePlots |
An example of how to quickly make some plots at a certain point in the cutflow. More... | |
class | JetScaleFactorCalculator |
class | JetSelectionBase |
class | KLFitterRun |
class | KLFitterSelector |
class | KLFitterTool |
class | LargeJetTrimmer |
JetCorrection-derived class that trims large-R jets while derivations are not ready. More... | |
class | METMWTSelector |
Allows a cut on the sum of MET and MWT. More... | |
class | METSelector |
Apply a cut on the event MET. More... | |
class | MissingETObjectCollectionMaker |
class | MLLSelector |
Put a cut on the invariant mass of two same flavour leptons. More... | |
class | MLLWindow |
Reject events in the invariant mass (of two charged leptons) window. More... | |
class | Muon |
Select muons based on some early suggestions. More... | |
class | MuonCPTools |
class | MuonObjectCollectionMaker |
class | MuonScaleFactorCalculator |
class | MuonSelectionBase |
class | MWTSelector |
Apply a cut on the transverse W mass (taken from the electron or muon and MET). More... | |
class | NElectronNMuonSelector |
To accept an event based on a check of electrons and muons. More... | |
class | NElectronNMuonTightSelector |
To accept an event based on a check of tight electrons and muons. More... | |
class | NElectronSelector |
A tool that selects events with a certain number of good electrons. More... | |
class | NElectronTightSelector |
A tool that selects events with a certain number of good tight electrons. More... | |
class | NeutrinoWeighting |
Not complete. More... | |
class | NFwdElectronSelector |
A tool that selects events with a certain number of good forward electrons. More... | |
class | NFwdElectronTightSelector |
A tool that selects events with a certain number of good tight electrons. More... | |
class | NJetBtagSelector |
A tool that selects events with a certain number of good jets. More... | |
class | NJetSelector |
A tool that selects events with a certain number of good jets. More... | |
class | NLargeJetSelector |
class | NMuonSelector |
A tool that selects events with a certain number of good muons. More... | |
class | NMuonTightSelector |
A tool that selects events with a certain number of good tight muons. More... | |
class | NoBadMuonSelector |
A tool that selects events containing no bad muons https://twiki.cern.ch/twiki/bin/view/Atlas/MuonSelectionTool#is_BadMuon_Flag_Event_Veto. More... | |
class | NPhotonSelector |
A tool that selects events with a certain number of good photons. More... | |
class | NRCJetSelector |
class | NSoftMuonSelector |
A tool that selects events with a certain number of good muons. More... | |
class | NTauSelector |
A tool that selects events with a certain number of good taus. More... | |
class | NTauTightSelector |
A tool that selects events with a certain number of good taus. More... | |
class | NVarRCJetSelector |
class | NWSolution |
Holds the two solutions from the quadratic equation as TLorentVectors. More... | |
class | ObjectCollectionMaker |
class | ObjectLoaderBase |
People seem to want to be able to configure the objects used in their anaysis for some reason. More... | |
class | ObjectLoaderStandardCuts |
This loads our "standard" object selection used in the top group. More... | |
class | ObjectSelectorBase |
class | OSLeptonSelector |
Keep only events that have at least one opposite sign lepton pair. More... | |
class | OSLeptonTightSelector |
Keep only events that have at least one opposite sign tight lepton pair. More... | |
class | OtherCPTools |
class | OverlapRemovalASG |
The Harmonization Group recommended object overlap removal. More... | |
class | OverlapRemovalBase |
class | OverlapRemovalCPTools |
class | OverlapRemovalIndices |
The "standard" overlap removal for the top group. More... | |
class | ParticleLevelElectronObjectSelector |
class | ParticleLevelEvent |
class | ParticleLevelJetObjectSelector |
class | ParticleLevelLoader |
Loading tool which creates a particle level event object. More... | |
class | ParticleLevelMuonObjectSelector |
class | ParticleLevelPhotonObjectSelector |
class | ParticleLevelSelector |
An event selector that accepts all particle level events and rejects all reco level events. More... | |
class | ParticleLevelTauObjectSelector |
class | PDFScaleFactorCalculator |
For testing PDF reweighting with LHAPDF6. More... | |
class | Photon |
Photon selection for top analyses. More... | |
class | PhotonScaleFactorCalculator |
class | PhotonSelectionBase |
Base class for implementing an Photon selection. More... | |
class | PileupScaleFactorCalculator |
class | PlotManager |
A map that lets you create a bunch of histograms and get hold of them via a string name. More... | |
class | PrimaryVertexSelector |
Select data events with good Primary vertices following: https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/InDetTrackingPerformanceGuidelines#Vertexing. More... | |
class | PrintEventSelector |
Print some information about the event to the screen. More... | |
class | PropertyValueJsonDumper |
Convert values of Property instances to JSON. More... | |
class | PseudoTopReco |
class | PseudoTopRecoRun |
class | PTMaxReco |
Not complete. More... | |
class | RecoLevelSelector |
An event selector that accepts all reco level events and rejects all particle level events. More... | |
class | RelativePTVarCone |
Yay DC14 now has isolation! This should allow you to cut on the isolation (ptvarcone) as a fraction of the pt of the lepton. More... | |
class | RunNumberSelector |
Apply a cut on the (random) run number. More... | |
class | SaveEventSelector |
Save this event in the output file. More... | |
class | ScaleFactorCalculator |
class | ScaleFactorRetriever |
struct | SelectionConfigurationData |
Some configuration data to setup the selections. More... | |
class | SignValueSelector |
Many of the tools need a sign (>=) and a value (2). More... | |
class | SoftMuon |
Select muons based on some early suggestions. More... | |
class | SoftMuonObjectCollectionMaker |
class | SoftMuonSelectionBase |
class | Sonnenschein |
An AnalysisTop friendly wrapper for the Sonnenschein reconstruction that is implemented in SonnenscheinEngine. More... | |
class | SonnenscheinEngine |
Rewrite the top and anti-top decays as a quartic polynomial using top and W mass constraints. More... | |
class | SSLeptonSelector |
Keep only events that have at least one same sign lepton pair. More... | |
class | SSLeptonTightSelector |
Keep only events that have at least one same sign tight lepton pair. More... | |
class | StandardIsolation |
Apply the cuts to etcone and ptcone like we used to in Run-I. More... | |
struct | StringData |
A little helper to hold the data, a little information that's useful to humans and a flag (true) if the settings has been set. More... | |
class | SubjetMaker |
Derived class that constructs subjets while derivations are not ready. More... | |
class | Tau |
To select taus based on BoostedDecisionTree definition. More... | |
class | TauCPTools |
class | TauObjectCollectionMaker |
class | TauScaleFactorCalculator |
class | TauSelectionBase |
class | ToolLoaderBase |
This allows user libraries (and TopEventSelectionTools and TopEventReconstructionTools) to supply event selection-like tools to the main top-xaod executable. More... | |
class | TopConfig |
class | TopEventMaker |
TopEventMaker produce top::Event objects from xAOD::SystematicEvent objects. More... | |
class | TopEventReconstructionToolsLoader |
Load a ttbar event reconstruction code based on the same. More... | |
class | TopEventSelectionToolsLoader |
This is used to load tools in this package in a factory like way. More... | |
class | TopJetSubstructure |
JetCorrection-derived class that applies a jet substructure action on the object. More... | |
class | TopObjectSelection |
Configure the object selection used in the analysis. More... | |
class | TopPersistentSettings |
class | TopToolStore |
class | TopxAODAlg |
class | TrackCPTools |
class | TrackJet |
class | TrackJetCleaningSelector |
class | TrackSelection |
class | TrackSelectionBase |
class | TrackSystematicsMaker |
class | TreeFilter |
class | TreeManager |
A class that hopefully makes making a flat ntuple tree a bit easier since you don't need to worry about what type to make the branches and stuff. More... | |
class | TrigDecisionLooseSelector |
Sometimes you may want to select events that pass a certain trigger, or triggers. More... | |
class | TrigDecisionSelector |
Sometimes you may want to select events that pass a certain trigger, or triggers. More... | |
class | TrigDecisionTightSelector |
Sometimes you may want to select events that pass a certain trigger, or triggers. More... | |
class | TriggerCPTools |
class | TrigMatchSelector |
Match offline object to trigger. More... | |
class | TruthSelectionBase |
class | TruthSelectionTtres |
Functions | |
void | xAODInit (bool failOnUnchecked=true) |
A little wrapper for the xAOD tools. More... | |
std::string | getDerivationStream (TFile *inputFile) |
Function to determine the derivation type using string manipulation. More... | |
void | parseCutBookkeepers (xAOD::TEvent &event, const std::size_t size, std::vector< std::string > &names, std::vector< float > &sumW) |
Search bookkeepers for ones matching AllExecutedEvents, and which originate from AOD before skimming. More... | |
ULong64_t | getRawEventsBookkeeper (const xAOD::CutBookkeeperContainer *cutBookKeepers) |
Get raw number of events before skimming from "AllExecutedEvents" bookkeeper. More... | |
void | renameCutBookkeepers (std::vector< std::string > &bookkepeer_names, const std::vector< std::string > &pmg_weight_names) |
Rename CutBookkeeper names according to MC generator weight names reported by PMGTruthWeightTool. More... | |
std::vector< std::string > | loadCuts (const std::string &filename) |
Load the file and make a vector of the cuts to pass on to the selection tool. More... | |
size_t | checkFiles (const std::vector< std::string > &filenames) |
Open each file in the vector and get the number of events in it. More... | |
std::vector< std::string > | fileList (const std::string &filename) |
Given a filename for a text file, parse it and extract a list of root files. More... | |
void | loadLibraries (const std::string &libraryNames) |
So that we can load external libraries with (1) extra event selection tools in, (2) user defined object selection and (3) user defined output file formats. More... | |
top::TopObjectSelection * | loadObjectSelection (const std::shared_ptr< top::TopConfig > &config) |
Users may want to define (and load!) their own object selection. More... | |
top::EventSaverBase * | loadEventSaver (const std::shared_ptr< top::TopConfig > &config) |
Users may also want to write out custom ntuples / xAODs. More... | |
bool | readMetaData (TFile *inputFile, const std::shared_ptr< top::TopConfig > &config) |
This function will be used to load the metadata object and pull information from it. More... | |
void | readMetaData (const xAOD::FileMetaData *FMD, const std::shared_ptr< top::TopConfig > &config) |
Retrieve metadata from xAOD::FileMetaData object, to be stored in the TopConfig instance. More... | |
std::ostream & | operator<< (std::ostream &os, const SelectionConfigurationData &data) |
std::ostream & | operator<< (std::ostream &os, const ConfigurationSettings &settings) |
std::string | json_dump (std::string const &value) |
Escape string for use in JSON format. More... | |
std::ostream & | operator<< (std::ostream &os, const TopConfig &config) |
template<typename T > | |
void | remove_duplicates (std::vector< T > &input) |
template<typename T , typename std::enable_if< std::is_same< typename std::remove_cv< T >::type, bool >::value >::type * = nullptr> | |
std::string | json_dump (T value) |
Convert boolean to JSON format. More... | |
template<typename Container > | |
void | tokenize (const std::string &input, Container &output, const std::string &delimiters=" ", bool trim_empty=false) |
Tokenize an input string using a set of delimiters. More... | |
template<typename Container > | |
void | tokenize_set (const std::string &input, Container &output, const std::string &delimiters=" ", bool trim_empty=false) |
Same as tokenize() method, but accepts std::set-like containers, with emplace method. More... | |
std::string | bTagNamedSystCheck (std::shared_ptr< top::TopConfig > config, const std::string &systCollection, const std::string &tagWP, const bool isTrackJet, const bool verbose=false) |
std::string | betterBtagNamedSyst (const std::string &name) |
void | check (bool thingToCheck, const std::string &usefulFailureMessage) |
Print an error message and terminate if thingToCheck is false. More... | |
double | deltaR (const xAOD::IParticle &p1, const xAOD::IParticle &p2) |
Calculate the delta-r distance between two particles (e.g. More... | |
double | deltaPhi (const xAOD::IParticle &p1, const xAOD::IParticle &p2) |
Calculate delta-phi between two particles (e.g. More... | |
double | mwt (const xAOD::IParticle &lepton, const xAOD::MissingET &met) |
Calculate the transverse mass of the W from the charged lepton and the missing ET. More... | |
double | ht (const top::Event &event) |
HT calculation. More... | |
double | invariantMass (const xAOD::IParticle &p1, const xAOD::IParticle &p2) |
Calculate the invariant mass of two particles. More... | |
bool | isSimulation (const top::Event &event) |
Is this event MC simulation (True) or data (False)? More... | |
bool | descendingPtSorter (const xAOD::IParticle *p0, const xAOD::IParticle *p1) |
Used when sorting the e, mu, jet, tau containers after CP corrections. More... | |
std::vector< int > | calculateBootstrapWeights (int nreplicas, int eventNumber, int mcChannelNumber) |
Function used to create poisson weights (mean of 1) for bootstrapping. More... | |
std::ostream & | operator<< (std::ostream &os, const top::ElectronSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::FwdElectronSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::JetGhostTrackSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::JetSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::MuonSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::OverlapRemovalBase &overlapremoval) |
std::ostream & | operator<< (std::ostream &os, const top::PhotonSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::SoftMuonSelectionBase &selection) |
std::ostream & | operator<< (std::ostream &os, const top::TrackSelectionBase &selection) |
Variables | |
const std::map< topSFSyst, TString > | tauSF_name |
const std::map< topSFSyst, TString > | tauSF_alias |
TopConfig A simple configuration that is NOT a singleton.
TauObjectCollectionMaker Makes all systematic variations of taus.
SoftMuonObjectCollectionMaker Makes all systematic variations of soft muons. Momentum Corrections are applied using the calibration tool. Efficiency Corrections are applied using the efficiency tool.
ObjectCollectionMaker Makes all systematic variations of all objects.
MuonObjectCollectionMaker Makes all systematic variations of muons. Momentum Corrections are applied using the calibration tool. Efficiency Corrections are applied using the efficiency tool.
JetObjectCollectionMaker Makes all systematic variations of jets.
ElectronInJetSubtractionCollectionMaker Makes all needed collections for the Electron in jet subtraction Used by boosted analysis.
EgammaObjectCollectionMaker Makes all systematic variations of photons and electrons.
CalcWtbPartonHistory Class derived from CalcTopPartonHistory, used to store Wt SingleTop variables.
CalcWlvPartonHistory Class derived from CalcTopPartonHistory, used to store ttbar variables.
CalcTTZPartonHistory Class derived from CalcTopPartonHistory, used to store ttZ variables.
CalcTtbarPartonHistory Class derived from CalcTopPartonHistory, used to store ttbar variables.
CalcTtbarLightPartonHistory Class derived from CalcTopPartonHistory, used to store ttbar variables.
CalcTtbarGammaPartonHistory Class derived from CalcTopPartonHistory, used to store ttbargamma variables.
CalcTopPartonHistory Determine the history of the top partons.
CalcTbbarPartonHistory Class derived from CalcTopPartonHistory, used to store tbbar variables.
An example class implementing a truth selection for tt resonances.
Base class for implementing a truth selection.
OverlapRemovalIndices Do overlap removal based on selected indices.
A namespace for the top group, to avoid using the same name as somewhere else in the code.
TopToolStore Configure all asg::AsgTools and place into asg::ToolStore This will allow other tools and algorithms to retrieve the tools This means that we can share tools and only configure them once.
ScaleFactorCalculator Scale factors for all objects.
PhotonScaleFactorCalculator Calculate all photon scale factors and decorate.
MuonScaleFactorCalculator Calculate all muon scale factors and decorate.
JetScaleFactorCalculator Calculate all jet scale factors and decorate.
FwdElectronScaleFactorCalculator Calculate all forward electron scale factors and decorate.
ElectronScaleFactorCalculator Calculate all electron scale factors and decorate.
BTagScaleFactorCalculator Calculate all jet scale factors and decorate.
TopPersistentSettings We presist this information into the mini-xAOD It allows us to reconstruct the state of the top-xaod code.
$Revision:
If you want to build a new truth selection, you should inherit from this.
Will require a set of electron and jet collections for: Nominal All Electron systematics All Jet systematics
This class does not do the actual subtraction algorithm This class prepares the collections and calls the algorithm
This is actually quite a complex tool The steps are as follows (1) Calibrate data/MC jets and save this collection to TStore (2) Loop over the various NP JES scenarios, using the output of (1) as an input (3) Loop over the various NP JER scenarios, using the output of (1) as an input (2.a , 3.a) Re-calculate the JVT for each jet
|
strong |
this enum defines a flag used to understand the particle origin of a lepton (tipically a soft muon), i.e.
if it is from a boson decay, from a B-hadron, from a B->D->mu decay, etc...
Enumerator | |
---|---|
MissingTruthInfo | no associated truth muon tipically this happens for muon from light-hadrons |
FromPhoton | |
FromPhotonToTau | gamma*->muonmuon |
FromLeptonicZ | gamma*->tautau and tau->muon from Z->tau->lep (note: this will not work for Sherpa) |
FromLeptonicZToTau | from Z->tau->lep (note: this will not work for Sherpa) |
FromLeptonicW | from W with leptonic decay (note: this will not work for Sherpa) |
FromLeptonicWToTau | from W->tau->lep (note: this will not work for Sherpa) |
FromHiggs | |
FromHiggsToTau | Higgs->muon. |
FromB | Higgs->tau->mu. from direct B-hadron decay |
FromBtoTau | from B-hadron to tau to mu decay |
FromBtoC | from B-hadron to C-hadron to muon decay |
FromBtoCtoTau | from B-hadron to C-hadron to tau to muon decay |
FromC | from direct C-hadron (with no B-hadron parent) decay |
FromCtoTau | from C-hadron (with no B-hadron parent) to tau to mu decay |
FromTau | from Tau leptonic (not coming from W or HF-hadron, so not sure this can really happen) |
FromLightHadron | often these muons are Unknown, but in some cases we have the truth record and we can verify they are from light-hadrons |
FromBSM | |
FromBSMToTau | BSMparticle->muon. |
Unknown | BSMparticle->tau->muon. |
Definition at line 57 of file EventTools.h.
|
strong |
this enum defines a flag used to understand the partonic origin of a lepton (tipically a soft muon), i.e.
if it is produced by the direct decay of a boson, or, in the case it is from a HF hadron decay, what is the boson/parton that originated the HF hadron. This flag will not work for Sherpa samples given the structure of Sherpa's truth record. note that in case of light-hadrons->muons the muon will always be considered as from "unknown", because often we cannot reconstruct the history when light hadrons are involved...
Definition at line 33 of file EventTools.h.
enum top::LeptonType |
Enumerator | |
---|---|
kElectron | |
kMuon |
Definition at line 36 of file PseudoTopReco.h.
enum top::topSFComp |
Enumerator | |
---|---|
ALL | |
TRIGGER | |
RECO | |
ID | |
ISOLATION | |
CHARGEID | |
CHARGEMISID | |
TTVA |
Definition at line 212 of file ScaleFactorRetriever.h.
enum top::topSFSyst |
– Top SF enmu, as CP::SystematicSet won't do the job –///
Definition at line 28 of file ScaleFactorRetriever.h.
std::string top::betterBtagNamedSyst | ( | const std::string & | name | ) |
Definition at line 45 of file TopCorrectionsTools.cxx.
std::string top::bTagNamedSystCheck | ( | std::shared_ptr< top::TopConfig > | config, |
const std::string & | systCollection, | ||
const std::string & | tagWP, | ||
const bool | isTrackJet, | ||
const bool | verbose = false |
||
) |
Definition at line 13 of file TopCorrectionsTools.cxx.
std::vector< int > top::calculateBootstrapWeights | ( | int | nreplicas, |
int | eventNumber, | ||
int | mcChannelNumber | ||
) |
Function used to create poisson weights (mean of 1) for bootstrapping.
nreplicas | The number of replicas to fill (corresponds to size of output vector) |
eventNumber | The event number used to seed TRandom3 |
mcChannelNumber | The DSID of MC event used to seed TRandom3 |
Definition at line 60 of file EventTools.cxx.
void top::check | ( | bool | thingToCheck, |
const std::string & | usefulFailureMessage | ||
) |
Print an error message and terminate if thingToCheck is false.
Lots of the xAOD functions need checking to see if they work or not. I guess we take the approach that if it didn't work, we should not really try to recover but just print a message and quit as soon as we can. So, this will either return nothing or quit your program via exception.
thingToCheck | The thing to check. If it's false then print the error message via std::runtime_error exception. |
Definition at line 15 of file EventTools.cxx.
size_t top::checkFiles | ( | const std::vector< std::string > & | filenames | ) |
Open each file in the vector and get the number of events in it.
Useful to make sure all the files are readable before jumping into an event loop. Also returns the total yield for all files. If the file can't be opened or the CollectionTree is missing then it will print an error message and exit.
filenames | A vector of filenames to check. |
Definition at line 206 of file Tools.cxx.
double top::deltaPhi | ( | const xAOD::IParticle & | p1, |
const xAOD::IParticle & | p2 | ||
) |
double top::deltaR | ( | const xAOD::IParticle & | p1, |
const xAOD::IParticle & | p2 | ||
) |
Calculate the delta-r distance between two particles (e.g.
You could do this directly with the xAOD interface, but like invariant mass, I think it's nicer like this.
p1 | The first particle of the two. |
p2 | The second particle of the two. |
Definition at line 21 of file EventTools.cxx.
bool top::descendingPtSorter | ( | const xAOD::IParticle * | p0, |
const xAOD::IParticle * | p1 | ||
) |
Used when sorting the e, mu, jet, tau containers after CP corrections.
In case they have changed order. Containers have pointers in, so this should take pointers as arguments.
p1 | The first particle of the two. |
p2 | The second particle of the two. |
Definition at line 56 of file EventTools.cxx.
std::vector< std::string > top::fileList | ( | const std::string & | filename | ) |
Given a filename for a text file, parse it and extract a list of root files.
This should open the text file and split it into a vector of strings. It should handle filenames that are separated by a newline or a comma.
filename | The text file that we want to parse. |
Definition at line 239 of file Tools.cxx.
std::string top::getDerivationStream | ( | TFile * | inputFile | ) |
ULong64_t top::getRawEventsBookkeeper | ( | const xAOD::CutBookkeeperContainer * | cutBookKeepers | ) |
double top::ht | ( | const top::Event & | event | ) |
HT calculation.
Uses the pT of the electrons, muons and jets. If they are present. It loops through those three containers and adds up the pT.
Definition at line 33 of file EventTools.cxx.
double top::invariantMass | ( | const xAOD::IParticle & | p1, |
const xAOD::IParticle & | p2 | ||
) |
Calculate the invariant mass of two particles.
This can be done using the xAOD objects directly, but I think this type of interface is prettier.
p1 | The first particle of the two. |
p2 | The second particle of the two. |
Definition at line 48 of file EventTools.cxx.
bool top::isSimulation | ( | const top::Event & | event | ) |
Is this event MC simulation (True) or data (False)?
Definition at line 52 of file EventTools.cxx.
std::string top::json_dump | ( | std::string const & | value | ) |
std::string top::json_dump | ( | T | value | ) |
Convert boolean to JSON format.
Convert number to JSON format.
Definition at line 27 of file JsonUtils.h.
std::vector< std::string > top::loadCuts | ( | const std::string & | filename | ) |
Load the file and make a vector of the cuts to pass on to the selection tool.
filename | The text file to load and read the cut information from. The idea is that the user will supply this at the command line. |
Definition at line 177 of file Tools.cxx.
top::EventSaverBase * top::loadEventSaver | ( | const std::shared_ptr< top::TopConfig > & | config | ) |
Users may also want to write out custom ntuples / xAODs.
This too can be loaded from the name of the class supplied in the configuration file.
outputFormat | Name of the class to load for the output format. For example top::EventSaverxAOD, or top::EventSaverFlatNtuple. Note that user defined ones are also allowed. Due to popular demand. |
Definition at line 314 of file Tools.cxx.
void top::loadLibraries | ( | const std::string & | libraryNames | ) |
So that we can load external libraries with (1) extra event selection tools in, (2) user defined object selection and (3) user defined output file formats.
For all those things the user supplies the class name of the class to load. But we also need the library that they're in so that root can load it.
libraryNames | The name of the library, for exmample libTopEventSelectionTools |
Definition at line 275 of file Tools.cxx.
top::TopObjectSelection * top::loadObjectSelection | ( | const std::shared_ptr< top::TopConfig > & | config | ) |
Users may want to define (and load!) their own object selection.
Once the library is loaded we also need to know the class that they want to use. Root then loads that class and attempts to convert it to a top::TopObjectSelection pointer. Only if that works can the program continue. If it doesn't work, the program should end (not much point running if you didn't manage to configure the objects to run on, is there?)
config | The object selection setup needs access to the config object, which should know the name of the object selection to use |
Definition at line 291 of file Tools.cxx.
double top::mwt | ( | const xAOD::IParticle & | lepton, |
const xAOD::MissingET & | met | ||
) |
Calculate the transverse mass of the W from the charged lepton and the missing ET.
The maths looks something a bit like this:
sqrt(2. * lepton.pt() * met.met() * (1. - cos(lepton.phi() - met.phi())))
Definition at line 29 of file EventTools.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const ConfigurationSettings & | settings | ||
) |
Definition at line 1049 of file ConfigurationSettings.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const SelectionConfigurationData & | data | ||
) |
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::ElectronSelectionBase & | selection | ||
) |
Definition at line 16 of file ElectronSelectionBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::FwdElectronSelectionBase & | selection | ||
) |
Definition at line 16 of file FwdElectronSelectionBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::JetGhostTrackSelectionBase & | selection | ||
) |
Definition at line 14 of file JetGhostTrackSelectionBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::JetSelectionBase & | selection | ||
) |
Definition at line 14 of file JetSelectionBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::MuonSelectionBase & | selection | ||
) |
Definition at line 14 of file MuonSelectionBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::OverlapRemovalBase & | overlapremoval | ||
) |
Definition at line 14 of file OverlapRemovalBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::PhotonSelectionBase & | selection | ||
) |
Definition at line 16 of file PhotonSelectionBase.cxx.
std::ostream & top::operator<< | ( | std::ostream & | os, |
const top::SoftMuonSelectionBase & | selection | ||
) |
Definition at line 14 of file SoftMuonSelectionBase.cxx.
std::ostream& top::operator<< | ( | std::ostream & | os, |
const top::TrackSelectionBase & | selection | ||
) |
Definition at line 14 of file TrackSelectionBase.cxx.
Definition at line 3942 of file TopConfig.cxx.
void top::parseCutBookkeepers | ( | xAOD::TEvent & | event, |
const std::size_t | size, | ||
std::vector< std::string > & | names, | ||
std::vector< float > & | sumW | ||
) |
Search bookkeepers for ones matching AllExecutedEvents, and which originate from AOD before skimming.
TEvent | to retrieve the cutbookkeepers |
number | of the generator weights |
names | Vector of names of the selected bookkeepers |
sumW | Vector of sum of weights of the selected bookkeepers |
Definition at line 89 of file Tools.cxx.
void top::readMetaData | ( | const xAOD::FileMetaData * | FMD, |
const std::shared_ptr< top::TopConfig > & | config | ||
) |
Retrieve metadata from xAOD::FileMetaData object, to be stored in the TopConfig instance.
FMD | pointer to xAOD::FileMetaData (for example during initialize via inputMetaStore()) |
config | Pass in the config, before it is fixed, so that we can add info |
Same as mc_channel_number [float]
Fast or Full sim [string]
Print out this information as a cross-check
Definition at line 359 of file Tools.cxx.
bool top::readMetaData | ( | TFile * | inputFile, |
const std::shared_ptr< top::TopConfig > & | config | ||
) |
This function will be used to load the metadata object and pull information from it.
We will then need to look at storing the info in TopConfig
inputFile | Include a single TFile which we load and read |
config | Pass in the config, before it is fixed, so that we can add info |
Definition at line 331 of file Tools.cxx.
void top::remove_duplicates | ( | std::vector< T > & | input | ) |
void top::renameCutBookkeepers | ( | std::vector< std::string > & | bookkepeer_names, |
const std::vector< std::string > & | pmg_weight_names | ||
) |
Rename CutBookkeeper names according to MC generator weight names reported by PMGTruthWeightTool.
bookkeeper_names | Vector of original AllExecutedEvents* bookkeeper names |
pmg_weight_names | Vector with MC generator weight names from PMGTruthWeightTool |
void top::tokenize | ( | const std::string & | input, |
Container & | output, | ||
const std::string & | delimiters = " " , |
||
bool | trim_empty = false |
||
) |
Tokenize an input string using a set of delimiters.
Container | The type of the output container. |
input | The input string which is to be tokenized. |
output | The container onto which the tokens are to be appended. Must support an emplace_back function which takes as pointer to const char (the string data) and a std::size_t (the string length). |
For maximum performance use a non-allocating string in the out container, e.g. use Container = std::vector<std::string_view>
in c++14.
Definition at line 24 of file Tokenize.h.
void top::tokenize_set | ( | const std::string & | input, |
Container & | output, | ||
const std::string & | delimiters = " " , |
||
bool | trim_empty = false |
||
) |
Same as tokenize() method, but accepts std::set-like containers, with emplace method.
Definition at line 53 of file Tokenize.h.
void top::xAODInit | ( | bool | failOnUnchecked = true | ) |
Definition at line 179 of file ScaleFactorRetriever.h.
Definition at line 131 of file ScaleFactorRetriever.h.