CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::PileUp Class Reference

#include <PileUp.h>

Public Member Functions

double averageNumber () const
 
void beginJob (eventsetup::ESRecordsToProductResolverIndices const &)
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
 
void beginRun (const edm::Run &run, const edm::EventSetup &setup)
 
void beginStream (edm::StreamID)
 
void CalculatePileup (int MinBunch, int MaxBunch, std::vector< int > &PileupSelection, std::vector< float > &TrueNumInteractions, StreamID const &)
 
bool doPileUp (int BX)
 
void dropUnwantedBranches (std::vector< std::string > const &wantedBranches)
 
void endLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
 
void endRun (const edm::Run &run, const edm::EventSetup &setup)
 
void endStream ()
 
void endStream (ExceptionCollector &)
 
const unsigned int & input () const
 
void input (unsigned int s)
 
 PileUp (ParameterSet const &pset, const std::shared_ptr< PileUpConfig > &config, edm::ConsumesCollector iC, const bool mixingConfigFromDB)
 
template<typename T >
void playOldFormatPileUp (std::vector< edm::EventID >::const_iterator begin, std::vector< edm::EventID >::const_iterator end, std::vector< edm::SecondaryEventIDAndFileInfo > &ids, T eventOperator)
 
template<typename T >
void playPileUp (std::vector< edm::SecondaryEventIDAndFileInfo >::const_iterator begin, std::vector< edm::SecondaryEventIDAndFileInfo >::const_iterator end, std::vector< edm::SecondaryEventIDAndFileInfo > &ids, T eventOperator)
 
bool poisson () const
 
template<typename T >
void readPileUp (edm::EventID const &signal, std::vector< edm::SecondaryEventIDAndFileInfo > &ids, T eventOperator, int const NumPU, StreamID const &)
 
void reload (const edm::EventSetup &setup)
 
void setupPileUpEvent (const edm::EventSetup &setup)
 
 ~PileUp ()
 

Private Member Functions

std::unique_ptr< CLHEP::RandPoisson > const & poissonDistr_OOT (StreamID const &streamID)
 
std::unique_ptr< CLHEP::RandPoissonQ > const & poissonDistribution (StreamID const &streamID)
 
CLHEP::HepRandomEngine * randomEngine (StreamID const &streamID)
 
void setRandomEngine (StreamID)
 
void setRandomEngine (LuminosityBlock const &)
 

Private Attributes

double averageNumber_
 
edm::ESGetToken< MixingModuleConfig, MixingRcdconfigToken_
 
std::unique_ptr< EventPrincipaleventPrincipal_
 
size_t fileNameHash_
 
bool fixed_
 
bool fixed_OOT_
 
std::shared_ptr< TH1F > histo_
 
bool histoDistribution_
 
std::unique_ptr< VectorInputSource > const input_
 
unsigned int inputType_
 
int const intAverage_
 
int intFixed_ITPU_
 
int intFixed_OOT_
 
std::shared_ptr< LuminosityBlockPrincipallumiPrincipal_
 
bool manage_OOT_
 
int maxBunch_cosmics_
 
int minBunch_cosmics_
 
bool none_
 
bool playback_
 
bool poisson_
 
bool poisson_OOT_
 
std::unique_ptr< CLHEP::RandPoisson > PoissonDistr_OOT_
 
std::unique_ptr< CLHEP::RandPoissonQ > PoissonDistribution_
 
bool probFunctionDistribution_
 
std::shared_ptr< ProcessConfigurationprocessConfiguration_
 
std::shared_ptr< ProcessContextprocessContext_
 
std::shared_ptr< ProductRegistryproductRegistry_
 
std::unique_ptr< SecondaryEventProviderprovider_
 
bool PU_Study_
 
CLHEP::HepRandomEngine * randomEngine_
 
PileupRandomNumberGeneratorrandomGenerator_ = nullptr
 
std::shared_ptr< RunPrincipalrunPrincipal_
 
bool sequential_
 
std::optional< ServiceTokenserviceToken_
 
std::string Source_type_
 
std::shared_ptr< StreamContextstreamContext_
 
std::string Study_type_
 
std::string type_
 

Detailed Description

Definition at line 44 of file PileUp.h.

Constructor & Destructor Documentation

◆ PileUp()

edm::PileUp::PileUp ( ParameterSet const &  pset,
const std::shared_ptr< PileUpConfig > &  config,
edm::ConsumesCollector  iC,
const bool  mixingConfigFromDB 
)
explicit

Definition at line 70 of file PileUp.cc.

References edm::BeginLuminosityBlock, configToken_, edm::ServiceRegistry::createContaining(), dqmPostProcessing_online::DB, edm::ParameterSet::emptyParameterSetID(), edm::ConsumesCollector::esConsumes(), eventPrincipal_, Exception, fixed_, fixed_OOT_, edm::ParameterSet::getUntrackedParameter(), histoDistribution_, input_, edm::ServiceRegistry::instance(), intFixed_ITPU_, intFixed_OOT_, edm::Service< T >::isAvailable(), manage_OOT_, maxBunch_cosmics_, minBunch_cosmics_, eostools::move(), names, none_, mix_2012_lumiLevel_15_20_50ns_PoissonOOTPU_cfi::OOT_type, poisson_, poisson_OOT_, probFunctionDistribution_, processConfiguration_, processContext_, HLT_2024v14_cff::producers, productRegistry_, provider_, muonDTDigis_cfi::pset, PU_Study_, randomGenerator_, serviceToken_, Source_type_, AlCaHLTBitMon_QueryRunRegistry::string, Study_type_, HcalDetIdTransform::transform(), and type_.

74  : type_(pset.getParameter<std::string>("type")),
75  Source_type_(config->sourcename_),
76  averageNumber_(config->averageNumber_),
77  intAverage_(static_cast<int>(averageNumber_)),
78  histo_(std::make_shared<TH1F>(*config->histo_)),
79  histoDistribution_(type_ == "histo"),
80  probFunctionDistribution_(type_ == "probFunction"),
81  poisson_(type_ == "poisson"),
82  fixed_(type_ == "fixed"),
83  none_(type_ == "none"),
84  fileNameHash_(0U),
87  ->makeVectorInputSource(
88  pset, VectorInputSourceDescription(productRegistry_, edm::PreallocationConfiguration()))
89  .release()),
90  processConfiguration_(new ProcessConfiguration(std::string("@MIXING"), getReleaseVersion(), getPassID())),
91  processContext_(new ProcessContext()),
94  runPrincipal_(),
95  provider_(),
98  randomEngine_(),
99  playback_(config->playback_),
100  sequential_(pset.getUntrackedParameter<bool>("sequential", false)) {
101  if (mixingConfigFromDB) {
103  }
104 
105  // Use the empty parameter set for the parameter set ID of our "@MIXING" process.
107  processContext_->setProcessConfiguration(processConfiguration_.get());
108 
109  if (pset.existsAs<std::vector<ParameterSet> >("producers", true)) {
110  std::vector<ParameterSet> producers = pset.getParameter<std::vector<ParameterSet> >("producers");
111 
112  std::vector<std::string> names;
113  names.reserve(producers.size());
114  std::transform(producers.begin(), producers.end(), std::back_inserter(names), [](edm::ParameterSet const& iPSet) {
115  return iPSet.getParameter<std::string>("@module_label");
116  });
117  auto randomGenerator = std::make_unique<PileupRandomNumberGenerator>(names);
118  randomGenerator_ = randomGenerator.get();
119  std::unique_ptr<edm::RandomNumberGenerator> baseGen = std::move(randomGenerator);
121  std::move(baseGen), edm::ServiceRegistry::instance().presentToken(), true);
122 
123  provider_ = std::make_unique<SecondaryEventProvider>(producers, *productRegistry_, processConfiguration_);
124  }
125 
126  productRegistry_->setFrozen();
127 
128  // A modified HistoryAppender must be used for unscheduled processing.
129  eventPrincipal_ = std::make_unique<EventPrincipal>(input_->productRegistry(),
130  std::make_shared<BranchIDListHelper>(),
131  std::make_shared<ThinnedAssociationsHelper>(),
133  nullptr);
134 
135  bool DB = type_ == "readDB";
136 
137  if (pset.exists("nbPileupEvents")) {
138  if (0 != pset.getParameter<edm::ParameterSet>("nbPileupEvents").getUntrackedParameter<int>("seed", 0)) {
139  edm::LogWarning("MixingModule") << "Parameter nbPileupEvents.seed is not supported";
140  }
141  }
142 
144  if (!rng.isAvailable()) {
145  throw cms::Exception("Configuration")
146  << "PileUp requires the RandomNumberGeneratorService\n"
147  "which is not present in the configuration file. You must add the service\n"
148  "in the configuration file or remove the modules that require it.";
149  }
150 
152  throw cms::Exception("Illegal parameter value", "PileUp::PileUp(ParameterSet const& pset)")
153  << "'type' parameter (a string) has a value of '" << type_ << "'.\n"
154  << "Legal values are 'poisson', 'fixed', or 'none'\n";
155  }
156 
157  if (!DB) {
158  manage_OOT_ = pset.getUntrackedParameter<bool>("manage_OOT", false);
159 
160  // Check for string describing special processing. Add these here for individual cases
161  PU_Study_ = false;
162  Study_type_ = pset.getUntrackedParameter<std::string>("Special_Pileup_Studies", "");
163 
164  if (Study_type_ == "Fixed_ITPU_Vary_OOTPU") {
165  PU_Study_ = true;
166  intFixed_ITPU_ = pset.getUntrackedParameter<int>("intFixed_ITPU", 0);
167  }
168 
169  if (manage_OOT_) { // figure out what the parameters are
170 
171  // if (playback_) throw cms::Exception("Illegal parameter clash","PileUp::PileUp(ParameterSet const& pset)")
172  // << " manage_OOT option not allowed with playback ";
173 
174  std::string OOT_type = pset.getUntrackedParameter<std::string>("OOT_type");
175 
176  if (OOT_type == "Poisson" || OOT_type == "poisson") {
177  poisson_OOT_ = true;
178  } else if (OOT_type == "Fixed" || OOT_type == "fixed") {
179  fixed_OOT_ = true;
180  // read back the fixed number requested out-of-time
181  intFixed_OOT_ = pset.getUntrackedParameter<int>("intFixed_OOT", -1);
182  if (intFixed_OOT_ < 0) {
183  throw cms::Exception("Illegal parameter value", "PileUp::PileUp(ParameterSet const& pset)")
184  << " Fixed out-of-time pileup requested, but no fixed value given ";
185  }
186  } else {
187  throw cms::Exception("Illegal parameter value", "PileUp::PileUp(ParameterSet const& pset)")
188  << "'OOT_type' parameter (a string) has a value of '" << OOT_type << "'.\n"
189  << "Legal values are 'poisson' or 'fixed'\n";
190  }
191  edm::LogInfo("MixingModule") << " Out-of-time pileup will be generated with a " << OOT_type
192  << " distribution. ";
193  }
194  }
195 
196  if (Source_type_ == "cosmics") { // allow for some extra flexibility for mixing
197  minBunch_cosmics_ = pset.getUntrackedParameter<int>("minBunch_cosmics", -1000);
198  maxBunch_cosmics_ = pset.getUntrackedParameter<int>("maxBunch_cosmics", 1000);
199  }
200  } // end of constructor
bool manage_OOT_
Definition: PileUp.h:129
size_t fileNameHash_
Definition: PileUp.h:143
std::string getPassID()
Definition: GetPassID.h:7
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
OOT_type
manage out-of-time pileup setting this to True means that the out-of-time pileup will have a differen...
std::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: PileUp.h:146
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
bool fixed_
Definition: PileUp.h:127
Definition: config.py:1
const std::string names[nVars_]
int const intAverage_
Definition: PileUp.h:122
std::shared_ptr< TH1F > histo_
Definition: PileUp.h:123
bool probFunctionDistribution_
Definition: PileUp.h:125
int maxBunch_cosmics_
Definition: PileUp.h:140
std::string Study_type_
Definition: PileUp.h:134
T getUntrackedParameter(std::string const &, T const &) const
bool histoDistribution_
Definition: PileUp.h:124
bool poisson_
Definition: PileUp.h:126
bool playback_
Definition: PileUp.h:164
PileupRandomNumberGenerator * randomGenerator_
Definition: PileUp.h:152
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145
bool poisson_OOT_
Definition: PileUp.h:130
static ServiceRegistry & instance()
static ServiceToken createContaining(std::unique_ptr< T > iService)
create a service token that holds the service defined by iService
int intFixed_ITPU_
Definition: PileUp.h:137
bool PU_Study_
Definition: PileUp.h:133
bool fixed_OOT_
Definition: PileUp.h:131
int minBunch_cosmics_
Definition: PileUp.h:139
std::unique_ptr< CLHEP::RandPoisson > PoissonDistr_OOT_
Definition: PileUp.h:156
Log< level::Info, false > LogInfo
std::string getReleaseVersion()
CLHEP::HepRandomEngine * randomEngine_
Definition: PileUp.h:157
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
Definition: PileUp.h:150
std::string type_
Definition: PileUp.h:119
static VectorInputSourceFactory const * get()
std::shared_ptr< ProductRegistry > productRegistry_
Definition: PileUp.h:144
bool sequential_
Definition: PileUp.h:167
std::string Source_type_
Definition: PileUp.h:120
bool none_
Definition: PileUp.h:128
std::unique_ptr< CLHEP::RandPoissonQ > PoissonDistribution_
Definition: PileUp.h:155
bool isAvailable() const
Definition: Service.h:40
int intFixed_OOT_
Definition: PileUp.h:136
std::shared_ptr< ProcessContext > processContext_
Definition: PileUp.h:147
Log< level::Warning, false > LogWarning
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: PileUp.h:149
std::shared_ptr< RunPrincipal > runPrincipal_
Definition: PileUp.h:151
static ParameterSetID emptyParameterSetID()
Definition: ParameterSet.cc:94
def move(src, dest)
Definition: eostools.py:511
double averageNumber_
Definition: PileUp.h:121
edm::ESGetToken< MixingModuleConfig, MixingRcd > configToken_
Definition: PileUp.h:142
unsigned transform(const HcalDetId &id, unsigned transformCode)

◆ ~PileUp()

edm::PileUp::~PileUp ( )

Definition at line 381 of file PileUp.cc.

381 {}

Member Function Documentation

◆ averageNumber()

double edm::PileUp::averageNumber ( ) const
inline

Definition at line 71 of file PileUp.h.

References averageNumber_.

Referenced by reload().

71 { return averageNumber_; }
double averageNumber_
Definition: PileUp.h:121

◆ beginJob()

void edm::PileUp::beginJob ( eventsetup::ESRecordsToProductResolverIndices const &  iES)

Definition at line 202 of file PileUp.cc.

References input_, edm::GlobalContext::kBeginJob, processContext_, productRegistry_, provider_, and serviceToken_.

202  {
203  input_->doBeginJob();
204  if (provider_.get() != nullptr) {
206  GlobalContext globalContext(GlobalContext::Transition::kBeginJob, processContext_.get());
207  provider_->beginJob(*productRegistry_, iES, globalContext);
208  }
209  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145
std::shared_ptr< ProductRegistry > productRegistry_
Definition: PileUp.h:144
std::shared_ptr< ProcessContext > processContext_
Definition: PileUp.h:147

◆ beginLuminosityBlock()

void edm::PileUp::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)

Definition at line 255 of file PileUp.cc.

References edm::StreamContext::kBeginLuminosityBlock, lumiPrincipal_, processConfiguration_, productRegistry_, provider_, runPrincipal_, serviceToken_, setRandomEngine(), singleTopDQM_cfi::setup, and streamContext_.

255  {
256  if (provider_.get() != nullptr) {
257  lumiPrincipal_.reset(new LuminosityBlockPrincipal(productRegistry_, *processConfiguration_, nullptr, 0));
258  lumiPrincipal_->setAux(lumi.luminosityBlockAuxiliary());
259  lumiPrincipal_->setRunPrincipal(runPrincipal_);
263  provider_->beginLuminosityBlock(*lumiPrincipal_, setup.impl(), lumi.moduleCallingContext(), *streamContext_);
264  }
265  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: PileUp.h:146
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
Definition: PileUp.h:150
void setRandomEngine(StreamID)
Definition: PileUp.cc:407
std::shared_ptr< ProductRegistry > productRegistry_
Definition: PileUp.h:144
std::shared_ptr< RunPrincipal > runPrincipal_
Definition: PileUp.h:151
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

◆ beginRun()

void edm::PileUp::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)

Definition at line 246 of file PileUp.cc.

References edm::StreamContext::kBeginRun, processConfiguration_, productRegistry_, provider_, writedatasetfile::run, runPrincipal_, serviceToken_, singleTopDQM_cfi::setup, and streamContext_.

246  {
247  if (provider_.get() != nullptr) {
248  runPrincipal_.reset(new RunPrincipal(productRegistry_, *processConfiguration_, nullptr, 0));
249  runPrincipal_->setAux(run.runAuxiliary());
252  provider_->beginRun(*runPrincipal_, setup.impl(), run.moduleCallingContext(), *streamContext_);
253  }
254  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::shared_ptr< ProcessConfiguration > processConfiguration_
Definition: PileUp.h:146
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::shared_ptr< ProductRegistry > productRegistry_
Definition: PileUp.h:144
std::shared_ptr< RunPrincipal > runPrincipal_
Definition: PileUp.h:151
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

◆ beginStream()

void edm::PileUp::beginStream ( edm::StreamID  )

Definition at line 211 of file PileUp.cc.

References eventPrincipal_, edm::StreamContext::kBeginStream, processContext_, provider_, serviceToken_, and streamContext_.

211  {
212  auto iID = eventPrincipal_->streamID(); // each producer has its own workermanager, so use default streamid
213  streamContext_.reset(new StreamContext(iID, processContext_.get()));
215  if (provider_.get() != nullptr) {
217  provider_->beginStream(iID, *streamContext_);
218  }
219  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::shared_ptr< ProcessContext > processContext_
Definition: PileUp.h:147
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: PileUp.h:149
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

◆ CalculatePileup()

void edm::PileUp::CalculatePileup ( int  MinBunch,
int  MaxBunch,
std::vector< int > &  PileupSelection,
std::vector< float > &  TrueNumInteractions,
StreamID const &  streamID 
)

Definition at line 414 of file PileUp.cc.

References averageNumber_, nano_mu_digi_cff::bx, ztail::d, fixed_, GetRandom(), histo_, histoDistribution_, createfilelist::int, intAverage_, intFixed_ITPU_, intFixed_OOT_, manage_OOT_, none_, poisson_, poisson_OOT_, poissonDistr_OOT(), poissonDistribution(), probFunctionDistribution_, provider_, PU_Study_, randomEngine(), setRandomEngine(), and Study_type_.

418  {
419  // if we are managing the distribution of out-of-time pileup separately, select the distribution for bunch
420  // crossing zero first, save it for later.
421 
422  int nzero_crossing = -1;
423  double Fnzero_crossing = -1;
424 
425  if (provider_) {
426  setRandomEngine(streamID);
427  }
428 
429  if (manage_OOT_) {
430  if (none_) {
431  nzero_crossing = 0;
432  } else if (poisson_) {
433  nzero_crossing = poissonDistribution(streamID)->fire();
434  } else if (fixed_) {
435  nzero_crossing = intAverage_;
437  // RANDOM_NUMBER_ERROR
438  // Random number should be generated by the engines from the
439  // RandomNumberGeneratorService. This appears to use the global
440  // engine in ROOT. This is not thread safe unless the module using
441  // it is a one module and declares a shared resource and all
442  // other modules using it also declare the same shared resource.
443  // This also breaks replay.
444  double d = GetRandom(histo_.get(), randomEngine(streamID));
445  //n = (int) floor(d + 0.5); // incorrect for bins with integer edges
446  Fnzero_crossing = d;
447  nzero_crossing = int(d);
448  }
449  }
450 
451  for (int bx = MinBunch; bx < MaxBunch + 1; ++bx) {
452  if (manage_OOT_) {
453  if (bx == 0 && !poisson_OOT_) {
454  PileupSelection.push_back(nzero_crossing);
455  TrueNumInteractions.push_back(nzero_crossing);
456  } else {
457  if (poisson_OOT_) {
458  if (PU_Study_ && (Study_type_ == "Fixed_ITPU_Vary_OOTPU") && bx == 0) {
459  PileupSelection.push_back(intFixed_ITPU_);
460  } else {
461  PileupSelection.push_back(poissonDistr_OOT(streamID)->fire(Fnzero_crossing));
462  }
463  TrueNumInteractions.push_back(Fnzero_crossing);
464  } else {
465  PileupSelection.push_back(intFixed_OOT_);
466  TrueNumInteractions.push_back(intFixed_OOT_);
467  }
468  }
469  } else {
470  if (none_) {
471  PileupSelection.push_back(0);
472  TrueNumInteractions.push_back(0.);
473  } else if (poisson_) {
474  PileupSelection.push_back(poissonDistribution(streamID)->fire());
475  TrueNumInteractions.push_back(averageNumber_);
476  } else if (fixed_) {
477  PileupSelection.push_back(intAverage_);
478  TrueNumInteractions.push_back(intAverage_);
480  // RANDOM_NUMBER_ERROR
481  // Random number should be generated by the engines from the
482  // RandomNumberGeneratorService. This appears to use the global
483  // engine in ROOT. This is not thread safe unless the module using
484  // it is a one module and declares a shared resource and all
485  // other modules using it also declare the same shared resource.
486  // This also breaks replay.
487  double d = GetRandom(histo_.get(), randomEngine(streamID));
488  PileupSelection.push_back(int(d));
489  TrueNumInteractions.push_back(d);
490  }
491  }
492  }
493  }
bool manage_OOT_
Definition: PileUp.h:129
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
static Double_t GetRandom(TH1 *th1, CLHEP::HepRandomEngine *rng)
Definition: PileUp.cc:52
bool fixed_
Definition: PileUp.h:127
std::unique_ptr< CLHEP::RandPoissonQ > const & poissonDistribution(StreamID const &streamID)
Definition: PileUp.cc:383
int const intAverage_
Definition: PileUp.h:122
std::shared_ptr< TH1F > histo_
Definition: PileUp.h:123
bool probFunctionDistribution_
Definition: PileUp.h:125
std::string Study_type_
Definition: PileUp.h:134
bool histoDistribution_
Definition: PileUp.h:124
bool poisson_
Definition: PileUp.h:126
bool poisson_OOT_
Definition: PileUp.h:130
int intFixed_ITPU_
Definition: PileUp.h:137
bool PU_Study_
Definition: PileUp.h:133
d
Definition: ztail.py:151
std::unique_ptr< CLHEP::RandPoisson > const & poissonDistr_OOT(StreamID const &streamID)
Definition: PileUp.cc:391
void setRandomEngine(StreamID)
Definition: PileUp.cc:407
bool none_
Definition: PileUp.h:128
CLHEP::HepRandomEngine * randomEngine(StreamID const &streamID)
Definition: PileUp.cc:399
int intFixed_OOT_
Definition: PileUp.h:136
double averageNumber_
Definition: PileUp.h:121

◆ doPileUp()

bool edm::PileUp::doPileUp ( int  BX)
inline

Definition at line 73 of file PileUp.h.

References averageNumber_, L1TStage2uGTEmulatorClient_cff::BX, funct::false, maxBunch_cosmics_, minBunch_cosmics_, none_, and Source_type_.

73  {
74  if (Source_type_ != "cosmics") {
75  return none_ ? false : averageNumber_ > 0.;
76  } else {
77  return (BX >= minBunch_cosmics_ && BX <= maxBunch_cosmics_);
78  }
79  }
int maxBunch_cosmics_
Definition: PileUp.h:140
int minBunch_cosmics_
Definition: PileUp.h:139
std::string Source_type_
Definition: PileUp.h:120
bool none_
Definition: PileUp.h:128
double averageNumber_
Definition: PileUp.h:121

◆ dropUnwantedBranches()

void edm::PileUp::dropUnwantedBranches ( std::vector< std::string > const &  wantedBranches)
inline

Definition at line 80 of file PileUp.h.

References input_.

80  {
81  input_->dropUnwantedBranches(wantedBranches);
82  }
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145

◆ endLuminosityBlock()

void edm::PileUp::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
)

Definition at line 274 of file PileUp.cc.

References edm::StreamContext::kEndLuminosityBlock, lumiPrincipal_, provider_, serviceToken_, singleTopDQM_cfi::setup, and streamContext_.

274  {
275  if (provider_.get() != nullptr) {
278  provider_->endLuminosityBlock(*lumiPrincipal_, setup.impl(), lumi.moduleCallingContext(), *streamContext_);
279  }
280  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
Definition: PileUp.h:150
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

◆ endRun()

void edm::PileUp::endRun ( const edm::Run run,
const edm::EventSetup setup 
)

Definition at line 267 of file PileUp.cc.

References edm::StreamContext::kEndRun, provider_, writedatasetfile::run, runPrincipal_, serviceToken_, singleTopDQM_cfi::setup, and streamContext_.

267  {
268  if (provider_.get() != nullptr) {
271  provider_->endRun(*runPrincipal_, setup.impl(), run.moduleCallingContext(), *streamContext_);
272  }
273  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::shared_ptr< RunPrincipal > runPrincipal_
Definition: PileUp.h:151
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

◆ endStream() [1/2]

void edm::PileUp::endStream ( )

Definition at line 221 of file PileUp.cc.

References edm::ExceptionCollector::hasThrown(), and edm::ExceptionCollector::rethrow().

221  {
222  ExceptionCollector exceptionCollector(
223  "Multiple exceptions were thrown while executing PileUp::endStream. An exception message follows for "
224  "each.\n");
225  endStream(exceptionCollector);
226 
227  if (exceptionCollector.hasThrown()) {
228  exceptionCollector.rethrow();
229  }
230  }
void endStream()
Definition: PileUp.cc:221

◆ endStream() [2/2]

void edm::PileUp::endStream ( ExceptionCollector exceptionCollector)

Definition at line 232 of file PileUp.cc.

References input_, edm::GlobalContext::kEndJob, edm::StreamContext::kEndStream, processContext_, provider_, serviceToken_, and streamContext_.

232  {
233  if (provider_.get() != nullptr) {
236  provider_->endStream(streamContext_->streamID(), *streamContext_, exceptionCollector);
237  // This is kind of strange, end of job running as part of endStream multiple times...
238  // For the moment, I'm leaving this as is but maybe we should think about this...
239  // I think nothing uses this code anymore anyway...
240  GlobalContext globalContext(GlobalContext::Transition::kEndJob, processContext_.get());
241  provider_->endJob(exceptionCollector, globalContext);
242  }
243  input_->doEndJob();
244  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145
std::shared_ptr< ProcessContext > processContext_
Definition: PileUp.h:147
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

◆ input() [1/2]

const unsigned int& edm::PileUp::input ( ) const
inline

Definition at line 108 of file PileUp.h.

References inputType_.

108 { return inputType_; }
unsigned int inputType_
Definition: PileUp.h:118

◆ input() [2/2]

void edm::PileUp::input ( unsigned int  s)
inline

Definition at line 109 of file PileUp.h.

References inputType_, and alignCSCRings::s.

109 { inputType_ = s; }
unsigned int inputType_
Definition: PileUp.h:118

◆ playOldFormatPileUp()

template<typename T >
void edm::PileUp::playOldFormatPileUp ( std::vector< edm::EventID >::const_iterator  begin,
std::vector< edm::EventID >::const_iterator  end,
std::vector< edm::SecondaryEventIDAndFileInfo > &  ids,
T  eventOperator 
)

Definition at line 229 of file PileUp.h.

References eventPrincipal_, fileNameHash_, and input_.

232  {
233  //TrueNumInteractions.push_back( end - begin ) ;
234  RecordEventID<T> recorder(ids, eventOperator);
235  input_->loopSpecified(*eventPrincipal_, fileNameHash_, begin, end, recorder);
236  }
size_t fileNameHash_
Definition: PileUp.h:143
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: PileUp.h:149

◆ playPileUp()

template<typename T >
void edm::PileUp::playPileUp ( std::vector< edm::SecondaryEventIDAndFileInfo >::const_iterator  begin,
std::vector< edm::SecondaryEventIDAndFileInfo >::const_iterator  end,
std::vector< edm::SecondaryEventIDAndFileInfo > &  ids,
T  eventOperator 
)

Definition at line 219 of file PileUp.h.

References eventPrincipal_, fileNameHash_, and input_.

222  {
223  //TrueNumInteractions.push_back( end - begin ) ;
224  RecordEventID<T> recorder(ids, eventOperator);
225  input_->loopSpecified(*eventPrincipal_, fileNameHash_, begin, end, recorder);
226  }
size_t fileNameHash_
Definition: PileUp.h:143
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: PileUp.h:149

◆ poisson()

bool edm::PileUp::poisson ( ) const
inline

Definition at line 72 of file PileUp.h.

References poisson_.

72 { return poisson_; }
bool poisson_
Definition: PileUp.h:126

◆ poissonDistr_OOT()

std::unique_ptr< CLHEP::RandPoisson > const & edm::PileUp::poissonDistr_OOT ( StreamID const &  streamID)
private

Definition at line 391 of file PileUp.cc.

References PoissonDistr_OOT_, and randomEngine().

Referenced by CalculatePileup().

391  {
392  if (!PoissonDistr_OOT_) {
393  CLHEP::HepRandomEngine& engine = *randomEngine(streamID);
394  PoissonDistr_OOT_ = std::make_unique<CLHEP::RandPoisson>(engine);
395  }
396  return PoissonDistr_OOT_;
397  }
std::unique_ptr< CLHEP::RandPoisson > PoissonDistr_OOT_
Definition: PileUp.h:156
CLHEP::HepRandomEngine * randomEngine(StreamID const &streamID)
Definition: PileUp.cc:399

◆ poissonDistribution()

std::unique_ptr< CLHEP::RandPoissonQ > const & edm::PileUp::poissonDistribution ( StreamID const &  streamID)
private

Definition at line 383 of file PileUp.cc.

References averageNumber_, PoissonDistribution_, and randomEngine().

Referenced by CalculatePileup().

383  {
384  if (!PoissonDistribution_) {
385  CLHEP::HepRandomEngine& engine = *randomEngine(streamID);
386  PoissonDistribution_ = std::make_unique<CLHEP::RandPoissonQ>(engine, averageNumber_);
387  }
388  return PoissonDistribution_;
389  }
CLHEP::HepRandomEngine * randomEngine(StreamID const &streamID)
Definition: PileUp.cc:399
std::unique_ptr< CLHEP::RandPoissonQ > PoissonDistribution_
Definition: PileUp.h:155
double averageNumber_
Definition: PileUp.h:121

◆ randomEngine()

CLHEP::HepRandomEngine * edm::PileUp::randomEngine ( StreamID const &  streamID)
private

Definition at line 399 of file PileUp.cc.

References randomEngine_.

Referenced by CalculatePileup(), poissonDistr_OOT(), poissonDistribution(), readPileUp(), and setRandomEngine().

399  {
400  if (!randomEngine_) {
402  randomEngine_ = &rng->getEngine(streamID);
403  }
404  return randomEngine_;
405  }
CLHEP::HepRandomEngine * randomEngine_
Definition: PileUp.h:157

◆ readPileUp()

template<typename T >
void edm::PileUp::readPileUp ( edm::EventID const &  signal,
std::vector< edm::SecondaryEventIDAndFileInfo > &  ids,
T  eventOperator,
int const  pileEventCnt,
StreamID const &  streamID 
)

Generates events from a VectorInputSource. This function decides which method of VectorInputSource to call: sequential, random, or pre-specified. The ids are either ids to read or ids to store while reading. eventOperator has a type that matches the eventOperator in VectorInputSource::loopRandom.

The "signal" event is optionally used to restrict the secondary events used for pileup and mixing.

Definition at line 201 of file PileUp.h.

References eventPrincipal_, fileNameHash_, input_, randomEngine(), SiPixelLorentzAngle_cfi::read, and sequential_.

205  {
206  // One reason PileUp is responsible for recording event IDs is
207  // that it is the one that knows how many events will be read.
208  ids.reserve(pileEventCnt);
209  RecordEventID<T> recorder(ids, eventOperator);
210  int read = 0;
211  CLHEP::HepRandomEngine* engine = (sequential_ ? nullptr : randomEngine(streamID));
212  read = input_->loopOverEvents(*eventPrincipal_, fileNameHash_, pileEventCnt, recorder, engine, &signal);
213  if (read != pileEventCnt)
214  edm::LogWarning("PileUp") << "Could not read enough pileup events: only " << read << " out of " << pileEventCnt
215  << " requested.";
216  }
size_t fileNameHash_
Definition: PileUp.h:143
std::unique_ptr< VectorInputSource > const input_
Definition: PileUp.h:145
bool sequential_
Definition: PileUp.h:167
CLHEP::HepRandomEngine * randomEngine(StreamID const &streamID)
Definition: PileUp.cc:399
Log< level::Warning, false > LogWarning
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: PileUp.h:149

◆ reload()

void edm::PileUp::reload ( const edm::EventSetup setup)

Definition at line 293 of file PileUp.cc.

References funct::abs(), averageNumber(), averageNumber_, configToken_, MillePedeFileConverter_cfg::e, Exception, fixed_, fixed_OOT_, histo_, histoDistribution_, mps_fire::i, inputType_, createfilelist::int, intFixed_OOT_, dqmiolumiharvest::j, LogDebug, manage_OOT_, none_, poisson_, poisson_OOT_, PoissonDistribution_, probFunctionDistribution_, singleTopDQM_cfi::setup, type_, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

293  {
294  //get the required parameters from DB.
295  const MixingInputConfig& config = setup.getData(configToken_).config(inputType_);
296 
297  //get the type
298  type_ = config.type();
299  //set booleans
300  histoDistribution_ = type_ == "histo";
301  probFunctionDistribution_ = type_ == "probFunction";
302  poisson_ = type_ == "poisson";
303  fixed_ = type_ == "fixed";
304  none_ = type_ == "none";
305 
306  if (histoDistribution_)
307  edm::LogError("MisConfiguration") << "type histo cannot be reloaded from DB, yet";
308 
309  if (fixed_) {
311  } else if (poisson_) {
312  averageNumber_ = config.averageNumber();
313  if (PoissonDistribution_) {
314  PoissonDistribution_ = std::make_unique<CLHEP::RandPoissonQ>(PoissonDistribution_->engine(), averageNumber_);
315  }
316  } else if (probFunctionDistribution_) {
317  //need to reload the histogram from DB
318  const std::vector<int>& dataProbFunctionVar = config.probFunctionVariable();
319  std::vector<double> dataProb = config.probValue();
320 
321  int varSize = (int)dataProbFunctionVar.size();
322  int probSize = (int)dataProb.size();
323 
324  if ((dataProbFunctionVar[0] != 0) || (dataProbFunctionVar[varSize - 1] != (varSize - 1)))
325  throw cms::Exception("BadProbFunction")
326  << "Please, check the variables of the probability function! The first variable should be 0 and the "
327  "difference between two variables should be 1."
328  << std::endl;
329 
330  // Complete the vector containing the probability function data
331  // with the values "0"
332  if (probSize < varSize) {
333  edm::LogWarning("MixingModule") << " The probability function data will be completed with "
334  << (varSize - probSize) << " values 0.";
335 
336  for (int i = 0; i < (varSize - probSize); i++)
337  dataProb.push_back(0);
338 
339  probSize = dataProb.size();
340  edm::LogInfo("MixingModule") << " The number of the P(x) data set after adding the values 0 is " << probSize;
341  }
342 
343  // Create an histogram with the data from the probability function provided by the user
344  int xmin = (int)dataProbFunctionVar[0];
345  int xmax = (int)dataProbFunctionVar[varSize - 1] + 1; // need upper edge to be one beyond last value
346  int numBins = varSize;
347 
348  edm::LogInfo("MixingModule") << "An histogram will be created with " << numBins << " bins in the range (" << xmin
349  << "," << xmax << ")." << std::endl;
350 
351  histo_.reset(new TH1F("h", "Histo from the user's probability function", numBins, xmin, xmax));
352 
353  LogDebug("MixingModule") << "Filling histogram with the following data:" << std::endl;
354 
355  for (int j = 0; j < numBins; j++) {
356  LogDebug("MixingModule") << " x = " << dataProbFunctionVar[j] << " P(x) = " << dataProb[j];
357  histo_->Fill(dataProbFunctionVar[j] + 0.5,
358  dataProb[j]); // assuming integer values for the bins, fill bin centers, not edges
359  }
360 
361  // Check if the histogram is normalized
362  if (std::abs(histo_->Integral() - 1) > 1.0e-02) {
363  throw cms::Exception("BadProbFunction") << "The probability function should be normalized!!! " << std::endl;
364  }
365  averageNumber_ = histo_->GetMean();
366  }
367 
368  int oot = config.outOfTime();
369  manage_OOT_ = false;
370  if (oot == 1) {
371  manage_OOT_ = true;
372  poisson_OOT_ = false;
373  fixed_OOT_ = true;
374  intFixed_OOT_ = config.fixedOutOfTime();
375  } else if (oot == 2) {
376  manage_OOT_ = true;
377  poisson_OOT_ = true;
378  fixed_OOT_ = false;
379  }
380  }
bool manage_OOT_
Definition: PileUp.h:129
double averageNumber() const
Definition: PileUp.h:71
unsigned int inputType_
Definition: PileUp.h:118
bool fixed_
Definition: PileUp.h:127
Definition: config.py:1
Log< level::Error, false > LogError
std::shared_ptr< TH1F > histo_
Definition: PileUp.h:123
bool probFunctionDistribution_
Definition: PileUp.h:125
bool histoDistribution_
Definition: PileUp.h:124
bool poisson_
Definition: PileUp.h:126
bool poisson_OOT_
Definition: PileUp.h:130
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool fixed_OOT_
Definition: PileUp.h:131
Log< level::Info, false > LogInfo
std::string type_
Definition: PileUp.h:119
bool none_
Definition: PileUp.h:128
std::unique_ptr< CLHEP::RandPoissonQ > PoissonDistribution_
Definition: PileUp.h:155
int intFixed_OOT_
Definition: PileUp.h:136
Log< level::Warning, false > LogWarning
double averageNumber_
Definition: PileUp.h:121
edm::ESGetToken< MixingModuleConfig, MixingRcd > configToken_
Definition: PileUp.h:142
#define LogDebug(id)

◆ setRandomEngine() [1/2]

void edm::PileUp::setRandomEngine ( StreamID  streamID)
private

Definition at line 407 of file PileUp.cc.

References randomEngine(), randomGenerator_, and PileupRandomNumberGenerator::setEngine().

Referenced by beginLuminosityBlock(), and CalculatePileup().

407 { randomGenerator_->setEngine(*randomEngine(streamID)); }
PileupRandomNumberGenerator * randomGenerator_
Definition: PileUp.h:152
void setEngine(CLHEP::HepRandomEngine const &)
CLHEP::HepRandomEngine * randomEngine(StreamID const &streamID)
Definition: PileUp.cc:399

◆ setRandomEngine() [2/2]

void edm::PileUp::setRandomEngine ( LuminosityBlock const &  iLumi)
private

◆ setupPileUpEvent()

void edm::PileUp::setupPileUpEvent ( const edm::EventSetup setup)

Definition at line 282 of file PileUp.cc.

References eventPrincipal_, edm::StreamContext::kEvent, lumiPrincipal_, provider_, serviceToken_, singleTopDQM_cfi::setup, and streamContext_.

282  {
283  if (provider_.get() != nullptr) {
284  // note: run and lumi numbers must be modified to match lumiPrincipal_
285  eventPrincipal_->setLuminosityBlockPrincipal(lumiPrincipal_.get());
286  eventPrincipal_->setRunAndLumiNumber(lumiPrincipal_->run(), lumiPrincipal_->luminosityBlock());
289  provider_->setupPileUpEvent(*eventPrincipal_, setup.impl(), *streamContext_);
290  }
291  }
std::unique_ptr< SecondaryEventProvider > provider_
Definition: PileUp.h:154
std::optional< ServiceToken > serviceToken_
Definition: PileUp.h:153
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
Definition: PileUp.h:150
std::unique_ptr< EventPrincipal > eventPrincipal_
Definition: PileUp.h:149
std::shared_ptr< StreamContext > streamContext_
Definition: PileUp.h:148

Member Data Documentation

◆ averageNumber_

double edm::PileUp::averageNumber_
private

Definition at line 121 of file PileUp.h.

Referenced by averageNumber(), CalculatePileup(), doPileUp(), poissonDistribution(), and reload().

◆ configToken_

edm::ESGetToken<MixingModuleConfig, MixingRcd> edm::PileUp::configToken_
private

Definition at line 142 of file PileUp.h.

Referenced by PileUp(), and reload().

◆ eventPrincipal_

std::unique_ptr<EventPrincipal> edm::PileUp::eventPrincipal_
private

◆ fileNameHash_

size_t edm::PileUp::fileNameHash_
private

Definition at line 143 of file PileUp.h.

Referenced by playOldFormatPileUp(), playPileUp(), and readPileUp().

◆ fixed_

bool edm::PileUp::fixed_
private

Definition at line 127 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), and reload().

◆ fixed_OOT_

bool edm::PileUp::fixed_OOT_
private

Definition at line 131 of file PileUp.h.

Referenced by PileUp(), and reload().

◆ histo_

std::shared_ptr<TH1F> edm::PileUp::histo_
private

Definition at line 123 of file PileUp.h.

Referenced by CalculatePileup(), and reload().

◆ histoDistribution_

bool edm::PileUp::histoDistribution_
private

Definition at line 124 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), and reload().

◆ input_

std::unique_ptr<VectorInputSource> const edm::PileUp::input_
private

◆ inputType_

unsigned int edm::PileUp::inputType_
private

Definition at line 118 of file PileUp.h.

Referenced by input(), and reload().

◆ intAverage_

int const edm::PileUp::intAverage_
private

Definition at line 122 of file PileUp.h.

Referenced by CalculatePileup().

◆ intFixed_ITPU_

int edm::PileUp::intFixed_ITPU_
private

Definition at line 137 of file PileUp.h.

Referenced by CalculatePileup(), and PileUp().

◆ intFixed_OOT_

int edm::PileUp::intFixed_OOT_
private

Definition at line 136 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), and reload().

◆ lumiPrincipal_

std::shared_ptr<LuminosityBlockPrincipal> edm::PileUp::lumiPrincipal_
private

Definition at line 150 of file PileUp.h.

Referenced by beginLuminosityBlock(), endLuminosityBlock(), and setupPileUpEvent().

◆ manage_OOT_

bool edm::PileUp::manage_OOT_
private

Definition at line 129 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), and reload().

◆ maxBunch_cosmics_

int edm::PileUp::maxBunch_cosmics_
private

Definition at line 140 of file PileUp.h.

Referenced by doPileUp(), and PileUp().

◆ minBunch_cosmics_

int edm::PileUp::minBunch_cosmics_
private

Definition at line 139 of file PileUp.h.

Referenced by doPileUp(), and PileUp().

◆ none_

bool edm::PileUp::none_
private

Definition at line 128 of file PileUp.h.

Referenced by CalculatePileup(), doPileUp(), PileUp(), and reload().

◆ playback_

bool edm::PileUp::playback_
private

Definition at line 164 of file PileUp.h.

◆ poisson_

bool edm::PileUp::poisson_
private

Definition at line 126 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), poisson(), and reload().

◆ poisson_OOT_

bool edm::PileUp::poisson_OOT_
private

Definition at line 130 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), and reload().

◆ PoissonDistr_OOT_

std::unique_ptr<CLHEP::RandPoisson> edm::PileUp::PoissonDistr_OOT_
private

Definition at line 156 of file PileUp.h.

Referenced by poissonDistr_OOT().

◆ PoissonDistribution_

std::unique_ptr<CLHEP::RandPoissonQ> edm::PileUp::PoissonDistribution_
private

Definition at line 155 of file PileUp.h.

Referenced by poissonDistribution(), and reload().

◆ probFunctionDistribution_

bool edm::PileUp::probFunctionDistribution_
private

Definition at line 125 of file PileUp.h.

Referenced by CalculatePileup(), PileUp(), and reload().

◆ processConfiguration_

std::shared_ptr<ProcessConfiguration> edm::PileUp::processConfiguration_
private

Definition at line 146 of file PileUp.h.

Referenced by beginLuminosityBlock(), beginRun(), and PileUp().

◆ processContext_

std::shared_ptr<ProcessContext> edm::PileUp::processContext_
private

Definition at line 147 of file PileUp.h.

Referenced by beginJob(), beginStream(), endStream(), and PileUp().

◆ productRegistry_

std::shared_ptr<ProductRegistry> edm::PileUp::productRegistry_
private

Definition at line 144 of file PileUp.h.

Referenced by beginJob(), beginLuminosityBlock(), beginRun(), and PileUp().

◆ provider_

std::unique_ptr<SecondaryEventProvider> edm::PileUp::provider_
private

◆ PU_Study_

bool edm::PileUp::PU_Study_
private

Definition at line 133 of file PileUp.h.

Referenced by CalculatePileup(), and PileUp().

◆ randomEngine_

CLHEP::HepRandomEngine* edm::PileUp::randomEngine_
private

Definition at line 157 of file PileUp.h.

Referenced by randomEngine().

◆ randomGenerator_

PileupRandomNumberGenerator* edm::PileUp::randomGenerator_ = nullptr
private

Definition at line 152 of file PileUp.h.

Referenced by PileUp(), and setRandomEngine().

◆ runPrincipal_

std::shared_ptr<RunPrincipal> edm::PileUp::runPrincipal_
private

Definition at line 151 of file PileUp.h.

Referenced by beginLuminosityBlock(), beginRun(), and endRun().

◆ sequential_

bool edm::PileUp::sequential_
private

Definition at line 167 of file PileUp.h.

Referenced by readPileUp().

◆ serviceToken_

std::optional<ServiceToken> edm::PileUp::serviceToken_
private

◆ Source_type_

std::string edm::PileUp::Source_type_
private

Definition at line 120 of file PileUp.h.

Referenced by doPileUp(), and PileUp().

◆ streamContext_

std::shared_ptr<StreamContext> edm::PileUp::streamContext_
private

◆ Study_type_

std::string edm::PileUp::Study_type_
private

Definition at line 134 of file PileUp.h.

Referenced by CalculatePileup(), and PileUp().

◆ type_

std::string edm::PileUp::type_
private