1 #ifndef Mixing_Base_PileUp_h
2 #define Mixing_Base_PileUp_h
23 class HepRandomEngine;
27 class SecondaryEventProvider;
39 void playPileUp(
const std::vector<edm::EventID> &ids,
T eventOperator);
52 input_->dropUnwantedBranches(wantedBranches);
67 void CalculatePileup(
int MinBunch,
int MaxBunch, std::vector<int>& PileupSelection, std::vector<float>& TrueNumInteractions,
StreamID const&);
108 std::unique_ptr<VectorInputSource>
const input_;
141 std::vector<edm::EventID>&
ids_;
148 ids_.push_back(eventPrincipal.
id());
182 const int pileEventCnt,
StreamID const& streamID) {
186 ids.reserve(pileEventCnt);
202 if (read != pileEventCnt)
203 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)
const unsigned int & input() const
std::unique_ptr< SecondaryEventProvider > provider_
std::vector< edm::EventID > & ids_
std::shared_ptr< ProcessConfiguration > processConfiguration_
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
PassEventID(T &eventOperator)
PileUp(ParameterSet const &pset, std::string sourcename, double averageNumber, TH1F *const histo, const bool playback)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< CLHEP::HepRandomEngine * > randomEngines_
bool probFunctionDistribution_
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)
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
void endRun(const edm::Run &run, const edm::EventSetup &setup)
std::shared_ptr< ProductRegistry > productRegistry_
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_
void operator()(EventPrincipal const &eventPrincipal)
std::unique_ptr< EventPrincipal > eventPrincipal_
std::shared_ptr< RunPrincipal > runPrincipal_
void operator()(EventPrincipal const &eventPrincipal)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")