|
|
Go to the documentation of this file. 1 #ifndef RecoCandidate_IsoDeposit_H
2 #define RecoCandidate_IsoDeposit_H
31 namespace isodeposit {
35 virtual bool veto(
double eta,
double phi,
float value)
const = 0;
39 throw cms::Exception(
"Not Implemented") <<
"This AbsVeto implementation (" <<
typeid(
this).
name()
40 <<
") does not support the centerOn(eta,phi) method";
65 typedef std::vector<Veto>
Vetos;
91 bool skipDepositVeto =
false
98 bool skipDepositVeto =
false
105 bool skipDepositVeto =
false
113 bool skipDepositVeto =
false
119 bool skipDepositVeto =
false
125 bool skipDepositVeto =
false
144 float dR()
const {
return it_->first.deltaR; }
169 std::multimap<Distance, float>::const_iterator
it_;
210 if (deposit->second >
max_)
211 max_ = deposit->second;
227 sum_ += deposit->first.deltaR;
248 template <
typename Algo>
251 bool skipDepositVeto =
false
254 template <
typename Algo>
258 bool skipDepositVeto =
false
263 bool skipDepositVeto =
false
268 bool skipDepositVeto =
false
274 bool skipDepositVeto =
false
278 bool skipDepositVeto =
false
283 bool skipDepositVeto =
false
288 bool skipDepositVeto =
false
308 template <
typename Algo>
312 typedef AbsVetos::const_iterator IV;
313 IV ivEnd =
vetos.end();
316 typedef DepositsMultimap::const_iterator IM;
318 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
322 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) {
333 return algo.result();
336 template <
typename Algo>
340 bool skipDepositVeto)
const {
343 typedef AbsVetos::const_iterator IV;
344 IV ivEnd =
vetos.end();
345 typedef DepositsMultimap::const_iterator IM;
347 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
354 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) {
365 return algo.result();
double nearestDR(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Direction::Distance Distance
const Veto & veto() const
Get veto area.
void operator+=(DepIterator deposit)
Direction::Distance Distance
void operator+=(DepIterator deposit)
void addDeposit(double dr, double deposit)
Add deposit (ie. transverse energy or pT)
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
std::atomic< bool > cacheReady_
isodeposit::AbsVeto AbsVeto
void operator+=(DepIterator deposit)
void operator+=(double deposit)
std::multimap< Distance, float > DepositsMultimap
std::vector< AbsVeto * > AbsVetos
double sum2Within(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
isodeposit::Direction Direction
float theCandTag
float tagging cand, ment to be transverse energy or pT attached to cand,
double countWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
IsoDeposit(double eta=0, double phi=0)
Constructor.
Direction theDirection
direcion of deposit (center of isolation cone)
virtual ~IsoDeposit()
Destructor.
isodeposit::AbsVetos AbsVetos
void operator+=(double deposit)
std::multimap< Distance, float >::const_iterator it_
virtual void centerOn(double eta, double phi)
const reco::IsoDeposit * parent_
void operator+=(DepIterator deposit)
double deltaR(const Direction &dir2) const
const_iterator(const IsoDeposit *parent, std::multimap< Distance, float >::const_iterator it)
const Direction & direction() const
Get direction of isolation cone.
bool operator!=(const const_iterator &it2)
const_iterator begin() const
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.
Veto(Direction dir, double d)
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
const const_iterator & operator++()
double candEnergy() const
Get energy or pT attached to cand trajectory.
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
const const_iterator * operator->() const
DepositsMultimap::const_iterator DepIterator
double algoWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Get some info about the deposit (e.g. sum, max, sum2, count)
void addCandEnergy(double et)
Set energy or pT attached to cand trajectory.
void operator+=(double deposit)
const_iterator end() const
double depositWithin(double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
Get deposit.
double maxWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
Veto theVeto
area to be excluded in computaion of depositWithin
void operator+=(DepIterator deposit)
std::vector< Veto > Vetos
std::string print() const
void setVeto(const Veto &aVeto)
Set veto.
void operator+=(DepIterator deposit)
void operator+=(double deposit)