|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   21    return StatusCode::SUCCESS;
 
   33   ppars = readHandlePcontainer.
get();
 
   35   using Grid=std::vector<std::vector<std::vector<const xAOD::IParticle*>>>;
 
   38   const double phiMin = -3.1416;
 
   39   const double phiMax = 3.1416;
 
   44   for ( 
auto& phiVec: grid) {
 
   45     phiVec.resize(1+ (phiMax-phiMin)/
m_DR);
 
   49   auto phiToIndex = [phiMin, 
this](
double phi) -> 
size_t { 
return (
phi-phiMin)/
m_DR; };
 
   51   auto neighborsInEta = [&grid, etaToIndex](
double eta) -> std::vector<size_t> {
 
   52     const size_t etaIndex = etaToIndex(
eta);
 
   54       return {etaIndex, etaIndex+1};
 
   56     if ( etaIndex == grid.size()-1){
 
   57       return {etaIndex-1, etaIndex};
 
   59     return {etaIndex-1, etaIndex, etaIndex+1};
 
   62   auto neighborsInPhi = [&grid, phiToIndex](
double phi) -> std::vector<size_t> {
 
   73   for(
const auto* 
ap : *ppars) {
 
   74     grid[etaToIndex(
ap->eta())][phiToIndex(
ap->phi())].push_back(
ap);
 
   81     auto etaN = neighborsInEta(theJet->
eta());
 
   82     auto phiN = neighborsInPhi(theJet->
phi());
 
   84     for ( 
size_t etaI :  etaN) { 
 
   85       for ( 
size_t phiI : phiN ) {
 
   86         for ( 
auto ap: grid[etaI][phiI]) {
 
   93   return StatusCode::SUCCESS;
 
  
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
virtual double phi() const
The azimuthal angle ( ) of the particle.
#define ATH_MSG_VERBOSE(x)
std::vector< const IParticle * > ParticleVector
(Non-const) Iterator class for DataVector/DataList.
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
virtual double eta() const
The pseudorapidity ( ) of the particle.
void setAssociatedObjects(const std::string &name, const std::vector< const T * > &vec)
set associated objects from a vector of arbitrary object.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
virtual FourMom_t p4() const
The full 4-momentum of the particle.