This file is indexed.

/usr/include/CLHEP/Vector/LorentzVector.icc is in libclhep-dev 2.1.4.1+dfsg-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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
// -*- C++ -*-
// $Id: LorentzVector.icc,v 1.3 2010/06/16 17:15:57 garren Exp $
// ---------------------------------------------------------------------------
//
// This file is a part of the CLHEP - a Class Library for High Energy Physics.
// 
// This is the definitions of the inline member functions of the
// HepLorentzVector class.
//

#include "CLHEP/Vector/ZMxpv.h"

#include <cmath>

namespace CLHEP {

inline double HepLorentzVector::x() const { return pp.x(); }
inline double HepLorentzVector::y() const { return pp.y(); }
inline double HepLorentzVector::z() const { return pp.z(); }
inline double HepLorentzVector::t() const { return ee; }

inline HepLorentzVector::
HepLorentzVector(double x1, double y1, double z1, double t1)
  : pp(x1, y1, z1), ee(t1) {}

inline HepLorentzVector:: HepLorentzVector(double x1, double y1, double z1)
  : pp(x1, y1, z1), ee(0) {}

inline HepLorentzVector:: HepLorentzVector(double t1)
  : pp(0, 0, 0), ee(t1) {}

inline HepLorentzVector:: HepLorentzVector()
  : pp(0, 0, 0), ee(0) {}

inline HepLorentzVector::HepLorentzVector(const Hep3Vector & p, double e1)
  : pp(p), ee(e1) {}

inline HepLorentzVector::HepLorentzVector(double e1, const Hep3Vector & p)
  : pp(p), ee(e1) {}

inline HepLorentzVector::HepLorentzVector(const HepLorentzVector & p)
  : pp(p.x(), p.y(), p.z()), ee(p.t()) {}

inline HepLorentzVector::~HepLorentzVector() {}

inline HepLorentzVector::operator const Hep3Vector & () const {return pp;}
inline HepLorentzVector::operator Hep3Vector & () { return pp; }

inline void HepLorentzVector::setX(double a) { pp.setX(a); } 
inline void HepLorentzVector::setY(double a) { pp.setY(a); }
inline void HepLorentzVector::setZ(double a) { pp.setZ(a); }
inline void HepLorentzVector::setT(double a) { ee = a;}

inline double HepLorentzVector::px() const { return pp.x(); }
inline double HepLorentzVector::py() const { return pp.y(); }
inline double HepLorentzVector::pz() const { return pp.z(); }
inline double HepLorentzVector::e()  const { return ee; }

inline void HepLorentzVector::setPx(double a) { pp.setX(a); } 
inline void HepLorentzVector::setPy(double a) { pp.setY(a); }
inline void HepLorentzVector::setPz(double a) { pp.setZ(a); }
inline void HepLorentzVector::setE(double a)  { ee = a;}

inline Hep3Vector HepLorentzVector::vect() const { return pp; } 
inline void HepLorentzVector::setVect(const Hep3Vector &p) { pp = p; } 

inline double HepLorentzVector::theta() const { return pp.theta(); }
inline double HepLorentzVector::cosTheta() const { return pp.cosTheta(); }
inline double HepLorentzVector::phi() const { return pp.phi(); }
inline double HepLorentzVector::rho() const { return pp.mag(); }

inline void HepLorentzVector::setTheta(double a) { pp.setTheta(a); }
inline void HepLorentzVector::setPhi(double a) { pp.setPhi(a); }
inline void HepLorentzVector::setRho(double a) { pp.setMag(a); }

double & HepLorentzVector::operator [] (int i)       { return (*this)(i); }
double   HepLorentzVector::operator [] (int i) const { return (*this)(i); }

inline HepLorentzVector &
HepLorentzVector::operator = (const HepLorentzVector & q) {
  pp = q.vect();
  ee = q.t();
  return *this;
}

inline HepLorentzVector
HepLorentzVector::operator + (const HepLorentzVector & q) const {
  return HepLorentzVector(x()+q.x(), y()+q.y(), z()+q.z(), t()+q.t());
}

inline HepLorentzVector &
HepLorentzVector::operator += (const HepLorentzVector & q) {
  pp += q.vect();
  ee += q.t();
  return *this;
}

inline HepLorentzVector
HepLorentzVector::operator - (const HepLorentzVector & q) const {
  return HepLorentzVector(x()-q.x(), y()-q.y(), z()-q.z(), t()-q.t());
}

inline HepLorentzVector &
HepLorentzVector::operator -= (const HepLorentzVector & q) {
  pp -= q.vect();
  ee -= q.t();
  return *this;
}

inline HepLorentzVector HepLorentzVector::operator - () const {
  return HepLorentzVector(-x(), -y(), -z(), -t());
}

inline HepLorentzVector& HepLorentzVector::operator *= (double a) {
  pp *= a;
  ee *= a;
  return *this;
}

inline bool
HepLorentzVector::operator == (const HepLorentzVector & q) const {
  return (vect()==q.vect() && t()==q.t());
}

inline bool
HepLorentzVector::operator != (const HepLorentzVector & q) const {
  return (vect()!=q.vect() || t()!=q.t());
}

inline double HepLorentzVector::perp2() const   { return pp.perp2(); }
inline double HepLorentzVector::perp()  const   { return pp.perp(); }
inline void HepLorentzVector::setPerp(double a) { pp.setPerp(a); }

inline double HepLorentzVector::perp2(const Hep3Vector &v1) const {
  return pp.perp2(v1);
}

inline double HepLorentzVector::perp(const Hep3Vector &v1) const {
  return pp.perp(v1);
}

inline double HepLorentzVector::angle(const Hep3Vector &v1) const {
  return pp.angle(v1);
}

inline double HepLorentzVector::mag2() const {
  return metric*(t()*t() - pp.mag2());
}

inline double HepLorentzVector::mag() const {
  double mmm = m2();
  return mmm < 0.0 ? -std::sqrt(-mmm) : std::sqrt(mmm);
}

inline double HepLorentzVector::m2() const { 
  return t()*t() - pp.mag2();
}

inline double HepLorentzVector::m() const { return mag(); }

inline double HepLorentzVector::mt2() const {
  return e()*e() - pz()*pz();
}

inline double HepLorentzVector::mt() const {
  double mmm = mt2();
  return mmm < 0.0 ? -std::sqrt(-mmm) : std::sqrt(mmm);
}

inline double HepLorentzVector::et2() const {
  double pt2 = pp.perp2();
  return pt2 == 0 ? 0 : e()*e() * pt2/(pt2+z()*z());
}

inline double HepLorentzVector::et() const {
  double etet = et2();
  return e() < 0.0 ? -std::sqrt(etet) : std::sqrt(etet);
}

inline double HepLorentzVector::et2(const Hep3Vector & v1) const {
  double pt2 = pp.perp2(v1);
  double pv = pp.dot(v1.unit());
  return pt2 == 0 ? 0 : e()*e() * pt2/(pt2+pv*pv);
}

inline double HepLorentzVector::et(const Hep3Vector & v1) const {
  double etet = et2(v1);
  return e() < 0.0 ? -std::sqrt(etet) : std::sqrt(etet);
}

inline void 
HepLorentzVector::setVectMag(const Hep3Vector & spatial, double magnitude) {
  setVect(spatial);
  setT(std::sqrt(magnitude * magnitude + spatial * spatial));
}

inline void 
HepLorentzVector::setVectM(const Hep3Vector & spatial, double mass) {
  setVectMag(spatial, mass);
}

inline double HepLorentzVector::dot(const HepLorentzVector & q) const {
  return metric*(t()*q.t() - z()*q.z() - y()*q.y() - x()*q.x());
}

inline double
HepLorentzVector::operator * (const HepLorentzVector & q) const {
  return dot(q);
}

inline double HepLorentzVector::plus() const {
  return t() + z();
}

inline double HepLorentzVector::minus() const {
  return t() - z();
}

inline HepLorentzVector & HepLorentzVector::boost(const Hep3Vector & b) {
  return boost(b.x(), b.y(), b.z());
}

inline double HepLorentzVector::pseudoRapidity() const {
  return pp.pseudoRapidity();
}

inline double HepLorentzVector::eta() const {
  return pp.pseudoRapidity();
}

inline double HepLorentzVector::eta( const Hep3Vector & ref ) const {
  return pp.eta( ref );
}

inline HepLorentzVector &
HepLorentzVector::operator *= (const HepRotation & m1) {
  pp.transform(m1);
  return *this;
}

inline HepLorentzVector &
HepLorentzVector::transform(const HepRotation & m1) {
  pp.transform(m1);
  return *this;
}

inline HepLorentzVector operator * (const HepLorentzVector & p, double a) {
  return HepLorentzVector(a*p.x(), a*p.y(), a*p.z(), a*p.t());
}

inline HepLorentzVector operator * (double a, const HepLorentzVector & p) {
  return HepLorentzVector(a*p.x(), a*p.y(), a*p.z(), a*p.t());
}

// The following were added when ZOOM PhysicsVectors was merged in:

inline HepLorentzVector::HepLorentzVector( 
	double x1, double y1, double z1, Tcomponent t1 ) :
	pp(x1, y1, z1), ee(t1) {}

inline void HepLorentzVector::set(
	double x1, double y1, double z1, Tcomponent t1 ) {
  pp.set(x1,y1,z1);
  ee = t1;
}

inline void HepLorentzVector::set(
        double x1, double y1, double z1, double t1 ) {
  set (x1,y1,z1,Tcomponent(t1));
}

inline HepLorentzVector::HepLorentzVector( 
	Tcomponent t1, double x1, double y1, double z1 ) :
        pp(x1, y1, z1), ee(t1) {}   

inline void HepLorentzVector::set(
	Tcomponent t1, double x1, double y1, double z1 ) {
  pp.set(x1,y1,z1);
  ee = t1;
}

inline void HepLorentzVector::set( Tcomponent t1 ) {
  pp.set(0, 0, 0);
  ee = t1;
}

inline void HepLorentzVector::set( double t1 ) {
  pp.set(0, 0, 0);
  ee = t1;
}

inline HepLorentzVector::HepLorentzVector( Tcomponent t1 ) : 
	pp(0, 0, 0), ee(t1) {}

inline void HepLorentzVector::set( const Hep3Vector & v1 ) {
  pp = v1;
  ee = 0;
}

inline HepLorentzVector::HepLorentzVector( const Hep3Vector & v1 ) : 
	pp(v1), ee(0) {}

inline void HepLorentzVector::setV(const Hep3Vector & v1) {
  pp = v1;
}

inline HepLorentzVector & HepLorentzVector::operator=(const Hep3Vector & v1) {
  pp = v1;
  ee = 0;
  return *this;
}

inline double HepLorentzVector::getX() const { return pp.x(); }
inline double HepLorentzVector::getY() const { return pp.y(); }
inline double HepLorentzVector::getZ() const { return pp.z(); }
inline double HepLorentzVector::getT() const { return ee; }

inline Hep3Vector HepLorentzVector::getV() const { return pp; } 
inline Hep3Vector HepLorentzVector::v() const { return pp; } 

inline void HepLorentzVector::set(double t1, const Hep3Vector & v1) {
  pp = v1;
  ee = t1;
}

inline void HepLorentzVector::set(const Hep3Vector & v1, double t1) {
  pp = v1;
  ee = t1;
}

inline void HepLorentzVector::setV( double x1,
             double y1,
             double z1 ) { pp.set(x1, y1, z1); }

inline void HepLorentzVector::setRThetaPhi 
		( double r, double ttheta, double phi1 ) 
                         { pp.setRThetaPhi( r, ttheta, phi1 ); }

inline void HepLorentzVector::setREtaPhi 
		( double r, double eta1, double phi1 ) 
                         { pp.setREtaPhi( r, eta1, phi1 ); }

inline void HepLorentzVector::setRhoPhiZ
		( double rho1, double phi1, double z1 )
                         { pp.setRhoPhiZ ( rho1, phi1, z1 ); }

inline bool HepLorentzVector::isTimelike() const {
  return restMass2() > 0;
}  

inline bool  HepLorentzVector::isSpacelike() const {
  return restMass2() < 0;
}

inline bool  HepLorentzVector::isLightlike(double epsilon) const {
  return std::fabs(restMass2()) < 2.0 * epsilon * ee * ee;
}

inline double HepLorentzVector::diff2( const HepLorentzVector & w ) const {
    return metric*( (ee-w.ee)*(ee-w.ee) - (pp-w.pp).mag2() );
}

inline double HepLorentzVector::delta2Euclidean 
					( const HepLorentzVector & w ) const {
    return (ee-w.ee)*(ee-w.ee) + (pp-w.pp).mag2();
}

inline double HepLorentzVector::euclideanNorm2()  const {
  return ee*ee + pp.mag2();
}

inline double HepLorentzVector::euclideanNorm()  const {
  return std::sqrt(euclideanNorm2());
}

inline double HepLorentzVector::restMass2()      const { return m2(); }
inline double HepLorentzVector::invariantMass2() const { return m2(); }

inline double HepLorentzVector::restMass() const {
    if( t() < 0.0 ) ZMthrowC(ZMxpvNegativeMass(
              "E^2-p^2 < 0 for this particle. Magnitude returned."));
    return t() < 0.0 ? -m() : m();
}

inline double HepLorentzVector::invariantMass() const {
    if( t() < 0.0 ) ZMthrowC(ZMxpvNegativeMass(
              "E^2-p^2 < 0 for this particle. Magnitude returned."));
    return t() < 0.0 ? -m() : m();
}

inline double HepLorentzVector::invariantMass2
					(const HepLorentzVector & w) const {
  return (*this + w).m2();
} /* invariantMass2 */

//-*********
// boostOf()
//-*********

// Each of these is a shell over a boost method.

inline HepLorentzVector boostXOf
	(const HepLorentzVector & vec, double bbeta) {
  HepLorentzVector vv (vec);
  return vv.boostX (bbeta);
}

inline HepLorentzVector boostYOf
	(const HepLorentzVector & vec, double bbeta) {
  HepLorentzVector vv (vec);
  return vv.boostY (bbeta);
}

inline HepLorentzVector boostZOf
	(const HepLorentzVector & vec, double bbeta) {
  HepLorentzVector vv (vec);
  return vv.boostZ (bbeta);
}

inline HepLorentzVector boostOf
	(const HepLorentzVector & vec, const Hep3Vector & betaVector ) {
  HepLorentzVector vv (vec);
  return vv.boost (betaVector);
}

inline HepLorentzVector boostOf
    (const HepLorentzVector & vec, const Hep3Vector & aaxis,  double bbeta) {
  HepLorentzVector vv (vec);
  return vv.boost (aaxis, bbeta);
}

}  // namespace CLHEP