1 #ifndef Mixing_Base_PileUp_h
2 #define Mixing_Base_PileUp_h
14 #include "boost/shared_ptr.hpp"
26 class HepRandomEngine;
30 class SecondaryEventProvider;
42 void playPileUp(
const std::vector<edm::EventID> &ids,
T eventOperator);
48 input_->dropUnwantedBranches(wantedBranches);
63 void CalculatePileup(
int MinBunch,
int MaxBunch, std::vector<int>& PileupSelection, std::vector<float>& TrueNumInteractions,
StreamID const&);
99 std::unique_ptr<VectorInputSource>
const input_;
132 std::vector<edm::EventID>&
ids_;
139 ids_.push_back(eventPrincipal.
id());
158 const int pileEventCnt,
StreamID const& streamID) {
162 ids.reserve(pileEventCnt);
191 if (read != pileEventCnt)
192 edm::LogWarning(
"PileUp") <<
"Could not read enough pileup events: only " << read <<
" out of " << pileEventCnt <<
" requested.";
void playPileUp(const std::vector< edm::EventID > &ids, T eventOperator)
boost::shared_ptr< RunPrincipal > runPrincipal_
const unsigned int & input() const
std::unique_ptr< SecondaryEventProvider > provider_
std::vector< edm::EventID > & ids_
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
void readPileUp(edm::EventID const &signal, std::vector< edm::EventID > &ids, T eventOperator, const int NumPU, StreamID const &)
EventID const & id() const
PileUp(ParameterSet const &pset, double averageNumber, TH1F *const histo, const bool playback)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< CLHEP::HepRandomEngine * > randomEngines_
bool probFunctionDistribution_
boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
void endLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
double averageNumber() const
std::vector< std::unique_ptr< CLHEP::RandPoissonQ > > vPoissonDistribution_
std::unique_ptr< VectorInputSource > const input_
void input(unsigned int s)
RecordEventID(std::vector< edm::EventID > &ids, T &eventOperator)
void beginRun(const edm::Run &run, const edm::EventSetup &setup)
std::unique_ptr< CLHEP::RandPoissonQ > const & poissonDistribution(StreamID const &streamID)
void CalculatePileup(int MinBunch, int MaxBunch, std::vector< int > &PileupSelection, std::vector< float > &TrueNumInteractions, StreamID const &)
void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
void setupPileUpEvent(const edm::EventSetup &setup)
boost::shared_ptr< ProductRegistry > productRegistry_
void endRun(const edm::Run &run, const edm::EventSetup &setup)
boost::shared_ptr< ProcessConfiguration > processConfiguration_
std::unique_ptr< CLHEP::RandPoisson > const & poissonDistr_OOT(StreamID const &streamID)
void reload(const edm::EventSetup &setup)
CLHEP::HepRandomEngine * randomEngine(StreamID const &streamID)
std::vector< std::unique_ptr< CLHEP::RandPoisson > > vPoissonDistr_OOT_
std::unique_ptr< EventPrincipal > eventPrincipal_
void operator()(EventPrincipal const &eventPrincipal)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")