#include "CompleteEvents.h"
#include "KVReconstructedNucleus.h"
#include "KVBatchSystem.h"
#include "KVDataAnalyser.h"
#include "KVMultiDetArray.h"
void CompleteEvents::InitAnalysis(void)
{
auto ztot = AddGV("KVZtot", "ztot");
ztot->SetEventSelection([&](
const KVVarGlob* vg)
{
return val>=ztot_min && val<=ztot_max;
}
);
auto zvtot = AddGV("KVZVtot", "zvtot");
zvtot->SetMaxNumBranches(1);
zvtot->SetEventSelection([&](
const KVVarGlob* vg)
{
return val>=zvtot_min && val<=zvtot_max;
}
);
AddHisto<TH2F>("ztot_zvtot", "Z_{tot}/Z_{sys} vs ZV_{tot}/ZV_{sys}", 200, 0, 1.5, 200, 0, 1.5);
auto t = AddTree("myTree");
GetGVList()->MakeBranches(t);
SetJobOutputFileName("CompleteEvents_results.root");
}
void CompleteEvents::InitRun(void)
{
GetTree("myTree")->SetTitle(GetCurrentRun()->GetSystemName());
ztot_sys = GetCurrentRun()->GetSystem()->GetZtot();
zvtot_sys = GetCurrentRun()->GetSystem()->GetZVtot();
ztot_min = 0.5*ztot_sys;
ztot_max = 1.05*ztot_sys;
zvtot_min = 0.5*zvtot_sys;
zvtot_max = 1.1*zvtot_sys;
}
Bool_t CompleteEvents::Analysis(
void)
{
GetGVList()->FillBranches();
auto ztot = GetGV("ztot")->GetValue();
FillHisto("ztot_zvtot", GetGV("zvtot")->GetValue("Z")/zvtot_sys, ztot/ztot_sys);
}
R__EXTERN TRandom * gRandom
Base class for all global variable implementations.
Double_t GetValue(void) const
virtual Double_t Uniform(Double_t x1, Double_t x2)
void FillTree(TTree &myTree, const RooDataSet &data)