#include "CompleteEventsFW.h"
#include "KVReconstructedNucleus.h"
#include "KVBatchSystem.h"
#include "KVDataAnalyser.h"
#include "KVMultiDetArray.h"
void CompleteEventsFW::InitAnalysis(void)
{
auto ztot = AddGV("KVZtot", "ztot");
ztot->SetFrame("CM");
ztot->SetSelection({
"fwcm", [](
const KVNucleus* nuc){
return nuc->GetVpar()>0; }});
ztot->SetEventSelection([&](
const KVVarGlob* vg)
{
return val>=ztot_min && val<=ztot_max;
}
);
auto zvtot = AddGV("KVZVtot", "zvtot");
zvtot->SetFrame("CM");
zvtot->SetSelection({
"fwcm", [](
const KVNucleus* nuc){
return nuc->GetVpar()>0; }});
zvtot->SetMaxNumBranches(1);
zvtot->SetEventSelection([&](
const KVVarGlob* vg)
{
return val>=zvtot_min && val<=zvtot_max;
}
);
AddHisto<TH2F>("ztot_zvtot", "Z_{tot}/Z_{proj} vs ZV_{tot}/ZV_{proj}", 200, 0, 1.5, 200, 0, 1.5);
auto t = AddTree("myTree");
GetGVList()->MakeBranches(t);
SetJobOutputFileName("CompleteEventsFW_results.root");
}
void CompleteEventsFW::InitRun(void)
{
GetTree("myTree")->SetTitle(GetCurrentRun()->GetSystemName());
ztot_proj = GetCurrentRun()->GetSystem()->GetZproj();
zvtot_proj = GetCurrentRun()->GetSystem()->GetZVtot();
ztot_min = 0.5*ztot_proj;
ztot_max = 1.05*ztot_proj;
zvtot_min = 0.5*zvtot_proj;
zvtot_max = 1.1*zvtot_proj;
}
Bool_t CompleteEventsFW::Analysis(
void)
{
GetGVList()->FillBranches();
auto ztot = GetGV("ztot")->GetValue();
FillHisto("ztot_zvtot", GetGV("zvtot")->GetValue("Z")/zvtot_proj, ztot/ztot_proj);
}
R__EXTERN TRandom * gRandom
Description of properties and kinematics of atomic nuclei.
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)