1 #ifndef CalibratedElectronProducerRun2_h
2 #define CalibratedElectronProducerRun2_h
43 theGBRForestName(conf.getParameter<
std::
string>(
"gbrForestName")),
44 theEpCombinationTool(),
45 theEnCorrectorRun2(theEpCombinationTool,
46 conf.getParameter<
bool>(
"isMC"),
47 conf.getParameter<
bool>(
"isSynchronization"),
48 conf.getParameter<
std::
string>(
"correctionFile")) {
53 produces<std::vector<T> >();
62 theEpCombinationTool.init(theGBRForestHandle.product());
65 iEvent.getByToken(theElectronToken,
in);
67 std::unique_ptr<std::vector<T> >
out(
new std::vector<T>());
68 out->reserve(
in->size());
70 if (theSemiDeterministicRng && !
in->empty()) {
71 const auto &
first =
in->front();
72 std::seed_seq seeder = {
int(
iEvent.id().event()),
73 int(
iEvent.id().luminosityBlock()),
78 uint32_t
seed = 0, tries = 10;
82 }
while (
seed == 0 && tries < 10);
83 theSemiDeterministicRng->SetSeed(
seed ?
seed :
iEvent.id().event());
86 for (
const T &ele : *
in) {
88 theEnCorrectorRun2.calibrate(
out->back(),
iEvent.id().run(),
iEvent.streamID());