ATLAS Offline Software
JetFromPseudojet.h
Go to the documentation of this file.
1 // JetFromPseudojet.h -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
8 #ifndef JetFromPseudojet_H
9 #define JetFromPseudojet_H
10 
11 
12 // Tool to construct a jet from a pseudojet. The pseudojet,
13 // kinematics, constituents and selected attributes are added to the jet.
14 
15 #include "AsgTools/AsgTool.h"
17 #include "fastjet/PseudoJet.hh"
18 #include "xAODJet/JetContainer.h"
19 
21 : public asg::AsgTool,
22  virtual public IJetFromPseudojet {
24 
25 public:
26 
27  // Ctor.
28  JetFromPseudojet(const std::string& name);
29 
30  // Initialization.
31  virtual StatusCode initialize() override;
32 
33  // Construct jet from pseudojet and input type and add to a container.
34  // Return a pointer to the new jet or null for failure.
35  // If pparent is not null, then it is set as the parent and its
36  // configuration properties are copied.
37  virtual xAOD::Jet* add(const fastjet::PseudoJet&,
38  const PseudoJetContainer&,
40  xAOD::JetInput::Type inputtype) const override;
41 
42 
43  // Construct jet from pseudojet and parent and add to a container.
44  // Return a pointer to the new jet or null for failure.
45  // If pparent is not null, then it is set as the parent and its
46  // configuration properties are copied.
47  virtual xAOD::Jet* add(const fastjet::PseudoJet& pj,
48  const PseudoJetContainer&,
50  const xAOD::Jet* pparent) const override;
51 
52  // Dump to log.
53  virtual void print() const override;
54 
55 
56 protected:
57 
58  // Method use by the above add(...) to do most of the work.
59  xAOD::Jet* addjet(const fastjet::PseudoJet& pj,
60  const PseudoJetContainer&,
62  const xAOD::Jet* pparent) const;
63 
64  // Method to evalaute the EM scale momentum
66  xAOD::JetInput::Type inputtype) const ;
67 
68 private: //data
69 
70  // Job options.
71  std::vector<std::string> m_atts; // List of jet attributes.
72 
73  bool m_doArea;
75 
76 };
77 
78 #endif
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
IJetFromPseudojet
IJetFromPseudojet is a dual-use tool interface for a tool that constructs a new ATLAS jet from a fast...
Definition: IJetFromPseudojet.h:24
JetFromPseudojet::m_doArea
bool m_doArea
Definition: JetFromPseudojet.h:73
JetFromPseudojet::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetFromPseudojet.cxx:39
PseudoJetContainer
Definition: PseudoJetContainer.h:48
IJetFromPseudojet.h
JetFromPseudojet::JetFromPseudojet
JetFromPseudojet(const std::string &name)
Definition: JetFromPseudojet.cxx:31
JetFromPseudojet
Definition: JetFromPseudojet.h:22
JetFromPseudojet::buildAndSetEMScaleMom
void buildAndSetEMScaleMom(xAOD::Jet *jet, xAOD::JetInput::Type inputtype) const
Definition: JetFromPseudojet.cxx:56
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetFromPseudojet::addjet
xAOD::Jet * addjet(const fastjet::PseudoJet &pj, const PseudoJetContainer &, xAOD::JetContainer &jets, const xAOD::Jet *pparent) const
Definition: JetFromPseudojet.cxx:140
xAOD::JetInput::Type
Type
Definition: JetContainerInfo.h:54
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
JetFromPseudojet::add
virtual xAOD::Jet * add(const fastjet::PseudoJet &, const PseudoJetContainer &, xAOD::JetContainer &, xAOD::JetInput::Type inputtype) const override
Method to construct an ATLAS jet from a pseudojet, input type and vector of ghost labels.
JetFromPseudojet::add
virtual xAOD::Jet * add(const fastjet::PseudoJet &pj, const PseudoJetContainer &, xAOD::JetContainer &jets, const xAOD::Jet *pparent) const override
Method to construct an ATLAS jet from a pseudojet and parent jet.
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetContainer.h
JetFromPseudojet::print
virtual void print() const override
Print the state of the tool.
Definition: JetFromPseudojet.cxx:252
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JetFromPseudojet::m_atts
std::vector< std::string > m_atts
Definition: JetFromPseudojet.h:71
AsgTool.h
JetFromPseudojet::m_doFourVecArea
bool m_doFourVecArea
Definition: JetFromPseudojet.h:74