KaliVeda
Toolkit for HIC analysis
KVINDRATriggerConditions.cpp
1 #include "KVINDRATriggerConditions.h"
2 #include "KVEventSelector.h"
3 #include <KVVarGlob.h>
4 #include "KVINDRA.h"
5 
6 
13 
15 {
16  // For (classic) INDRA data, respecting the trigger conditions means rejecting all events with
17  // a multiplicity of correctly-identified & calibrated ("OK") particles less than the trigger
18  // multiplicity for the run
19 
20  /* when analysing several files sequentially, this method will be called several times.
21  make sure to remove any previously added variable (in case conditions are different for this run/file)
22  */
23  auto vg = Selec->GetGVList("__internal__")->GetGV("Mult_INDRA");
24  if (vg) {
25  Selec->GetGVList("__internal__")->Remove(vg);
26  delete vg;
27  }
28  vg = Selec->GetGVList("__internal__")->AddGV("KVArrayMult", "INDRA");
29  vg->SetMaxNumBranches(0);
30  // "__internal__" list has no a priori event selection
31  vg->SetSelection({"OK", [](const KVNucleus * n)
32  {
33  return n->IsOK();
34  }});
35  Int_t trig = gIndra->GetTrigger();
36  Info("SetTriggerConditionsForRun", "Minimum multiplicity for run : %d", trig);
37  vg->SetEventSelection([ = ](const KVVarGlob * V) {
38  return V->GetValue() >= trig;
39  });
40 }
41 
42 
44 
45 
46 
int Int_t
bool Bool_t
General purpose analysis base class for TTree containing KVEvent objects.
KVGVList * GetGVList(const KVString &list_name="default")
KVVarGlob * AddGV(const Char_t *class_name, const Char_t *name)
Definition: KVGVList.cpp:705
KVVarGlob * GetGV(const Char_t *nom) const
Return pointer to global variable in list with name 'nom'.
Definition: KVGVList.cpp:319
Set trigger conditions for analysis of reconstructed INDRA data.
void SetTriggerConditionsForRun(KVEventSelector *, Int_t, Bool_t=kFALSE) override
UChar_t GetTrigger() const
Definition: KVINDRA.h:258
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
TObject * Remove(TObject *obj) override
Remove object from list.
Base class for all global variable implementations.
Definition: KVVarGlob.h:233
Double_t GetValue(void) const
Definition: KVVarGlob.h:443
void SetMaxNumBranches(Int_t n)
Definition: KVVarGlob.h:683
virtual void Info(const char *method, const char *msgfmt,...) const
const Int_t n
ClassImp(TPyArg)