1 #ifndef Mixing_Base_PileUp_h
2 #define Mixing_Base_PileUp_h
14 #include "CLHEP/Random/RandPoissonQ.h"
15 #include "CLHEP/Random/RandFlat.h"
17 #include "boost/shared_ptr.hpp"
34 class SecondaryEventProvider;
42 void readPileUp(
edm::EventID const & signal, std::vector<edm::EventID> &ids,
T eventOperator,
const int NumPU );
45 void playPileUp(
const std::vector<edm::EventID> &ids,
T eventOperator);
51 input_->dropUnwantedBranches(wantedBranches);
66 void CalculatePileup(
int MinBunch,
int MaxBunch, std::vector<int>& PileupSelection, std::vector<float>& TrueNumInteractions);
97 std::unique_ptr<VectorInputSource>
const input_;
130 std::vector<edm::EventID>&
ids_;
137 ids_.push_back(eventPrincipal.
id());
159 ids.reserve(pileEventCnt);
188 if (read != pileEventCnt)
189 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)
void CalculatePileup(int MinBunch, int MaxBunch, std::vector< int > &PileupSelection, std::vector< float > &TrueNumInteractions)
boost::shared_ptr< RunPrincipal > runPrincipal_
const unsigned int & input() const
std::unique_ptr< SecondaryEventProvider > provider_
std::vector< edm::EventID > & ids_
std::unique_ptr< CLHEP::RandPoisson > poissonDistr_OOT_
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
EventID const & id() const
void readPileUp(edm::EventID const &signal, std::vector< edm::EventID > &ids, T eventOperator, const int NumPU)
PileUp(ParameterSet const &pset, double averageNumber, TH1F *const histo, const bool playback)
LuminosityBlockNumber_t luminosityBlock() const
bool probFunctionDistribution_
boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
void endLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
double averageNumber() const
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)
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_
void reload(const edm::EventSetup &setup)
std::unique_ptr< CLHEP::RandPoissonQ > poissonDistribution_
std::unique_ptr< EventPrincipal > eventPrincipal_
void operator()(EventPrincipal const &eventPrincipal)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")