FairRoot/PandaRoot
PndSttCellTrackFinder.cxx
Go to the documentation of this file.
1 /*
2  * PndSttCellTrackFinder.cxx
3  *
4  * Created on: May 20, 2014
5  * Author: schumann
6  */
7 
9 #include "TString.h"
10 #include "PndSttHit.h"
11 #include "FairRootManager.h"
12 #include "PndSttSkewedHit.h"
14 #include "TTimeStamp.h"
15 
16 using namespace std;
17 
19 
20 void PndSttCellTrackFinder::AddHits(TClonesArray* hits, TString branchName) {
21 
22  //std::cout << "hits added! branch name: " << branchName << "#################################################################"<<std::endl;
23  //std::cout << "size of tconesarray: " << hits->GetEntriesFast() << "#################################################################"<<std::endl;
24  fTrackFinderData->AddHits(hits, branchName);
25 
26 }
27 
29 
30  // init TrackFinderData
31  vector<Double_t> timesGenerateNeighorhoodData;
32 
33  //if(fRunTimeBased){ // Bug?????????????? J.R. 01/06-2018
34  fTrackFinderData->SetRunTimeBased(fRunTimeBased);
35  //}
36  fTrackFinderData->SetClusterTime(fClusterTime);
37  //store timestamps for runtime analysis
38 
39  timesGenerateNeighorhoodData.push_back(TTimeStamp());
40  fTrackFinderData->GenerateNeighborhoodData();
41  timesGenerateNeighorhoodData.push_back(TTimeStamp());
42 
43  //fTrackFinderData->PrintInfo();
44 
45 
46  fTrackletGenerator = new PndSttCellTrackletGenerator(fTrackFinderData);
47 
48  fTrackletGenerator->SetCalcFirstTrackletInf(fCalcFirstTrackletInf);
49  fTrackletGenerator->SetVerbose(fVerbose);
50  fTrackletGenerator->SetBz(fBz);
51 
52  //calculation on GPU is only possible without multiple STTHits and a maximum number of MAX_THREADS_PER_BLOCK
53  if (fUseGPU && (fTrackFinderData->GetAllowDoubleHits() == kFALSE)
54  && (fTrackFinderData->GetNumHitsWithoutDouble()
56  fTrackletGenerator->SetUseGPU(fUseGPU);
57  fTrackletGenerator->SetDevTubeNeighboringsPointer(
58  fDev_tubeNeighborings);
59  }
60 
61  fTrackFinderData->SetClusterTime(fClusterTime);
62  fTrackFinderData->SetRunTimeBased(fRunTimeBased);
63 
64  if (fCalcWithCorrectedIsochrones) {
65  fHitCorrector = new PndSttHitCorrector(fTrackFinderData);
66  fHitCorrector->CorrectHits();
67  map<int, FairHit*> correctedIsochrones =
68  fHitCorrector->GetCorrectedHits();
69 
70  //Get tracks with corrected hits
71  fTrackletGenerator->SetCorrectedHits(correctedIsochrones);
72  }
73 
74  fTrackletGenerator->FindTracks();
75  //fTrackletGenerator->PrintInfo();
76 
77  StoreTrackData();
78 
79  // cpu time measurement
80  fTimeStampsTrackletGen.push_back(fTrackletGenerator->GetTimeStamps());
81  fTimeStampsGenerateNeighborhoodData.push_back(timesGenerateNeighorhoodData);
82 }
83 
84 ;
int fVerbose
Definition: poormantracks.C:24
ClassImp(PndSttCellTrackFinder)
#define MAX_THREADS_PER_BLOCK
void AddHits(TClonesArray *hits, TString branchName)
CbmHit * hits[nHits]
Definition: RiemannTest.C:19