91 float energy =
recHitE(
id,rhs,
false);
98 float e4e1value =
e4e1(
id,rhs);
99 e4e1thresh = a* log10(energy) +
b;
116 float e6e2value =
e6e2(
id,rhs);
144 float e1 =
recHitE(
id, rhs,
false );
147 if ( e1 == 0 )
return 0;
148 const std::vector<DetId>& neighs =
neighbours(
id);
149 for (
size_t i=0;
i<neighs.size(); ++
i)
166 float e1 =
recHitE(
id, rhs ,
false );
172 if ( e1 == 0 )
return 0;
174 const std::vector<DetId>& neighs =
neighbours(
id);
177 for (
size_t i=0;
i<neighs.size(); ++
i){
178 float ene =
recHitE(neighs[
i],rhs,
false);
187 s4_1 =
e4e1(
id,rhs)* e1;
188 s4_2 =
e4e1(maxid,rhs)* e2;
190 return (s4_1 + s4_2) / (e1+e2) -1. ;
201 if (
id.rawId() == 0 )
return 0;
208 if ( it != recHits.
end() ){
209 float ene= (*it).energy();
220 if (ene < threshold)
return 0;
231 std::vector<DetId> ret;
269 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)