/** CbmLitFindGlobalTracksIdeal.h * @author Andrey Lebedev * @since 2009 * @version 1.0 ** ** CBM task class for ideal global track reconstruction. ** Combines local track segments to a global track based on MC information. ** Local ideal or real tracking must be run before. ** Also track matching tasks must be run before. ** Produces objects of type CbmGlobalTrack. **/ #ifndef CBMLITFINDGLOBALTRACKSIDEAL_H_ #define CBMLITFINDGLOBALTRACKSIDEAL_H_ #include "FairTask.h" #include class TClonesArray; class CbmLitFindGlobalTracksIdeal : public FairTask { public: /** Default constructor */ CbmLitFindGlobalTracksIdeal(); /** Destructor */ virtual ~CbmLitFindGlobalTracksIdeal(); /** * Derived from FairTask. Executed before starting event-by-event execution. */ virtual InitStatus Init(); /** * Derived from FairTask. Executed on each event. * @param opt Options */ virtual void Exec(Option_t* opt); private: /** * Derived from FairTask. Executed after all events are processed. */ virtual void Finish(); /** * Determines the CBM detector setup, based on TGeoManager stored in the input MC file. */ void DetermineSetup(); /** * Reads necessary data branches from the input data files. */ void ReadDataBranches(); /** * Fills map from to */ void FillTrackMap( std::map& mcMap, const TClonesArray* matches); /** * Fills map from to */ void FillMapTof(); /** * Creates output CbmGlobalTracks and writes them to the output array. */ void CreateGlobalTracks(); Bool_t fIsElectronSetup; // If "electron" setup detected than true Bool_t fIsSts; // If STS detected than true Bool_t fIsTrd; // If TRD detected than true Bool_t fIsMuch; // If MUCH detected than true Bool_t fIsTof; // If TOF detected than true // Pointers to data arrays TClonesArray* fMCTracks; // CbmMCTrack TClonesArray* fStsMatches; // CbmStsTrackMatch TClonesArray* fMuchMatches; // CbmTrackMatch TClonesArray* fTrdMatches; // CbmTrackMatch TClonesArray* fTofMCPoints; // CbmTofPoint TClonesArray* fTofHits; // CbmTofHit TClonesArray* fGlobalTracks; //output: CbmGlobalTrack // Maps for reconstructed tracks // std::map fMcStsMap; // STS std::map fMcTrdMap; // TRD std::map fMcMuchMap; // MUCH std::map fMcTofMap; //TOF Int_t fEventNo; //event counter ClassDef(CbmLitFindGlobalTracksIdeal, 1); }; #endif /* CBMLITFINDGLOBALTRACKSIDEAL_H_ */