ATLAS Offline Software
JetTruthParticleSelectorTool.h
Go to the documentation of this file.
1 // emacs this file is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef JETSIMTOOLS_JETTRUTHPARTICLESELECTORTOOL_H
8 #define JETSIMTOOLS_JETTRUTHPARTICLESELECTORTOOL_H
9 
10 #include "AsgTools/AsgTool.h"
11 
13 
14 
15 
16 #include <map>
17 
18 static const InterfaceID IID_JetTruthParticleSelectorTool("JetTruthParticleSelectorTool", 1, 0);
19 
20 //using asg::AsgTool;
22 {
24 
25  public:
26 
27  JetTruthParticleSelectorTool(const std::string &s);
28 
30 
31  virtual StatusCode initialize() override;
32 
33  virtual StatusCode finalize() override;
34 
35 
37  bool operator()(const xAOD::TruthParticle* truth) { return this->selector(truth);}
38 
39 
40  bool selector(const xAOD::TruthParticle* truth);
41 
42  void setupEvent();
43 
44  static const InterfaceID& interfaceID( ){return IID_JetTruthParticleSelectorTool;}
45 
46 
47  bool passKinematics(const xAOD::TruthParticle* truth) const ;
48 
49 protected:
51  Invalid = -1,
56  };
57 
58  private:
59 
60 
61  double m_min_pt;
62  double m_max_pt;
63  double m_maxAbsEta;
64  double m_minEta;
65  double m_maxEta;
67 
68  // bool m_includeMuons;
69  // bool m_useOnlyInteracting;
70 
73 
74  std::string m_selectionModeName;
76 
77  typedef std::map< int, long long > PDGList;
79 
80  typedef std::map< int, double > Average;
91 
92  std::vector<const xAOD::TruthParticle*> m_wzLeptons;
93 };
94 #endif
95 
JetTruthParticleSelectorTool::JetTruthParticleSelectorTool
JetTruthParticleSelectorTool(const std::string &s)
Definition: JetTruthParticleSelectorTool.cxx:128
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
JetTruthParticleSelectorTool::StableNoMuonNoNu
@ StableNoMuonNoNu
Definition: JetTruthParticleSelectorTool.h:52
JetTruthParticleSelectorTool::setupEvent
void setupEvent()
Definition: JetTruthParticleSelectorTool.cxx:158
JetTruthParticleSelectorTool::passKinematics
bool passKinematics(const xAOD::TruthParticle *truth) const
Definition: JetTruthParticleSelectorTool.cxx:192
JetTruthParticleSelectorTool::NoWZDecay
@ NoWZDecay
Definition: JetTruthParticleSelectorTool.h:55
JetTruthParticleSelectorTool::m_avPt
Average m_avPt
Definition: JetTruthParticleSelectorTool.h:83
JetTruthParticleSelectorTool::MuonOnly
@ MuonOnly
Definition: JetTruthParticleSelectorTool.h:53
JetTruthParticleSelectorTool::m_min_pt
double m_min_pt
Definition: JetTruthParticleSelectorTool.h:61
JetTruthParticleSelectorTool::Average
std::map< int, double > Average
Definition: JetTruthParticleSelectorTool.h:80
JetTruthParticleSelectorTool::m_max_pt
double m_max_pt
Definition: JetTruthParticleSelectorTool.h:62
JetTruthParticleSelectorTool::interfaceID
static const InterfaceID & interfaceID()
Definition: JetTruthParticleSelectorTool.h:44
JetTruthParticleSelectorTool::NuOnly
@ NuOnly
Definition: JetTruthParticleSelectorTool.h:54
JetTruthParticleSelectorTool::m_avPhi
Average m_avPhi
Definition: JetTruthParticleSelectorTool.h:87
JetTruthParticleSelectorTool::m_av2Pt
Average m_av2Pt
Definition: JetTruthParticleSelectorTool.h:84
JetTruthParticleSelectorTool::m_wzLeptons
std::vector< const xAOD::TruthParticle * > m_wzLeptons
Definition: JetTruthParticleSelectorTool.h:92
JetTruthParticleSelectorTool::m_wzPhotonCone
double m_wzPhotonCone
Definition: JetTruthParticleSelectorTool.h:66
JetTruthParticleSelectorTool::finalize
virtual StatusCode finalize() override
Definition: JetTruthParticleSelectorTool.cxx:277
JetTruthParticleSelectorTool::m_av2Phi
Average m_av2Phi
Definition: JetTruthParticleSelectorTool.h:88
JetTruthParticleSelectorTool::m_selectionModeName
std::string m_selectionModeName
Definition: JetTruthParticleSelectorTool.h:74
JetTruthParticleSelectorTool::m_av2M
Average m_av2M
Definition: JetTruthParticleSelectorTool.h:90
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
JetTruthParticleSelectorTool::Invalid
@ Invalid
Definition: JetTruthParticleSelectorTool.h:51
JetTruthParticleSelectorTool::m_av2P
Average m_av2P
Definition: JetTruthParticleSelectorTool.h:82
JetTruthParticleSelectorTool::m_listPDGofStables
bool m_listPDGofStables
Definition: JetTruthParticleSelectorTool.h:72
JetTruthParticleSelectorTool::SelectionMode
SelectionMode
Definition: JetTruthParticleSelectorTool.h:50
JetTruthParticleSelectorTool::m_useOnlyCharged
bool m_useOnlyCharged
Definition: JetTruthParticleSelectorTool.h:71
JetTruthParticleSelectorTool::selector
bool selector(const xAOD::TruthParticle *truth)
Definition: JetTruthParticleSelectorTool.cxx:208
JetTruthParticleSelectorTool::m_maxEta
double m_maxEta
Definition: JetTruthParticleSelectorTool.h:65
JetTruthParticleSelectorTool::m_avP
Average m_avP
Definition: JetTruthParticleSelectorTool.h:81
JetTruthParticleSelectorTool::~JetTruthParticleSelectorTool
virtual ~JetTruthParticleSelectorTool()
JetTruthParticleSelectorTool::PDGList
std::map< int, long long > PDGList
Definition: JetTruthParticleSelectorTool.h:77
JetTruthParticleSelectorTool
Definition: JetTruthParticleSelectorTool.h:22
JetTruthParticleSelectorTool::m_maxAbsEta
double m_maxAbsEta
Definition: JetTruthParticleSelectorTool.h:63
JetTruthParticleSelectorTool::m_av2Eta
Average m_av2Eta
Definition: JetTruthParticleSelectorTool.h:86
JetTruthParticleSelectorTool::m_avM
Average m_avM
Definition: JetTruthParticleSelectorTool.h:89
JetTruthParticleSelectorTool::operator()
bool operator()(const xAOD::TruthParticle *truth)
alias 'selector' to operator(const IN4M*)
Definition: JetTruthParticleSelectorTool.h:37
JetTruthParticleSelectorTool::m_pdgList
PDGList m_pdgList
Definition: JetTruthParticleSelectorTool.h:78
JetTruthParticleSelectorTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetTruthParticleSelectorTool.cxx:163
JetTruthParticleSelectorTool::m_avEta
Average m_avEta
Definition: JetTruthParticleSelectorTool.h:85
AsgTool.h
TruthParticle.h
JetTruthParticleSelectorTool::m_minEta
double m_minEta
Definition: JetTruthParticleSelectorTool.h:64
JetTruthParticleSelectorTool::m_selectionMode
SelectionMode m_selectionMode
Definition: JetTruthParticleSelectorTool.h:75