![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/MsgStream.h"
11 #include "GaudiKernel/SystemOfUnits.h"
38 declareProperty(
"UseNeutrinosFromWZTau",
m_UseNu =
false,
"Include neutrinos from W/Z/tau decays in the calculation of HT");
63 return StatusCode::SUCCESS;
71 return StatusCode::SUCCESS;
82 ATH_MSG_ERROR(
" For HEPMC3 releases xAOD filters should be used. Exiting with ERROR. ");
83 return StatusCode::FAILURE;
93 return StatusCode::SUCCESS;
99 if (!(*it_truth))
continue;
102 <<
", eta " << (*it_truth)->eta()
103 <<
", phi " << (*it_truth)->phi()
104 <<
", nconst = " << (*it_truth)->numConstituents());
105 HT += (*it_truth)->pt();
114 ATH_MSG_WARNING(
"Could not retrieve MC Event Collection - weight might not work" );
115 return StatusCode::SUCCESS;
118 std::vector<HepMC::GenParticlePtr> WZleptons;
119 WZleptons.reserve(10);
121 for (
const auto& iter: *((*mecc)[0])){
122 if ( !iter )
continue;
123 int pdgid = iter->pdg_id();
126 HT += iter->momentum().perp();
135 HT += iter->momentum().perp();
144 if (HT<m_MinHT || HT>=
m_MaxHT){
146 setFilterPassed(
false);
150 setFilterPassed(
true);
153 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
HTFilter(const std::string &name, ISvcLocator *pSvcLocator)
bool m_UseNu
Use neutrinos in HT.
long m_ptfailed
Number of events failing the pT cuts.
Scalar perp() const
perp method - perpenticular length
double m_MaxJetEta
Max eta for the truth jets.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double m_MaxLepEta
Max eta for the truth jets.
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
#define ATH_MSG_VERBOSE(x)
double m_MaxHT
Max HT for events.
virtual StatusCode filterInitialize()
std::string m_TruthJetContainerName
Name of the truth jet container.
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Base class for event generator filtering modules.
::StatusCode StatusCode
StatusCode definition for legacy code.
double m_MinLepPt
Min pT for the truth jets.
long m_passed
Number of events passing all cuts.
virtual StatusCode filterEvent()
double m_MinHT
Min HT for events.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
long m_total
Total number of events tested.
double m_MinJetPt
Min pT for the truth jets.
bool fromWZorTau(const HepMC::ConstGenParticlePtr &part)
#define ATH_MSG_WARNING(x)
virtual StatusCode filterFinalize()
bool m_UseLep
Use leptons in HT.
size_type size() const noexcept
Returns the number of elements in the collection.