Main Page
Namespaces
Classes
Package Documentation
RecoEgamma
EgammaTools
src
EgammaRandomSeeds.cc
Go to the documentation of this file.
1
#include "
RecoEgamma/EgammaTools/interface/EgammaRandomSeeds.h
"
2
3
#include "
DataFormats/EgammaReco/interface/SuperCluster.h
"
4
5
uint32_t
egamma::getRandomSeedFromSC
(
const
edm::Event
&
iEvent
,
const
reco::SuperClusterRef
scRef)
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
}
edm::EventID::run
RunNumber_t run() const
Definition:
EventID.h:39
edm::EventID::event
EventNumber_t event() const
Definition:
EventID.h:41
edm::Ref< SuperClusterCollection >
SurveyInfoScenario_cff.seed
seed
Definition:
SurveyInfoScenario_cff.py:295
edm::Ref::key
key_type key() const
Accessor for product key.
Definition:
Ref.h:265
edm::EventID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition:
EventID.h:40
iEvent
int iEvent
Definition:
GenABIO.cc:230
createfilelist.int
int
Definition:
createfilelist.py:10
EgammaRandomSeeds.h
PFRecoTauDiscriminationByIsolation_cfi.offset
offset
Definition:
PFRecoTauDiscriminationByIsolation_cfi.py:61
edm::EventBase::id
edm::EventID id() const
Definition:
EventBase.h:60
egamma::getRandomSeedFromSC
uint32_t getRandomSeedFromSC(const edm::Event &iEvent, const reco::SuperClusterRef scRef)
Definition:
EgammaRandomSeeds.cc:5
edm::Event
Definition:
Event.h:69
SuperCluster.h
Generated for CMSSW Reference Manual by
1.8.11