7#ifndef SUSYTOOLS_SUSYOBJDEF_XAODTOOL_H
8#define SUSYTOOLS_SUSYOBJDEF_XAODTOOL_H
97 static const unsigned int Btag = 1001;
98 static const unsigned int JVT = 1002;
100 static const unsigned int FJVT = 1004;
106 static const unsigned int ID = 1103;
113 static const unsigned int ID = 1203;
126 static const unsigned int ID = 1403;
152 case Jet:
return "Jet";
153 case Egamma:
return "Egamma";
155 case Photon:
return "Photon";
156 case Muon:
return "Muon";
157 case Tau:
return "Tau";
158 case BTag:
return "BTag";
169 static inline int getMCShowerType(
const std::string& sample_name,
const std::string& tagger=
"") {
172 const static std::vector<TString> gen_mc_generator_keys = {
"PYTHIA8EVTGEN517",
"POWHEGHERWIG7",
"PHH7EG",
"SHERPA_2210",
"SHERPA_2211",
"SHERPA_2212",
"SHERPA_2214",
"SHERPA_UNKNOWN"};
173 const static std::vector<TString> gen_mc_generator_keys_dl1d = {
"POWHEGHERWIG7",
"PHH7EG",
"SHERPA_221_",
"SHERPA_2210",
"SHERPA_2211",
"SHERPA_2212",
"AMCATNLOPY8",
"AMCATNLOHERWIG7"};
176 TString tmp_name(sample_name);
178 if(tmp_name.Contains(
"Py8EG") && !tmp_name.Contains(
"aMcAtNloPy8EG")) tmp_name.ReplaceAll(
"Py8EG",
"PYTHIA8EVTGEN");
179 if(tmp_name.Contains(
"Pythia") && !tmp_name.Contains(
"Pythia8") && !tmp_name.Contains(
"EvtGen")) tmp_name.ReplaceAll(
"Pythia",
"PYTHIA8EVTGEN");
180 if(tmp_name.Contains(
"Pythia8") && !tmp_name.Contains(
"EvtGen")) tmp_name.ReplaceAll(
"Pythia8",
"PYTHIA8EVTGEN");
181 if(tmp_name.Contains(
"Py8") && !tmp_name.Contains(
"EG")) tmp_name.ReplaceAll(
"Py8",
"PYTHIA8EVTGEN");
182 if(tmp_name.Contains(
"Sh_2")) tmp_name.ReplaceAll(
"Sh_2",
"SHERPA_2");
183 if(tmp_name.Contains(
"Sh_") && !tmp_name.Contains(
"Sh_2")) tmp_name.ReplaceAll(
"Sh_",
"SHERPA_UNKNOWN_");
184 if(tmp_name.Contains(
"Sherpa_") && !tmp_name.Contains(
"Sherpa_2")) tmp_name.ReplaceAll(
"Sherpa_",
"SHERPA_UNKNOWN_");
185 if(tmp_name.Contains(
"PYTHIA8EVTGEN517")) tmp_name.ReplaceAll(
"PYTHIA8EVTGEN517",
"PYTHIA8EVTGEN");
190 unsigned int ishower = 0;
191 if (tagger==
"DL1dv01"){
192 for(
const auto & gen : gen_mc_generator_keys_dl1d ){
193 if( tmp_name.Contains(gen) ){
return ishower+1;}
196 }
else if (tagger==
"GN2v01"){
197 for(
const auto & gen : gen_mc_generator_keys ){
198 if( tmp_name.Contains(gen) ){
return ishower+1;}
202 std::cout <<
"ST::getMCShowerType ERROR: Invalid tagger " << tagger <<
". Supported values are GN2v01 and DL1dv01." << std::endl;
205 if( tmp_name.Contains(
"PYTHIA8EVTGEN") || tmp_name.Contains(
"PhPy8EG") )
return 0;
208 TRegexp is_data(
"^data1[5-9]_13TeV");
209 TRegexp is_dataRun3(
"^data2[2-5]_13p6TeV");
210 if (tmp_name.Contains(is_data) || tmp_name.Contains(is_dataRun3)){
211 std::cout <<
"ST::getMCShowerType WARNING: Asking for the MC shower when running on a data file is not advised. Just returning 0." << std::endl;
215 std::cout <<
"ST::getMCShowerType WARNING: Unknown MC generator detected. Returning default 0 = PowhegPythia8 ShowerType for btagging MC/MC maps." << std::endl;
233 virtual int getMCShowerType(
const std::string& sample_name,
const std::string& tagger=
"")
const = 0;
271 bool doTST=true,
bool doJVTCut=true,
281 double& metSignificance,
282 bool doTST = true,
bool doJVTCut = true
Define macros for attributes used to control the static checker.
Class to wrap a set of SystematicVariations.
Class to wrap a set of SystematicVariations.
Class providing the definition of the 4-vector interface.
Class creating a shallow copy of an existing auxiliary container.
static std::vector< uint32_t > runnumber
Select isolated Photons, Electrons and Muons.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
static const unsigned int Reconstruction
static const unsigned int ID
static const unsigned int Trigger
static const unsigned int ChargeID
static const unsigned int Isolation
static const unsigned int Btag_Track
static const unsigned int FJVT
static const unsigned int Btag
static const unsigned int JVT
static const unsigned int Reconstruction
static const unsigned int ID
static const unsigned int Isolation
static const unsigned int Trigger
static const unsigned int Trigger
static const unsigned int ID
static const unsigned int Isolation
static const unsigned int Reconstruction
static const unsigned int Reconstruction
static const unsigned int Trigger
static const unsigned int Unknown
static int getMCShowerType(const std::string &sample_name, const std::string &tagger="")
static bool testAffectsObject(xAOD::Type::ObjectType type, unsigned int test)
static const double DUMMYDEF
helper namespace for calculating deltaR for unknown object types
The common trigger namespace for trigger analysis tools.
ObjectType
Type of objects that have a representation in the xAOD EDM.
@ Jet
The object is a jet.
@ Photon
The object is a photon.
@ Muon
The object is a muon.
@ BTag
The object is a b-tagging object.
@ Electron
The object is an electron.
@ Tau
The object is a tau (jet).
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
@ Unknown
Track fitter not defined.
void ErrorHandler ATLAS_NOT_THREAD_SAFE(Int_t level, Bool_t abort, const char *location, const char *message)
Function filtering the warnings coming from ROOT.
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauJet_v3 TauJet
Definition of the current "tau version".
MissingETContainer_v1 MissingETContainer
TruthEvent_v1 TruthEvent
Typedef to implementation.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.
Electron_v1 Electron
Definition of the current "egamma version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
std::set< unsigned int > affectedWeights
CP::SystematicSet systset