/* * PndSttCellTrackFinderData.h * * Created on: May 8, 2014 * Author: schumann */ #ifndef PNDSTTCELLTRACKFINDERDATA_H_ #define PNDSTTCELLTRACKFINDERDATA_H_ #include #include #include "TVector3.h" #include "PndSttGeometryMap.h" #include "PndSttStrawMap.h" #include "FairHit.h" class TClonesArray; class PndSttSkewedHit; class PndSttCellTrackFinderData { public: PndSttCellTrackFinderData(TClonesArray* fTubeArray); virtual ~PndSttCellTrackFinderData() { delete fStrawMap; delete fGeometryMap; for (int i = 0; i < fHits.size(); ++i) delete fHits.at(i); for (int i = 0; i < fHitsOrig.size(); ++i) delete fHitsOrig.at(i); } void AddHits(TClonesArray* hits, Int_t branchId); void GenerateNeighborhoodData(); void clear() { fHits.clear(); fHitsOrig.clear(); fMapHitToFairLink.clear(); fMapTubeIdToHit.clear(); fHitNeighbors.clear(); fSeparations.clear(); fCombinedSkewedHits.clear(); fHitNeighborsWithoutEdges.clear(); fSeparationsWithoutEdges.clear(); fHitNeighborsWithoutSkewed.clear(); fSeparationsWithoutSkewed.clear(); } void PrintInfo(); void SetAllowDoubleHits(Bool_t value){ fAllowDoubleHits=value; } Bool_t GetAllowDoubleHits(){ return fAllowDoubleHits; } std::vector GetHits() const { return fHits; } std::multimap GetCombinedSkewedHits() const { return fCombinedSkewedHits; } PndSttStrawMap* GetStrawMap() const { return fStrawMap; } PndSttGeometryMap* GetGeometryMap() const { return fGeometryMap; } std::map GetMapHitToFairLink() const{ return fMapHitToFairLink; } std::map GetMapTubeIdToHit() const { return fMapTubeIdToHit; } std::map GetMapTubeIdToPos() const { return fMapTubeIdToPos; } std::map > GetHitNeighbors() const { return fHitNeighbors; } std::map > GetSeparations() const { return fSeparations; } std::map > GetHitNeighborsWithoutEdges() const { return fHitNeighborsWithoutEdges; } std::map > GetSeparationsWithoutEdges() const { return fSeparationsWithoutEdges; } std::map > GetHitNeighborsWithoutSkewed() const { return fHitNeighborsWithoutSkewed; } std::map > GetSeparationsWithoutSkewed() const { return fSeparationsWithoutSkewed; } int GetNumHits() { return fNumHits; } int GetNumHitsWithoutDouble() { return fNumHitsWithoutDouble; } private: std::map fMapHitToFairLink; // map< index of hit in fHit, FairLink of SttHit> std::map fMapHitToFairLinkOrig; // map< index of hit in fHitOrig, FairLink of SttHit> std::vector fHits; //vector with selected hits of an event std::vector fHitsOrig;//vector with all originally hits of an event std::multimap fCombinedSkewedHits; //<(inner) Tube-ID of combined stt hits of skewed layers, corresponding hit> Bool_t fAllowDoubleHits; int fNumHits; int fNumHitsWithoutDouble; PndSttStrawMap* fStrawMap; // for getting more information about the tubes PndSttGeometryMap* fGeometryMap;// for initializing the neighbors of each tube std::map fMapTubeIdToPos;// map std::map fMapTubeIdToHit; // map< id of straw tube, index of hit in fHit> std::map > fHitNeighbors; // map> std::map > fSeparations; // map<#active neighbors, vector> std::map > fHitNeighborsWithoutEdges; // map> std::map > fSeparationsWithoutEdges; // map<#active neighbors, vector> std::map > fHitNeighborsWithoutSkewed; // map> std::map > fSeparationsWithoutSkewed; // map<#active neighbors, vector> /* Method grades the active cells according to the number of hit-neighbors.*/ void SeparateNeighbors(); /* Method searches for hit-neighbors of each cell.*/ void FindHitNeighbors(); ClassDef(PndSttCellTrackFinderData,1) ; }; #endif /* PNDSTTCELLTRACKFINDERDATA_H_ */