1#ifndef TGRIFFINANGLES_H
2#define TGRIFFINANGLES_H
24#include "TGraphErrors.h"
28 explicit TGriffinAngles(
double distance = 145.,
bool folding =
false,
bool grouping =
false,
bool addback =
true);
40 int Index(
double angle);
45 std::advance(it, index);
56 void FoldOrGroup(TGraphErrors* z0, TGraphErrors* z2, TGraphErrors* z4,
bool verbose =
false)
const;
57 std::set<double>::iterator
begin()
const {
return fAngles.begin(); }
58 std::set<double>::iterator
end()
const {
return fAngles.end(); }
63 void Print(Option_t* =
"")
const override;
std::set< double > fAngles
set of unique angles, when grouping is used, the largest angle of the group is used!
static void Rounding(const double &val)
TGriffinAngles(TGriffinAngles &&) noexcept=default
static double fRounding
we consider any angles whose difference is less than this to be equal
void FoldOrGroup(TGraphErrors *z0, TGraphErrors *z2, TGraphErrors *z4, bool verbose=false) const
bool ExcludeDetector(int detector) const
bool fGrouping
flag indicating whether we group close angles together
std::set< double >::iterator end() const
std::vector< int > fCustomGrouping
list of custom groups
void Print(Option_t *="") const override
double fDistance
distance of detector from center of array in mmm
bool fFolding
flag indicating whether we fold our distribution around 90 degree
bool fAddback
flag indicating whether we use addback
int NumberOfAngles() const
TGriffinAngles(double distance=145., bool folding=false, bool grouping=false, bool addback=true)
TGriffinAngles(const TGriffinAngles &)=default
double Angle(int index) const
std::map< int, int > fAngleCount
Maps angles (divided by rounding and cast to integers) to number of combinations contributing to it.
std::vector< int > fExcludedDetectors
list of detectors that are excluded in calculating the angles
std::map< double, int > fAngleMap
Maps angles to indices. This is fairly straight forward without grouping, but if grouping is used mul...
std::vector< int > fExcludedCrystals
list of crystals that are excluded in calculating the angles, the crystals are numbered as 4*(det-1)+...
std::set< double >::iterator begin() const
bool ExcludeCrystal(int detector, int crystal) const
double AverageAngle(int index) const