ATLAS Offline Software
Loading...
Searching...
No Matches
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
7namespace{
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
31
33{
34 xAOD::JetContainer::iterator itB = jets.begin();
35 xAOD::JetContainer::iterator itE = jets.end();
37 jets.erase( lastFiltered, itE );
38 return StatusCode::SUCCESS;
39}
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
Gaudi::Property< float > m_MaxOverMeanCut
minimum cut applied to MaxOverMean moment
StatusCode modify(xAOD::JetContainer &jets) const
Implementing abstract methods from base.
Gaudi::Property< float > m_ETminCut
minimum cut applied to MaxConstituentET moment
HIJetDiscriminatorTool(const std::string &t)
JetModifierBase(const std::string &myname)
Ctor.
DataModel_detail::iterator< DVL > remove_if(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of remove_if for DataVector/List.
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".