Go to the documentation of this file.
6 #include "FairLogger.h"
20 #include "TClonesArray.h"
26 #include <boost/assign/list_of.hpp>
28 using boost::assign::list_of;
39 , fMuchPixelHits(NULL)
43 , fMergerType(
"neares_hit")
44 , fFitterType(
"kalman")
46 , fTrackingWithIOWatch() {}
69 static Int_t eventNo = 0;
70 cout <<
"CbmLitFindGlobalTracksParallel::Exec eventNo: " << eventNo++ << endl;
76 FairRootManager* ioman = FairRootManager::Instance();
79 <<
"CbmLitFindGlobalTracksParallel: FairRootManager is not instantiated";
82 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
84 LOG(fatal) <<
"CbmLitFindGlobalTracksParallel: No StsTrack array!";
88 fTrdHits = (TClonesArray*) ioman->GetObject(
"TrdHit");
91 LOG(fatal) <<
"CbmLitFindGlobalTracksParallel: No TRDHit array!";
99 LOG(fatal) <<
"CbmLitFindGlobalTracksParallel: No MuchPixelHit array!";
104 ioman->Register(
"GlobalTrack",
107 IsOutputBranchPersistent(
"GlobalTrack"));
110 fTrdTracks =
new TClonesArray(
"CbmTrdTrack", 100);
112 "TrdTrack",
"Trd",
fTrdTracks, IsOutputBranchPersistent(
"TrdTrack"));
116 fMuchTracks =
new TClonesArray(
"CbmMuchTrack", 100);
118 "MuchTrack",
"Much",
fMuchTracks, IsOutputBranchPersistent(
"MuchTrack"));
123 static Bool_t firstTime =
true;
132 finder.
SetPDG(list_of(211));
143 finder.
SetPDG(list_of(211));
154 vector<lit::parallel::LitScalTrack*> lseeds;
155 vector<lit::parallel::LitScalPixelHit*> lhits;
156 vector<lit::parallel::LitScalTrack*> ltracks;
167 Int_t nofSeeds =
fStsTracks->GetEntriesFast();
168 for (Int_t iSeed = 0; iSeed < nofSeeds; iSeed++) {
175 lseeds.push_back(lseed);
180 finder.
DoFind(lhits, lseeds, ltracks);
196 for_each(ltracks.begin(), ltracks.end(),
DeleteObject());
206 set<Int_t> stsTracksSet;
207 Int_t globalTrackNo = 0;
209 Int_t nofTrdTracks =
fTrdTracks->GetEntriesFast();
210 for (Int_t iTrack = 0; iTrack < nofTrdTracks; iTrack++) {
221 Int_t nofMuchTracks =
fMuchTracks->GetEntriesFast();
222 for (Int_t iTrack = 0; iTrack < nofMuchTracks; iTrack++) {
234 for (Int_t iTrack = 0; iTrack <
fStsTracks->GetEntriesFast(); iTrack++) {
236 if (stsTracksSet.find(iTrack) == stsTracksSet.end()) {
245 LOG(info) <<
"CbmLitFindGlobalTracksParallel::PrintStopwatchStatistics:\n "
const FairTrackParam * GetParamLast() const
void DoTracking()
Do the track reconstruction.
void SetNofIterations(int nofIterations)
virtual void Exec(Option_t *opt)
Inherited from FairTask.
void SetTrdTrackIndex(Int_t iTrd)
virtual InitStatus Init()
Inherited from FairTask.
Tracking geometry constructor.
CBM task for parallel global track reconstruction.
TStopwatch fTrackingWatch
void SetChiSqStripHitCut(const vector< fscal > &chiSqStripHitCut)
void SetMaxNofMissingHits(const vector< int > &maxNofMissingHits)
void SetPreviousTrackId(unsigned short previousTrackId)
Sets previous trackId.
void PrintStopwatchStatistics()
Print stopwatch statistics.
void GetTrdLayoutScal(lit::parallel::LitDetectorLayoutScal &layout)
Return TRD detector layout for TRD parallel tracking in scalar format.
virtual ~CbmLitFindGlobalTracksParallel()
Destructor.
Data class for STS tracks.
void SetStsTrackIndex(Int_t iSts)
static void FairTrackParamToLitTrackParamScal(const FairTrackParam *par, lit::parallel::LitTrackParamScal *lpar)
Convert FairTrackParam to LitTrackParamScal.
void SetPDG(const vector< int > &pdg)
TClonesArray * fTrdTracks
void SetParamFirst(const LitTrackParamScal ¶m)
Sets first track parameter.
void SetChiSqPixelHitCut(const vector< fscal > &chiSqPixelHitCut)
static void LitScalTrackArrayToCbmMuchTrackArray(const vector< lit::parallel::LitScalTrack * > <racks, TClonesArray *tracks)
Convert array of LitScalTrack to array of CbmTrack.
bool GetDet(ECbmModuleId detId) const
Return detector presence in setup.
TClonesArray * fMuchTracks
static void LitScalTrackArrayToCbmTrdTrackArray(const vector< lit::parallel::LitScalTrack * > <racks, TClonesArray *tracks)
Convert array of LitScalTrack to array of CbmTrack.
Base class for scalar pixel hits.
Int_t GetPreviousTrackId() const
ClassImp(CbmLitFindGlobalTracksParallel)
TClonesArray * fMuchPixelHits
void GetMuchLayoutScal(lit::parallel::LitDetectorLayoutScal &layout)
Return MUCH detector layout for parallel MUCH tracking in scalar format.
void SetSigmaCoef(const vector< fscal > &sigmaCoef)
void DoFind(const vector< lit::parallel::LitScalPixelHit * > &hits, const vector< lit::parallel::LitScalTrack * > &trackSeeds, vector< lit::parallel::LitScalTrack * > &tracks)
Main function for track reconstruction.
static void CbmPixelHitArrayToLitScalPixelHitArray(const TClonesArray *hits, vector< lit::parallel::LitScalPixelHit * > &lhits)
Convert CbmPixelHit array to LitScalPixelHit arra.
Parallel implementation of the nearest neighbor tracking algorithm.
Class for conversion between CBMROOT data classes and littrack parallel data classes.
TClonesArray * fGlobalTracks
@ kTrd
Transition Radiation Detector.
CbmLitFindGlobalTracksParallel()
Constructor.
void ReadAndCreateDataBranches()
Reads necessary data branches from the input data files and creates branches for CbmGlobalTrack,...
virtual void Finish()
Inherited from FairTask.
void SetDetectorLayout(const LitDetectorLayoutScal &layout)
void SetMuchTrackIndex(Int_t iMuch)
@ kMuch
Muon detection system.
TClonesArray * fStsTracks
void ConstructGlobalTracks()
Create and fill global tracks.
string ToString() const
Return string representation of class.
TStopwatch fTrackingWithIOWatch
static CbmLitTrackingGeometryConstructor * Instance()
Return pointer to singleton object.
void DetermineSetup()
Determines detector presence using TGeoManager.