38 #include <Math/VectorUtil.h>
133 if (
abs(particle.pdgId()) != 22 || particle.status() != 1)
139 closestPhoton = &particle;
157 : phoMapTags_(iConfig.getParameter<
std::vector<
std::
string>>(
"phoMVAs")),
158 phoMapBranchNames_(iConfig.getParameter<
std::vector<
std::
string>>(
"phoMVALabels")),
159 nPhoMaps_(phoMapBranchNames_.
size()),
160 valMapTags_(iConfig.getParameter<
std::vector<
std::
string>>(
"phoMVAValMaps")),
161 valMapBranchNames_(iConfig.getParameter<
std::vector<
std::
string>>(
"phoMVAValMapLabels")),
162 nValMaps_(valMapBranchNames_.
size()),
163 mvaCatTags_(iConfig.getParameter<
std::vector<
std::
string>>(
"phoMVACats")),
164 mvaCatBranchNames_(iConfig.getParameter<
std::vector<
std::
string>>(
"phoMVACatLabels")),
165 nCats_(mvaCatBranchNames_.
size()),
166 isMC_(iConfig.getParameter<
bool>(
"isMC")),
167 ptThreshold_(iConfig.getParameter<double>(
"ptThreshold")),
168 deltaR_(iConfig.getParameter<double>(
"deltaR")),
175 mvaPasses_(nPhoMaps_),
176 mvaValues_(nValMaps_),
178 variableHelper_(consumesCollector()),
179 mvaVarMngr_(iConfig.getParameter<
std::
string>(
"variableDefinition")),
180 nVars_(mvaVarMngr_.getNVars()),
182 doEnergyMatrix_(iConfig.getParameter<
bool>(
"doEnergyMatrix")),
183 energyMatrixSize_(iConfig.getParameter<
int>(
"energyMatrixSize")) {
250 std::unique_ptr<noZS::EcalClusterLazyTools> lazyTools;
259 int bx =
pu.getBunchCrossing();
287 for (
auto const& pho :
src->ptrs()) {
296 const auto&
seed = *(pho->superCluster()->seed());
301 for (
int iVar = 0; iVar <
nVars_; ++iVar) {
331 desc.
add<std::vector<std::string>>(
"phoMVAs", {});
332 desc.
add<std::vector<std::string>>(
"phoMVALabels", {});
333 desc.
add<std::vector<std::string>>(
"phoMVAValMaps", {});
334 desc.
add<std::vector<std::string>>(
"phoMVAValMapLabels", {});
335 desc.
add<std::vector<std::string>>(
"phoMVACats", {});
336 desc.
add<std::vector<std::string>>(
"phoMVACatLabels", {});
337 desc.
add<
bool>(
"doEnergyMatrix",
false);
338 desc.
add<
int>(
"energyMatrixSize", 2)->setComment(
"extension of crystals in each direction away from the seed");
339 desc.
add<
bool>(
"isMC",
true);
340 desc.
add<
double>(
"ptThreshold", 15.0);
341 desc.
add<
double>(
"deltaR", 0.1);