1 #ifndef CalibratedPhotonProducer_h
2 #define CalibratedPhotonProducer_h
37 theEnCorrectorRun2(conf.getParameter<
bool>(
"isMC"),
38 conf.getParameter<
bool>(
"isSynchronization"),
39 conf.getParameter<
std::
string>(
"correctionFile")) {
44 produces<std::vector<T> >();
53 iEvent.getByToken(thePhotonToken,
in);
55 if (theSemiDeterministicRng && !
in->empty()) {
56 const auto &
first =
in->front();
57 std::seed_seq seeder = {
int(
iEvent.id().event()),
58 int(
iEvent.id().luminosityBlock()),
63 uint32_t
seed = 0, tries = 10;
67 }
while (
seed == 0 && tries < 10);
68 theSemiDeterministicRng->SetSeed(
seed ?
seed :
iEvent.id().event());
71 std::unique_ptr<std::vector<T> >
out(
new std::vector<T>());
72 out->reserve(
in->size());
74 for (
const T &ele : *
in) {
76 theEnCorrectorRun2.calibrate(
out->back(),
iEvent.id().run(),
iEvent.streamID());