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
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
}
edm::Ref< SuperClusterCollection >
fileCollector.seed
seed
Definition:
fileCollector.py:127
edm::Ref::key
key_type key() const
Accessor for product key.
Definition:
Ref.h:250
iEvent
int iEvent
Definition:
GenABIO.cc:224
createfilelist.int
int
Definition:
createfilelist.py:10
EgammaRandomSeeds.h
egamma::getRandomSeedFromSC
uint32_t getRandomSeedFromSC(const edm::Event &iEvent, const reco::SuperClusterRef scRef)
Definition:
EgammaRandomSeeds.cc:5
edm::Event
Definition:
Event.h:73
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:83
SuperCluster.h
Generated for CMSSW Reference Manual by
1.8.14