|
|
Go to the documentation of this file.
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]));
28 for (
int i = 0;
i < 9; ++
i)
30 for (
int i = 0;
i < 9; ++
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) {
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_
iterator find(key_type k)
TMVA::IMethod * loadTMVAWeights(TMVA::Reader *reader, const std::string &method, const std::string &weightFile, bool verbose=false)
T getParameter(std::string const &) const
int iphi() const
get the crystal iphi
Abs< T >::type abs(const T &t)
const CaloTopology * topology_
std::string fullPath() const