StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StiCATpcTrackerInterface.h
1 #ifndef __StiCATpcTrackerInterface_h__
2 #define __StiCATpcTrackerInterface_h__
3 #include "StiCATpcSeedFinder.h"
4 #define __NEW_TPCCATracker__
5 #ifdef __NEW_TPCCATracker__
6 #include "TPCCATracker/AliHLTTPCCAGBTracker.h"
7 #else /* ! __NEW_TPCCATracker__ */
8 #include "TPCCATracker/AliHLTTPCCAGBTracker.h"
9 #endif /* __NEW_TPCCATracker__ */
10 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
11 #ifdef __NEW_TPCCATracker__
12 #include "TPCCATrackerPerformance/AliHLTTPCCAPerformance.h"
13 #include "TPCCATrackerPerformance/AliHLTTPCCAMCTrack.h"
14 #else /* ! __NEW_TPCCATracker__ */
15 #include "TPCCATracker/Performance/AliHLTTPCCAPerformance.h"
16 #include "TPCCATracker/Performance/AliHLTTPCCAMCTrack.h"
17 #endif /* __NEW_TPCCATracker__ */
18 #endif
19 
20 #include "Sti/StiTrackContainer.h"
21 
23  public:
24 
27 
31 
32  void SetNewEvent(); // clean and initialize before new event
33 
34 
35  void SetHits(HitMapToVectorAndEndType &map_){ fHitsMap = &map_; };// set hits data array.
36  void SetStiTracks( StiTrackContainer *fStiTracks_){ fStiTracks = fStiTracks_; };
37 
38  void Run(); // copy data to CATracker, run CATracker, copy tracks in fSeeds. Should be called after SetHits(...).
39  vector<Seed_t> &GetSeeds(){ return fSeeds; }; // get seeds. Should be called after Run(...).
40 
41  void RunPerformance();
42 
43  vector<SeedHit_t> GetSeedHits() { return fSeedHits;}
44 
45 
46  protected:
47 
48  void MakeSettings(); // fill fCaParam
49  virtual void MakeHits(); // fill fCaHits & fSeedHits
50  void MakeSeeds(); // fill fSeeds & fTrackParameters
51 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
52  void FillPerformance(const vector<AliHLTTPCCAGBHit>& hits, const vector<int>& idTruth, vector<AliHLTTPCCAMCTrack>& mcTracks, vector<AliHLTTPCCALocalMCPoint>& mcPoints, vector<AliHLTTPCCAHitLabel>& hitLabels); // fill fPerformance by MCTracks, MCPoints and Hit-MCPointsMatch
53 #endif
54  void ConvertPars(const AliHLTTPCCATrackParam& caPar, double _alpha, StiNodePars& nodePars, StiNodeErrs& nodeErrs); // convert caPars into NodePars
55 
56  HitMapToVectorAndEndType *fHitsMap;
57  vector<Seed_t> fSeeds;
58 
59  StiCATpcSeedFinder *fSeedFinder;
60  AliHLTTPCCAGBTracker *fTracker;
61 
62  vector<int> fIdTruth; // id of the Track, which has created CaHit
63 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
64  vector<AliHLTTPCCAMCTrack> fMCTracks;
65  vector<AliHLTTPCCALocalMCPoint> fMCPoints;
66  vector<AliHLTTPCCAHitLabel> fHitLabels;
67  AliHLTTPCCAPerformance *fPerformance;
68 
69  TFile *fOutFile; // file for perfo histos
70 #endif
71 
72  vector<AliHLTTPCCAParam> fCaParam;// settings for all sectors to give CATracker
73  vector<AliHLTTPCCAGBHit> fCaHits; // hits to give CATracker
74  vector<SeedHit_t> fSeedHits; // hits to make seeds
75 
76  // for StiPefro
77  void FillStiPerformance();
78 
79  AliHLTTPCCAGBTracker *fStiTracker;
80 
81  StiTrackContainer *fStiTracks;
82  vector<AliHLTTPCCAGBHit> fStiCaHits; // hits to give CATracker.
83  vector<int> fStiIdTruth; // id of the Track, which has created CaHit
84  vector<AliHLTTPCCAGBTrack> fStiCaTracks;
85 
86 #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE
90 #endif
91  double fPreparationTime_real, fPreparationTime_cpu; // time for coping data and performance
92 };
93 #endif // __StiCATpcTrackerInterface_h__
StiCATpcTrackerInterface()
constructor - destructor
void Run()
Copy data to CATracker. Run CATracker. Copy tracks in fSeeds.
static StiCATpcTrackerInterface & Instance()
Instance.