This file is indexed.

/usr/include/ThePEG/MatrixElement/Tree2toNDiagram.h is in libthepeg-dev 1.8.0-1.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
// -*- C++ -*-
//
// Tree2toNDiagram.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef ThePEG_Tree2toNDiagram_H
#define ThePEG_Tree2toNDiagram_H
// This is the declaration of the Tree2toNDiagram class.

#include "ThePEG/MatrixElement/DiagramBase.h"
#include "ThePEG/MatrixElement/ColourLines.h"
#include "ThePEG/Handlers/StandardXComb.fh"
#include "Tree2toNDiagram.xh"

namespace ThePEG {

/**
 * The Tree2toNDiagram class inherits from DiagramBase and represents
 * a Feynman tree diagram. It is represented by a chain of \f$n\f$
 * space-like propagators, where one incoming particle has index 1 and
 * other incoming one index \f$n\f$. For adiagram with in total
 * \f$m\f$ propagators the timelike propagators are then numbered
 * \f$n+1\f$ through \f$m\f$. The vector of type of the propagators
 * are accessible from the partons() method, and the parents of
 * propagator \f$i\f$ form the parents(int) method. The parent of a
 * space-like propagator is simply the previous space-like one. The
 * parent of a time-like propagator is either a previous time-like
 * propagator or the first of the connecting space-like ones.
 *
 * A Tree2toNDiagram is created by first constructing it with an
 * integer corresponding to the number of space-like propagators. Then
 * the comma operator is used to add first the particle data objects
 * corresponding to the space-like propagators, then the time-like
 * ones preceeded with the index of their parents. To complete a
 * Tree2toNDiagram, a negative integer is added with the comma
 * operator. This number is then used as an identifier. Note that the
 * parent must have been added before a child is. As an example, the
 * s-channel diagram \f$e \nu_e \rightarrow u \bar{d}\f$ is created
 * thus:<br>
 * <code>Tree2toNDiagram(2),eplus,nue,1,Wplus,3,u,3,dbar</code>.<br>
 * Similarly the t-channel diagram \f$e d \rightarrow \nu_e u\f$ is
 * created thus:<br>
 * <code>Tree2toNDiagram(3),eplus,Wplus,d,1,nu,2,u</code>.  Note that
 * only two chidren are allowed per propagator. This means that
 * four-propagator vertices are not allowed, but must be represented
 * by two three-propagator ones.
 *
 * Please note that for technical reasons, when specifying the
 * diagrams with the comma operator the numbering of the particles is
 * \f$1\ldots m\f$, while the internal representation (in the
 * parent(int) and children(int) function) is using \f$0\ldots m-1\f$
 *
 * @see DiagramBase
 * @see ColourLines
 * 
 */
class Tree2toNDiagram: public DiagramBase {

public:

  /** The integer type reresenting vector sizes. */
  typedef cPDVector::size_type size_type;
  /** A multi-set of particle data objects. */
  typedef multiset<tcPDPtr> PDMSet;

public:

  /** @name Standard constructors and destructors. */
  //@{
  /**
   * Default constructor.
   */
  Tree2toNDiagram()
    : theNSpace(0), theNOutgoing(0), nextOrig(0) {}

  /**
   * Destructor.
   */
  ~Tree2toNDiagram();

  /**
   * The standard constructor giving the number of \a space-like
   * propagators.
   */
  explicit Tree2toNDiagram(int space) 
    : theNSpace(space), theNOutgoing(0), nextOrig(-1) {}
  //@}

public:

  /**
   * If less than zero indicate that this tree is competed. Otherwise
   * signal the parent of the next added parton.
   */
  Tree2toNDiagram & operator,(int o) {
    nextOrig = o - 1;
    if ( o < 0 ) check();
    return *this;
  }

  /**
   * Add a space- or time-like parton.
   */
  Tree2toNDiagram & operator,(PDPtr pd) { return add(pd); }

  /**
   * Add a space- or time-like parton.
   */
  Tree2toNDiagram & operator,(cPDPtr pd) { return add(pd); }

  /**
   * Add a space- or time-like parton.
   */
  Tree2toNDiagram & operator,(tPDPtr pd) { return add(pd); }

  /**
   * Add a space- or time-like parton.
   */
  Tree2toNDiagram & operator,(tcPDPtr pd) { return add(pd); }

  /**
   * Construct a sub process corresponding to this diagram. The
   * incoming partons, and the momenta of the outgoing ones, are given
   * by the XComb object. All parent/children pointers should be set
   * correspondingly and the partons should be colour connected as
   * specified by the ColourLines object.
   */
  virtual tPVector construct(SubProPtr sb, const StandardXComb &,
			     const ColourLines &) const;

  /**
   * Return the types of the incoming partons.
   */
  tcPDPair incoming() const;

  /**
   * Return the complete vector of partons in this tree diagram.
   */
  const cPDVector & allPartons() const { return thePartons; }

  /**
   * Return the outgoing parton types of this tree diagram.
   */
  tcPDVector outgoing() const;

  /**
   * Return the incoming followed by the outgoing parton types of this
   * tree diagram.
   */
  tcPDVector external() const;

  /**
   * Return the index of the parent of the given parton.
   */
  int parent(int i) const { return theParents[i]; }

  /**
   * Return the indices of the children of the given parton.
   */
  pair<int,int> children(int) const;

  /**
   * Return the number of space-like partons
   */
  int nSpace() const { return theNSpace; }

  /**
   * Return the number of outgoing partons.
   */
  int nOutgoing() const { return theNOutgoing; }

private:

  /**
   * Check the consistency of this tree diagram.
   */
  void check();

  /**
   * Add a space-like parton to this diagram.
   */
  void addSpacelike(tcPDPtr pd) {
    if ( thePartons.size() >= theNSpace ) throw Tree2toNDiagramError();
    theParents.push_back(thePartons.size() - 1);
    thePartons.push_back(pd);
  }
  /**
   * Add a time-like parton to this diagram.
   */
  void addTimelike(tcPDPtr);

  /**
   * Add a time-like parton to this diagram indicating its \a origin.
   */
  void addTimelike(tcPDPtr, size_type origin);

  /**
   * Add a parton to this diagram.
   */
  Tree2toNDiagram & add(tcPDPtr);

public:

  /**
   * Compare this diagram's topology to another one.
   */
  virtual bool isSame(tcDiagPtr) const;

  /**
   * Compare this diagram's topology to another one modulo
   * permutations of external legs; provide a map of this diagram's
   * external legs to the other diagram's external legs.
   */
  virtual bool isSame(tcDiagPtr, map<int,int>&) const;

  /**
   * Check for equality.
   */
  bool equals(Ptr<Tree2toNDiagram>::tcptr, int start=0, int startCmp=0) const;

  /**
   * Check for equality modulo permutations of external legs.
   */
  bool equals(Ptr<Tree2toNDiagram>::tcptr, 
	      map<int,int>&,
	      int start=0, int startCmp=0) const;

  /**
   * Merge the two external partons referred to by indices as in the
   * partons() vector returned by DiagramBase. If both are timelike,
   * the parent will become the new outgoing parton, if one is space-
   * and the other timelike, the spacelike child will become the new
   * incoming parton.  Return the position of the merged parton in the
   * resulting diagram or -1 if the merging is not possible. In
   * addition, return a mapping of a certain (non-merged) external leg
   * id to the id in the merged diagram.
   */
  int mergeEmission(int emitter, int id, map<int,int>& remap);

  /**
   * Translate a parton's id in the diagram to a parton's id in a
   * vector of incoming followed by outgoing partons.
   */
  int externalId(int id) const;

  /**
   * Translate a parton's id in a vector of incoming followed by
   * outgoing partons to a parton's id in the diagram.
   */
  int diagramId(int id) const;

public:

  /** @name Functions used by the persistent I/O system. */
  //@{
  /**
   * Function used to write out object persistently.
   * @param os the persistent output stream written to.
   */
  void persistentOutput(PersistentOStream & os) const;

  /**
   * Function used to read in object persistently.
   * @param is the persistent input stream read from.
   * @param version the version number of the object when written.
   */
  void persistentInput(PersistentIStream & is, int version);
  //@}

private:

  /**
   * The number of space-like partons
   */
  size_type theNSpace;

  /**
   * The number of outgoing partons.
   */
  int theNOutgoing;

  /**
   * The parent of the next added parton.
   */
  int nextOrig;

  /**
   * The complete vector of partons in this tree diagram.
   */
  cPDVector thePartons;

  /**
   * The index of the parents.
   */
  vector<int> theParents;

private:

  /**
   * Describe a concrete class with persistent data.
   */
  static ClassDescription<Tree2toNDiagram> initTree2toNDiagram;

  /**
   *  Private and non-existent assignment operator.
   */
  Tree2toNDiagram & operator=(const Tree2toNDiagram &);

};

}

namespace ThePEG {

/** @cond TRAITSPECIALIZATIONS */

/**
 * This template specialization informs ThePEG about the
 * base class of Tree2toNDiagram.
 */
template <>
struct BaseClassTrait<Tree2toNDiagram,1>: public ClassTraitsType {
  /** Typedef of the base class of Tree2toNDiagram. */
  typedef DiagramBase NthBase;
};

/**
 * This template specialization informs ThePEG about the name of the
 * Tree2toNDiagram class.
 */
template <>
struct ClassTraits<Tree2toNDiagram>: public ClassTraitsBase<Tree2toNDiagram> {
  /** Return the class name. */
  static string className() { return "ThePEG::Tree2toNDiagram"; }
};

/** @endcond */

}

#endif /* ThePEG_Tree2toNDiagram_H */