KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVINDRAFAZIAE789TriggerConditions.cpp
1#include "KVINDRAFAZIAE789TriggerConditions.h"
2#include "KVFAZIA.h"
3#include "KVEventSelector.h"
4
6
7
8
23
24void KVINDRAFAZIAE789TriggerConditions::SetTriggerConditionsForRun(KVEventSelector* Selector, int, Bool_t filtered)
25{
26 // Implements rejection of events incompatible with the (principal) on-line DAQ trigger for each run of E789.
27 //
28 // Used for analysis of events when KVEventSelector::SetTriggerConditionsForRun() is called in KVEventSelector::InitRun().
29 //
30 // This will do 2 things: for physics runs (where the principal trigger for FAZIA was "Mult2"), we retain only
31 // events for which the trigger bit pattern is compatible with "Mult2", which can be either "Mult2" alone or
32 // "Mult2"+"Mult1/100" (see KVFAZIA::SetTriggerPatternsForDataSet() and KVFAZIA::GetTriggerForCurrentRun()).
33 // Events for which only "Mult1/100" (multiplicity 1 trigger downscaled by 100) fired are rejected.
34 //
35 // The 2nd thing this will do is reject the (very small) number of events where FAZIA is not present, only INDRA
36 // (in this case there is no FAZIA trigger bit pattern, which is not consistent with a trigger pattern "Mult2").
37 //
38 // When analysing filtered simulated data, this just rejects all events for which the number of particles
39 // hitting FAZIA (identified/calibrated or not) is less than 2.
40
41 if (filtered) {
42 auto gv = Selector->GetGVList("__internal__")->AddGV("KVArrayMult", "FAZIA");
43 gv->SetEventSelection([](const KVVarGlob * GV) {
44 return GV->GetValue() > 1;
45 });
46 Info("SetTriggerConditionsForRun", "Rejecting all events with <2 hits in FAZIA");
47 }
48 else {
49 auto gv = Selector->GetGVList("__internal__")->AddGV("KVDummyGV", "FaziaTrigSelect");
50 auto TrigPat = gFazia->GetTriggerForCurrentRun();
51 Info("SetTriggerConditionsForRun", "Rejecting all events for which FAZIA trigger pattern is NOT: %s", TrigPat.c_str());
52 gv->SetEventSelection([ = ](const KVVarGlob*) {
53 return gFazia->GetTrigger().IsTrigger(TrigPat);
54 });
55 }
56}
57
58
bool Bool_t
General purpose analysis base class for TTree containing KVEvent objects.
const KVFAZIATrigger & GetTrigger() const
Definition KVFAZIA.h:258
std::string GetTriggerForCurrentRun() const
Definition KVFAZIA.cpp:129
Trigger conditions for E789 INDRAFAZIA experiment.
Base class for all global variable implementations.
Definition KVVarGlob.h:233
Double_t GetValue(void) const
Definition KVVarGlob.h:443
void Info(const char *location, const char *fmt,...)
ClassImp(TPyArg)