1#ifndef TANGULARCORRELATION_H
2#define TANGULARCORRELATION_H
15#include "TGraphAsymmErrors.h"
30 std::map<Int_t, std::map<Int_t, Int_t>>
111 TH2D*
Create2DSlice(THnSparse* hst, Double_t min, Double_t max, Bool_t fold, Bool_t group);
112 TH2D*
Create2DSlice(TObjArray* hstarray, Double_t min, Double_t max, Bool_t fold, Bool_t group);
137 Bool_t
CheckGroups(std::vector<Int_t>& group)
const;
139 Bool_t
CheckMaps(Bool_t fold, Bool_t group);
144 static std::vector<Double_t>
GenerateAngleMap(std::vector<Int_t>& arraynumbers, std::vector<Int_t>& distances);
145 static std::map<Int_t, std::map<Int_t, Int_t>>
GenerateIndexMap(std::vector<Int_t>& arraynumbers,
146 std::vector<Int_t>& distances,
147 std::vector<Double_t>& anglemap);
149 std::vector<Int_t>& arraynumbers, std::vector<Int_t>& distances,
150 std::map<Int_t, std::map<Int_t, Int_t>>& indexmap);
153 Int_t
GenerateMaps(std::vector<Int_t>& arraynumbers, std::vector<Int_t>& distances);
157 Int_t
AssignGroupMaps(std::vector<Int_t>& group, std::vector<Double_t>& groupangles);
158 Int_t
GenerateGroupMaps(std::vector<Int_t>& arraynumbers, std::vector<Int_t>& distances, std::vector<Int_t>& group,
159 std::vector<Double_t>& groupangles);
164 static std::vector<Int_t>
GenerateFoldedIndices(std::vector<Double_t>& folds, std::vector<Double_t>& anglemap);
std::vector< Double_t > fGroupAngles
array correlating angular index with group assignment
TGraphAsymmErrors * CreateGraphFromHst()
void Set1DSlice(Int_t index, TH1D *slice)
TAngularCorrelation(TAngularCorrelation &&) noexcept=default
Double_t GetWeightFromIndex(Int_t index)
Int_t GetAngularIndex(Int_t arraynum1, Int_t arraynum2)
TH1D * GetIndexCorrelation()
TPeak * GetPeak(Int_t index)
TH1D * DivideByWeights(TH1 *hst, Bool_t fold, Bool_t group)
void PrintGroupAngleMap()
Bool_t CheckModifiedHistogram(TH1 *hst) const
std::vector< Double_t > fAngleMap
size of fIndexMap
Int_t GetModifiedWeight(Int_t modindex)
Int_t AssignGroupMaps(std::vector< Int_t > &group, std::vector< Double_t > &groupangles)
std::vector< Int_t > fGroups
array correlating angular index with weight (number of detector pairs at that index)
static std::vector< Int_t > GenerateFoldedIndices(std::vector< Double_t > &folds, std::vector< Double_t > &anglemap)
Bool_t CheckGroups(std::vector< Int_t > &group) const
std::vector< Double_t > GenerateModifiedAngles(Bool_t fold, Bool_t group)
Int_t GetGroupFromIndex(Int_t index)
TH2D * Create2DSlice(THnSparse *hst, Double_t min, Double_t max, Bool_t fold, Bool_t group)
std::vector< Int_t > GenerateModifiedWeights(std::vector< Int_t > &modindices, std::vector< Int_t > &weights)
Bool_t fGrouped
switch to indicate a folded correlation
void PrintModifiedIndexMap()
Prints map of angular index vs. Folded Index.
Int_t fIndexMapSize
number of angular indices
TH1D * fFWHM
1D plot of centroid vs. angular index
TH1D * IntegralSlices(TH2 *hst, Double_t min, Double_t max)
Bool_t CheckGroupAngles(std::vector< Double_t > &groupangles) const
static std::vector< Double_t > GenerateAngleMap(std::vector< Int_t > &arraynumbers, std::vector< Int_t > &distances)
std::vector< Int_t > fModifiedWeights
TH1D * FitSlices(TH2 *hst, TPeak *peak, Bool_t visualization)
Int_t GetNumModIndices() const
static std::vector< Int_t > GenerateWeights(std::vector< Int_t > &arraynumbers, std::vector< Int_t > &distances, std::map< Int_t, std::map< Int_t, Int_t > > &indexmap)
Bool_t fFolded
array correlating group assignment with their average angles
void ScaleSingleIndex(TH1 *hst, Int_t index, Double_t factor)
void UpdateIndexCorrelation()
Int_t GenerateGroupMaps(std::vector< Int_t > &arraynumbers, std::vector< Int_t > &distances, std::vector< Int_t > &group, std::vector< Double_t > &groupangles)
static std::map< Int_t, std::map< Int_t, Int_t > > GenerateIndexMap(std::vector< Int_t > &arraynumbers, std::vector< Int_t > &distances, std::vector< Double_t > &anglemap)
std::vector< Int_t > GenerateModifiedIndices(Bool_t fold, Bool_t group)
void SetPeak(Int_t index, TPeak *peak)
void UpdatePeak(Int_t index, TPeak *peak)
TAngularCorrelation(const TAngularCorrelation &)=default
TH1D * fChi2
1D plot of counts vs. angular index
Double_t GetGroupAngleFromIndex(Int_t gindex)
Int_t fNumIndices
2D square array correlating array number pairs with angular index
Int_t GenerateMaps(std::vector< Int_t > &arraynumbers, std::vector< Int_t > &distances)
TH1D * Get1DSlice(Int_t index)
void PrintModifiedConditions() const
Double_t GetModifiedAngleFromIndex(Int_t modindex)
std::map< Int_t, TH1D * > f1DSlices
array of TPeaks used to create fIndexCorrelations
static std::vector< Double_t > GenerateFoldedAngles(std::vector< Double_t > &anglemap)
std::vector< Int_t > fWeights
array correlating angular index with opening angle
std::map< Int_t, TPeak * > fPeaks
1D plot of FWHM vs. angular index
void DisplayDiagnostics(TCanvas *c_diag)
Bool_t CheckMaps(Bool_t fold, Bool_t group)
Int_t GetNumGroups() const
std::vector< Int_t > fModifiedIndices
switch to indicate a grouped correlation
Int_t GetModifiedIndex(Int_t index)
std::vector< Double_t > fModifiedAngles
Int_t GetWeightsSize() const
void PrintModifiedAngleMap()
Int_t GenerateModifiedMaps(Bool_t fold, Bool_t group)
std::map< Int_t, std::map< Int_t, Int_t > > fIndexMap
array of 1D histograms used to create fIndexCorrelations
TH1D * fCentroid
1D plot of chi^2 vs. angular index
void PrintGroupIndexMap()
Double_t GetAngleFromIndex(Int_t index)
TH2D * Modify2DSlice(TH2 *hst, Bool_t fold, Bool_t group)
void SetIndexCorrelation(TH1D *hst)
void PrintModifiedWeights()