ATLAS Offline Software
HFORSelectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HFORTOOLS_HFORSELECTIONTOOL_H
6 #define HFORTOOLS_HFORSELECTIONTOOL_H 1
7 
29 
30 #include <vector>
31 #include <map>
32 #include <string>
33 
35 
38 
40 #include "HFORTools/HFOR_Truth.h"
41 
43  public:
44  //constructor for athena can be created using special macro
45  //Note: if you add a second interface to your tool, you must use: ASG_TOOL_CLASS2( ToolName, Interface1, Interface2)
47 
48  HFORSelectionTool( const std::string& name );
49 
50  //Initialize the tool
51  virtual StatusCode initialize() override;
52 
53  // Make sure we clean the the configuration information, forcing the call to
54  // setSampleType when the next file is opened.
55  virtual StatusCode beginInputFile() override ;
56 
57  //Called at the end of file processing, puts out some book keeping
58  //information and clear the bookkeeping counters
59  virtual StatusCode endInputFile() override ;
60 
61  //This method will signal the event to be kept (true) or to be removed (false)
62  //based on the overlap removal result
63  virtual bool isSelected() override;
64 
65  //Helper to get back the current sample type
66  HFORType getSampleType() override ;
67 
68  //Helper to get back the name of the current sample (light, bb, cc, c or unknown)
69  std::string getSampleName() override ;
70 
71  // Return a string with the LAST type of event classification
72  //(bb, cc, c, light, kill or unknown)
73  HFORType getDecisionType() override ;
74 
75  private:
76  //Sets the sample type based on the sample DSID
78 
79  double m_matchCone ;
80  std::string m_truthJetCollectionName; //used in JetBasedHFOR
83  unsigned long int m_sampleRunNumber ;
84  std::string m_sampleName ;
85 
86  unsigned long int m_evtCounterAll ;
87  unsigned long int m_evtCounterKilled ;
88 
90 
91  std::string m_runConfigFile ;
92  std::string m_HFORStrategy ;
94 };
95 
96 
97 #endif //> !HFORTOOLS_HFORSELECTIONTOOL_H
HFORSelectionTool::m_sampleType
HFORType m_sampleType
Definition: HFORSelectionTool.h:81
IHFORSelectionTool
Definition: IHFORSelectionTool.h:12
HFOR_Truth
Definition: HFOR_Truth.h:30
HFORSelectionTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: HFORSelectionTool.cxx:57
HFORSelectionTool::m_HFORStrategy
std::string m_HFORStrategy
Definition: HFORSelectionTool.h:92
HFOR_Truth.h
HFORSelectionTool::m_sampleName
std::string m_sampleName
Definition: HFORSelectionTool.h:84
HFORType
HFORType
Definition: HFORTypes.h:9
HFORSelectionTool::getSampleName
std::string getSampleName() override
Definition: HFORSelectionTool.cxx:282
HFORSelectionTool::m_runConfigFile
std::string m_runConfigFile
Definition: HFORSelectionTool.h:91
HFORSelectionTool::m_evtCounterAll
unsigned long int m_evtCounterAll
Definition: HFORSelectionTool.h:86
HFORSelectionTool::m_isConfigured
bool m_isConfigured
Definition: HFORSelectionTool.h:93
HFORSelectionTool::m_hforTruth
HFOR_Truth m_hforTruth
Definition: HFORSelectionTool.h:89
HFORSelectionTool::m_decisionType
HFORType m_decisionType
Definition: HFORSelectionTool.h:82
HFORSelectionTool::HFORSelectionTool
HFORSelectionTool(const std::string &name)
Definition: HFORSelectionTool.cxx:36
HFORSelectionTool::getDecisionType
HFORType getDecisionType() override
Definition: HFORSelectionTool.cxx:296
IHFORSelectionTool.h
HFORSelectionTool::m_sampleRunNumber
unsigned long int m_sampleRunNumber
Definition: HFORSelectionTool.h:83
HFORSelectionTool::beginInputFile
virtual StatusCode beginInputFile() override
Function called when a new input file is opened.
Definition: HFORSelectionTool.cxx:97
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HFORSelectionTool::isSelected
virtual bool isSelected() override
Definition: HFORSelectionTool.cxx:144
HFORSelectionTool::setSampleType
StatusCode setSampleType()
Definition: HFORSelectionTool.cxx:215
HFORSelectionTool
Example usage code: Athena only: To configure the tool, add the following to your joboptions: myTool ...
Definition: HFORSelectionTool.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
HFORSelectionTool::m_truthJetCollectionName
std::string m_truthJetCollectionName
Definition: HFORSelectionTool.h:80
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
HFORSelectionTool::getSampleType
HFORType getSampleType() override
Definition: HFORSelectionTool.cxx:269
HFORSelectionTool::m_evtCounterKilled
unsigned long int m_evtCounterKilled
Definition: HFORSelectionTool.h:87
AsgMetadataTool.h
TruthEventAuxContainer.h
HFORSelectionTool::m_matchCone
double m_matchCone
Definition: HFORSelectionTool.h:79
TruthEventContainer.h
HFORSelectionTool::endInputFile
virtual StatusCode endInputFile() override
Function called when the currently open input file got completely processed.
Definition: HFORSelectionTool.cxx:112