1 #ifndef RecoEgamma_EgammaTools_EgammaRandomSeeds_h
2 #define RecoEgamma_EgammaTools_EgammaRandomSeeds_h
22 std::seed_seq seeder = {int(iEvent.
id().
event()),
24 int(iEvent.
id().
run()),
28 uint32_t
seed = 0, tries = 10;
30 seeder.generate(&seed, &seed + 1);
32 }
while (seed == 0 && tries < 10);
33 return seed ? seed : iEvent.
id().
event() + 10000 * objNr;
EventNumber_t event() const
LuminosityBlockNumber_t luminosityBlock() const
uint32_t getRandomSeedFromObj(const edm::Event &iEvent, const T &obj, size_t nrObjs, size_t objNr)
uint32_t getRandomSeedFromSC(const edm::Event &iEvent, const reco::SuperClusterRef scRef)