1 #ifndef RecoCandidate_IsoDeposit_H
2 #define RecoCandidate_IsoDeposit_H
28 namespace isodeposit {
36 throw cms::Exception(
"Not Implemented") <<
"This AbsVeto implementation (" <<
typeid(
this).
name() <<
") does not support the centerOn(eta,phi) method";
58 typedef std::vector<Veto>
Vetos;
85 bool skipDepositVeto =
false
92 bool skipDepositVeto =
false
101 bool skipDepositVeto =
false
105 std::pair<double,int>
111 bool skipDepositVeto =
false
118 bool skipDepositVeto =
false
122 std::pair<double,int>
126 bool skipDepositVeto =
false
136 std::string
print()
const;
142 float dR()
const {
return it_->first.deltaR; }
154 mutable std::multimap<Distance, float>::const_iterator
it_;
194 template<
typename Algo>
197 bool skipDepositVeto =
false
200 template<
typename Algo>
204 bool skipDepositVeto =
false
209 bool skipDepositVeto =
false
214 bool skipDepositVeto =
false
220 bool skipDepositVeto =
false
224 bool skipDepositVeto =
false
229 bool skipDepositVeto =
false
234 bool skipDepositVeto =
false
260 template<
typename Algo>
263 using namespace reco::isodeposit;
265 typedef AbsVetos::const_iterator IV;
266 IV ivEnd = vetos.end();
268 Distance maxDistance = {float(coneSize),999.f};
269 typedef DepositsMultimap::const_iterator IM;
271 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
274 for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
275 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) { vetoed =
true;
break; }
283 return algo.result();
286 template<
typename Algo>
288 const AbsVetos& vetos,
bool skipDepositVeto)
const
290 using namespace reco::isodeposit;
292 typedef AbsVetos::const_iterator IV;
293 IV ivEnd = vetos.end();
294 typedef DepositsMultimap::const_iterator IM;
296 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
300 if(newDist.
deltaR > coneSize)
continue;
301 for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
302 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) { vetoed =
true;
break; }
310 return algo.result();
double candEnergy() const
Get energy or pT attached to cand trajectory.
const Direction & direction() const
Get direction of isolation cone.
double sum2Within(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
virtual void centerOn(double eta, double phi)
const Veto & veto() const
Get veto area.
virtual bool veto(double eta, double phi, float value) const =0
Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum...
void setVeto(const Veto &aVeto)
Set veto.
double algoWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Get some info about the deposit (e.g. sum, max, sum2, count)
const reco::IsoDeposit * parent_
Direction::Distance Distance
the deposits identifed by relative position to center of cone and deposit value
double countWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
virtual ~IsoDeposit()
Destructor.
double maxWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Veto(Direction dir, double d)
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
void operator+=(double deposit)
double depositWithin(double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
Get deposit.
const const_iterator * operator->() const
Veto theVeto
area to be excluded in computaion of depositWithin
DepositsMultimap theDeposits
double nearestDR(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
const const_iterator & operator++()
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
std::multimap< Distance, float > DepositsMultimap
const_iterator begin() const
std::multimap< Distance, float >::const_iterator it_
const_iterator(const IsoDeposit *parent, std::multimap< Distance, float >::const_iterator it)
void operator+=(double deposit)
isodeposit::AbsVeto AbsVeto
std::vector< Veto > Vetos
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
std::string print() const
std::vector< AbsVeto * > AbsVetos
isodeposit::Direction Direction
float theCandTag
float tagging cand, ment to be transverse energy or pT attached to cand,
Direction theDirection
direcion of deposit (center of isolation cone)
isodeposit::AbsVetos AbsVetos
void operator+=(float deposit)
const_iterator end() const
bool operator!=(const const_iterator &it2)
void operator+=(double deposit)
IsoDeposit(double eta=0, double phi=0)
Constructor.
Direction::Distance Distance
double deltaR(const Direction &dir2) const