18#include "FairRootManager.h"
19#include "FairTrackParam.h"
20#include "TClonesArray.h"
32 FairRootManager* manager = FairRootManager::Instance();
33 if (
nullptr == manager) LOG(fatal) <<
"CbmRichRingTrackAssignIdeal::Init(): FairRootManager is nullptr.";
35 fGlobalTracks = (TClonesArray*) manager->GetObject(
"GlobalTrack");
36 if (
fGlobalTracks ==
nullptr) LOG(fatal) <<
"CbmRichRingTrackAssignIdeal::Init():No GlobalTrack.";
38 fRingMatches = (TClonesArray*) manager->GetObject(
"RichRingMatch");
39 if (
fRingMatches ==
nullptr) LOG(fatal) <<
"CbmRichRingTrackAssignIdeal::Init():No RichRingMatch.";
42 if (
fStsTrackMatches ==
nullptr) LOG(fatal) <<
"CbmRichRingTrackAssignIdeal::Init():No StsTrackMatch.";
48 if (event !=
nullptr) {
49 LOG(fatal) <<
"CbmRichRingTrackAssignIdeal::DoAssign(): CbmEvent is not nullptr. "
50 "This class does not support time-based mode. Please switch to event-by-event mode.";
53 Int_t nofTracks =
richProj->GetEntriesFast();
54 Int_t nofRings =
rings->GetEntriesFast();
56 for (Int_t iR = 0; iR < nofRings; iR++) {
58 if (ring ==
nullptr)
continue;
62 if (ringMatch ==
nullptr)
continue;
65 for (Int_t iT = 0; iT < nofTracks; iT++) {
66 FairTrackParam* proj =
static_cast<FairTrackParam*
>(
richProj->At(iT));
67 if (proj ==
nullptr)
continue;
70 if (proj->GetX() == 0 && proj->GetY() == 0)
continue;
73 if (gTrack ==
nullptr)
continue;
76 if (trackMatch ==
nullptr)
continue;
Ideal Ring-Track Assignment. CbmRichRingMatch must be run prior to this procedure.
Class characterising one event by a collection of links (indices) to data objects,...
int32_t GetStsTrackIndex() const
void SetRichRingIndex(int32_t iRing)
const CbmLink & GetMatchedLink() const
TClonesArray * fStsTrackMatches
TClonesArray * fGlobalTracks
CbmRichRingTrackAssignIdeal()
Default constructor.
virtual ~CbmRichRingTrackAssignIdeal()
Destructor.
TClonesArray * fRingMatches
virtual void DoAssign(CbmEvent *event, TClonesArray *rings, TClonesArray *richProj)
Inherited from CbmRichRingTrackAssignBase.
void Init()
Inherited from CbmRichRingTrackAssignBase.
int32_t GetNofHits() const