63 float a = 0,
b = 0, e4e1thresh = 0, ethresh = 0;
84 float e4e1value =
e4e1(
id, rhs);
85 e4e1thresh = a * log10(energy) +
b;
93 if (e4e1value < e4e1thresh)
102 float e6e2value =
e6e2(
id, rhs);
115 if (e6e2value < e6e2thresh)
123 float e1 =
recHitE(
id, rhs,
false);
127 const std::vector<DetId>& neighs =
neighbours(
id);
128 for (
size_t i = 0;
i < neighs.size(); ++
i)
130 s4 +=
recHitE(neighs[
i], rhs,
true);
138 float e1 =
recHitE(
id, rhs,
false);
146 const std::vector<DetId>& neighs =
neighbours(
id);
149 for (
size_t i = 0;
i < neighs.size(); ++
i) {
150 float ene =
recHitE(neighs[
i], rhs,
false);
159 s4_1 =
e4e1(
id, rhs) * e1;
160 s4_2 =
e4e1(maxid, rhs) * e2;
162 return (s4_1 + s4_2) / (e1 + e2) - 1.;
174 if (it != recHits.
end()) {
175 float ene = (*it).energy();
195 std::vector<DetId>
ret;
225 for (rh = rhs.
begin(); rh != rhs.
end(); ++rh) {
tuple ret
prodAgent to be discontinued
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
T getParameter(std::string const &) 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)