ATLAS Offline Software
HIJetDiscriminatorTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace{
8  struct Discrim{
9  Discrim(float maxOverMean, float ETMin) : _maxOverMean(maxOverMean),
10  _ETMin(ETMin){};
11 
12  float _maxOverMean;
13  float _ETMin;
14 
15  //return true if jet should be removed
17  bool operator()(const xAOD::Jet* j1)
18  {
19  float max_ET=j1->getAttribute<float>("MaxConstituentET");
20  float disc=j1->getAttribute<float>("MaxOverMean");
21  if( max_ET < _ETMin ) return true;
22  if( disc < _maxOverMean ) return true;
23  return false;
24  }
25  };
26 } //annonymous namespace
27 
29 {
30 }
31 
33 {
34  xAOD::JetContainer::iterator itB = jets.begin();
36  xAOD::JetContainer::iterator lastFiltered=std::remove_if(itB, itE, Discrim(m_MaxOverMeanCut,m_ETminCut));
37  jets.erase( lastFiltered, itE );
38  return StatusCode::SUCCESS;
39 }
HIJetDiscriminatorTool::m_MaxOverMeanCut
Gaudi::Property< float > m_MaxOverMeanCut
minimum cut applied to MaxOverMean moment
Definition: HIJetDiscriminatorTool.h:48
HIJetDiscriminatorTool::HIJetDiscriminatorTool
HIJetDiscriminatorTool(const std::string &t)
Definition: HIJetDiscriminatorTool.cxx:28
HIJetDiscriminatorTool::modify
StatusCode modify(xAOD::JetContainer &jets) const
Implementing abstract methods from base.
Definition: HIJetDiscriminatorTool.cxx:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
HIJetDiscriminatorTool::m_ETminCut
Gaudi::Property< float > m_ETminCut
minimum cut applied to MaxConstituentET moment
Definition: HIJetDiscriminatorTool.h:51
TruthTest.itE
itE
Definition: TruthTest.py:25
doubleTestComp.j1
j1
Definition: doubleTestComp.py:21
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
JetModifierBase
Definition: JetModifierBase.h:22
HIJetDiscriminatorTool.h