26 theDeposits.insert(std::make_pair(relDir, deposit));
40 bool skipDepositVeto)
const {
44 Vetos allVetos = vetos;
45 typedef Vetos::const_iterator IV;
48 IV ivEnd = allVetos.end();
50 Distance maxDistance = {float(coneSize), 999.f};
51 typedef DepositsMultimap::const_iterator IM;
53 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
55 for (IV
iv = allVetos.begin();
iv < ivEnd; ++
iv) {
60 if (!vetoed && im->second > threshold) {
73 Vetos allVetos = vetos;
74 typedef Vetos::const_iterator IV;
77 IV ivEnd = allVetos.end();
79 typedef DepositsMultimap::const_iterator IM;
84 if (newDist.
deltaR > coneSize)
86 for (IV
iv = allVetos.begin();
iv < ivEnd; ++
iv) {
90 if (!vetoed && im->second > threshold) {
100 bool skipDepositVeto)
const {
101 using namespace reco::isodeposit;
104 typedef AbsVetos::const_iterator IV;
106 IV ivEnd = vetos.end();
108 Distance maxDistance = {float(coneSize), 999.f};
109 typedef DepositsMultimap::const_iterator IM;
111 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
114 for (IV
iv = vetos.begin();
iv < ivEnd; ++
iv) {
115 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) {
135 return algoWithin<CountAlgo>(
coneSize, vetos, skipDepositVeto);
138 return algoWithin<SumAlgo>(
coneSize, vetos, skipDepositVeto);
141 return algoWithin<SumAlgo>(
dir,
coneSize, vetos, skipDepositVeto);
144 return algoWithin<Sum2Algo>(
coneSize, vetos, skipDepositVeto);
147 return algoWithin<MaxAlgo>(
coneSize, vetos, skipDepositVeto);
151 using namespace reco::isodeposit;
153 typedef AbsVetos::const_iterator IV;
155 IV ivEnd = vetos.end();
157 Distance maxDistance = {float(coneSize), 999.f};
158 typedef DepositsMultimap::const_iterator IM;
160 for (IM im =
theDeposits.begin(); im != imLoc; ++im) {
163 for (IV
iv = vetos.begin();
iv < ivEnd; ++
iv) {
164 if ((*iv)->veto(dirDep.
eta(), dirDep.
phi(), im->second)) {
179 std::ostringstream
str;
183 typedef DepositsMultimap::const_iterator IM;
185 for (IM im =
theDeposits.begin(); im != imEnd; ++im) {
186 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