4#include "KVUniqueNameList.h"
5#include "KVParticleCondition.h"
7#include "KVEventClassifier.h"
9#include <KVUnownedList.h>
248#ifdef KVGVLIST_OPTIMIZE_GVLIST
250 struct optigvlist :
public TObject {
254 bool has_two_body =
false;
255 bool has_N_body =
false;
256 void ls(
Option_t* option =
"")
const
262 template<
typename call_func>
271 template<
typename call_func>
280 template<
typename call_func>
281 void iterate_one_body(call_func F)
285 template<
typename call_func>
286 void iterate_two_body(call_func F)
290 template<
typename call_func>
291 void iterate_N_body(call_func F)
295 template<
typename call_func>
296 void iterate_one_body_with_test(call_func F)
298 iterate_with_test(&one_body, F);
300 template<
typename call_func>
301 void iterate_two_body_with_test(call_func F)
303 iterate_with_test(&two_body, F);
305 template<
typename call_func>
306 void iterate_N_body_with_test(call_func F)
308 iterate_with_test(&N_body, F);
311 void optimise_variable_lists();
348 virtual void Add(
TObject* obj) ;
#define ClassDef(name, id)
Simple class for sorting events according to global variables.
Abstract base class container for multi-particle events.
#define KVGVLIST_OPTIMIZE_GVLIST
Bool_t Has1BodyVariables()
returns kTRUE if list contains 1-body variables
KVVarGlob * GetGVType(const Char_t *class_name)
Returns first global variable in list with given class.
KVParticleCondition fSelection
used to select particles to iterate over in event
KVVarGlob * AddGVFirst(const Char_t *class_name, const Char_t *name)
void Reset(void)
Reset all variables before treating an event.
std::vector< Double_t > fBranchVar
used for automatic creation & filling of TTree branches
Bool_t HasNBodyVariables()
returns kTRUE if list contains N-body variables
TList fVG2
two-body variables
TString NameSanitizer(const Char_t *s) const
virtual void AddFirst(TObject *obj)
void Calculate2()
Calculate all 2-body observables after filling.
void CalculateN()
Calculate all N-body observables after filling.
void CalculateGlobalVariables(KVEvent *e)
bool fAbortEventAnalysis
set to false if a global variable fails its own event selection criterion
void FillN(const KVEvent *e)
Calls KVVarGlob::FillN(KVEvent*) method of all N-body variables in the list.
std::vector< Int_t > fIBranchVar
used for automatic creation & filling of TTree branches
KVEventClassifier * AddEventClassifier(const TString &varname, const TString &value="")
TList fVGN
N-body variables.
void Calculate()
Calculate all 1-body observables after filling.
KVVarGlob * prepareGVforAdding(const Char_t *class_name, const Char_t *name)
TList fVG1
one-body variables
KVVarGlob * AddGV(const Char_t *class_name, const Char_t *name)
void Fill(const KVNucleus *c)
void MakeBranches(TTree *)
KVVarGlob * GetGV(const Char_t *nom) const
Return pointer to global variable in list with name 'nom'.
Bool_t Has2BodyVariables()
returns kTRUE if list contains 2-body variables
bool AbortEventAnalysis() const
void Fill2(const KVNucleus *c1, const KVNucleus *c2)
Extended TList class which owns its objects by default.
Description of properties and kinematics of atomic nuclei.
TObject * FindObjectByClass(const Char_t *) const
Return (first) object in embedded list with given class.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Optimised list in which named objects can only be placed once.
Extended TList class which does not own its objects by default.
Base class for all global variable implementations.
void ls(Option_t *option="") const override
virtual Int_t GetEntries() const
TString & ReplaceAll(const char *s1, const char *s2)
int iterate(rng_state_t *X)