- static Int_t nSupMod1=0, nModule1=0, nIphi1=0, nIeta1=0, iphi1=0, ieta1=0;
- static Int_t nSupMod2=0, nModule2=0, nIphi2=0, nIeta2=0, iphi2=0, ieta2=0;
- static Int_t rowdiff=0, coldiff=0;
+ if (fEnergyGrad) { //false by default
+ if (d2->GetCalibAmp()>d1->GetCalibAmp())
+ return 3; // energy of neighboring cell should be smaller in order to become a neighbor
+ }
+
+ Int_t nSupMod1=0, nModule1=0, nIphi1=0, nIeta1=0, iphi1=0, ieta1=0;
+ Int_t nSupMod2=0, nModule2=0, nIphi2=0, nIeta2=0, iphi2=0, ieta2=0;
+ Int_t rowdiff=0, coldiff=0;