Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
OTFComplexEvent.cxx
1/*
2 * OTFComplexEvent.cxx
3 *
4 * Created on: 28 maj 2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "OTFComplexEvent.h"
11#include "ComplexEventInterface.h"
12#include "ComplexTrack.h"
13#include "OTFMcEvent.h"
14#include "OTFRecoEvent.h"
15#include "OTFRecoEventInterface.h"
16
17namespace HalOTF {
18 ComplexEvent::ComplexEvent() : Hal::ComplexEvent(new HalOTF::RecoEvent(), new HalOTF::McEvent) {}
19
23 fImgEvent->Update(source->GetImag());
24 fRealEvent->Update(source->GetReal());
26 fTotalTracksNo = fRealEvent->GetTotalTrackNo();
27 fTracks->ExpandCreateFast(fTotalTracksNo);
28 for (Int_t i = 0; i < fTotalTracksNo; i++) {
29 Hal::ComplexTrack* track = (Hal::ComplexTrack*) fTracks->UncheckedAt(i);
30 track->ResetTrack(i, this);
31 track->SetRealTrack(fRealEvent->GetTrack(i));
32 track->Hal::Track::CopyData(fRealEvent->GetTrack(i));
33 Int_t match = ((RecoTrack*) fRealEvent->GetTrack(i))->GetMatch();
34
35 if (match < 0) {
36 track->SetImgTrack(nullptr);
37 } else {
38 track->SetImgTrack(fImgEvent->GetTrack(match));
39 track->SetMatchID(match);
40 }
41 }
42 }
43
44} // namespace HalOTF
virtual void Update(Hal::EventInterface *interface)
virtual void Clear(Option_t *opt=" ")
virtual void ResetTrack(Int_t thisId=-1, Event *event=nullptr)
virtual void ShallowCopyEvent(Event *event)
Definition Event.cxx:100
virtual void Update(EventInterface *interface)
Definition Event.cxx:157
Int_t GetTotalTrackNo() const
Definition Event.h:236
Track * GetTrack(Int_t i) const
Definition Event.h:208