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 29 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)
 
Long64_t Merge (TCollection *list)
 
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)
 
static EVerbosity Verbosity ()
 
static void Verbosity (const EVerbosity &val)
 

Private Member Functions

void Add (TGriffinAngles *griffinAngles)
 

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
 
static EVerbosity fVerbosity = EVerbosity::kQuiet
 
+ 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

◆ Add()

void TGriffinAngles::Add ( TGriffinAngles * griffinAngles)
private

◆ Addback()

bool TGriffinAngles::Addback ( ) const
inline

Definition at line 41 of file TGriffinAngles.h.

References fAddback.

◆ Angle()

double TGriffinAngles::Angle ( int index) const
inline

Definition at line 45 of file TGriffinAngles.h.

References fAngles.

Referenced by main().

◆ AverageAngle()

double TGriffinAngles::AverageAngle ( int index) const

Definition at line 165 of file TGriffinAngles.cxx.

References fAngleMap.

Referenced by Print().

◆ begin()

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

Definition at line 60 of file TGriffinAngles.h.

References fAngles.

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

◆ 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 52 of file TGriffinAngles.h.

References fAngleCount, and fRounding.

Referenced by main().

◆ Distance()

double TGriffinAngles::Distance ( ) const
inline

Definition at line 38 of file TGriffinAngles.h.

References fDistance.

◆ end()

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

Definition at line 61 of file TGriffinAngles.h.

References fAngles.

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

◆ 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 389 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 383 of file TGriffinAngles.cxx.

References fExcludedDetectors.

Referenced by TGriffinAngles().

◆ Folding()

bool TGriffinAngles::Folding ( ) const
inline

Definition at line 39 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 178 of file TGriffinAngles.cxx.

References fFolding, fGrouping, and fRounding.

◆ Grouping()

bool TGriffinAngles::Grouping ( ) const
inline

Definition at line 40 of file TGriffinAngles.h.

References fGrouping.

◆ Index()

int TGriffinAngles::Index ( double angle)

Definition at line 149 of file TGriffinAngles.cxx.

References fAngleMap, fAngles, and fRounding.

Referenced by AngularCorrelationHelper::Exec(), and main().

◆ Merge()

Long64_t TGriffinAngles::Merge ( TCollection * list)
inline

Definition at line 68 of file TGriffinAngles.h.

References Add().

◆ NumberOfAngles()

int TGriffinAngles::NumberOfAngles ( ) const
inline

Definition at line 44 of file TGriffinAngles.h.

References fAngles.

Referenced by main().

◆ 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 74 of file TGriffinAngles.h.

References fRounding.

◆ Rounding() [2/2]

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

Definition at line 75 of file TGriffinAngles.h.

References fRounding.

◆ Verbosity() [1/2]

static EVerbosity TGriffinAngles::Verbosity ( )
inlinestatic

Definition at line 77 of file TGriffinAngles.h.

References fVerbosity.

Referenced by main().

◆ Verbosity() [2/2]

static void TGriffinAngles::Verbosity ( const EVerbosity & val)
inlinestatic

Definition at line 78 of file TGriffinAngles.h.

References fVerbosity.

Member Data Documentation

◆ fAddback

bool TGriffinAngles::fAddback {true}
private

flag indicating whether we use addback

Definition at line 87 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), 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 94 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), 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 93 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), 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 92 of file TGriffinAngles.h.

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

◆ fCustomGrouping

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

list of custom groups

Definition at line 91 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), and Add().

◆ fDistance

double TGriffinAngles::fDistance {145.}
private

distance of detector from center of array in mmm

Definition at line 84 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), 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 90 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), and ExcludeCrystal().

◆ fExcludedDetectors

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

list of detectors that are excluded in calculating the angles

Definition at line 89 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), and ExcludeDetector().

◆ fFolding

bool TGriffinAngles::fFolding {false}
private

flag indicating whether we fold our distribution around 90 degree

Definition at line 85 of file TGriffinAngles.h.

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

◆ fGrouping

bool TGriffinAngles::fGrouping {false}
private

flag indicating whether we group close angles together

Definition at line 86 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Add(), 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 88 of file TGriffinAngles.h.

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

◆ fVerbosity

EVerbosity TGriffinAngles::fVerbosity = EVerbosity::kQuiet
staticprivate

verbosity level

Definition at line 83 of file TGriffinAngles.h.

Referenced by TGriffinAngles(), Verbosity(), and Verbosity().