/** * \file CbmMatchRecoToMC.h * \brief FairTask for matching RECO data to MC. * \author Andrey Lebedev * \date 2013 */ #ifndef CBMMATCHRECOTOMC_H_ #define CBMMATCHRECOTOMC_H_ #include "FairTask.h" #include class TClonesArray; class CbmMCDataArray; class CbmRichHit; class CbmMatchRecoToMC : public FairTask { public: /** * \brief Constructor. */ CbmMatchRecoToMC(); /** * \brief Destructor. */ virtual ~CbmMatchRecoToMC(); /** * \brief Derived from FairTask. */ virtual InitStatus Init(); /** * \brief Derived from FairTask. */ virtual void Exec( Option_t* opt); /** * \brief Derived from FairTask. */ virtual void Finish(); void SetIncludeMvdHitsInStsTrack(Bool_t includeMvdHitsInStsTrack); private: /** * \brief Read and create data branches. */ void ReadAndCreateDataBranches(); void MatchClusters( const TClonesArray* digiMatches, const TClonesArray* clusters, TClonesArray* clusterMatches); void MatchStsClusters( const TClonesArray* digiMatches, const TClonesArray* clusters, TClonesArray* clusterMatches); void MatchHits( const TClonesArray* matches, const TClonesArray* hits, TClonesArray* hitMatches); void MatchHitsSts( const TClonesArray* matches, const TClonesArray* hits, TClonesArray* hitMatches); void MatchHitsMvd( const TClonesArray* matches, const TClonesArray* hits, TClonesArray* hitMatches); void MatchHitsTof( const TClonesArray* DigiPntMatches, const TClonesArray* digis, const TClonesArray* HitDigiMatches, const TClonesArray* hits, TClonesArray* hitMatches); void MatchHitsTofDigiExp( const TClonesArray* DigiPntMatches, const TClonesArray* digis, const TClonesArray* HitDigiMatches, const TClonesArray* hits, TClonesArray* hitMatches); void MatchHitsToPoints( const TClonesArray* points, const TClonesArray* hits, TClonesArray* hitMatches); void MatchTracks( const TClonesArray* hitMatches, const TClonesArray* points, const TClonesArray* tracks, TClonesArray* trackMatches); //Special case for STS: now evbased compatible void MatchStsTracks( const TClonesArray* mvdHitMatches, const TClonesArray* stsHitMatches, const TClonesArray* mvdPoints, CbmMCDataArray* stsPoints, const TClonesArray* tracks, TClonesArray* trackMatches); void MatchRichRings( const TClonesArray* richRings, const TClonesArray* richHits, const TClonesArray* richDigis, const TClonesArray* richMcPoints, const TClonesArray* mcTracks, TClonesArray* ringMatches); public: /** * \brief Return McTrack Ids for RICH hit * C++11 efficient way to return vector */ static std::vector GetMcTrackMotherIdsForRichHit( const CbmRichHit* hit, const TClonesArray* richDigis, const TClonesArray* richPoints, const TClonesArray* mcTracks); private: // If MVD hits has to be included in STS track Bool_t fIncludeMvdHitsInStsTrack; // Pointers to data arrays CbmMCDataArray* fMCTracks; // Monte-Carlo tracks TClonesArray* fMCTracksArray; // Array of MCTracks // STS CbmMCDataArray* fStsPoints; // CbmStsPoint array TClonesArray* fStsDigis; // CbmStsDigi array TClonesArray* fStsClusters; // CbmStsCluster array TClonesArray* fStsHits; // CbmStsHit array TClonesArray* fStsTracks; // CbmStsTrack array TClonesArray* fStsDigiMatches; // Output CbmMatch array TClonesArray* fStsClusterMatches; // Output CbmMatch array TClonesArray* fStsHitMatches; // Output CbmMatch array TClonesArray* fStsTrackMatches; // Output CbmTrackMatchNew array //RICH TClonesArray* fRichDigis; // CbmRichDigi array TClonesArray* fRichHits; // CbmRichHit array TClonesArray* fRichRings; // CbmRichRing array TClonesArray* fRichMcPoints; // CbmRichRing array TClonesArray* fRichTrackMatches; // Output CbmTrackMatchNew array // TRD TClonesArray* fTrdPoints; // CbmTrdPoint array TClonesArray* fTrdDigis; // CbmTrdDigi array TClonesArray* fTrdClusters; // CbmTrdCluster array TClonesArray* fTrdHits; // CbmTrdHit array TClonesArray* fTrdTracks; // CbmTrdTrack array TClonesArray* fTrdDigiMatches; // Output CbmMatch array TClonesArray* fTrdClusterMatches; // Output CbmMatch array TClonesArray* fTrdHitMatches; // Output CbmMatch array TClonesArray* fTrdTrackMatches; // Output CbmTrackMatchNew array // MUCH TClonesArray* fMuchPoints; // CbmMuchPoint array TClonesArray* fMuchPixelDigis; // CbmMuchDigi array TClonesArray* fMuchStrawDigis; // CbmMuchStrawDigi array TClonesArray* fMuchClusters; // CbmMuchCluster array TClonesArray* fMuchPixelHits; // CbmMuchPixelHit array TClonesArray* fMuchStrawHits; // CbmMuchStrawHit array TClonesArray* fMuchTracks; // CbmMuchTrack array TClonesArray* fMuchPixelDigiMatches; // Output CbmMatch array TClonesArray* fMuchStrawDigiMatches; // Output CbmMatch array TClonesArray* fMuchClusterMatches; // Output CbmMatch array TClonesArray* fMuchPixelHitMatches; // Output CbmMatch array TClonesArray* fMuchStrawHitMatches; // Output CbmMatch array TClonesArray* fMuchTrackMatches; // Output CbmMatch array // MVD TClonesArray* fMvdPoints; // CbmMvdPoint array TClonesArray* fMvdHits; // CbmMvdHit array TClonesArray* fMvdDigiMatches; // CbmMatch array TClonesArray* fMvdHitMatches; // Output CbmMatch array TClonesArray* fMvdCluster; // CbmMvdCluster array TClonesArray* fMvdClusterMatches; // Output CbmMatch array // TOF TClonesArray* fTofPoints; // CbmTofPoint array TClonesArray* fTofDigis; // CbmTofDigi or CbmTofDigiExp array TClonesArray* fTofHits; // CbmTofHit array Bool_t fbDigiExpUsed; // Flag true if usage of CbmTofDigiExp detected TClonesArray* fTofDigiMatchesPoints; // CbmMatch array for Digi -> MC TClonesArray* fTofDigiMatches; // CbmMatch array for Hit -> Digi TClonesArray* fTofHitMatches; // Output CbmMatch array for Hit -> MC CbmMatchRecoToMC(const CbmMatchRecoToMC&); CbmMatchRecoToMC& operator=(const CbmMatchRecoToMC&); ClassDef(CbmMatchRecoToMC, 1); }; #endif /* CBMMATCHRECOTOMC_H_ */