GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGriffinAngles Class Reference

Detailed Description

This class provides the number of angles, their values, and the index a specific angle is at, as well as how many combinations contribute to this angle. It is meant to be used for the angular correlation analysis.

Definition at line 26 of file TGriffinAngles.h.

Public Member Functions

 TGriffinAngles (const TGriffinAngles &)=default
 
 TGriffinAngles (double distance=145., bool folding=false, bool grouping=false, bool addback=true)
 
 TGriffinAngles (TGriffinAngles &&) noexcept=default
 
 ~TGriffinAngles ()=default
 
bool Addback () const
 
double Angle (int index) const
 
double AverageAngle (int index) const
 
std::set< double >::iterator begin () const
 
int Count (double angle)
 
double Distance () const
 
std::set< double >::iterator end () const
 
bool ExcludeCrystal (int detector, int crystal) const
 
bool ExcludeDetector (int detector) const
 
bool Folding () const
 
void FoldOrGroup (TGraphErrors *z0, TGraphErrors *z2, TGraphErrors *z4, bool verbose=false) const
 
bool Grouping () const
 
int Index (double angle)
 
int NumberOfAngles () const
 
TGriffinAnglesoperator= (const TGriffinAngles &)=default
 
TGriffinAnglesoperator= (TGriffinAngles &&) noexcept=default
 
void Print (Option_t *="") const override
 

Static Public Member Functions

static double Rounding ()
 
static void Rounding (const double &val)
 

Private Attributes

bool fAddback {true}
 
std::map< int, int > fAngleCount
 
std::map< double, int > fAngleMap
 
std::set< double > fAngles
 
std::vector< int > fCustomGrouping
 
double fDistance {145.}
 
std::vector< int > fExcludedCrystals
 
std::vector< int > fExcludedDetectors
 
bool fFolding {false}
 
bool fGrouping {false}
 

Static Private Attributes

static double fRounding = 0.001
 
+ Inheritance diagram for TGriffinAngles:
+ Collaboration diagram for TGriffinAngles:

Constructor & Destructor Documentation

◆ TGriffinAngles() [1/3]

TGriffinAngles::TGriffinAngles ( double distance = 145.,
bool folding = false,
bool grouping = false,
bool addback = true )
explicit

◆ TGriffinAngles() [2/3]

TGriffinAngles::TGriffinAngles ( const TGriffinAngles & )
default

◆ TGriffinAngles() [3/3]

TGriffinAngles::TGriffinAngles ( TGriffinAngles && )
defaultnoexcept

◆ ~TGriffinAngles()

TGriffinAngles::~TGriffinAngles ( )
default

Member Function Documentation

◆ Addback()

bool TGriffinAngles::Addback ( ) const
inline

Definition at line 38 of file TGriffinAngles.h.

References fAddback.

◆ Angle()

double TGriffinAngles::Angle ( int index) const
inline

Definition at line 42 of file TGriffinAngles.h.

References fAngles.

◆ AverageAngle()

double TGriffinAngles::AverageAngle ( int index) const

Definition at line 156 of file TGriffinAngles.cxx.

References fAngleMap.

Referenced by Print().

◆ begin()

std::set< double >::iterator TGriffinAngles::begin ( ) const
inline

Definition at line 57 of file TGriffinAngles.h.

References fAngles.

Referenced by AngularCorrelationHelper::CreateHistograms().

◆ Count()

int TGriffinAngles::Count ( double angle)
inline

If the angle is in our map, report how often it exists, otherwise return zero.

Definition at line 49 of file TGriffinAngles.h.

References fAngleCount, and fRounding.

◆ Distance()

double TGriffinAngles::Distance ( ) const
inline

Definition at line 35 of file TGriffinAngles.h.

References fDistance.

◆ end()

std::set< double >::iterator TGriffinAngles::end ( ) const
inline

Definition at line 58 of file TGriffinAngles.h.

References fAngles.

Referenced by TGriffinAngles(), and AngularCorrelationHelper::CreateHistograms().

◆ ExcludeCrystal()

bool TGriffinAngles::ExcludeCrystal ( int detector,
int crystal ) const

Returns true if any of the crystals in fExcludedCrystals matches the given detector and crystal (using 4*(detector-1)+crystal+1).

Definition at line 380 of file TGriffinAngles.cxx.

References fExcludedCrystals.

Referenced by TGriffinAngles().

◆ ExcludeDetector()

bool TGriffinAngles::ExcludeDetector ( int detector) const

Returns true if any of the detectors in fExcludedDetectors matches the given detector.

Definition at line 374 of file TGriffinAngles.cxx.

References fExcludedDetectors.

Referenced by TGriffinAngles().

◆ Folding()

bool TGriffinAngles::Folding ( ) const
inline

Definition at line 36 of file TGriffinAngles.h.

References fFolding.

◆ FoldOrGroup()

void TGriffinAngles::FoldOrGroup ( TGraphErrors * z0,
TGraphErrors * z2,
TGraphErrors * z4,
bool verbose = false ) const

Apply folding and/or grouping to the theory graphs. This assumes that the theory graphs all have the exact same length of 49 or 51 for singles or addback, respectively.

Definition at line 169 of file TGriffinAngles.cxx.

References fFolding, fGrouping, and fRounding.

◆ Grouping()

bool TGriffinAngles::Grouping ( ) const
inline

Definition at line 37 of file TGriffinAngles.h.

References fGrouping.

◆ Index()

int TGriffinAngles::Index ( double angle)

Definition at line 140 of file TGriffinAngles.cxx.

References fAngleMap, fAngles, and fRounding.

Referenced by AngularCorrelationHelper::Exec().

◆ NumberOfAngles()

int TGriffinAngles::NumberOfAngles ( ) const
inline

Definition at line 41 of file TGriffinAngles.h.

References fAngles.

◆ operator=() [1/2]

TGriffinAngles & TGriffinAngles::operator= ( const TGriffinAngles & )
default

◆ operator=() [2/2]

TGriffinAngles & TGriffinAngles::operator= ( TGriffinAngles && )
defaultnoexcept

◆ Print()

void TGriffinAngles::Print ( Option_t * = "") const
override

◆ Rounding() [1/2]

static double TGriffinAngles::Rounding ( )
inlinestatic

Definition at line 65 of file TGriffinAngles.h.

References fRounding.

◆ Rounding() [2/2]

static void TGriffinAngles::Rounding ( const double & val)
inlinestatic

Definition at line 66 of file TGriffinAngles.h.

References fRounding.

Member Data Documentation

◆ fAddback

bool TGriffinAngles::fAddback {true}
private

flag indicating whether we use addback

Definition at line 72 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), and Addback().

◆ fAngleCount

std::map<int, int> TGriffinAngles::fAngleCount
private

Maps angles (divided by rounding and cast to integers) to number of combinations contributing to it.

Definition at line 79 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Count(), and Print().

◆ fAngleMap

std::map<double, int> TGriffinAngles::fAngleMap
private

Maps angles to indices. This is fairly straight forward without grouping, but if grouping is used multiple angles can be mapped to the same index.

Definition at line 78 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), AverageAngle(), Index(), and Print().

◆ fAngles

std::set<double> TGriffinAngles::fAngles
private

set of unique angles, when grouping is used, the largest angle of the group is used!

Definition at line 77 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Angle(), begin(), end(), Index(), NumberOfAngles(), and Print().

◆ fCustomGrouping

std::vector<int> TGriffinAngles::fCustomGrouping
private

list of custom groups

Definition at line 76 of file TGriffinAngles.h.

Referenced by TGriffinAngles().

◆ fDistance

double TGriffinAngles::fDistance {145.}
private

distance of detector from center of array in mmm

Definition at line 69 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), and Distance().

◆ fExcludedCrystals

std::vector<int> TGriffinAngles::fExcludedCrystals
private

list of crystals that are excluded in calculating the angles, the crystals are numbered as 4*(det-1)+cry, so start at 0 and go up to 63

Definition at line 75 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), and ExcludeCrystal().

◆ fExcludedDetectors

std::vector<int> TGriffinAngles::fExcludedDetectors
private

list of detectors that are excluded in calculating the angles

Definition at line 74 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), and ExcludeDetector().

◆ fFolding

bool TGriffinAngles::fFolding {false}
private

flag indicating whether we fold our distribution around 90 degree

Definition at line 70 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Folding(), and FoldOrGroup().

◆ fGrouping

bool TGriffinAngles::fGrouping {false}
private

flag indicating whether we group close angles together

Definition at line 71 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), FoldOrGroup(), and Grouping().

◆ fRounding

double TGriffinAngles::fRounding = 0.001
staticprivate

we consider any angles whose difference is less than this to be equal

Definition at line 73 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Count(), FoldOrGroup(), Index(), Print(), Rounding(), and Rounding().