#ifndef __CORRELATOR_H
#define __CORRELATOR_H
#include "KVReconEventSelector.h"
#include "KVEventMixer.h"
#include "KVEventClassifier.h"
#include <vector>
#include <deque>
struct particle {
double phi;
int det_index;
particle() = default;
particle(particle&&) = default;
particle(const particle&) = default;
{}
};
TString get_cor_histo_name(int bin, const TString& quantity)
{
return Form("h_cor_%s_bin_%d", quantity.Data(), bin);
}
TString get_uncor_histo_name(int bin, const TString& quantity)
{
return Form("h_uncor_%s_bin_%d", quantity.Data(), bin);
}
public:
ExampleCorrelationAnalysis() {};
virtual ~ExampleCorrelationAnalysis() {};
ClassDef(ExampleCorrelationAnalysis, 0)
};
#endif
virtual Int_t GetIndex() const
Simple class for sorting events according to global variables.
Generic event mixing algorithm for two-particle correlation studies.
virtual void InitAnalysis()
virtual Bool_t Analysis()
virtual void EndAnalysis()
Base class for user analysis of reconstructed data.
Nuclei reconstructed from data measured by a detector array .
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
#include "ExampleCorrelationAnalysis.h"
ClassImp(ExampleCorrelationAnalysis)
void ExampleCorrelationAnalysis::InitAnalysis(void)
{
AddGV("KVMult", "mtot");
mult_bin = GetGVList()->AddEventClassifier("mtot");
std::vector<Double_t> mult_slices = {8.4195047, 14.449584, 21.173604, 28.044737};
for (auto cut : mult_slices) mult_bin->AddCut(cut);
for (int i = 0; i <= mult_slices.size(); ++i) {
AddHisto<TH1F>(get_cor_histo_name(i, "dphi"), Form("Correlated spectrum #Delta#phi bin %d", i), 21, -4.5, 184.5);
AddHisto<TH1F>(get_uncor_histo_name(i, "dphi"), Form("Uncorrelated spectrum #Delta#phi bin %d", i), 21, -4.5, 184.5);
}
auto t = AddTree("check_tree", "check event classifier");
GetGVList()->MakeBranches(t);
SetJobOutputFileName("ExampleCorrelationAnalysis_results.root");
}
void ExampleCorrelationAnalysis::InitRun(void)
{
SetTriggerConditionsForRun(GetCurrentRun()->GetNumber());
}
Bool_t ExampleCorrelationAnalysis::Analysis(void)
{
auto bin = mult_bin->GetEventClassification();
GetGVList()->FillBranches();
FillTree();
event_mixer.ProcessEvent(bin,
"alpha",
{
return n->IsOK() && n->IsAMeasured() && n->IsIsotope(2, 4);
}
}),
"alpha",
{
return n->IsOK() && n->IsAMeasured() && n->IsIsotope(2, 4);
}
}),
if (&alpha == &other_alpha) return;
if (dphi > 180) dphi = 360 - dphi;
GetHisto(get_cor_histo_name(bin_num, "dphi"))->Fill(dphi);
},
if (dphi > 180) dphi = 360 - dphi;
GetHisto(get_uncor_histo_name(bin_num, "dphi"))->Fill(dphi);
}
}
);
return kTRUE;
}
Base class used for handling geometry in a multidetector array.
Double_t GetAzimuthalWidth(Double_t phmin=-1., Double_t phimax=-1.) const
Wrapper class for iterating over nuclei in KVReconstructedEvent accessed through base pointer or refe...