 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef PILEUPTOOLS_BKGSTREAMSCACHE_H
6 # define PILEUPTOOLS_BKGSTREAMSCACHE_H
19 #include "GaudiKernel/ServiceHandle.h"
20 #include "Gaudi/Property.h"
36 public extends<AthAlgTool, IBkgStreamsCache>
39 BkgStreamsCache(
const std::string&,
const std::string&,
const IInterface*);
50 unsigned int firstStore,
53 virtual void newEvent()
override final;
64 int t0BinCenter)
override final;
75 int t0BinCenter,
bool loadEventProxies,
unsigned int )
override final;
95 unsigned int nEvtsXing(
unsigned int iXing)
const;
109 "IAtRndmGenSvc controlling the distribution of bkg events/xing"};
112 "(average) number of collisions per beam crossing"};
115 "The maximum fraction of bunch-crossings which will be occupied."};
118 "nEvts/Xings can be either Fixed at CollPerXing or Poisson with average CollPerXing"};
121 "read one event every downscaleFactor accesses (asymptotically -> number of times "
122 "an event in the cache will be reused)"};
125 "IAtRndmGenSvc stream used as engine for our various random distributions, including the CollPerXing one "};
129 "Type of the pileup events in this cache: 0:Signal, 1:MinimumBias, 2:Cavern, 3:HaloGas, "
130 "4:ZeroBias. Default=0 (Signal, Invalid)"};
134 "reduce the number of events at bunch xing t=0 by m_subtractBC0. Default=0, set to 1 when "
135 "using the same type of events (e.g. minbias) for original and background streams"};
137 Gaudi::Property<bool>
m_ignoreBM{
this,
"IgnoreBeamInt",
false,
138 "Default=False, set to True to ignore the PileUpEventLoopMgr beam intensity "
139 "tool in setting the number of events per xing."};
141 Gaudi::Property<bool>
m_ignoreSF{
this,
"IgnoreBeamLumi",
false,
142 "Default=False, set to True to ignore the PileUpEventLoopMgr beam luminosity "
143 "tool in setting the number of events per xing."};
146 "Force events used in the central bunch crossing to be refreshed"};
171 #endif // PILEUPTOOLS_BKGSTREAMSCACHE_H
JetConstituentVector::iterator iterator
virtual StatusCode finalize() override final
void PileUpEventTypeHandler(Gaudi::Details::PropertyBase &)
StreamVector::iterator m_cursor
StatusCode nextEvent_passive(bool isCentralBunchCrossing)
as nextEvent except don't actually load anything
Gaudi::CheckedProperty< unsigned short > m_pileUpEventTypeProp
Gaudi::Property< bool > m_ignoreBM
CLHEP::RandFlat * m_chooseEventRand
pickup an event store at random from the cache
std::vector< unsigned int > m_nEvtsXing
ServiceHandle< IAtRndmGenSvc > m_atRndmSvc
xAOD::EventInfo::PileUpType m_pileUpEventType
the type of events in this cache
unsigned int numberOfBkgForBunchCrossingDefaultImpl(unsigned int iXing) const
std::function< unsigned int(unsigned int) > m_f_numberOfBackgroundForBunchCrossing
function returning the number of bkg events per bunch crossing after bunch structure modulation
float m_collXingSF
float scaling number of collisions per bunch crossing
Gaudi::Property< unsigned short > m_subtractBC0
std::vector< PileUpStream > StreamVector
Gaudi::Property< bool > m_forceReadForBC0
Gaudi::Property< float > m_occupationFraction
PileUpType
Enumerator describing the types of pileup events.
virtual unsigned int nStores() const override final
how many stores in this cache
std::function< long() > m_f_collDistr
function returning the number of collisions per bunch crossing before bunch structure modulation
Gaudi::Property< float > m_collXing
virtual StatusCode setup(int firstXing, unsigned int nXings, unsigned int firstStore, IBeamIntensity *) override final
bool const RAWDATA *ch2 const
unsigned int nEvtsXing(unsigned int iXing) const
IBeamIntensity * m_beamInt
pointer to the IBeamIntensity distribution tool
Gaudi::Property< std::string > m_collDistrName
bool alreadyInUse(StreamVector::size_type iStream)
Gaudi::Property< float > m_readDownscale
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_ignoreSF
In-memory cache for pileup events.
virtual void resetEvtsPerXingScaleFactor(float sf) override final
reset scale factor at new run/lumiblk
a triple selector/context/store defines a stream
virtual StatusCode initialize() override final
unsigned int numberOfCavernBkgForBunchCrossing(unsigned int iXing) const
int m_zeroXing
offset of BC=0 xing
long collXing()
meant to be used (mainly) via m_f_collDistr
CLHEP::RandPoisson * m_collXingPoisson
set number of collisions per bunch crossing (if Poisson distribution chosen)
ServiceHandle< IEvtSelector > m_selecName
unsigned int setNEvtsXing(unsigned int iXing)
Class describing the basic event information.
PileUpStream * current()
get current (last asked) stream
a triple selector/context/store defines a stream
std::vector< bool > m_usedStreams
Interface to in-memory cache for pileup events.
virtual ~BkgStreamsCache()
virtual StatusCode addSubEvts(unsigned int iXing, xAOD::EventInfo *overlaidEvent, int t0BinCenter) override final
Read input events in bkg stores and link them to overlay store.
BkgStreamsCache(const std::string &, const std::string &, const IInterface *)
virtual void newEvent() override final
inform cache that we start overlaying a new event
unsigned int numberOfBkgForBunchCrossingIgnoringBeamIntensity(unsigned int iXing) const
meant to be used via m_f_numberOfBackgroundForBunchCrossing
Gaudi::Property< std::string > m_randomStreamName
const xAOD::EventInfo * nextEvent(bool isCentralBunchCrossing)
get next bkg event from cache
CLHEP::RandFlat * m_readEventRand
read a new event every downscaleFactor accesses