ATLAS Offline Software
JetEventSelector.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
9  : asg::AsgTool(t)
10  , m_var(this)
11 {
12 
13  declareProperty("CutMin", m_min );
14  declareProperty("CutMax", m_max );
15  declareProperty("Var", m_var);
16 }
17 
19 
21 
22  for (unsigned int it = 0; it < m_var.size(); it++) {
24  ATH_MSG_INFO( "Selecting on var ("<< m_var[it]->varName() << ") in ["<< m_min.at(it) << " , "<< m_max.at(it)<< "]");
25  }
26  return StatusCode::SUCCESS;
27 }
28 
29 // This IJetEventSelector implementation uses EventHistoVarTool to
30 // retrieve EventInfo attribute.
31 // Note: xAOD:EventInfo passing not needed as EventHistoVarTool member (m_var)
32 // configured for and accesses EventInfo attribute directly.
33 int JetEventSelector::keep(const xAOD::EventInfo&/*not used in this implementation*/ , const xAOD::JetContainer & jets) const {
34 
35  for (unsigned int it = 0; it < m_var.size(); it++) {
36  float v = m_var[it]->value(jets);
37  if ((m_min.at(it) > v) || (m_max.at(it) < v)) return false;
38  }
39  return true;
40 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
JetEventSelector::m_var
ToolHandleArray< IEventHistoVarTool > m_var
Definition: JetEventSelector.h:32
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
JetEventSelector::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: JetEventSelector.cxx:20
skel.it
it
Definition: skel.GENtoEVGEN.py:396
asg
Definition: DataHandleTestTool.h:28
JetEventSelector::~JetEventSelector
virtual ~JetEventSelector()
JetEventSelector.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
JetEventSelector::m_max
std::vector< float > m_max
Definition: JetEventSelector.h:30
PixelAthClusterMonAlgCfg.varName
string varName
end cluster ToT and charge
Definition: PixelAthClusterMonAlgCfg.py:125
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JetEventSelector::m_min
std::vector< float > m_min
Definition: JetEventSelector.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
python.PyAthena.v
v
Definition: PyAthena.py:154
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JetEventSelector::JetEventSelector
JetEventSelector(const std::string &t)
Definition: JetEventSelector.cxx:8
JetEventSelector::keep
int keep(const xAOD::EventInfo &e, const xAOD::JetContainer &jets) const
Method to select.
Definition: JetEventSelector.cxx:33