15#include "FairRunAna.h"
16#include "FairRuntimeDb.h"
17#include "TClonesArray.h"
61 Int_t nEvents =
fEvents->GetEntriesFast();
62 LOG(debug) << GetName() <<
": reading time slice with " << nEvents <<
" events ";
64 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
78 LOG(warn) <<
"CbmLitFindMvdTracks::Exec: MVD tracking is not executed NO "
79 "StsTrack or MvdHit arrays.";
81 LOG(info) <<
"-I- Event: " <<
fEventNo++;
86 FairRunAna* ana = FairRunAna::Instance();
87 FairRuntimeDb* rtdb = ana->GetRuntimeDb();
88 rtdb->getContainer(
"FairBaseParSet");
95 FairRootManager* ioman = FairRootManager::Instance();
97 LOG(fatal) <<
"CbmLitFindMvdTracks::ReadAndCreateDataBranches "
98 "FairRootManager is not instantiated";
100 fMvdHits =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"MvdHit"));
101 fStsTracks =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"StsTrack"));
102 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"CbmEvent"));
109 for (Int_t iTrack = 0; iTrack <
fLitStsTracks.size(); iTrack++) {
114 LOG(info) <<
"-I- Number of STS tracks: " <<
fLitStsTracks.size();
119 for (Int_t iHit = 0; iHit <
fLitMvdHits.size(); iHit++) {
123 LOG(info) <<
"-I- Number of MVD hits: " <<
fLitMvdHits.size();
132 for (Int_t iHit = 0; iHit < litTrack->
GetNofHits(); iHit++) {
135 FairHit* hit =
static_cast<FairHit*
>(
fMvdHits->At(refId));
140 FairTrackParam parFirst;
MVD tracking based on littrack package.
Base data class for hits.
Base data class for pixel hits.
Implementation of nearest neighbor tracking algorithm.
Data class for track parameters.
Base data class for track.
Tracking geometry constructor.
Data class for STS tracks.
Class characterising one event by a collection of links (indices) to data objects,...
static void CbmLitTrackParamToFairTrackParam(const CbmLitTrackParam *litPar, FairTrackParam *par)
static void MvdHitArrayToHitVector(const TClonesArray *hits, HitPtrVector &litHits)
static void StsTrackArrayToTrackVector(CbmEvent *event, const TClonesArray *tracks, TrackPtrVector &litTracks)
virtual ~CbmLitFindMvdTracks()
Destructor.
TClonesArray * fStsTracks
virtual void Exec(Option_t *opt)
Inherited from FairTask.
void ConvertOutputData()
Convert output littrack data classes to CBMROOT data classes.
void ClearArrays()
Clear arrays and free memory.
virtual InitStatus Init()
Inherited from FairTask.
virtual void SetParContainers()
Inherited from FairTask.
virtual void Finish()
Inherited from FairTask.
void ReadAndCreateDataBranches()
Read necessary data branches from the input data files.
CbmLitFindMvdTracks()
Constructor.
TrackPtrVector fLitStsTracks
void ConvertInputData(CbmEvent *event)
Convert input data from CBMROOT data classes to littrack data classes.
void RunTrackReconstruction()
Run track reconstruction.
TrackPtrVector fLitOutputTracks
Base data class for hits.
void SetDetectorId(LitSystemId sysId, Int_t station)
Data class for track parameters.
Base data class for track.
void SetParamLast(const CbmLitTrackParam *par)
Int_t GetPreviousTrackId() const
const CbmLitTrackParam * GetParamFirst() const
const CbmLitHit * GetHit(Int_t index) const
const CbmLitTrackParam * GetParamLast() const
static CbmLitTrackingGeometryConstructor * Instance()
Return pointer to singleton object.
Int_t GetNofMvdStations()
Return number of stations in MVD.
void AddMvdHit(int32_t hitIndex)
void SetParamFirst(const FairTrackParam *par)