CbmSttFindTracks.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // -------------------------------------------------------------------------
  2. // ----- CbmSttFindTracks header file -----
  3. // ----- Created 29/03/06 by V. Friese -----
  4. // -------------------------------------------------------------------------
  5. /** CbmSttFindTracks
  6. *@author V.Friese <v.friese@gsi.de>
  7. **
  8. ** Task class for track finding in the STT.
  9. ** Input: TClonesArray of CbmSttHit
  10. ** Output: TClonesArray of CbmSttTrack
  11. **
  12. ** Uses as track finding algorithm classes derived from CbmSttTrackFinder.
  13. **/
  14. #ifndef CBMSTTFINDTRACKS
  15. #define CBMSTTFINDTRACKS 1
  16. #include <string>
  17. #include <vector>
  18. #include "FairTask.h"
  19. using std::string;
  20. using std::vector;
  21. class CbmSttTrackFinder;
  22. class CbmSttFindTracks : public FairTask
  23. {
  24. public:
  25. /** Default constructor **/
  26. CbmSttFindTracks();
  27. /** Standard constructor
  28. *@param finder Pointer to STT track finder concrete class
  29. *@param verbose Verbosity level
  30. **/
  31. CbmSttFindTracks(CbmSttTrackFinder* finder, Int_t verbose = 1);
  32. /** Constructor with name and title
  33. *@param name Name of class
  34. *@param title Task title
  35. *@param finder Pointer to STT track finder concrete class
  36. *@param verbose Verbosity level
  37. **/
  38. CbmSttFindTracks(const char* name, const char* title = "FairTask",
  39. CbmSttTrackFinder* finder = NULL, Int_t verbose = 1);
  40. /** Destructor **/
  41. virtual ~CbmSttFindTracks();
  42. /** Initialisation at beginning of each event **/
  43. virtual InitStatus Init();
  44. /** Task execution **/
  45. virtual void Exec(Option_t* opt);
  46. /** Finish at the end of each event **/
  47. virtual void Finish();
  48. /** Accessors **/
  49. CbmSttTrackFinder* GetFinder() { return fFinder; };
  50. Int_t GetNofTracks() { return fNofTracks; };
  51. /** Set concrete track finder **/
  52. void UseFinder(CbmSttTrackFinder* finder) { fFinder = finder; };
  53. /** Add an hit collection to perform trackfinding on */
  54. void AddHitCollectionName(char *hitCollectionName, char *pointCollectionName);
  55. private:
  56. void AddAllCollections();
  57. void AddHitCollection(char const *collectionName, char const *pointCollectionName);
  58. CbmSttTrackFinder* fFinder; // Pointer to TrackFinder concrete class
  59. TClonesArray* fTrackArray; // Output array of CbmSttTracks
  60. Int_t fNofTracks; // Number of tracks created
  61. Int_t fVerbose; // Verbosity level
  62. vector<string> fHitCollectionNames;
  63. vector<string> fPointCollectionNames;
  64. Bool_t fCollectionsComplete;
  65. ClassDef(CbmSttFindTracks,1);
  66. };
  67. #endif