ATLAS Offline Software
JetQuarkLabel.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //Dear emacs, this is -*-c++-*-
6 
8 // JetQuarkLabel.h
9 // Header file for class JetQuarkLabel
11 
18 #ifndef PARTICLEJETTOOLS_JETQUARKLABEL_H
19 #define PARTICLEJETTOOLS_JETQUARKLABEL_H
20 
22 #include "AsgTools/AsgTool.h"
25 #include <string>
26 #include <map>
27 #include "xAODJet/Jet.h"
31 
32 //class McEventCollection;
33 class Jet;
34 
35 namespace Analysis
36 {
37 
38 class JetQuarkLabel : public asg::AsgTool, virtual public IJetTruthMatching {
40  public:
41  JetQuarkLabel(const std::string& name);
42  virtual ~JetQuarkLabel();
43  virtual StatusCode initialize() override;
44 
45  /* Method to truth tag a jet.
46  * NB: for this particular algorithm, matchJet is TRUE if the jet is matched
47  * to a b-quark OR a c-quark. The jetLabel is set accordingly and is no
48  * longer a job option.
49  */
50 
51  virtual bool matchJet(const xAOD::Jet& myJet,
52  MatchInfo* info = nullptr) const override;
53 
54  virtual void printParameterSettings() const override;
55 
56  inline void EventSelection(short s) { m_inTime = s; }
57  inline short EventSelection() const { return m_inTime; }
58 
59  private:
60  SG::ReadHandleKey<xAOD::TruthEventContainer> m_truthEventContainerKey{this,"McEventCollection","TruthEvents","ReadHandleKey for xAOD::TruthEventContainer"};
61  std::string m_mcEventCollection;
62  double m_deltaRCut;
63  double m_ptCut;
64  bool m_noDoc;
65  short m_inTime;
66  bool testJet(const xAOD::Jet&, const xAOD::TruthEventContainer*,
67  MatchInfo* info) const;
68 };
69 
70 
71 }
72 #endif // TRUTHMATCHTOOLS_JETQUARKLABEL_H
73 
grepfile.info
info
Definition: grepfile.py:38
Analysis::JetQuarkLabel::EventSelection
void EventSelection(short s)
Definition: JetQuarkLabel.h:56
Jet.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Analysis::JetQuarkLabel::m_deltaRCut
double m_deltaRCut
deltaR cut value of the cone matching (max distance between Jet axis and momentum of truth particel)
Definition: JetQuarkLabel.h:62
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
TruthParticleContainer.h
Analysis::JetQuarkLabel::m_mcEventCollection
std::string m_mcEventCollection
Definition: JetQuarkLabel.h:61
Analysis::IJetTruthMatching::MatchInfo
Definition: IJetTruthMatching.h:43
Analysis::JetQuarkLabel::testJet
bool testJet(const xAOD::Jet &, const xAOD::TruthEventContainer *, MatchInfo *info) const
Definition: JetQuarkLabel.cxx:64
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Analysis::JetQuarkLabel::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetQuarkLabel.cxx:42
Analysis::JetQuarkLabel::EventSelection
short EventSelection() const
Definition: JetQuarkLabel.h:57
Analysis::JetQuarkLabel::JetQuarkLabel
JetQuarkLabel(const std::string &name)
Definition: JetQuarkLabel.cxx:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Analysis::JetQuarkLabel::m_truthEventContainerKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventContainerKey
Definition: JetQuarkLabel.h:60
IJetTruthMatching.h
Analysis::JetQuarkLabel::m_noDoc
bool m_noDoc
Definition: JetQuarkLabel.h:64
Analysis::JetQuarkLabel::matchJet
virtual bool matchJet(const xAOD::Jet &myJet, MatchInfo *info=nullptr) const override
AlgTool interface methods.
Definition: JetQuarkLabel.cxx:47
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
EventPrimitives.h
Analysis::IJetTruthMatching
Definition: IJetTruthMatching.h:39
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Analysis::JetQuarkLabel
Definition: JetQuarkLabel.h:38
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
Analysis::JetQuarkLabel::~JetQuarkLabel
virtual ~JetQuarkLabel()
Definition: JetQuarkLabel.cxx:40
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
Analysis::JetQuarkLabel::m_ptCut
double m_ptCut
pT cut for partons
Definition: JetQuarkLabel.h:63
Analysis::JetQuarkLabel::m_inTime
short m_inTime
Definition: JetQuarkLabel.h:65
AsgTool.h
TruthParticle.h
TruthEventContainer.h
Analysis::JetQuarkLabel::printParameterSettings
virtual void printParameterSettings() const override
print parameter settings of the truth match tool
Definition: JetQuarkLabel.cxx:211