ATLAS Offline Software
Namespaces | Enumerations | Functions
EventTools.h File Reference

A few functions for doing operations on particles / events. Currently holds code for dR, dPhi, MWT, HT, invariantMass, isSimulation and sorting containers in descending pT order. Note that the xAOD currently doesn't know if it's fast sim or full sim. More...

#include <string>
#include <vector>
#include "xAODMissingET/MissingET.h"
Include dependency graph for EventTools.h:

Go to the source code of this file.

Namespaces

 xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
 
 top
 TopConfig A simple configuration that is NOT a singleton.
 

Enumerations

enum  top::LepPartonOriginFlag {
  top::LepPartonOriginFlag::MissingTruthInfo =0, top::LepPartonOriginFlag::FromAntiTopViaHadronicBosonToHF =-3, top::LepPartonOriginFlag::FromAntiTopViaLeptonicBoson =-2, top::LepPartonOriginFlag::FromAntiTopViaQuarkToHF =-1,
  top::LepPartonOriginFlag::FromTopViaQuarkToHF =1, top::LepPartonOriginFlag::FromTopViaLeptonicBoson =2, top::LepPartonOriginFlag::FromTopViaHadronicBosonToHF =3, top::LepPartonOriginFlag::FromLeptonicBoson =4,
  top::LepPartonOriginFlag::FromHadronicBosonToHF =5, top::LepPartonOriginFlag::FromHFHadronOfUnkownOrigin =6, top::LepPartonOriginFlag::FromHiggsViaLeptonicBosonToHF =7, top::LepPartonOriginFlag::FromHiggsViaHadronicBosonToHF =8,
  top::LepPartonOriginFlag::FromHiggsToHF =9, top::LepPartonOriginFlag::FromHiggs =10, top::LepPartonOriginFlag::FromBSM =1000, top::LepPartonOriginFlag::FromBSMViaLeptonicBosonToHF =1001,
  top::LepPartonOriginFlag::FromBSMViaHadronicBosonToHF =1002, top::LepPartonOriginFlag::FromBSMToHF =1003, top::LepPartonOriginFlag::Unknown =9999
}
 this enum defines a flag used to understand the partonic origin of a lepton (tipically a soft muon), i.e. More...
 
enum  top::LepParticleOriginFlag {
  top::LepParticleOriginFlag::MissingTruthInfo =0, top::LepParticleOriginFlag::FromPhoton =22, top::LepParticleOriginFlag::FromPhotonToTau =2215, top::LepParticleOriginFlag::FromLeptonicZ =23,
  top::LepParticleOriginFlag::FromLeptonicZToTau =2315, top::LepParticleOriginFlag::FromLeptonicW =24, top::LepParticleOriginFlag::FromLeptonicWToTau =2415, top::LepParticleOriginFlag::FromHiggs =25,
  top::LepParticleOriginFlag::FromHiggsToTau =2515, top::LepParticleOriginFlag::FromB =5, top::LepParticleOriginFlag::FromBtoTau =515, top::LepParticleOriginFlag::FromBtoC =54,
  top::LepParticleOriginFlag::FromBtoCtoTau =5415, top::LepParticleOriginFlag::FromC =4, top::LepParticleOriginFlag::FromCtoTau =415, top::LepParticleOriginFlag::FromTau =15,
  top::LepParticleOriginFlag::FromLightHadron =100, top::LepParticleOriginFlag::FromBSM =1000, top::LepParticleOriginFlag::FromBSMToTau =1001, top::LepParticleOriginFlag::Unknown =9999
}
 this enum defines a flag used to understand the particle origin of a lepton (tipically a soft muon), i.e. More...
 

Functions

void top::check (bool thingToCheck, const std::string &usefulFailureMessage)
 Print an error message and terminate if thingToCheck is false. More...
 
double top::deltaR (const xAOD::IParticle &p1, const xAOD::IParticle &p2)
 Calculate the delta-r distance between two particles (e.g. More...
 
double top::deltaPhi (const xAOD::IParticle &p1, const xAOD::IParticle &p2)
 Calculate delta-phi between two particles (e.g. More...
 
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. More...
 
double top::ht (const top::Event &event)
 HT calculation. More...
 
double top::invariantMass (const xAOD::IParticle &p1, const xAOD::IParticle &p2)
 Calculate the invariant mass of two particles. More...
 
bool top::isSimulation (const top::Event &event)
 Is this event MC simulation (True) or data (False)? More...
 
bool top::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 > top::calculateBootstrapWeights (int nreplicas, int eventNumber, int mcChannelNumber)
 Function used to create poisson weights (mean of 1) for bootstrapping. More...
 

Detailed Description

A few functions for doing operations on particles / events. Currently holds code for dR, dPhi, MWT, HT, invariantMass, isSimulation and sorting containers in descending pT order. Note that the xAOD currently doesn't know if it's fast sim or full sim.

Definition in file EventTools.h.