ATLAS Offline Software
HIEventSelectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HIEVENTUTILS_HIEVENTSELECTIONTOOL_H
6 #define HIEVENTUTILS_HIEVENTSELECTIONTOOL_H
7 
8 #include "AsgTools/AsgTool.h"
9 #include "AsgTools/ToolHandle.h"
13 
14 namespace HI
15 {
16 
18  public virtual HI::IHIEventSelectionTool, public asg::AsgTool
19  {
20 
22 
23  public:
24 
25  HIEventSelectionTool(const std::string& name = "HIEventSelection");
26  virtual ~HIEventSelectionTool();
27  virtual StatusCode initialize() override;
28  virtual StatusCode finalize() override;
29  virtual const asg::AcceptInfo& getAcceptInfo() const override;
30 
31  // MBTS timing cut member functions
32  void checkMBTSTime( asg::AcceptData& acceptData ) const;
33  bool isGoodMBTSTime() const;
34 
35  // Vertex member functions
36  void checkVertex( asg::AcceptData& acceptData ) const;
37  unsigned int getNPrimaryVertices() const;
38 
39  std::string dumpSelection() const;
40 
41  private:
42 
43  static const std::string m_MBTS_CNAME;
44  static const std::string m_FWD_CNAME;
45  static const std::string m_VERTEX_CNAME;
46  static const std::string m_SHAPE_CNAME;
47  static const std::string m_ZDC_CNAME;
48 
49  const std::string m_name;
51 
52  // MBTS external parameters
53  bool m_checkTime = false;
54  float m_timeCut = -1;
55 
56  // Vertex external parameters
57  ToolHandle<HI::IHIVertexSelectionTool> m_vertexSelectionTool;
58  ToolHandle<HI::IHIPileupTool> m_hiPileupTool;
59  float m_vtx_min_sumPt = -1;
60  int m_vtx_min_nTrk = -1;
61  bool m_exclusive_mode = false;
62  bool m_reject_pileup = true;
63  std::string m_track_cutlevel = "NoCut";
64  };
65 
66 }
67 #endif
HI::HIEventSelectionTool::m_MBTS_CNAME
static const std::string m_MBTS_CNAME
Definition: HIEventSelectionTool.h:43
HI::HIEventSelectionTool::getNPrimaryVertices
unsigned int getNPrimaryVertices() const
Definition: HIEventSelectionTool.cxx:174
HI::HIEventSelectionTool::m_name
const std::string m_name
Definition: HIEventSelectionTool.h:49
IHIEventSelectionTool.h
HI::HIEventSelectionTool::checkMBTSTime
void checkMBTSTime(asg::AcceptData &acceptData) const
Definition: HIEventSelectionTool.cxx:104
HI::HIEventSelectionTool::m_vertexSelectionTool
ToolHandle< HI::IHIVertexSelectionTool > m_vertexSelectionTool
Definition: HIEventSelectionTool.h:57
HI::HIEventSelectionTool::dumpSelection
std::string dumpSelection() const
Definition: HIEventSelectionTool.cxx:131
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
HI::IHIEventSelectionTool
Definition: IHIEventSelectionTool.h:17
HI::HIEventSelectionTool::isGoodMBTSTime
bool isGoodMBTSTime() const
HI::HIEventSelectionTool::m_ZDC_CNAME
static const std::string m_ZDC_CNAME
Definition: HIEventSelectionTool.h:47
HI::HIEventSelectionTool::m_accept
asg::AcceptInfo m_accept
Definition: HIEventSelectionTool.h:50
HI::HIEventSelectionTool::m_hiPileupTool
ToolHandle< HI::IHIPileupTool > m_hiPileupTool
Definition: HIEventSelectionTool.h:58
HI::HIEventSelectionTool::m_FWD_CNAME
static const std::string m_FWD_CNAME
Definition: HIEventSelectionTool.h:44
HI::HIEventSelectionTool::m_VERTEX_CNAME
static const std::string m_VERTEX_CNAME
Definition: HIEventSelectionTool.h:45
asg::AcceptInfo
Definition: AcceptInfo.h:28
HI::HIEventSelectionTool::m_checkTime
bool m_checkTime
Definition: HIEventSelectionTool.h:53
HI::HIEventSelectionTool::m_reject_pileup
bool m_reject_pileup
Definition: HIEventSelectionTool.h:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HI::HIEventSelectionTool::m_vtx_min_sumPt
float m_vtx_min_sumPt
Definition: HIEventSelectionTool.h:59
HI::HIEventSelectionTool
Definition: HIEventSelectionTool.h:19
HI
Definition: HIEventDefs.h:14
HI::HIEventSelectionTool::m_timeCut
float m_timeCut
Definition: HIEventSelectionTool.h:54
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
HI::HIEventSelectionTool::m_vtx_min_nTrk
int m_vtx_min_nTrk
Definition: HIEventSelectionTool.h:60
HI::HIEventSelectionTool::~HIEventSelectionTool
virtual ~HIEventSelectionTool()
Definition: HIEventSelectionTool.cxx:45
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
HI::HIEventSelectionTool::finalize
virtual StatusCode finalize() override
Definition: HIEventSelectionTool.cxx:85
HI::HIEventSelectionTool::HIEventSelectionTool
HIEventSelectionTool(const std::string &name="HIEventSelection")
Definition: HIEventSelectionTool.cxx:26
IHIPileupTool.h
HI::HIEventSelectionTool::m_track_cutlevel
std::string m_track_cutlevel
Definition: HIEventSelectionTool.h:63
HI::HIEventSelectionTool::m_exclusive_mode
bool m_exclusive_mode
Definition: HIEventSelectionTool.h:61
ToolHandle.h
AsgTool.h
HI::HIEventSelectionTool::m_SHAPE_CNAME
static const std::string m_SHAPE_CNAME
Definition: HIEventSelectionTool.h:46
asg::AcceptData
Definition: AcceptData.h:30
HI::HIEventSelectionTool::checkVertex
void checkVertex(asg::AcceptData &acceptData) const
Definition: HIEventSelectionTool.cxx:147
HI::HIEventSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: HIEventSelectionTool.cxx:50
HI::HIEventSelectionTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Definition: HIEventSelectionTool.cxx:93
IHIVertexSelectionTool.h