CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
reco::IsoDeposit Class Reference

#include <IsoDeposit.h>

Classes

class  const_iterator
 
class  CountAlgo
 
class  MaxAlgo
 
class  MeanDRAlgo
 
class  Sum2Algo
 
class  SumAlgo
 
class  SumDRAlgo
 
struct  Veto
 

Public Types

typedef isodeposit::AbsVeto AbsVeto
 
typedef isodeposit::AbsVetos AbsVetos
 
typedef DepositsMultimap::const_iterator DepIterator
 
typedef std::multimap< Distance, float > DepositsMultimap
 
typedef isodeposit::Direction Direction
 
typedef Direction::Distance Distance
 
typedef std::vector< VetoVetos
 

Public Member Functions

void addCandEnergy (double et)
 Set energy or pT attached to cand trajectory. More...
 
void addDeposit (double dr, double deposit)
 Add deposit (ie. transverse energy or pT) More...
 
void addDeposit (const Direction &depDir, double deposit)
 
template<typename Algo >
double algoWithin (double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 Get some info about the deposit (e.g. sum, max, sum2, count) More...
 
template<typename Algo >
double algoWithin (const Direction &, double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 Get some info about the deposit (e.g. sum, max, sum2, count) w.r.t. other direction. More...
 
const_iterator begin () const
 
double candEnergy () const
 Get energy or pT attached to cand trajectory. More...
 
double countWithin (double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 
std::pair< double, int > depositAndCountWithin (double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
 Get deposit. More...
 
std::pair< double, int > depositAndCountWithin (Direction dir, double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
 Get deposit wrt other direction. More...
 
std::pair< double, int > depositAndCountWithin (double coneSize, const AbsVetos &vetos, bool skipDepositVeto=false) const
 Get deposit. More...
 
double depositWithin (double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
 Get deposit. More...
 
double depositWithin (Direction dir, double coneSize, const Vetos &vetos=Vetos(), bool skipDepositVeto=false) const
 Get deposit wrt other direction. More...
 
double depositWithin (double coneSize, const AbsVetos &vetos, bool skipDepositVeto=false) const
 Get deposit with new style vetos. More...
 
const Directiondirection () const
 Get direction of isolation cone. More...
 
const_iterator end () const
 
double eta () const
 
 IsoDeposit (double eta=0, double phi=0)
 Constructor. More...
 
 IsoDeposit (const Direction &candDirection)
 
double maxWithin (double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 
double nearestDR (double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 
double phi () const
 
std::string print () const
 
void setVeto (const Veto &aVeto)
 Set veto. More...
 
double sum2Within (double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 
double sumWithin (double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 
double sumWithin (const Direction &dir, double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
 
const Vetoveto () const
 Get veto area. More...
 
virtual ~IsoDeposit ()
 Destructor. More...
 

Private Attributes

float theCandTag
 float tagging cand, ment to be transverse energy or pT attached to cand, More...
 
DepositsMultimap theDeposits
 the deposits identifed by relative position to center of cone and deposit value More...
 
Direction theDirection
 direcion of deposit (center of isolation cone) More...
 
Veto theVeto
 area to be excluded in computaion of depositWithin More...
 

Detailed Description

Definition at line 49 of file IsoDeposit.h.

Member Typedef Documentation

◆ AbsVeto

Definition at line 52 of file IsoDeposit.h.

◆ AbsVetos

Definition at line 53 of file IsoDeposit.h.

◆ DepIterator

typedef DepositsMultimap::const_iterator reco::IsoDeposit::DepIterator

Definition at line 56 of file IsoDeposit.h.

◆ DepositsMultimap

typedef std::multimap<Distance, float> reco::IsoDeposit::DepositsMultimap

Definition at line 55 of file IsoDeposit.h.

◆ Direction

Definition at line 51 of file IsoDeposit.h.

◆ Distance

Definition at line 54 of file IsoDeposit.h.

◆ Vetos

typedef std::vector<Veto> reco::IsoDeposit::Vetos

Definition at line 65 of file IsoDeposit.h.

Constructor & Destructor Documentation

◆ IsoDeposit() [1/2]

IsoDeposit::IsoDeposit ( double  eta = 0,
double  phi = 0 
)

Constructor.

Definition at line 14 of file IsoDeposit.cc.

References reco::IsoDeposit::Veto::dR, theDirection, theVeto, and reco::IsoDeposit::Veto::vetoDir.

16  theVeto.dR = 0.;
17 }
double phi() const
Definition: IsoDeposit.h:77
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
double eta() const
Definition: IsoDeposit.h:76
isodeposit::Direction Direction
Definition: IsoDeposit.h:51
float theCandTag
float tagging cand, ment to be transverse energy or pT attached to cand,
Definition: IsoDeposit.h:299
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ IsoDeposit() [2/2]

IsoDeposit::IsoDeposit ( const Direction candDirection)

Definition at line 9 of file IsoDeposit.cc.

References reco::IsoDeposit::Veto::dR, theDirection, theVeto, and reco::IsoDeposit::Veto::vetoDir.

9  : theDirection(candDirection), theCandTag(0.) {
11  theVeto.dR = 0.;
12 }
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
float theCandTag
float tagging cand, ment to be transverse energy or pT attached to cand,
Definition: IsoDeposit.h:299
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ ~IsoDeposit()

virtual reco::IsoDeposit::~IsoDeposit ( )
inlinevirtual

Destructor.

Definition at line 72 of file IsoDeposit.h.

72 {};

Member Function Documentation

◆ addCandEnergy()

void reco::IsoDeposit::addCandEnergy ( double  et)
inline

◆ addDeposit() [1/2]

void IsoDeposit::addDeposit ( double  dr,
double  deposit 
)

◆ addDeposit() [2/2]

void IsoDeposit::addDeposit ( const Direction depDir,
double  deposit 
)

Definition at line 24 of file IsoDeposit.cc.

References theDeposits, and theDirection.

24  {
25  Distance relDir = depDir - theDirection;
26  theDeposits.insert(std::make_pair(relDir, deposit));
27 }
Direction::Distance Distance
Definition: IsoDeposit.h:54
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ algoWithin() [1/2]

template<typename Algo >
double IsoDeposit::algoWithin ( double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

Get some info about the deposit (e.g. sum, max, sum2, count)

Definition at line 309 of file IsoDeposit.h.

References HLT_2022v12_cff::coneSize, reco::isodeposit::Direction::deltaR(), reco::IsoDeposit::Veto::dR, reco::isodeposit::Direction::eta(), dqmMemoryStats::float, gpuVertexFinder::iv, particleFlowClusterHGC_cfi::maxDistance, reco::isodeposit::Direction::phi(), theDeposits, theDirection, theVeto, reco::IsoDeposit::Veto::vetoDir, and boostedElectronIsolation_cff::vetos.

Referenced by CandIsolatorFromDeposits::SingleDeposit::compute().

309  {
310  using namespace reco::isodeposit;
311  Algo algo;
312  typedef AbsVetos::const_iterator IV;
313  IV ivEnd = vetos.end();
314 
315  Distance maxDistance = {float(coneSize), 999.f};
316  typedef DepositsMultimap::const_iterator IM;
317  IM imLoc = theDeposits.upper_bound(maxDistance);
318  for (IM im = theDeposits.begin(); im != imLoc; ++im) {
319  bool vetoed = false;
320  Direction dirDep = theDirection + im->first;
321  for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
322  if ((*iv)->veto(dirDep.eta(), dirDep.phi(), im->second)) {
323  vetoed = true;
324  break;
325  }
326  }
327  if (!vetoed) {
328  if (skipDepositVeto || (dirDep.deltaR(theVeto.vetoDir) > theVeto.dR)) {
329  algo += im;
330  }
331  }
332  }
333  return algo.result();
334 }
int32_t *__restrict__ iv
Direction::Distance Distance
Definition: IsoDeposit.h:54
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
double deltaR(const Direction &dir2) const
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293
Definition: fakeMenu.h:6

◆ algoWithin() [2/2]

template<typename Algo >
double IsoDeposit::algoWithin ( const Direction dir,
double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

Get some info about the deposit (e.g. sum, max, sum2, count) w.r.t. other direction.

Definition at line 337 of file IsoDeposit.h.

References HLT_2022v12_cff::coneSize, reco::isodeposit::Direction::Distance::deltaR, reco::isodeposit::Direction::deltaR(), DeadROC_duringRun::dir, reco::IsoDeposit::Veto::dR, reco::isodeposit::Direction::eta(), gpuVertexFinder::iv, reco::isodeposit::Direction::phi(), theDeposits, theDirection, theVeto, reco::IsoDeposit::Veto::vetoDir, and boostedElectronIsolation_cff::vetos.

340  {
341  using namespace reco::isodeposit;
342  Algo algo;
343  typedef AbsVetos::const_iterator IV;
344  IV ivEnd = vetos.end();
345  typedef DepositsMultimap::const_iterator IM;
346  IM imLoc = theDeposits.end();
347  for (IM im = theDeposits.begin(); im != imLoc; ++im) {
348  bool vetoed = false;
349  Direction dirDep = theDirection + im->first;
350  Distance newDist = dirDep - dir;
351  if (newDist.deltaR > coneSize)
352  continue;
353  for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
354  if ((*iv)->veto(dirDep.eta(), dirDep.phi(), im->second)) {
355  vetoed = true;
356  break;
357  }
358  }
359  if (!vetoed) {
360  if (skipDepositVeto || (dirDep.deltaR(theVeto.vetoDir) > theVeto.dR)) {
361  algo += im;
362  }
363  }
364  }
365  return algo.result();
366 }
int32_t *__restrict__ iv
Direction::Distance Distance
Definition: IsoDeposit.h:54
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
double deltaR(const Direction &dir2) const
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293
Definition: fakeMenu.h:6

◆ begin()

const_iterator reco::IsoDeposit::begin ( void  ) const
inline

Definition at line 173 of file IsoDeposit.h.

References theDeposits.

173 { return const_iterator(this, theDeposits.begin()); }
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303

◆ candEnergy()

double reco::IsoDeposit::candEnergy ( ) const
inline

Get energy or pT attached to cand trajectory.

Definition at line 129 of file IsoDeposit.h.

References theCandTag.

Referenced by CandIsolatorFromDeposits::SingleDeposit::compute(), PFCandIsolatorFromDeposits::SingleDeposit::compute(), MuonIdProducer::fillMuonIsolation(), and pat::helper::IsoDepositIsolator::getValue().

129 { return theCandTag; }
float theCandTag
float tagging cand, ment to be transverse energy or pT attached to cand,
Definition: IsoDeposit.h:299

◆ countWithin()

double IsoDeposit::countWithin ( double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

◆ depositAndCountWithin() [1/3]

std::pair< double, int > IsoDeposit::depositAndCountWithin ( double  coneSize,
const Vetos vetos = Vetos(),
double  threshold = -1e+36,
bool  skipDepositVeto = false 
) const

Get deposit.

Definition at line 37 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, submitPVResolutionJobs::count, reco::isodeposit::Direction::deltaR(), dqmMemoryStats::float, gpuVertexFinder::iv, particleFlowClusterHGC_cfi::maxDistance, mps_fire::result, theDeposits, theDirection, theVeto, remoteMonitoring_LASER_era2018_cfg::threshold, and boostedElectronIsolation_cff::vetos.

Referenced by depositWithin(), MuonIdProducer::fillMuonIsolation(), L3MuonIsolationProducer::produce(), L3MuonCombinedRelativeIsolationProducer::produce(), and muonisolation::IsolatorByDepositCount::result().

40  {
41  double result = 0;
42  int count = 0;
43 
44  Vetos allVetos = vetos;
45  typedef Vetos::const_iterator IV;
46  if (!skipDepositVeto)
47  allVetos.push_back(theVeto);
48  IV ivEnd = allVetos.end();
49 
50  Distance maxDistance = {float(coneSize), 999.f};
51  typedef DepositsMultimap::const_iterator IM;
52  IM imLoc = theDeposits.upper_bound(maxDistance);
53  for (IM im = theDeposits.begin(); im != imLoc; ++im) {
54  bool vetoed = false;
55  for (IV iv = allVetos.begin(); iv < ivEnd; ++iv) {
56  Direction dirDep = theDirection + im->first;
57  if (dirDep.deltaR(iv->vetoDir) < iv->dR)
58  vetoed = true;
59  }
60  if (!vetoed && im->second > threshold) {
61  result += im->second;
62  count++;
63  }
64  }
65  return std::pair<double, int>(result, count);
66 }
int32_t *__restrict__ iv
Direction::Distance Distance
Definition: IsoDeposit.h:54
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
std::vector< Veto > Vetos
Definition: IsoDeposit.h:65
double deltaR(const Direction &dir2) const
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ depositAndCountWithin() [2/3]

std::pair< double, int > IsoDeposit::depositAndCountWithin ( Direction  dir,
double  coneSize,
const Vetos vetos = Vetos(),
double  threshold = -1e+36,
bool  skipDepositVeto = false 
) const

Get deposit wrt other direction.

Definition at line 68 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, submitPVResolutionJobs::count, reco::isodeposit::Direction::Distance::deltaR, reco::isodeposit::Direction::deltaR(), DeadROC_duringRun::dir, gpuVertexFinder::iv, mps_fire::result, theDeposits, theDirection, theVeto, remoteMonitoring_LASER_era2018_cfg::threshold, and boostedElectronIsolation_cff::vetos.

69  {
70  double result = 0;
71  int count = 0;
72 
73  Vetos allVetos = vetos;
74  typedef Vetos::const_iterator IV;
75  if (!skipDepositVeto)
76  allVetos.push_back(theVeto);
77  IV ivEnd = allVetos.end();
78 
79  typedef DepositsMultimap::const_iterator IM;
80  for (IM im = theDeposits.begin(); im != theDeposits.end(); ++im) {
81  bool vetoed = false;
82  Direction dirDep = theDirection + im->first;
83  Distance newDist = dirDep - dir;
84  if (newDist.deltaR > coneSize)
85  continue;
86  for (IV iv = allVetos.begin(); iv < ivEnd; ++iv) {
87  if (dirDep.deltaR(iv->vetoDir) < iv->dR)
88  vetoed = true;
89  }
90  if (!vetoed && im->second > threshold) {
91  result += im->second;
92  count++;
93  }
94  }
95  return std::pair<double, int>(result, count);
96 }
int32_t *__restrict__ iv
Direction::Distance Distance
Definition: IsoDeposit.h:54
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
std::vector< Veto > Vetos
Definition: IsoDeposit.h:65
double deltaR(const Direction &dir2) const
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ depositAndCountWithin() [3/3]

std::pair< double, int > IsoDeposit::depositAndCountWithin ( double  coneSize,
const AbsVetos vetos,
bool  skipDepositVeto = false 
) const

Get deposit.

Definition at line 98 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, submitPVResolutionJobs::count, reco::isodeposit::Direction::deltaR(), reco::IsoDeposit::Veto::dR, reco::isodeposit::Direction::eta(), dqmMemoryStats::float, gpuVertexFinder::iv, particleFlowClusterHGC_cfi::maxDistance, reco::isodeposit::Direction::phi(), mps_fire::result, theDeposits, theDirection, theVeto, reco::IsoDeposit::Veto::vetoDir, and boostedElectronIsolation_cff::vetos.

100  {
101  using namespace reco::isodeposit;
102  double result = 0;
103  int count = 0;
104  typedef AbsVetos::const_iterator IV;
105 
106  IV ivEnd = vetos.end();
107 
108  Distance maxDistance = {float(coneSize), 999.f};
109  typedef DepositsMultimap::const_iterator IM;
110  IM imLoc = theDeposits.upper_bound(maxDistance);
111  for (IM im = theDeposits.begin(); im != imLoc; ++im) {
112  bool vetoed = false;
113  Direction dirDep = theDirection + im->first;
114  for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
115  if ((*iv)->veto(dirDep.eta(), dirDep.phi(), im->second)) {
116  vetoed = true;
117  break;
118  }
119  }
120  if (!vetoed) {
121  if (skipDepositVeto || (dirDep.deltaR(theVeto.vetoDir) > theVeto.dR)) {
122  result += im->second;
123  count++;
124  }
125  }
126  }
127  return std::pair<double, int>(result, count);
128 }
int32_t *__restrict__ iv
Direction::Distance Distance
Definition: IsoDeposit.h:54
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
double deltaR(const Direction &dir2) const
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ depositWithin() [1/3]

double IsoDeposit::depositWithin ( double  coneSize,
const Vetos vetos = Vetos(),
bool  skipDepositVeto = false 
) const

Get deposit.

Definition at line 29 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, depositAndCountWithin(), MillePedeFileConverter_cfg::e, and boostedElectronIsolation_cff::vetos.

Referenced by MuonIdProducer::fillMuonIsolation(), IsolationProducerForTracks::produce(), and L3MuonCombinedRelativeIsolationProducer::produce().

29  {
30  return depositAndCountWithin(coneSize, vetos, -1e+36, skipDepositVeto).first;
31 }
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
Definition: IsoDeposit.cc:37

◆ depositWithin() [2/3]

double IsoDeposit::depositWithin ( Direction  dir,
double  coneSize,
const Vetos vetos = Vetos(),
bool  skipDepositVeto = false 
) const

Get deposit wrt other direction.

Definition at line 33 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, depositAndCountWithin(), DeadROC_duringRun::dir, MillePedeFileConverter_cfg::e, and boostedElectronIsolation_cff::vetos.

33  {
34  return depositAndCountWithin(dir, coneSize, vetos, -1e+36, skipDepositVeto).first;
35 }
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
Definition: IsoDeposit.cc:37

◆ depositWithin() [3/3]

double IsoDeposit::depositWithin ( double  coneSize,
const AbsVetos vetos,
bool  skipDepositVeto = false 
) const

Get deposit with new style vetos.

Definition at line 130 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, depositAndCountWithin(), and boostedElectronIsolation_cff::vetos.

130  {
131  return depositAndCountWithin(coneSize, vetos, skipDepositVeto).first;
132 }
std::pair< double, int > depositAndCountWithin(double coneSize, const Vetos &vetos=Vetos(), double threshold=-1e+36, bool skipDepositVeto=false) const
Get deposit.
Definition: IsoDeposit.cc:37

◆ direction()

const Direction& reco::IsoDeposit::direction ( ) const
inline

Get direction of isolation cone.

Definition at line 75 of file IsoDeposit.h.

References theDirection.

Referenced by reco::IsoDeposit::const_iterator::doDir().

75 { return theDirection; }
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ end()

const_iterator reco::IsoDeposit::end ( void  ) const
inline

Definition at line 174 of file IsoDeposit.h.

References theDeposits.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

174 { return const_iterator(this, theDeposits.end()); }
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303

◆ eta()

double reco::IsoDeposit::eta ( ) const
inline

◆ maxWithin()

double IsoDeposit::maxWithin ( double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

◆ nearestDR()

double IsoDeposit::nearestDR ( double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

Definition at line 150 of file IsoDeposit.cc.

References HLT_2022v12_cff::coneSize, reco::isodeposit::Direction::deltaR(), reco::IsoDeposit::Veto::dR, reco::isodeposit::Direction::eta(), dqmMemoryStats::float, gpuVertexFinder::iv, particleFlowClusterHGC_cfi::maxDistance, reco::isodeposit::Direction::phi(), mps_fire::result, theDeposits, theDirection, theVeto, reco::IsoDeposit::Veto::vetoDir, and boostedElectronIsolation_cff::vetos.

Referenced by CandIsolatorFromDeposits::SingleDeposit::compute(), and PFCandIsolatorFromDeposits::SingleDeposit::compute().

150  {
151  using namespace reco::isodeposit;
152  double result = coneSize;
153  typedef AbsVetos::const_iterator IV;
154 
155  IV ivEnd = vetos.end();
156 
157  Distance maxDistance = {float(coneSize), 999.f};
158  typedef DepositsMultimap::const_iterator IM;
159  IM imLoc = theDeposits.upper_bound(maxDistance);
160  for (IM im = theDeposits.begin(); im != imLoc; ++im) {
161  bool vetoed = false;
162  Direction dirDep = theDirection + im->first;
163  for (IV iv = vetos.begin(); iv < ivEnd; ++iv) {
164  if ((*iv)->veto(dirDep.eta(), dirDep.phi(), im->second)) {
165  vetoed = true;
166  break;
167  }
168  }
169  if (!vetoed) {
170  if (skipDepositVeto || (dirDep.deltaR(theVeto.vetoDir) > theVeto.dR)) {
171  result = (dirDep.deltaR(theVeto.vetoDir) < result) ? dirDep.deltaR(theVeto.vetoDir) : result;
172  }
173  }
174  }
175  return result;
176 }
int32_t *__restrict__ iv
Direction::Distance Distance
Definition: IsoDeposit.h:54
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
double deltaR(const Direction &dir2) const
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293

◆ phi()

double reco::IsoDeposit::phi ( ) const
inline

◆ print()

std::string IsoDeposit::print ( void  ) const

Definition at line 178 of file IsoDeposit.cc.

References reco::IsoDeposit::Veto::dR, reco::isodeposit::Direction::eta(), reco::isodeposit::Direction::phi(), reco::isodeposit::Direction::print(), str, theDeposits, theDirection, theVeto, and reco::IsoDeposit::Veto::vetoDir.

Referenced by HLTMuonIsoFilter::hltFilter(), L3MuonIsolationProducer::produce(), and L3MuonCombinedRelativeIsolationProducer::produce().

178  {
179  std::ostringstream str;
180  str << "Direction : " << theDirection.print() << std::endl;
181  str << "Veto: (" << theVeto.vetoDir.eta() << ", " << theVeto.vetoDir.phi() << " dR=" << theVeto.dR << ")"
182  << std::endl;
183  typedef DepositsMultimap::const_iterator IM;
184  IM imEnd = theDeposits.end();
185  for (IM im = theDeposits.begin(); im != imEnd; ++im) {
186  str << "(dR=" << im->first.deltaR << ", alpha=" << im->first.relativeAngle << ", Pt=" << im->second << "),";
187  }
188  str << std::endl;
189 
190  return str.str();
191 }
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296
DepositsMultimap theDeposits
the deposits identifed by relative position to center of cone and deposit value
Definition: IsoDeposit.h:303
Direction theDirection
direcion of deposit (center of isolation cone)
Definition: IsoDeposit.h:293
#define str(s)

◆ setVeto()

void reco::IsoDeposit::setVeto ( const Veto aVeto)
inline

◆ sum2Within()

double IsoDeposit::sum2Within ( double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

◆ sumWithin() [1/2]

double IsoDeposit::sumWithin ( double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

◆ sumWithin() [2/2]

double IsoDeposit::sumWithin ( const Direction dir,
double  coneSize,
const AbsVetos vetos = AbsVetos(),
bool  skipDepositVeto = false 
) const

◆ veto()

const Veto& reco::IsoDeposit::veto ( ) const
inline

Get veto area.

Definition at line 80 of file IsoDeposit.h.

References theVeto.

Referenced by muonisolation::CaloExtractorByAssociator::deposits().

80 { return theVeto; }
Veto theVeto
area to be excluded in computaion of depositWithin
Definition: IsoDeposit.h:296

Member Data Documentation

◆ theCandTag

float reco::IsoDeposit::theCandTag
private

float tagging cand, ment to be transverse energy or pT attached to cand,

Definition at line 299 of file IsoDeposit.h.

Referenced by addCandEnergy(), and candEnergy().

◆ theDeposits

DepositsMultimap reco::IsoDeposit::theDeposits
private

the deposits identifed by relative position to center of cone and deposit value

Definition at line 303 of file IsoDeposit.h.

Referenced by addDeposit(), algoWithin(), begin(), depositAndCountWithin(), end(), nearestDR(), and print().

◆ theDirection

Direction reco::IsoDeposit::theDirection
private

direcion of deposit (center of isolation cone)

Definition at line 293 of file IsoDeposit.h.

Referenced by addDeposit(), algoWithin(), depositAndCountWithin(), direction(), eta(), IsoDeposit(), nearestDR(), phi(), and print().

◆ theVeto

Veto reco::IsoDeposit::theVeto
private

area to be excluded in computaion of depositWithin

Definition at line 296 of file IsoDeposit.h.

Referenced by algoWithin(), depositAndCountWithin(), IsoDeposit(), nearestDR(), print(), setVeto(), and veto().