ATLAS Offline Software
Public Member Functions | List of all members
DerivationFramework::TracksInCone Struct Reference

#include <TracksInCone.h>

Collaboration diagram for DerivationFramework::TracksInCone:

Public Member Functions

void select (const xAOD::IParticle *particle, float coneSize, const xAOD::TrackParticleContainer *tracks, std::vector< bool > &mask)
 
void select (const xAOD::IParticle *particle, float coneSize, const xAOD::TauTrackContainer *tracks, std::vector< bool > &mask)
 

Detailed Description

Definition at line 19 of file TracksInCone.h.

Member Function Documentation

◆ select() [1/2]

void DerivationFramework::TracksInCone::select ( const xAOD::IParticle particle,
float  coneSize,
const xAOD::TauTrackContainer tracks,
std::vector< bool > &  mask 
)
inline

Definition at line 38 of file TracksInCone.h.

38  {
39  float particleEta = particle->eta();
40  float particlePhi = particle->phi();
41  unsigned int i(0);
42  for (xAOD::TauTrackContainer::const_iterator trIt = tracks->begin(); trIt!=tracks->end(); ++trIt, ++i) {
43  float deltaEta = (*trIt)->eta() - particleEta;
44  float deltaPhi = fabs((*trIt)->phi() - particlePhi);
45  if (deltaPhi > TMath::Pi()) deltaPhi = 2.0*TMath::Pi() - deltaPhi;
46  float deltaR = sqrt(deltaEta*deltaEta + deltaPhi*deltaPhi);
47  if (deltaR < coneSize) mask[i] = true;
48  }
49  return;
50  }

◆ select() [2/2]

void DerivationFramework::TracksInCone::select ( const xAOD::IParticle particle,
float  coneSize,
const xAOD::TrackParticleContainer tracks,
std::vector< bool > &  mask 
)
inline

Definition at line 21 of file TracksInCone.h.

21  {
22  float particleEta = particle->eta();
23  float particlePhi = particle->phi();
24  unsigned int i(0);
25  for (xAOD::TrackParticleContainer::const_iterator trIt = tracks->begin(); trIt!=tracks->end(); ++trIt, ++i) {
26  float deltaEta = (*trIt)->eta() - particleEta;
27  float deltaPhi = fabs((*trIt)->phi() - particlePhi);
28  if (deltaPhi > TMath::Pi()) deltaPhi = 2.0*TMath::Pi() - deltaPhi;
29  float deltaR = sqrt(deltaEta*deltaEta + deltaPhi*deltaPhi);
30  if (deltaR < coneSize) mask[i] = true;
31  }
32  return;
33  }

The documentation for this struct was generated from the following file:
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.