This file is indexed.

/usr/include/CLHEP/Vector/Rotation.icc is in libclhep-dev 2.1.4.1-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
345
346
347
348
// -*- C++ -*-
// $Id: Rotation.icc,v 1.2 2003/10/10 21:42:35 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
// HepRotation class
//

namespace CLHEP {

// Put commonly used accessors as early as possible to avoid inlining misses:

inline double HepRotation::xx() const { return rxx; }
inline double HepRotation::xy() const { return rxy; }
inline double HepRotation::xz() const { return rxz; }
inline double HepRotation::yx() const { return ryx; }
inline double HepRotation::yy() const { return ryy; }
inline double HepRotation::yz() const { return ryz; }
inline double HepRotation::zx() const { return rzx; }
inline double HepRotation::zy() const { return rzy; }
inline double HepRotation::zz() const { return rzz; }

inline HepRep3x3 HepRotation::rep3x3() const {
  return HepRep3x3 ( rxx, rxy, rxz, 
		     ryx, ryy, ryz, 
		     rzx, rzy, rzz );
}

inline double HepRotation::xt() const { return 0.0; }
inline double HepRotation::yt() const { return 0.0; }
inline double HepRotation::zt() const { return 0.0; }
inline double HepRotation::tx() const { return 0.0; }
inline double HepRotation::ty() const { return 0.0; }
inline double HepRotation::tz() const { return 0.0; }
inline double HepRotation::tt() const { return 1.0; }

inline HepRep4x4 HepRotation::rep4x4() const {
  return HepRep4x4 ( rxx, rxy, rxz, 0.0,
		     ryx, ryy, ryz, 0.0,
		     rzx, rzy, rzz, 0.0,
		     0.0, 0.0, 0.0, 1.0 );
}

// Ctors etc:

inline HepRotation::HepRotation() : rxx(1.0), rxy(0.0), rxz(0.0), 
				    ryx(0.0), ryy(1.0), ryz(0.0),
				    rzx(0.0), rzy(0.0), rzz(1.0) {}

inline HepRotation::HepRotation(const HepRotation & m1) : 
	rxx(m1.rxx), rxy(m1.rxy), rxz(m1.rxz), 
	ryx(m1.ryx), ryy(m1.ryy), ryz(m1.ryz),
	rzx(m1.rzx), rzy(m1.rzy), rzz(m1.rzz) {}

inline HepRotation::HepRotation
			(double mxx, double mxy, double mxz,
			 double myx, double myy, double myz,
			 double mzx, double mzy, double mzz) : 
	rxx(mxx), rxy(mxy), rxz(mxz), 
	ryx(myx), ryy(myy), ryz(myz),
	rzx(mzx), rzy(mzy), rzz(mzz) {}

inline HepRotation::HepRotation ( const HepRep3x3 & m1 ) :
	rxx(m1.xx_), rxy(m1.xy_), rxz(m1.xz_), 
	ryx(m1.yx_), ryy(m1.yy_), ryz(m1.yz_),
	rzx(m1.zx_), rzy(m1.zy_), rzz(m1.zz_) {}

inline HepRotation::HepRotation(const HepRotationX & rx) : 
	rxx(1.0), rxy(0.0),     rxz(0.0), 
	ryx(0.0), ryy(rx.yy()), ryz(rx.yz()),
	rzx(0.0), rzy(rx.zy()), rzz(rx.zz()) {}

inline HepRotation::HepRotation(const HepRotationY & ry) : 
	rxx(ry.xx()), rxy(0.0), rxz(ry.xz()), 
	ryx(0.0),     ryy(1.0), ryz(0.0),
	rzx(ry.zx()), rzy(0.0), rzz(ry.zz()) {}

inline HepRotation::HepRotation(const HepRotationZ & rz) : 
	rxx(rz.xx()), rxy(rz.xy()), rxz(0.0), 
	ryx(rz.yx()), ryy(rz.yy()), ryz(0.0),
	rzx(0.0),     rzy(0.0),     rzz(1.0) {}

inline HepRotation::~HepRotation() {}

// More accessors:

inline HepRotation::HepRotation_row::HepRotation_row
(const HepRotation & r, int i) : rr(r), ii(i) {}

inline double HepRotation::HepRotation_row::operator [] (int jj) const {
  return rr(ii,jj);
}

inline
const HepRotation::HepRotation_row HepRotation::operator [] (int i) const {
  return HepRotation_row(*this, i);
}

inline Hep3Vector HepRotation::colX() const 
				{ return Hep3Vector ( rxx, ryx, rzx ); }
inline Hep3Vector HepRotation::colY() const 
				{ return Hep3Vector ( rxy, ryy, rzy ); }
inline Hep3Vector HepRotation::colZ() const 
				{ return Hep3Vector ( rxz, ryz, rzz ); }
 
inline Hep3Vector HepRotation::rowX() const 
				{ return Hep3Vector ( rxx, rxy, rxz ); }
inline Hep3Vector HepRotation::rowY() const 
				{ return Hep3Vector ( ryx, ryy, ryz ); }
inline Hep3Vector HepRotation::rowZ() const 
				{ return Hep3Vector ( rzx, rzy, rzz ); }
 
inline HepLorentzVector HepRotation::col1() const 
				{ return HepLorentzVector (colX(), 0); }
inline HepLorentzVector HepRotation::col2() const
				{ return HepLorentzVector (colY(), 0); }
inline HepLorentzVector HepRotation::col3() const
				{ return HepLorentzVector (colZ(), 0); }
inline HepLorentzVector HepRotation::col4() const
				{ return HepLorentzVector (0,0,0,1); }
inline HepLorentzVector HepRotation::row1() const
				{ return HepLorentzVector (rowX(), 0); }
inline HepLorentzVector HepRotation::row2() const
				{ return HepLorentzVector (rowY(), 0); }
inline HepLorentzVector HepRotation::row3() const
				{ return HepLorentzVector (rowZ(), 0); }
inline HepLorentzVector HepRotation::row4() const
				{ return HepLorentzVector (0,0,0,1); }

inline double  HepRotation::getPhi  () const { return phi();   }
inline double  HepRotation::getTheta() const { return theta(); }
inline double  HepRotation::getPsi  () const { return psi();   }
inline double  HepRotation::getDelta() const { return delta(); }
inline Hep3Vector HepRotation::getAxis () const { return axis();  }

inline HepRotation & HepRotation::operator = (const HepRotation & m1) {
  rxx = m1.rxx;
  rxy = m1.rxy;
  rxz = m1.rxz;
  ryx = m1.ryx;
  ryy = m1.ryy;
  ryz = m1.ryz;
  rzx = m1.rzx;
  rzy = m1.rzy;
  rzz = m1.rzz;
  return *this;
}

inline HepRotation & HepRotation::set(const HepRep3x3 & m1) {
  rxx = m1.xx_;
  rxy = m1.xy_;
  rxz = m1.xz_;
  ryx = m1.yx_;
  ryy = m1.yy_;
  ryz = m1.yz_;
  rzx = m1.zx_;
  rzy = m1.zy_;
  rzz = m1.zz_;
  return *this;
}

inline HepRotation & HepRotation::set(const HepRotationX & r) {
  return (set (r.rep3x3()));
}
inline HepRotation & HepRotation::set(const HepRotationY & r) {
  return (set (r.rep3x3()));
}
inline HepRotation & HepRotation::set(const HepRotationZ & r) {
  return (set (r.rep3x3()));
}

inline HepRotation & HepRotation::operator= (const HepRotationX & r) {
  return (set (r.rep3x3()));
}
inline HepRotation & HepRotation::operator= (const HepRotationY & r) {
  return (set (r.rep3x3()));
}
inline HepRotation & HepRotation::operator= (const HepRotationZ & r) {
  return (set (r.rep3x3()));
}

inline Hep3Vector HepRotation::operator * (const Hep3Vector & p) const {
  return Hep3Vector(rxx*p.x() + rxy*p.y() + rxz*p.z(),
                    ryx*p.x() + ryy*p.y() + ryz*p.z(),
                    rzx*p.x() + rzy*p.y() + rzz*p.z());
//  This is identical to the code in the CLHEP 1.6 version
}

inline Hep3Vector HepRotation::operator () (const Hep3Vector & p) const {
  register double x = p.x();
  register double y = p.y();
  register double z = p.z();
  return Hep3Vector(rxx*x + rxy*y + rxz*z,
                    ryx*x + ryy*y + ryz*z,
                    rzx*x + rzy*y + rzz*z);
}

inline HepLorentzVector
HepRotation::operator () (const HepLorentzVector & w) const {
  return HepLorentzVector( operator() (w.vect()), w.t() );
}

inline HepLorentzVector HepRotation::operator * 
					(const HepLorentzVector & p) const {
  return operator()(p);
}

inline HepRotation HepRotation::operator* (const HepRotation & r) const {
  return HepRotation(rxx*r.rxx + rxy*r.ryx + rxz*r.rzx,
                     rxx*r.rxy + rxy*r.ryy + rxz*r.rzy,
                     rxx*r.rxz + rxy*r.ryz + rxz*r.rzz,
                     ryx*r.rxx + ryy*r.ryx + ryz*r.rzx,
                     ryx*r.rxy + ryy*r.ryy + ryz*r.rzy,
                     ryx*r.rxz + ryy*r.ryz + ryz*r.rzz,
                     rzx*r.rxx + rzy*r.ryx + rzz*r.rzx,
                     rzx*r.rxy + rzy*r.ryy + rzz*r.rzy,
                     rzx*r.rxz + rzy*r.ryz + rzz*r.rzz );
}

inline HepRotation HepRotation::operator * (const HepRotationX & rx) const {
  double yy1 = rx.yy();
  double yz1 = rx.yz();
  double zy1 = -yz1;
  double zz1 =  yy1;
  return HepRotation(
    rxx,   rxy*yy1 + rxz*zy1,   rxy*yz1 + rxz*zz1,
    ryx,   ryy*yy1 + ryz*zy1,   ryy*yz1 + ryz*zz1,
    rzx,   rzy*yy1 + rzz*zy1,   rzy*yz1 + rzz*zz1 );
}

inline HepRotation HepRotation::operator * (const HepRotationY & ry) const {
  double xx1 = ry.xx();
  double xz1 = ry.xz();
  double zx1 = -xz1;
  double zz1 =  xx1;
  return HepRotation(
    rxx*xx1 + rxz*zx1,   rxy,   rxx*xz1 + rxz*zz1,   
    ryx*xx1 + ryz*zx1,   ryy,   ryx*xz1 + ryz*zz1,   
    rzx*xx1 + rzz*zx1,   rzy,   rzx*xz1 + rzz*zz1 );
}

inline HepRotation HepRotation::operator * (const HepRotationZ & rz) const {
  double xx1 = rz.xx();
  double xy1 = rz.xy();
  double yx1 = -xy1;
  double yy1 =  xx1;
  return HepRotation(
    rxx*xx1 + rxy*yx1,   rxx*xy1 + rxy*yy1,   rxz,   
    ryx*xx1 + ryy*yx1,   ryx*xy1 + ryy*yy1,   ryz,   
    rzx*xx1 + rzy*yx1,   rzx*xy1 + rzy*yy1,   rzz );
}


inline HepRotation & HepRotation::operator *= (const HepRotation & r) {
  return *this = (*this) * (r);
}

inline HepRotation & HepRotation::operator *= (const HepRotationX & r) {
  return *this = (*this) * (r); }
inline HepRotation & HepRotation::operator *= (const HepRotationY & r) {
  return *this = (*this) * (r); }
inline HepRotation & HepRotation::operator *= (const HepRotationZ & r) {
  return *this = (*this) * (r); }

inline HepRotation & HepRotation::transform(const HepRotation & r) {
  return *this = r * (*this);
}

inline HepRotation & HepRotation::transform(const HepRotationX & r) {
  return *this = r * (*this); }
inline HepRotation & HepRotation::transform(const HepRotationY & r) {
  return *this = r * (*this); }
inline HepRotation & HepRotation::transform(const HepRotationZ & r) {
  return *this = r * (*this); }

inline HepRotation HepRotation::inverse() const {
  return HepRotation( rxx, ryx, rzx, 
		      rxy, ryy, rzy, 
		      rxz, ryz, rzz );
}

inline HepRotation inverseOf (const HepRotation & r) {
  return r.inverse();
}

inline HepRotation & HepRotation::invert() {
  return *this=inverse();
}

inline HepRotation & HepRotation::rotate
				(double ddelta, const Hep3Vector * p) {
  return rotate(ddelta, *p);
}

inline bool HepRotation::operator== ( const HepRotation & r ) const {
  return ( rxx==r.rxx && rxy==r.rxy && rxz==r.rxz &&
	   ryx==r.ryx && ryy==r.ryy && ryz==r.ryz &&
	   rzx==r.rzx && rzy==r.rzy && rzz==r.rzz );
}
inline bool HepRotation::operator!= ( const HepRotation & r ) const {
  return ! operator==(r);
}
inline bool HepRotation::operator< ( const HepRotation & r ) const 
	{ return compare(r)< 0; }
inline bool HepRotation::operator<=( const HepRotation & r ) const 
	{ return compare(r)<=0; }
inline bool HepRotation::operator>=( const HepRotation & r ) const 
	{ return compare(r)>=0; }
inline bool HepRotation::operator> ( const HepRotation & r ) const 
	{ return compare(r)> 0; }

inline double HepRotation::getTolerance() { 
  return Hep4RotationInterface::tolerance;
}
inline double HepRotation::setTolerance(double tol) { 
  return Hep4RotationInterface::setTolerance(tol);
}

inline HepRotation operator * (const HepRotationX & rx, const HepRotation & r){
  HepRep3x3 mmm = r.rep3x3();
  double c = rx.yy();
  double ss = rx.zy();
  return HepRotation (        mmm.xx_,           mmm.xy_,          mmm.xz_,
                        c*mmm.yx_-ss*mmm.zx_, c*mmm.yy_-ss*mmm.zy_, c*mmm.yz_-ss*mmm.zz_,
                        ss*mmm.yx_+c*mmm.zx_, ss*mmm.yy_+c*mmm.zy_, ss*mmm.yz_+c*mmm.zz_ );
}

inline HepRotation operator * (const HepRotationY & ry, const HepRotation & r){
  HepRep3x3 mmm = r.rep3x3();
  double c = ry.xx();
  double ss = ry.xz();
  return HepRotation (  c*mmm.xx_+ss*mmm.zx_, c*mmm.xy_+ss*mmm.zy_, c*mmm.xz_+ss*mmm.zz_,
                              mmm.yx_,           mmm.yy_,          mmm.yz_,
                       -ss*mmm.xx_+c*mmm.zx_,-ss*mmm.xy_+c*mmm.zy_,-ss*mmm.xz_+c*mmm.zz_ );
}

inline HepRotation operator * (const HepRotationZ & rz, const HepRotation & r){
  HepRep3x3 mmm = r.rep3x3();
  double c = rz.xx();
  double ss = rz.yx();
  return HepRotation (  c*mmm.xx_-ss*mmm.yx_, c*mmm.xy_-ss*mmm.yy_, c*mmm.xz_-ss*mmm.yz_,
                        ss*mmm.xx_+c*mmm.yx_, ss*mmm.xy_+c*mmm.yy_, ss*mmm.xz_+c*mmm.yz_,
                              mmm.zx_,           mmm.zy_,          mmm.zz_       );
}

}  // namespace CLHEP