CMS 3D CMS Logo

EgammaRandomSeeds.cc
Go to the documentation of this file.
2 
4 
6  const int offset = 0; //for future expansion
7  std::seed_seq seeder = {int(iEvent.id().event()),
8  int(iEvent.id().luminosityBlock()),
9  int(iEvent.id().run()),
10  int(scRef->seed()->seed().rawId()),
11  int(scRef->seed()->hitsAndFractions().size()),
12  offset};
13  uint32_t seed = 0, tries = 10;
14  do {
15  seeder.generate(&seed, &seed + 1);
16  tries++;
17  } while (seed == 0 && tries < 10);
18  return seed ? seed : iEvent.id().event() + 10000 * scRef.key();
19 }
key_type key() const
Accessor for product key.
Definition: Ref.h:250
int iEvent
Definition: GenABIO.cc:224
uint32_t getRandomSeedFromSC(const edm::Event &iEvent, const reco::SuperClusterRef scRef)