A simple example of analysis of filtered simulated data, for use with kaliveda-sim.
#ifndef __EXAMPLEFILTEREDSIMDATAANALYSIS_H
#define __EXAMPLEFILTEREDSIMDATAANALYSIS_H
#include "KVEventSelector.h"
#include "KVZmax.h"
#include "KVDataAnalyser.h"
public:
ClassDef(ExampleFilteredSimDataAnalysis, 1)
};
#endif
#define ClassDef(name, id)
General purpose analysis base class for TTree containing KVEvent objects.
virtual void InitAnalysis()
virtual Bool_t Analysis()
void AddHisto(TH1 *histo)
virtual void EndAnalysis()
#include "ExampleFilteredSimDataAnalysis.h"
#include "KVReconstructedNucleus.h"
#include "KVBatchSystem.h"
ClassImp(ExampleFilteredSimDataAnalysis)
#include "KVMultiDetArray.h"
void ExampleFilteredSimDataAnalysis::InitAnalysis()
{
AddGV("KVMult", "mult");
auto zvtot = AddGV("KVZVtot", "ZVTOT");
zvtot->SetEventSelection([&](
const KVVarGlob * vg) {
});
AddHisto<TH2F>("Z_Vpar", "Z vs V_{par} [cm/ns] in CM", 250, -10, 10, 75, .5, 75.5);
auto t = AddTree("data", GetOpt("SimulationInfos"));
GetGVList()->MakeBranches(t);
link_to_unfiltered_simulation = IsOptGiven("AuxFiles");
}
void ExampleFilteredSimDataAnalysis::InitRun()
{
}
Bool_t ExampleFilteredSimDataAnalysis::Analysis()
{
if (link_to_unfiltered_simulation) GetFriendTreeEntry(GetEvent()->
GetParameters()->GetIntValue(
"SIMEVENT_TREE_ENTRY"));
FillHisto("Z_Vpar", part.GetFrame("CM")->GetVpar(), part.GetZ());
}
GetGVList()->FillBranches();
}
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Relativistic binary kinematics calculator.
KVNucleus * GetNucleus(Int_t i) const
virtual const KV2Body * GetKinematics() const
UInt_t GetCurrentRunNumber() const
Int_t GetZ() const
Return the number of proton / atomic number.
Base class for all global variable implementations.
Double_t GetValue(void) const
Wrapper class for iterating over "OK" nuclei in KVReconstructedEvent accessed through base pointer or...
void FillTree(TTree &myTree, const RooDataSet &data)