55 calotopo = theCaloTopology;
78 int IndDeadChannel[1]={-1};
80 double sum8 = MakeNxNMatrice(Id,hit_collection,IndDeadChannel,MNxN);
87 }
else if(algo_==
"NeuralNetworks"){
98 if ( NewEnergy > 5. * sum8 ) {
111 return correct(Id, hit_collection, algo_, Sum8Cut);
126 for(
int i=0;
i<121;
i++)MNxN[
i]=0.0;
133 std::vector<DetId> NxNaroundDC = topology->
getWindow(itID,size,size);
138 std::vector<DetId>::const_iterator theCells;
141 double EnergyMax = 0.0;
143 for(theCells=NxNaroundDC.begin();theCells<NxNaroundDC.end();theCells++){
149 if( goS_it != hit_collection->
end() && goS_it->energy()>=EnergyMax){EnergyMax=goS_it->energy(); EBCellMax = EBCell;}
154 if(EBCellMax.
null()){
return 0;}
165 std::vector<DetId> NxNaroundMaxCont = topology->
getWindow(EBCellMax,FixedSize,FixedSize);
170 std::vector<DetId>::const_iterator itCells;
171 for(itCells=NxNaroundMaxCont.begin();itCells<NxNaroundMaxCont.end();itCells++){
173 int CReta = EBitCell.
ieta();
174 int CRphi = EBitCell.
iphi();
177 if(!EBitCell.
null()){
179 if( goS_it != hit_collection->
end() ) Energy=goS_it->energy();
186 if((CReta * EBCellMax.
ieta()) < 0 && EBCellMax.
ieta()>0 )ietaCorr= -1;
187 if((CReta * EBCellMax.
ieta()) < 0 && EBCellMax.
ieta()<0 )ietaCorr= 1;
188 if((CReta * EBCellMax.
ieta()) > 0 )ietaCorr= 0;
189 int ieta = -( (CReta -ietaCorr) - EBCellMax.
ieta() ) +
int((FixedSize - 1)/2);
192 if((CRphi - EBCellMax.
iphi())> 50)iphiCorr= 360;
193 if((CRphi - EBCellMax.
iphi())<-50)iphiCorr=-360;
194 int iphi = CRphi - EBCellMax.
iphi() - iphiCorr + int((FixedSize - 1)/2);
196 int MIndex = ieta+iphi*FixedSize;
199 if(EBitCell == itID)IndDeadChannel[0]= MIndex;
210 if(theIndex>=48 && theIndex<=50)ESUMis += Energy;
211 if(theIndex>=59 && theIndex<=61)ESUMis += Energy;
212 if(theIndex>=70 && theIndex<=72)ESUMis += Energy;
double CorrectDeadChannelsClassic(double *M11x11Input, const int DCeta)
std::vector< EcalRecHit >::const_iterator const_iterator
EcalRecHit correct(const EBDetId Id, const EcalRecHitCollection *hit_collection, std::string algo_, double Sum8Cut)
int iphi() const
get the crystal iphi
EcalDeadChannelRecoveryAlgos()
int ieta() const
get the crystal ieta
double MakeNxNMatrice(EBDetId itID, const EcalRecHitCollection *hit_collection, int *IndDeadChannel, double *MNxN)
const_iterator end() const
double CorrectDeadChannelsNN(double *M5x5Input)
EcalRecHit Correct(const EBDetId Id, const EcalRecHitCollection *hit_collection, std::string algo_, double Sum8Cut)
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
bool null() const
is this a null id ?
iterator find(key_type k)
~EcalDeadChannelRecoveryAlgos()
tuple size
Write out results.