ATLAS Offline Software
Loading...
Searching...
No Matches
JetFlavourInfo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <vector>
8#include <string>
9
10using xAOD::IParticle;
12
13int
15
16 const std::string labelB = "GhostBHadronsFinal";
17 const std::string labelC = "GhostCHadronsFinal";
18 const std::string labelTau = "GhostTausFinal";
19
20 std::vector<const IParticle*> ghostB;
21 if (jet->getAssociatedObjects<IParticle>(labelB, ghostB) && ghostB.size() > 0) return 5;
22 std::vector<const IParticle*> ghostC;
23 if (jet->getAssociatedObjects<IParticle>(labelC, ghostC) && ghostC.size() > 0) return 4;
24 std::vector<const IParticle*> ghostTau;
25 if (jet->getAssociatedObjects<IParticle>(labelTau, ghostTau) && ghostTau.size() > 0) return 15;
26 return 0;
27}
28
29int
31
32 const std::string labelB = "GhostBHadronsInitial";
33 const std::string labelC = "GhostCHadronsInitial";
34 const std::string labelTau = "GhostTausFinal";
35
36 std::vector<const IParticle*> ghostB;
37 if (jet->getAssociatedObjects<IParticle>(labelB, ghostB) && ghostB.size() > 0) return 5;
38 std::vector<const IParticle*> ghostC;
39 if (jet->getAssociatedObjects<IParticle>(labelC, ghostC) && ghostC.size() > 0) return 4;
40 std::vector<const IParticle*> ghostTau;
41 if (jet->getAssociatedObjects<IParticle>(labelTau, ghostTau) && ghostTau.size() > 0) return 15;
42 return 0;
43}
44
45int
47
48 const std::string labelB = "GhostBQuarksFinal";
49 const std::string labelC = "GhostCQuarksFinal";
50 const std::string labelTau = "GhostTausFinal";
51
52 std::vector<const IParticle*> ghostB;
53 if (jet->getAssociatedObjects<IParticle>(labelB, ghostB) && ghostB.size() > 0) return 5;
54 std::vector<const IParticle*> ghostC;
55 if (jet->getAssociatedObjects<IParticle>(labelC, ghostC) && ghostC.size() > 0) return 4;
56 std::vector<const IParticle*> ghostTau;
57 if (jet->getAssociatedObjects<IParticle>(labelTau, ghostTau) && ghostTau.size() > 0) return 15;
58 return 0;
59}
60
61int
63 // default label means "invalid"
64 int label = -1;
65
66 // We don't check the return value, as we would not be able to handle it gracefully anyway
67 jet->getAttribute("HadronConeExclTruthLabelID",label);
68 return label;
69}
70
71int
73 // default label means "invalid"
74 int label = -1;
75
76 // We don't check the return value, as we would not be able to handle it gracefully anyway
77 jet->getAttribute("HadronConeExclExtendedTruthLabelID",label);
78 return label;
79}
80
82
83 switch (t) {
84 case GAFinalHadron: return GAFinalHadronFlavourLabel (jet); break;
86 case GAFinalParton: return GAFinalPartonFlavourLabel (jet); break;
88 }
89}
Class providing the definition of the 4-vector interface.
std::string label(const std::string &format, int i)
Definition label.h:19
Jet_v1 Jet
Definition of the current "jet version".
int GAInitialHadronFlavourLabel(const xAOD::Jet *jet)
int GAFinalPartonFlavourLabel(const xAOD::Jet *jet)
int jetFlavourLabel(const xAOD::Jet *jet, JetFlavourLabelType=ExclConeHadron)
int GAFinalHadronFlavourLabel(const xAOD::Jet *jet)
int ExclusiveConeDoubleHadronFlavourLabel(const xAOD::Jet *jet)
JetFlavourLabelType
@ GAFinalParton
@ GAInitialHadron
@ ExclConeHadron
@ GAFinalHadron
int ExclusiveConeHadronFlavourLabel(const xAOD::Jet *jet)