1 #ifndef CalibratedElectronProducerRun2_h
2 #define CalibratedElectronProducerRun2_h
45 theGBRForestName(conf.getParameter<
std::
string>(
"gbrForestName")),
46 theEpCombinationTool(),
47 theEnCorrectorRun2(theEpCombinationTool,
48 conf.getParameter<
bool>(
"isMC"),
49 conf.getParameter<
bool>(
"isSynchronization"),
50 conf.getParameter<
std::
string>(
"correctionFile")) {
55 produces<std::vector<T> >();
64 theEpCombinationTool.init(theGBRForestHandle.product());
67 iEvent.getByToken(theElectronToken,
in);
69 std::unique_ptr<std::vector<T> >
out(
new std::vector<T>());
70 out->reserve(
in->size());
72 if (theSemiDeterministicRng && !
in->empty()) {
73 const auto &
first =
in->front();
74 std::seed_seq seeder = {
int(
iEvent.id().event()),
75 int(
iEvent.id().luminosityBlock()),
80 uint32_t
seed = 0, tries = 10;
84 }
while (
seed == 0 && tries < 10);
85 theSemiDeterministicRng->SetSeed(
seed ?
seed :
iEvent.id().event());
88 for (
const T &ele : *
in) {
90 theEnCorrectorRun2.calibrate(
out->back(),
iEvent.id().run(),
iEvent.streamID());