#include <ClusterShapes.h>
Public Member Functions | |
ClusterShapes (int nhits, float *a, float *x, float *y, float *z) | |
ClusterShapes (int nhits, float *a, float *t, float *x, float *y, float *z) | |
ClusterShapes (int nhits, std::vector< float > a, std::vector< float > x, std::vector< float > y, std::vector< float > z) | |
ClusterShapes (int nhits, std::vector< float > a, std::vector< float > t, std::vector< float > x, std::vector< float > y, std::vector< float > z) | |
~ClusterShapes () | |
int | getNumberOfHits () |
float | getTotalAmplitude () |
float | getAverageTime () |
float * | getCenterOfGravity () |
float * | getEigenValInertia () |
float * | getEigenVecInertia () |
float | getWidth () |
float | radius () |
float | getElipsoid_r1 () |
float | getElipsoid_r2 () |
float | getElipsoid_r3 () |
float | getElipsoid_vol () |
float | getElipsoid_r_ave () |
float | getElipsoid_density () |
float | getElipsoid_eccentricity () |
float | getElipsoid_r_forw () |
float | getElipsoid_r_back () |
Private Member Functions | |
void | findElipsoid () |
void | findGravity () |
void | findInertia () |
void | findWidth () |
float | findDistance (int i) |
Private Attributes | |
int | _nHits |
std::vector< float > | _aHit |
std::vector< float > | _tHit |
std::vector< float > | _xHit |
std::vector< float > | _yHit |
std::vector< float > | _zHit |
int | _ifNotGravity = 1 |
float | _totAmpl = 0.0 |
float | _totTime = 0.0 |
float | _radius = 0.0 |
float | _xgr = 0.0 |
float | _ygr = 0.0 |
float | _zgr = 0.0 |
float | _analogGravity [3] = {0.0, 0.0, 0.0} |
int | _ifNotWidth = 1 |
float | _analogWidth = 0.0 |
int | _ifNotInertia = 1 |
float | _ValAnalogInertia [3] = {0., 0., 0.} |
float | _VecAnalogInertia [9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.} |
int | _ifNotElipsoid = 1 |
float | _r1 = 0.0 |
float | _r2 = 0.0 |
float | _r3 = 0.0 |
float | _vol = 0.0 |
float | _r_ave = 0.0 |
float | _density = 0.0 |
float | _eccentricity = 0.0 |
float | _r1_forw = 0.0 |
float | _r1_back = 0.0 |
Utility class to derive properties of clusters, such as centre of gravity, axes of inertia, fits of the cluster shape and so on. All the details are explained in the documentation of the methods. Several classes of the GSL (GNU Scientific Library) are needed in this class.
Definition at line 25 of file ClusterShapes.h.
util::ClusterShapes::ClusterShapes | ( | int | nhits, |
float * | a, | ||
float * | x, | ||
float * | y, | ||
float * | z | ||
) |
Constructor
nhits | : number of hits in the cluster |
a | : amplitudes of elements ('cells') of the cluster. Stored in an array, with one entry for each element ('cell'). Each entry is depending on coordinates x,y,z (Cartesian), which are stored in the arrays x,y,z. |
x,y,z | : array of coordinates corresponding to the array of amplitudes a. |
Definition at line 13 of file ClusterShapes.cxx.
util::ClusterShapes::ClusterShapes | ( | int | nhits, |
float * | a, | ||
float * | t, | ||
float * | x, | ||
float * | y, | ||
float * | z | ||
) |
Definition at line 26 of file ClusterShapes.cxx.
util::ClusterShapes::ClusterShapes | ( | int | nhits, |
std::vector< float > | a, | ||
std::vector< float > | x, | ||
std::vector< float > | y, | ||
std::vector< float > | z | ||
) |
Definition at line 41 of file ClusterShapes.cxx.
util::ClusterShapes::ClusterShapes | ( | int | nhits, |
std::vector< float > | a, | ||
std::vector< float > | t, | ||
std::vector< float > | x, | ||
std::vector< float > | y, | ||
std::vector< float > | z | ||
) |
Definition at line 54 of file ClusterShapes.cxx.
util::ClusterShapes::~ClusterShapes | ( | ) |
|
private |
Definition at line 304 of file ClusterShapes.cxx.
|
private |
Elipsoid parameter calculations see cluster_proper.f
Definition at line 122 of file ClusterShapes.cxx.
|
private |
Definition at line 177 of file ClusterShapes.cxx.
|
private |
Definition at line 205 of file ClusterShapes.cxx.
|
private |
Definition at line 283 of file ClusterShapes.cxx.
float util::ClusterShapes::getAverageTime | ( | ) |
float * util::ClusterShapes::getCenterOfGravity | ( | ) |
returns an array, which represents a vector from the origin of the coordiante system, i. e. IP, to the centre of gravity of the cluster. The centre of gravity is calculated with the energy of the entries of the cluster.
Definition at line 96 of file ClusterShapes.cxx.
float * util::ClusterShapes::getEigenValInertia | ( | ) |
array of the inertias of mass (i. e. energy) corresponding to the three main axes of inertia. The array is sorted in ascending order.
Definition at line 103 of file ClusterShapes.cxx.
float * util::ClusterShapes::getEigenVecInertia | ( | ) |
array of the three main axes of inertia (9 entries) starting with the axis corresponding to the smallest inertia of mass (main principal axis). All axes are normalised to a length of 1.
Definition at line 110 of file ClusterShapes.cxx.
|
inline |
|
inline |
|
inline |
largest spatial axis length of the ellipsoid derived by the inertia tensor (by their eigenvalues and eigen- vectors)
Definition at line 110 of file ClusterShapes.h.
|
inline |
medium spatial axis length of the ellipsoid derived by the inertia tensor (by their eigenvalues and eigen- vectors)
Definition at line 117 of file ClusterShapes.h.
|
inline |
smallest spatial axis length of the ellipsoid derived by the inertia tensor (by their eigenvalues and eigen- vectors)
Definition at line 124 of file ClusterShapes.h.
|
inline |
average radius of the ellipsoid (qubic root of volume)
Definition at line 134 of file ClusterShapes.h.
|
inline |
distance from centre of gravity to the point nearest to IP projected on the main principal axis
Definition at line 157 of file ClusterShapes.h.
|
inline |
distance from centre of gravity to the point most far away from IP projected on the main principal axis
Definition at line 151 of file ClusterShapes.h.
|
inline |
int util::ClusterShapes::getNumberOfHits | ( | ) |
returns the number of elements of the cluster
Definition at line 76 of file ClusterShapes.cxx.
float util::ClusterShapes::getTotalAmplitude | ( | ) |
returns the accumulated amplitude for the whole cluster (just the sum of the energy in all the entries of the cluster)
Definition at line 82 of file ClusterShapes.cxx.
float util::ClusterShapes::getWidth | ( | ) |
'mean' width of the cluster perpendicular to the main principal axis, defined as: width := sqrt( 1/TotalAmplitude * Sum(a[i]*d[i]*d[i]) ), where d[i] is the distance of the i-th point to the main principal axis.
Definition at line 117 of file ClusterShapes.cxx.
|
inline |
distance to the centre of gravity measured from IP (absolut value of the vector to the centre of gravity)
Definition at line 103 of file ClusterShapes.h.
|
private |
Definition at line 163 of file ClusterShapes.h.
|
private |
Definition at line 176 of file ClusterShapes.h.
|
private |
Definition at line 179 of file ClusterShapes.h.
|
private |
Definition at line 191 of file ClusterShapes.h.
|
private |
Definition at line 192 of file ClusterShapes.h.
|
private |
Definition at line 185 of file ClusterShapes.h.
|
private |
Definition at line 169 of file ClusterShapes.h.
|
private |
Definition at line 181 of file ClusterShapes.h.
|
private |
Definition at line 178 of file ClusterShapes.h.
|
private |
Definition at line 161 of file ClusterShapes.h.
|
private |
Definition at line 186 of file ClusterShapes.h.
|
private |
Definition at line 194 of file ClusterShapes.h.
|
private |
Definition at line 193 of file ClusterShapes.h.
|
private |
Definition at line 187 of file ClusterShapes.h.
|
private |
Definition at line 188 of file ClusterShapes.h.
|
private |
Definition at line 190 of file ClusterShapes.h.
|
private |
Definition at line 172 of file ClusterShapes.h.
|
private |
Definition at line 164 of file ClusterShapes.h.
|
private |
Definition at line 170 of file ClusterShapes.h.
|
private |
Definition at line 171 of file ClusterShapes.h.
|
private |
Definition at line 182 of file ClusterShapes.h.
|
private |
Definition at line 183 of file ClusterShapes.h.
|
private |
Definition at line 189 of file ClusterShapes.h.
|
private |
Definition at line 173 of file ClusterShapes.h.
|
private |
Definition at line 165 of file ClusterShapes.h.
|
private |
Definition at line 174 of file ClusterShapes.h.
|
private |
Definition at line 166 of file ClusterShapes.h.
|
private |
Definition at line 175 of file ClusterShapes.h.
|
private |
Definition at line 167 of file ClusterShapes.h.