/usr/include/Rivet/Projections/Spherocity.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 | // -*- C++ -*-
#ifndef RIVET_Spherocity_HH
#define RIVET_Spherocity_HH
#include "Rivet/Projection.hh"
#include "Rivet/Projections/AxesDefinition.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Event.hh"
namespace Rivet {
/**
@brief Get the transverse spherocity scalars for hadron-colliders.
@author Holger Schulz
The scalar (maximum) transverse spherocity is defined as
\f[
T = \mathrm{max}_{\vec{n_\perp}} \frac{\sum_i \left|\vec{p}_{\perp,i} \cdot \vec{n} \right|}{\sum_i |\vec{p}_{\perp,i}|}
\f],
with the direction of the unit vector \f$ \vec{n_\perp} \f$ which maximises \f$ T \f$
being identified as the spherocity axis. The unit vector which maximises the spherocity
scalar in the plane perpendicular to \f$ \vec{n} \f$ is the "spherocity major"
direction, and the vector perpendicular to both the spherocity and spherocity major directions
is the spherocity minor. Both the major and minor directions have associated spherocity
scalars.
Care must be taken in the case of Drell-Yan processes - there we should use the
newly proposed observable \f$ a_T \f$.
*/
class Spherocity : public AxesDefinition {
public:
// Default Constructor
Spherocity() {}
/// Constructor.
Spherocity(const FinalState& fsp)
: _calculatedSpherocity(false)
{
setName("Spherocity");
addProjection(fsp, "FS");
}
/// Clone on the heap.
virtual const Projection* clone() const {
return new Spherocity(*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:
///@{ Spherocity scalar accessors
/// The spherocity scalar, \f$ S \f$, (minimum spherocity).
double spherocity() const { return _spherocities[0]; }
///@}
///@{ Spherocity axis accessors
/// The spherocity axis.
const Vector3& spherocityAxis() const { return _spherocityAxes[0]; }
/// The spherocity major axis (axis of max spherocity perpendicular to spherocity axis).
const Vector3& spherocityMajorAxis() const { return _spherocityAxes[1]; }
/// The spherocity minor axis (axis perpendicular to spherocity and spherocity major).
const Vector3& spherocityMinorAxis() const { return _spherocityAxes[2]; }
///@}
///@{ AxesDefinition axis accessors.
const Vector3& axis1() const { return spherocityAxis(); }
const Vector3& axis2() const { return spherocityMajorAxis(); }
const Vector3& axis3() const { return spherocityMinorAxis(); }
///@}
public:
/// @name Direct methods
/// Ways to do the calculation directly, without engaging the caching system
//@{
/// Manually calculate the spherocity, without engaging the caching system
void calc(const FinalState& fs);
/// Manually calculate the spherocity, without engaging the caching system
void calc(const vector<Particle>& fsparticles);
/// Manually calculate the spherocity, without engaging the caching system
void calc(const vector<FourMomentum>& fsmomenta);
/// Manually calculate the spherocity, without engaging the caching system
void calc(const vector<Vector3>& threeMomenta);
//@}
private:
/// The spherocity scalars.
vector<double> _spherocities;
/// The spherocity axes.
vector<Vector3> _spherocityAxes;
/// Caching flag to avoid costly recalculations.
bool _calculatedSpherocity;
private:
/// Explicitly calculate the spherocity values.
void _calcSpherocity(const vector<Vector3>& fsmomenta);
};
}
#endif
|