ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpTools
PileUpTools
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
14
#include "
AthenaBaseComps/AthAlgTool.h
"
15
#include "
PileUpTools/IPileUpTool.h
"
16
#include "
TruthUtils/MagicNumbers.h
"
17
18
class
PileUpToolBase
:
public
extends<AthAlgTool, IPileUpTool> {
19
public
:
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
38
using
IPileUpTool::processAllSubEvents
;
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
53
protected
:
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
AthAlgTool.h
IPileUpTool.h
a call-back interface for tools that merge pileup events information An IPileUpTool is called back fo...
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition
IPileUpTool.h:22
MagicNumbers.h
IPileUpTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx)=0
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
PileUpToolBase::m_filterPassed
bool m_filterPassed
Definition
PileUpToolBase.h:60
PileUpToolBase::m_vetoPileUpTruthLinks
Gaudi::Property< int > m_vetoPileUpTruthLinks
Definition
PileUpToolBase.h:58
PileUpToolBase::filterPassed
virtual bool filterPassed() const override
dummy implementation of passing filter
Definition
PileUpToolBase.h:49
PileUpToolBase::toProcess
virtual bool toProcess(int bunchXing) const override
the method this base class helps implementing
Definition
PileUpToolBase.h:32
PileUpToolBase::PileUpToolBase
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
PileUpToolBase.cxx:7
PileUpToolBase::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &) override
Definition
PileUpToolBase.h:39
PileUpToolBase::resetFilter
virtual void resetFilter() override
dummy implementation of filter reset
Definition
PileUpToolBase.h:51
PileUpToolBase::m_firstXing
Gaudi::Property< int > m_firstXing
Definition
PileUpToolBase.h:54
PileUpToolBase::initialize
virtual StatusCode initialize() override
Definition
PileUpToolBase.h:26
PileUpToolBase::processBunchXing
virtual StatusCode processBunchXing(int, SubEventIterator, SubEventIterator) override
Definition
PileUpToolBase.h:43
PileUpToolBase::m_lastXing
Gaudi::Property< int > m_lastXing
Definition
PileUpToolBase.h:56
type
Generated on
for ATLAS Offline Software by
1.17.0