10 : theDirection(candDirection),theCandTag(0.)
17 : theDirection(
Direction(eta,phi)), theCandTag(0.)
25 theDeposits.insert( std::make_pair( relDir, value));
31 theDeposits.insert( std::make_pair( relDir,deposit));
45 double threshold,
bool skipDepositVeto)
const
50 Vetos allVetos = vetos;
51 typedef Vetos::const_iterator IV;
52 if (!skipDepositVeto) allVetos.push_back(
theVeto);
53 IV ivEnd = allVetos.end();
55 Distance maxDistance = {float(coneSize),999.f};
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
78 Vetos allVetos = vetos;
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){
102 using namespace reco::isodeposit;
105 typedef AbsVetos::const_iterator IV;
107 IV ivEnd = vetos.end();
109 Distance maxDistance = {float(coneSize),999.f};
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; }
136 return algoWithin<CountAlgo>(coneSize, vetos, skipDepositVeto);
140 return algoWithin<SumAlgo>(coneSize, vetos, skipDepositVeto);
144 return algoWithin<SumAlgo>(
dir, coneSize, vetos, skipDepositVeto);
148 return algoWithin<Sum2Algo>(coneSize, vetos, skipDepositVeto);
152 return algoWithin<MaxAlgo>(coneSize, vetos, skipDepositVeto);
157 using namespace reco::isodeposit;
159 typedef AbsVetos::const_iterator IV;
161 IV ivEnd = vetos.end();
163 Distance maxDistance = {float(coneSize),999.f};
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
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