22 for (
int i = 0;
i < 9; ++
i) {
25 reader->AddVariable(
"E" + std::to_string(
i + 1) +
"/(E1+E2+E3+E4+E6+E7+E8+E9)", &(
mx_.
rEn[
i]));
27 reader->AddVariable(
"E1+E2+E3+E4+E6+E7+E8+E9", &(
mx_.
sumE8));
28 for (
int i = 0;
i < 9; ++
i)
29 reader->AddVariable(
"iEta" + std::to_string(
i + 1), &(
mx_.
ieta[
i]));
30 for (
int i = 0;
i < 9; ++
i)
31 reader->AddVariable(
"iPhi" + std::to_string(
i + 1), &(
mx_.
iphi[
i]));
35 readerNoCrack = std::make_unique<TMVA::Reader>(
"!Color:!Silent");
36 readerCrack = std::make_unique<TMVA::Reader>(
"!Color:!Silent");
73 double neighTotEn = 0.;
77 std::vector<DetId> m3x3aroundDC = EcalClusterTools::matrixDetId(
topology_,
id, 1);
78 if (m3x3aroundDC.size() < 9) {
85 for (
auto const &theCells : m3x3aroundDC) {
89 int iPhiCentral = cell.
iphi();
91 if (iEtaCentral < 2 ||
std::abs(iEtaCentral - 25) < 2 ||
std::abs(iEtaCentral - 45) < 2 ||
92 std::abs(iEtaCentral - 65) < 2 || iEtaCentral > 83 || (
int(iPhiCentral + 0.5) % 20 == 0))
97 if (goS_it != hit_collection.
end() && cell !=
id) {
98 if (goS_it->energy() < single8Cut) {
102 neighTotEn += goS_it->energy();
103 mx_.
rEn[cellIndex] = goS_it->energy();
108 }
else if (cell ==
id) {
120 if (cellIndex > 0 && neighTotEn >= single8Cut * 8. && neighTotEn >= sum8Cut) {
121 bool allneighs =
true;
123 for (
unsigned int icell = 0; icell < 9; icell++) {
124 if (
mx_.
rEn[icell] < single8Cut && icell != 4) {
129 if (allneighs ==
true) {
std::array< float, 9 > iphi
uint16_t *__restrict__ id
void setParameters(const edm::ParameterSet &ps)
edm::FileInPath bdtWeightFileCracks_
constexpr bool null() const
is this a null id ?
edm::FileInPath bdtWeightFileNoCracks_
std::vector< EcalRecHit >::const_iterator const_iterator
Exp< T >::type exp(const T &t)
const CaloTopology * topology_
int iphi() const
get the crystal iphi
EcalDeadChannelRecoveryBDTG()
Abs< T >::type abs(const T &t)
std::unique_ptr< TMVA::Reader > readerCrack
int ieta() const
get the crystal ieta
const_iterator end() const
T getParameter(std::string const &) const
std::array< float, 9 > ieta
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
double recover(const DetIdT id, const EcalRecHitCollection &hit_collection, double single8Cut, double sum8Cut, bool *acceptFlag)
iterator find(key_type k)
~EcalDeadChannelRecoveryBDTG()
std::string fullPath() const
std::unique_ptr< TMVA::Reader > readerNoCrack
void addVariables(TMVA::Reader *reader)
std::array< float, 9 > rEn