ATLAS Offline Software
Loading...
Searching...
No Matches
PileUpToolBase.h
Go to the documentation of this file.
1/* -*- C++ -*- */
2
3/*
4 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef PILEUPTOOLS_PILEUPTOOLBASE_H
8#define PILEUPTOOLS_PILEUPTOOLBASE_H
17
18class PileUpToolBase : public extends<AthAlgTool, IPileUpTool> {
19public:
21
22 PileUpToolBase(const std::string& type,
23 const std::string& name,
24 const IInterface* parent);
25
26 virtual StatusCode initialize() override {
27 return StatusCode::SUCCESS;
28 }
29
30
32 virtual bool toProcess(int bunchXing) const override {
33 //closed interval [m_firstXing,m_lastXing]
34 return !((m_firstXing > bunchXing) || (bunchXing > m_lastXing));
35 }
36
39 virtual StatusCode processAllSubEvents(const EventContext&) override {
40 return StatusCode::SUCCESS;
41 }
42 virtual StatusCode
43 processBunchXing(int /*bunchXing*/,
44 SubEventIterator /*bSubEvents*/,
45 SubEventIterator /*eSubEvents*/) override {
46 return StatusCode::SUCCESS;
47 }
48
49 virtual bool filterPassed() const override { return m_filterPassed; }
51 virtual void resetFilter() override { m_filterPassed=true; }
52
53protected:
54 Gaudi::Property<int> m_firstXing{this, "FirstXing", -999,
55 "First bunch-crossing in which det is live"};
56 Gaudi::Property<int> m_lastXing {this, "LastXing", 999,
57 "Last bunch-crossing in which det is live"};
58 Gaudi::Property<int> m_vetoPileUpTruthLinks{this, "VetoPileUpTruthLinks", true,
59 "Ignore links to suppressed pile-up truth"};
60 bool m_filterPassed{true};
61};
62#endif
a call-back interface for tools that merge pileup events information An IPileUpTool is called back fo...
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition IPileUpTool.h:22
virtual StatusCode processAllSubEvents(const EventContext &ctx)=0
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
Gaudi::Property< int > m_vetoPileUpTruthLinks
virtual bool filterPassed() const override
dummy implementation of passing filter
virtual bool toProcess(int bunchXing) const override
the method this base class helps implementing
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode processAllSubEvents(const EventContext &) override
virtual void resetFilter() override
dummy implementation of filter reset
Gaudi::Property< int > m_firstXing
virtual StatusCode initialize() override
virtual StatusCode processBunchXing(int, SubEventIterator, SubEventIterator) override
Gaudi::Property< int > m_lastXing