#ifndef __CORRELATOR_H
#define __CORRELATOR_H
#include "KVReconEventSelector.h"
#include "KVEventMixerN.h"
#include "KVEventClassifier.h"
struct particle {
particle() = default;
particle(particle&&) = default;
particle(const particle&) = default;
det_index{
p.GetStoppingDetector()->GetIndex()},
momentum{
p.GetMomentum()}
{}
};
{
return Form(
"h_cor_%s_bin_%d", quantity.
Data(), bin);
}
{
return Form(
"h_uncor_%s_bin_%d", quantity.
Data(), bin);
}
int nevent = 0;
public:
ClassDef(ExampleAnalysis_KVEventMixerN_3Body, 0)
};
#endif
#define ClassDef(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
char * Form(const char *fmt,...)
Simple class for sorting events according to global variables.
Generic event mixing algorithm for N-particle correlation studies.
virtual void InitAnalysis()
virtual Bool_t Analysis()
void AddHisto(TH1 *histo)
virtual void EndAnalysis()
Base class for user analysis of reconstructed data.
Nuclei reconstructed from data measured by a detector array .
const char * Data() const
#include "ExampleAnalysis_KVEventMixerN_3Body.h"
ClassImp(ExampleAnalysis_KVEventMixerN_3Body)
void ExampleAnalysis_KVEventMixerN_3Body::InitAnalysis(void)
{
auto gv = AddGV("KVMult", "m_proton");
gv->SetSelection({
"proton", [](
const KVNucleus * _n)
{
return n->IsOK() &&
n->IsAMeasured() &&
n->IsIsotope(1, 1);
}});
gv->SetEventSelection([](
const KVVarGlob * vg) {
});
gv = AddGV("KVMult", "m_deuton");
gv->SetSelection({
"deuton", [](
const KVNucleus * _n)
{
return n->IsOK() &&
n->IsAMeasured() &&
n->IsIsotope(1, 2);
}});
gv->SetEventSelection([](
const KVVarGlob * vg) {
});
gv = AddGV("KVMult", "m_alpha");
gv->SetSelection({
"alpha", [](
const KVNucleus * _n)
{
return n->IsOK() &&
n->IsAMeasured() &&
n->IsIsotope(2, 4);
}});
gv->SetEventSelection([](
const KVVarGlob * vg) {
});
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 (size_t i = 0; i <= mult_slices.size(); ++i) {
AddHisto<TH1F>(get_cor_histo_name(i,
"Ex"),
Form(
"Correlated spectrum E* bin %ld", i), 500, 0., 100.);
AddHisto<TH1F>(get_uncor_histo_name(i,
"Ex"),
Form(
"Uncorrelated spectrum E* bin %ld", i), 500, 0., 100.);
}
auto t = AddTree("check_tree", "check event classifier");
GetGVList()->MakeBranches(t);
SetJobOutputFileName("ExampleAnalysis_KVEventMixerN_3Body_results.root");
}
void ExampleAnalysis_KVEventMixerN_3Body::InitRun(void)
{
SetTriggerConditionsForRun(GetCurrentRun()->GetNumber());
}
Bool_t ExampleAnalysis_KVEventMixerN_3Body::Analysis(
void)
{
auto bin = mult_bin->GetEventClassification();
GetGVList()->FillBranches();
event_mixer.ProcessEvent(bin,
for (auto& n : parts) {
}
},
BE += part;
for (auto& n : other_parts) {
}
},
"proton",
{
return n->IsOK() &&
n->IsAMeasured() &&
n->IsIsotope(1, 1);
}
}),
"deuton",
{
return n->IsOK() &&
n->IsAMeasured() &&
n->IsIsotope(1, 2);
}
}),
"alpha",
{
return n->IsOK() &&
n->IsAMeasured() &&
n->IsIsotope(2, 4);
}
})
);
}
Description of properties and kinematics of atomic nuclei.
Double_t GetExcitEnergy() const
Vector of references to objects.
Base class for all global variable implementations.
Double_t GetValue(void) const
Wrapper class for iterating over nuclei in KVReconstructedEvent accessed through base pointer or refe...
void FillTree(TTree &myTree, const RooDataSet &data)