This file is indexed.

/usr/include/siscone/vicinity.h is in libsiscone-dev 2.0.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// -*- C++ -*-
///////////////////////////////////////////////////////////////////////////////
// File: vicinity.h                                                          //
// Description: header file for particle vicinity (Cvicinity class)          //
// This file is part of the SISCone project.                                 //
// For more details, see http://projects.hepforge.org/siscone                //
//                                                                           //
// Copyright (c) 2006 Gavin Salam and Gregory Soyez                          //
//                                                                           //
// This program is free software; you can redistribute it and/or modify      //
// it under the terms of the GNU General Public License as published by      //
// the Free Software Foundation; either version 2 of the License, or         //
// (at your option) any later version.                                       //
//                                                                           //
// This program is distributed in the hope that it will be useful,           //
// but WITHOUT ANY WARRANTY; without even the implied warranty of            //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             //
// GNU General Public License for more details.                              //
//                                                                           //
// You should have received a copy of the GNU General Public License         //
// along with this program; if not, write to the Free Software               //
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
//                                                                           //
// $Revision:: 123                                                          $//
// $Date:: 2007-03-01 02:52:16 +0100 (Thu, 01 Mar 2007)                     $//
///////////////////////////////////////////////////////////////////////////////

#ifndef __VICINITY_H__
#define __VICINITY_H__

#include <vector>
#include <list>
#include "momentum.h"
#include "defines.h"
#include "quadtree.h"

namespace siscone{

  

/**
 * \class Cvicinity_inclusion
 * \brief a class to keep track of inclusion status in cone and in cocircular region
 *        while using minimal resources
 */
class Cvicinity_inclusion {
public:
  /// default ctor
  Cvicinity_inclusion() : cone(false), cocirc(false) {}

  bool cone;    ///< flag for particle inclusion in the cone
  bool cocirc;  ///< flag for particle inclusion in the border
};


/**
 * \class Cvicinity_elm
 * \brief element in the vicinity of a parent.
 *
 * class used to manage one points in the vicinity 
 * of a parent point.
 */
class Cvicinity_elm{
 public:
  /// pointer to the second borderline particle
  Cmomentum *v;

  /// variable to tell if the particle is inside or outside the cone 
  Cvicinity_inclusion *is_inside;   

  // centre variables
  double eta;              ///< eta coordinate of the center
  double phi;              ///< phi coordinate of the center
  double angle;            ///< angle with parent
  bool side;               ///< true if angle on the positive side, false otherwise
  double cocircular_range; ///< amount by which the angle can be varied while
                           ///< maintaining this point within co-circularity margin

  /// list of elements co-circular with this one
  /// NB: empty list uses less mem than vector
  std::list<Cvicinity_elm * > cocircular;                                          
};

/// ordering pointers to Cvicinity_elm
bool ve_less(Cvicinity_elm *ve1, Cvicinity_elm *ve2);


/**
 * \class Cvicinity
 * \brief list of element in the vicinity of a parent.
 *
 * class used to manage the points which are in the vicinity 
 * of a parent point.
 */
class Cvicinity{
 public:
  /// default constructor
  Cvicinity();

  /// constructor with initialisation (see set_particle_list)
  Cvicinity(std::vector<Cmomentum> &_particle_list);

  /// default destructor
  ~Cvicinity();

  /**
   * set the particle_list
   * \param _particle_list   list of particles (type Cmomentum)
   */ 
  void set_particle_list(std::vector<Cmomentum> &_particle_list);

  /**
   * build the vicinity list from the list of points.
   * \param _parent    reference particle
   * \param _VR        vicinity radius
   */
  void build(Cmomentum *_parent, double _VR);

  // cone kinematical information
  Cmomentum *parent;         ///< parent vector
  double VR;                 ///< radius of the vicinity
  double VR2;                ///< squared radius of the vicinity
  double R;                  ///< normal radius
  double R2;                 ///< squared normal radius
  double inv_R_EPS_COCIRC;   ///< R / EPSILON_COCIRCULAR
  double inv_R_2EPS_COCIRC;  ///< R / (2*EPSILON_COCIRCULAR)

  // particle list information
  int n_part;                                 ///< number of particles
  std::vector<Cmomentum> plist;               ///< the list of particles
  std::vector<Cvicinity_inclusion> pincluded; ///< the inclusion state of particles
  Cvicinity_elm *ve_list;                     ///< list of vicinity elements built from particle list (size=2*n)
#ifdef USE_QUADTREE_FOR_STABILITY_TEST
  Cquadtree *quadtree;                        ///< quadtree used for final stability tests
#endif

  // vicinity information
  std::vector<Cvicinity_elm*> vicinity;       ///< list of points in parent's vicinity
  unsigned int vicinity_size;                 ///< number of elements in vicinity

 protected:
  /**
   * append a particle to the 'vicinity' list after
   * having tested it and computed the angular-ordering quantities
   * \param v   vector to test
   */
  void append_to_vicinity(Cmomentum *v);

  // internal variables
  double pcx;    ///< parent centre (eta)
  double pcy;    ///< parent centre (phi)
};

}

#endif