KaliVeda
Toolkit for HIC analysis
KVFilterEventReconstructor.cpp
1 #include "KVFilterEventReconstructor.h"
2 #include "KVFilterGroupReconstructor.h"
3 #include "KVNucleusEvent.h"
4 
5 
7 
9  : KVEventReconstructor(arg1, arg2), fDetectionFrame(det_frame)
10 {
11  if (E) SetSimEvent(E);
12 }
13 
14 
15 
20 
22 {
23  // Copy particles of simulated event to group reconstructors before reconstruction.
24  //
25  // The particle default kinematics are in the detection frame.
26 
27  TList fired; // list of stopping detectors for all particles
28  for (auto& n : EventIterator(fSimEvent)) {
29  if (n.GetParameters()->HasIntParameter("GROUP")) {
30  auto gr = GetReconstructor(n.GetParameters()->GetIntValue("GROUP"));
31  if (!gr) {
32  Error("ReconstructEvent", "No reconstructor for group %d", n.GetParameters()->GetIntValue("GROUP"));
33  n.Print();
34  assert(gr);
35  }
36  dynamic_cast<KVFilterGroupReconstructor*>(gr)->AddSimParticle((const KVNucleus*)n.GetFrame(fDetectionFrame));
37  fired.Add(GetArray()->GetDetector(n.GetParameters()->GetStringValue("STOPPING DETECTOR")));
38  }
39  }
41 }
42 
43 
44 
49 
51 {
52  // \param[in] DQA pointer to data quality audit object filled from experimental data
53  //
54  // The audit will be used to determine particle identification capacities for each ID telescope
55 
56  Info("SetDataQualityAudit", "Using data quality audit %s for filtering", DQA->GetName());
57 
58  // set for each group
59  TIter nxt_grp(GetReconstructors());
61  while ((fgr = dynamic_cast<KVFilterGroupReconstructor*>(nxt_grp()))) {
62  fgr->SetDataQualityAudit(DQA);
63  }
64 }
65 
66 
68 
69 
70 
Class for iterating over nuclei in events accessed through base pointer/reference.
Audit of experimental data identification and calibrations.
Base class for event reconstruction from array data.
KVMultiDetArray * GetArray()
TObjArray * GetReconstructors()
virtual void ReconstructEvent(const TSeqCollection *=nullptr)
KVGroupReconstructor * GetReconstructor(int group_number)
Abstract base class container for multi-particle events.
Definition: KVEvent.h:67
Reconstruct events after filtering a simulation.
void SetDataQualityAudit(const KVDataQualityAudit *DQA)
void ReconstructEvent(const TSeqCollection *=nullptr) override
KVFilterEventReconstructor(KVMultiDetArray *arg1, KVReconstructedEvent *arg2, KVEvent *E=nullptr, const TString &det_frame="")
the frame used in the call to KVDetectionSimulator::DetectEvent()
TString fDetectionFrame
the simulated event used as input to the filter
Reconstruct particles in group of detectors after filtering simulated events.
void SetDataQualityAudit(const KVDataQualityAudit *DQA)
virtual KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
Base class for describing the geometry of a detector array.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
void Add(TObject *obj) override
const char * GetName() const override
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const Int_t n
TGraphErrors * gr
constexpr Double_t E()
ClassImp(TPyArg)