10 : theDirection(candDirection),theCandTag(0.)
25 theDeposits.insert( std::make_pair( relDir, value));
31 theDeposits.insert( std::make_pair( relDir,deposit));
45 double threshold,
bool skipDepositVeto)
const 51 typedef Vetos::const_iterator IV;
52 if (!skipDepositVeto) allVetos.push_back(
theVeto);
53 IV ivEnd = allVetos.end();
56 typedef DepositsMultimap::const_iterator IM;
58 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
60 for ( IV iv = allVetos.begin(); iv < ivEnd; ++iv) {
62 if (dirDep.
deltaR(iv->vetoDir) < iv->dR) vetoed =
true;
64 if (!vetoed && im->second > threshold){
73 double threshold,
bool skipDepositVeto)
const 79 typedef Vetos::const_iterator IV;
80 if (!skipDepositVeto) allVetos.push_back(
theVeto);
81 IV ivEnd = allVetos.end();
83 typedef DepositsMultimap::const_iterator IM;
88 if (newDist.
deltaR > coneSize)
continue;
89 for ( IV iv = allVetos.begin(); iv < ivEnd; ++iv) {
90 if (dirDep.
deltaR(iv->vetoDir) < iv->dR) vetoed =
true;
92 if (!vetoed && im->second > threshold){
105 typedef AbsVetos::const_iterator IV;
107 IV ivEnd = vetos.end();
110 typedef DepositsMultimap::const_iterator IM;
112 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
115 for ( IV iv = vetos.begin(); iv < ivEnd; ++iv) {
116 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) { vetoed =
true;
break; }
120 result += im->second;
136 return algoWithin<CountAlgo>(
coneSize,
vetos, skipDepositVeto);
140 return algoWithin<SumAlgo>(
coneSize,
vetos, skipDepositVeto);
148 return algoWithin<Sum2Algo>(
coneSize,
vetos, skipDepositVeto);
152 return algoWithin<MaxAlgo>(
coneSize,
vetos, skipDepositVeto);
159 typedef AbsVetos::const_iterator IV;
161 IV ivEnd = vetos.end();
164 typedef DepositsMultimap::const_iterator IM;
166 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
169 for ( IV iv = vetos.begin(); iv < ivEnd; ++iv) {
170 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) { vetoed =
true;
break; }
182 std::ostringstream
str;
185 typedef DepositsMultimap::const_iterator IM;
187 for (IM im =
theDeposits.begin(); im != imEnd; ++im) {
188 str<<
"(dR="<< im->first.deltaR<<
", alpha="<<im->first.relativeAngle<<
", Pt="<<im->second<<
"),";
double sum2Within(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
double countWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
double maxWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
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
double depositWithin(double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
Get deposit.
Veto theVeto
area to be excluded in computaion of depositWithin
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
double nearestDR(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
std::string print() const
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
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
IsoDeposit(double eta=0, double phi=0)
Constructor.
double deltaR(const Direction &dir2) const