1 #include "KVEventReconstructor.h"
2 #include "KVDetectorEvent.h"
3 #include "KVGroupReconstructor.h"
25 fArray(a), fEvent(e), fGroupReconstructor(a->GetNumberOfGroups(), 1)
37 fGroupReconstructor.SetOwner();
38 unique_ptr<KVSeqCollection> gr_list(
a->GetStructureTypeList(
"GROUP"));
40 TIter it(gr_list.get());
41 unsigned int N = gr_list->GetEntries();
45 Warning(
"KVEventReconstructor",
"Groups in array %s are not numbered the way I like...%u",
a->
GetName(), i);
49 if (fGroupReconstructor[i]) {
50 Warning(
"KVEventReconstructor",
"%s array has non-unique group numbers!!!",
a->
GetName());
53 fGroupReconstructor[i] =
a->GetReconstructorForGroup(
gr);
54 if (fGroupReconstructor[i]) {
63 Info(
"KVEventReconstructor",
"Initialised for %u groups of multidetector %s",
N, fArray->GetName());
64 if (GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoIdentification",
kFALSE) || GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoCalibration",
kFALSE)) {
65 if (GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoIdentification",
kFALSE)) {
66 fArray->InitializeIDTelescopes();
67 Info(
"KVEventReconstructor",
" -- identification of events will be performed");
70 if (GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoCalibration",
kFALSE)) {
71 Info(
"KVEventReconstructor",
" -- calibration of events will be performed");
73 if (GetArray()->GetTarget()) {
75 GetArray()->GetTarget()->SetOutgoing();
80 Info(
"KVEventReconstructor",
" -- no identification or calibration will be performed");
122 GetEvent()->Clear(
"N");
125 GetArray()->GetDetectorEvent(&detev, fired);
129 fHitGroups.reserve(detev.GetGroups()->GetEntries());
130 TIter it(detev.GetGroups());
135 fHitGroups[fNGrpRecon] =
group->GetNumber();
142 MergeGroupEventFragments();
145 GetArray()->SetReconParametersInEvent(GetEvent());
161 for (
int k = 0; k < fNGrpRecon; ++k) {
162 auto grp_rcon = GetReconstructor(fHitGroups[k]);
163 to_merge.
Add(grp_rcon->GetEventFragment());
166 GetEvent()->MergeEventFragments(&to_merge,
"N");
Base class for KaliVeda framework.
void Copy(TObject &) const override
Make a copy of this object.
Base class for event reconstruction from array data.
void MergeGroupEventFragments()
void Copy(TObject &obj) const override
virtual void ReconstructEvent(const TSeqCollection *=nullptr)
Base class for particle reconstruction in one group of a detector array.
static void SetDoCalibration(bool on=kTRUE)
static void SetDoIdentification(bool on=kTRUE)
Group of detectors which can be treated independently of all others in array.
Base class for describing the geometry of a detector array.
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
void Print(Option_t *chopt="") const override
void Add(TObject *obj) override
virtual const char * GetName() const