|
|
Go to the documentation of this file.
20 for (
int i = 0;
i < 9; ++
i) {
23 reader->AddVariable(
"E" + std::to_string(
i + 1) +
"/(E1+E2+E3+E4+E6+E7+E8+E9)", &(
mx_.
rEn[
i]));
26 for (
int i = 0;
i < 9; ++
i)
28 for (
int i = 0;
i < 9; ++
i)
33 readerNoCrack = std::unique_ptr<TMVA::Reader>(
new TMVA::Reader(
"!Color:!Silent"));
34 readerCrack = std::unique_ptr<TMVA::Reader>(
new TMVA::Reader(
"!Color:!Silent"));
71 double neighTotEn = 0.;
75 std::vector<DetId> m3x3aroundDC = EcalClusterTools::matrixDetId(
topology_,
id, 1);
76 if (m3x3aroundDC.size() < 9) {
83 for (
auto const &theCells : m3x3aroundDC) {
87 int iPhiCentral = cell.
iphi();
89 if (iEtaCentral < 2 ||
std::abs(iEtaCentral - 25) < 2 ||
std::abs(iEtaCentral - 45) < 2 ||
90 std::abs(iEtaCentral - 65) < 2 || iEtaCentral > 83 || (
int(iPhiCentral + 0.5) % 20 == 0))
95 if (goS_it != hit_collection.
end() && cell !=
id) {
96 if (goS_it->energy() < single8Cut) {
100 neighTotEn += goS_it->energy();
101 mx_.
rEn[cellIndex] = goS_it->energy();
106 }
else if (cell ==
id) {
118 if (cellIndex > 0 && neighTotEn >= single8Cut * 8. && neighTotEn >= sum8Cut) {
119 bool allneighs =
true;
121 for (
unsigned int icell = 0; icell < 9; icell++) {
122 if (
mx_.
rEn[icell] < single8Cut && icell != 4) {
127 if (allneighs ==
true) {
int ieta() const
get the crystal ieta
std::vector< EcalRecHit >::const_iterator const_iterator
std::array< float, 9 > ieta
edm::FileInPath bdtWeightFileCracks_
double recover(const DetIdT id, const EcalRecHitCollection &hit_collection, double single8Cut, double sum8Cut, bool *acceptFlag)
EcalDeadChannelRecoveryBDTG()
std::unique_ptr< TMVA::Reader > readerCrack
constexpr bool null() const
is this a null id ?
std::unique_ptr< TMVA::Reader > readerNoCrack
void setParameters(const edm::ParameterSet &ps)
~EcalDeadChannelRecoveryBDTG()
std::array< float, 9 > iphi
std::array< float, 9 > rEn
void addVariables(TMVA::Reader *reader)
const_iterator end() const
edm::FileInPath bdtWeightFileNoCracks_
T getParameter(std::string const &) const
iterator find(key_type k)
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
int iphi() const
get the crystal iphi
Abs< T >::type abs(const T &t)
const CaloTopology * topology_
std::string fullPath() const