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]) {
64 Info(
"KVEventReconstructor",
"Initialised for %u groups of multidetector %s",
N, fArray->GetName());
65 if (GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoIdentification",
kTRUE) || GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoCalibration",
kTRUE)) {
66 if (GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoIdentification",
kTRUE)) {
67 Info(
"KVEventReconstructor",
" -- identification of events will be performed");
68 fArray->PrintStatusOfIDTelescopes();
70 if (GetDataSetEnv(fArray->GetDataSet(),
"EventReconstruction.DoCalibration",
kTRUE)) {
71 Info(
"KVEventReconstructor",
" -- calibration of events will be performed");
72 fArray->PrintCalibStatusOfDetectors();
76 Info(
"KVEventReconstructor",
" -- no identification or calibration will be performed");
118 if (GetArray()->GetTarget()) {
120 GetArray()->GetTarget()->SetIncoming(
kFALSE);
121 GetArray()->GetTarget()->SetOutgoing(
kTRUE);
124 GetEvent()->Clear(
"N");
127 GetArray()->GetDetectorEvent(&detev, fired);
131 fHitGroups.reserve(detev.GetGroups()->GetEntries());
132 TIter it(detev.GetGroups());
137 fHitGroups[fNGrpRecon] =
group->GetNumber();
144 MergeGroupEventFragments();
147 GetArray()->SetReconParametersInEvent(GetEvent());
163 for (
int k = 0; k < fNGrpRecon; ++k) {
164 int i = fHitGroups[k];
167 GetEvent()->MergeEventFragments(&to_merge,
"N");
Base class for KaliVeda framework.
virtual void Copy(TObject &) const
Make a copy of this object.
Base class for event reconstruction from array data.
void MergeGroupEventFragments()
void Copy(TObject &obj) const
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