1 #ifndef CalibratedPhotonProducer_h
2 #define CalibratedPhotonProducer_h
35 theEnCorrectorRun2(conf.getParameter<
bool>(
"isMC"),
36 conf.getParameter<
bool>(
"isSynchronization"),
37 conf.getParameter<
std::
string>(
"correctionFile")) {
42 produces<std::vector<T> >();
51 iEvent.getByToken(thePhotonToken,
in);
53 if (theSemiDeterministicRng && !
in->empty()) {
54 const auto &
first =
in->front();
55 std::seed_seq seeder = {
int(
iEvent.id().event()),
56 int(
iEvent.id().luminosityBlock()),
61 uint32_t
seed = 0, tries = 10;
65 }
while (
seed == 0 && tries < 10);
66 theSemiDeterministicRng->SetSeed(
seed ?
seed :
iEvent.id().event());
69 std::unique_ptr<std::vector<T> >
out(
new std::vector<T>());
70 out->reserve(
in->size());
72 for (
const T &ele : *
in) {
74 theEnCorrectorRun2.calibrate(
out->back(),
iEvent.id().run(),
iEvent.streamID());