74 float a=0,
b=0,e4e1thresh=0,ethresh=0;
99 float e4e1value =
e4e1(
id,rhs);
100 e4e1thresh = a* log10(energy) +
b;
117 float e6e2value =
e6e2(
id,rhs);
148 if ( e1 == 0 )
return 0;
149 const std::vector<DetId>& neighs =
neighbours(
id);
150 for (
size_t i=0;
i<neighs.size(); ++
i)
173 if ( e1 == 0 )
return 0;
175 const std::vector<DetId>& neighs =
neighbours(
id);
178 for (
size_t i=0;
i<neighs.size(); ++
i){
179 float ene =
recHitE(neighs[
i],rhs,
false);
189 s4_2 =
e4e1(maxid,rhs)*
e2;
191 return (s4_1 + s4_2) / (e1+
e2) -1. ;
202 if (
id.rawId() == 0 )
return 0;
209 if ( it != recHits.
end() ){
210 float ene= (*it).energy();
221 if (ene < threshold)
return 0;
232 std::vector<DetId>
ret;
270 for (rh=rhs.
begin(); rh!=rhs.
end(); ++rh){
T getParameter(std::string const &) const
const std::vector< DetId > neighbours(const DetId &id)
return the id of the 4 neighbours in the swiss cross
EcalCleaningAlgo(const edm::ParameterSet &p)
float tightenCrack_e4e1_single_
float recHitE(const DetId id, const EcalRecHitCollection &recHits, bool useTimingInfo)
float ignoreOutOfTimeThresh_
ignore kOutOfTime above threshold when calculating e4e1
float e4e1Treshold_barrel_
std::vector< EcalRecHit >::const_iterator const_iterator
EEDetId offsetBy(int nrStepsX, int nrStepsY) const
EcalRecHit::Flags checkTopology(const DetId &id, const EcalRecHitCollection &rhs)
float tightenCrack_e1_double_
float e4e1(const DetId &id, const EcalRecHitCollection &rhs)
yet another function to calculate swiss cross
static bool isNextToBoundary(EBDetId id)
bool isNearCrack(const DetId &detid)
in EB, check if we are near a crack
static bool isNextToRingBoundary(EEDetId id)
float tightenCrack_e6e2_double_
EBDetId offsetBy(int nrStepsEta, int nrStepsPhi) const
float tightenCrack_e1_single_
std::vector< EcalRecHit >::iterator iterator
const_iterator end() const
iterator find(key_type k)
void setFlags(EcalRecHitCollection &rhs)
float e4e1Treshold_endcap_
const_iterator begin() const
float e6e2(const DetId &id, const EcalRecHitCollection &rhs)