/usr/include/Rivet/Projections/Thrust.hh is in librivet-dev 1.8.3-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 | // -*- C++ -*-
#ifndef RIVET_Thrust_HH
#define RIVET_Thrust_HH
#include "Rivet/Projection.hh"
#include "Rivet/Projections/AxesDefinition.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Event.hh"
namespace Rivet {
/**
@brief Get the e+ e- thrust basis and the thrust, thrust major and thrust minor scalars.
@author Andy Buckley
The scalar (maximum) thrust is defined as
\f[
T = \mathrm{max}_{\vec{n}} \frac{\sum_i \left|\vec{p}_i \cdot \vec{n} \right|}{\sum_i |\vec{p}_i|}
\f],
with the direction of the unit vector \f$ \vec{n} \f$ which maximises \f$ T \f$
being identified as the thrust axis. The unit vector which maximises the thrust
scalar in the plane perpendicular to \f$ \vec{n} \f$ is the "thrust major"
direction, and the vector perpendicular to both the thrust and thrust major directions
is the thrust minor. Both the major and minor directions have associated thrust
scalars.
Thrust calculations have particularly simple forms for less than 4 particles, and
in those cases this projection is computationally minimal. For 4 or more particles,
a more general calculation must be carried out, based on the Brandt/Dahmen method
from Z. Phys. C1 (1978). While a polynomial improvement on the exponential scaling
of the naive method, this algorithm scales asymptotically as
\f$ \mathcal{O}\left( n^3 \right) \f$. Be aware that the thrust may easily be the
most computationally demanding projection in Rivet for large events!
The Rivet implementation of thrust is based heavily on Stefan Gieseke's Herwig++
re-coding of the 'tasso' code from HERWIG.
NB. special case with >= 4 coplanar particles will still fail.
NB. Thrust assumes all momenta are in the CoM system: no explicit boost is performed.
This can be dealt with by appropriate choice of the supplied FinalState.
*/
class Thrust : public AxesDefinition {
public:
/// Constructor.
Thrust() {}
Thrust(const FinalState& fsp) {
setName("Thrust");
addProjection(fsp, "FS");
}
/// Clone on the heap.
virtual const Projection* clone() const {
return new Thrust(*this);
}
protected:
/// Perform the projection on the Event
void project(const Event& e) {
const vector<Particle> ps
= applyProjection<FinalState>(e, "FS").particles();
calc(ps);
}
/// Compare projections
int compare(const Projection& p) const {
return mkNamedPCmp(p, "FS");
}
public:
///@{ Thrust scalar accessors
/// The thrust scalar, \f$ T \f$, (maximum thrust).
double thrust() const { return _thrusts[0]; }
/// The thrust major scalar, \f$ M \f$, (thrust along thrust major axis).
double thrustMajor() const { return _thrusts[1]; }
/// The thrust minor scalar, \f$ m \f$, (thrust along thrust minor axis).
double thrustMinor() const { return _thrusts[2]; }
/// The oblateness, \f$ O = M - m \f$ .
double oblateness() const { return _thrusts[1] - _thrusts[2]; }
///@}
///@{ Thrust axis accessors
/// The thrust axis.
const Vector3& thrustAxis() const { return _thrustAxes[0]; }
/// The thrust major axis (axis of max thrust perpendicular to thrust axis).
const Vector3& thrustMajorAxis() const { return _thrustAxes[1]; }
/// The thrust minor axis (axis perpendicular to thrust and thrust major).
const Vector3& thrustMinorAxis() const { return _thrustAxes[2]; }
///@}
///@{ AxesDefinition axis accessors.
const Vector3& axis1() const { return thrustAxis(); }
const Vector3& axis2() const { return thrustMajorAxis(); }
const Vector3& axis3() const { return thrustMinorAxis(); }
///@}
public:
/// @name Direct methods
/// Ways to do the calculation directly, without engaging the caching system
//@{
/// Manually calculate the thrust, without engaging the caching system
void calc(const FinalState& fs);
/// Manually calculate the thrust, without engaging the caching system
void calc(const vector<Particle>& fsparticles);
/// Manually calculate the thrust, without engaging the caching system
void calc(const vector<FourMomentum>& fsmomenta);
/// Manually calculate the thrust, without engaging the caching system
void calc(const vector<Vector3>& threeMomenta);
//@}
private:
/// The thrust scalars.
vector<double> _thrusts;
/// The thrust axes.
vector<Vector3> _thrustAxes;
private:
/// Explicitly calculate the thrust values.
void _calcThrust(const vector<Vector3>& fsmomenta);
};
}
#endif
|