1 #ifndef RecoCandidate_IsoDeposit_H
2 #define RecoCandidate_IsoDeposit_H
29 namespace isodeposit {
37 throw cms::Exception(
"Not Implemented") <<
"This AbsVeto implementation (" <<
typeid(
this).
name() <<
") does not support the centerOn(eta,phi) method";
63 typedef std::vector<Veto>
Vetos;
90 bool skipDepositVeto =
false
97 bool skipDepositVeto =
false
101 std::pair<double,int>
106 bool skipDepositVeto =
false
110 std::pair<double,int>
116 bool skipDepositVeto =
false
123 bool skipDepositVeto =
false
127 std::pair<double,int>
131 bool skipDepositVeto =
false
147 float dR()
const {
return it_->first.deltaR; }
159 mutable std::multimap<Distance, float>::const_iterator
it_;
223 template<
typename Algo>
226 bool skipDepositVeto =
false
229 template<
typename Algo>
233 bool skipDepositVeto =
false
238 bool skipDepositVeto =
false
243 bool skipDepositVeto =
false
249 bool skipDepositVeto =
false
253 bool skipDepositVeto =
false
258 bool skipDepositVeto =
false
263 bool skipDepositVeto =
false
287 template<
typename Algo>
290 using namespace reco::isodeposit;
292 typedef AbsVetos::const_iterator IV;
293 IV ivEnd = vetos.end();
295 Distance maxDistance = {float(coneSize),999.f};
296 typedef DepositsMultimap::const_iterator IM;
298 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
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();
313 template<
typename Algo>
315 const AbsVetos& vetos,
bool skipDepositVeto)
const
317 using namespace reco::isodeposit;
319 typedef AbsVetos::const_iterator IV;
320 IV ivEnd = vetos.end();
321 typedef DepositsMultimap::const_iterator IM;
323 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
327 if(newDist.
deltaR > coneSize)
continue;
328 for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
329 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) { vetoed =
true;
break; }
337 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.
void operator+=(double deposit)
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 operator+=(DepIterator deposit)
DepositsMultimap::const_iterator DepIterator
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
double countWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
void operator+=(DepIterator deposit)
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)
void operator+=(DepIterator deposit)
void operator+=(DepIterator 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
void operator+=(DepIterator deposit)
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
const T & max(const T &a, const T &b)
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
void operator+=(DepIterator deposit)
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
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