CMS 3D CMS Logo

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