#ifndef HMETAMATCHF_H #define HMETAMATCHF_H #include "hreconstructor.h" #include "hgeomvector.h" #include "hlocation.h" #include "hmdckickplane.h" #define RICH_TAB_SIZE 3 class HCategory; class HMdcSeg; class HTofCluster; class HTofHit; class HShowerHit; class HIterator; class HMdcTrkCand; class HMdcTrackGSpline; class HMetaMatch; class HGeomTransform; class HMdcGetContainers; class HRichHit; class HTofGeomPar; class HRpcGeomPar; class HShowerGeometry; class HMetaMatchPar; class HMdcSizesCells; class HMetaMatchF : public HReconstructor { private: HMdcSizesCells *pSizesCells; // Cut parameters: HMetaMatchPar* fMatchPar; Float_t sigmaTofX[6]; Float_t sigmaTofY[6]; Float_t sTofX[6]; Float_t sTofY[6]; Float_t qualityTOFCut[6]; Float_t sigma2MdcInShrX[6]; Float_t sigma2MdcInShrY[6]; Float_t sShowerX[6]; Float_t sShowerY[6]; Float_t qualitySHOWERCut[6]; Float_t dThRich[6]; // matching window for 6 sectors Float_t dPhRich[6]; // ... Float_t dPhRichOff[6]; // ... Float_t qualityRichCut[6]; // Float_t richThetaMinCut[6]; Float_t richThetaMaxCut[6]; // ... HMdcSeg *segments[2]; Short_t trkCandIndex; // ?????????? const HGeomTransform *labTrans[6]; HGeomVector mdcTrackPar[4]; HMdcGetContainers *fGetCont; HMetaMatch *meta; HCategory *fCatTrkCand; HCategory *fCatMetaMatch; HCategory *fCatMdcSeg; HCategory *fCatTof; HCategory *fCatTofCluster; HCategory *fCatShower; HCategory *fCatRich; HCategory *fCatRpcCluster; HMdcKickPlane kickplane; HMdcTrackGSpline *Spline; HIterator *fTrkCandIter; HIterator *IterTof; HIterator *IterTofCluster; HIterator *IterShower; HIterator *IterRich; HIterator *IterRpcCluster; HLocation sectorLoc; HTofGeomPar *fTofGeometry; HShowerGeometry *fShrGeometry; HRpcGeomPar *fRpcGeometry; Int_t nShowerHits[6]; HShowerHit* fShowerHits[6][200]; Short_t indexShrHit[6][200]; Double_t xSegCrShr; // current cross poinr mdc segment with Double_t ySegCrShr; // shower or tof module in coor.sys. of mod. Int_t nTofHits[6]; HGeomVector tofHits[6][200]; Char_t tofModule[6][200]; // Tof module of hit Short_t indexTofHit[6][200]; Char_t tofClustSize[6][200]; // 0 - HTofHit obj., >=1 - HTofCluster Double_t xSegCrTof; // current cross poinr mdc segment with Double_t ySegCrTof; // shower or tof module in coor.sys. of mod. // For each inner MDC segment is filled: Int_t nTrCndForTHit[200]; // Number of trackCands matched to TofHit Int_t nTrCndForSHit[200]; // Number of trackCand matched to ShowerHit Int_t mmTof[200][300]; // index of HMetaMatch obj. for Tof Matching Int_t mmShr[200][300]; // index of HMetaMatch obj. for Shower Matchint Float_t qualTof; // quality of matching Float_t qualShower; // quality of matching Float_t meta_dx; // x-coordinate deviation between META and outer MDC Float_t meta_dy; // y-coordinate deviation between META and outer MDC Int_t sector; // current sector Int_t nShowerHitsSec; // == nShowerHits[sec] for current sector HShowerHit** fShowerHitsSec; // ... Short_t* indexShrHitSec; // ... Int_t nTofHitsSec; // == nTofHits[sec] for current sector HGeomVector* tofHitsSec; // ... Short_t* indexTofHitSec; // ... Char_t* tofClustSizeSec; Char_t* tofModuleSec; const HGeomTransform* secLabTrans; Short_t aRichIndTable[RICH_TAB_SIZE]; Float_t qualRich[RICH_TAB_SIZE]; Int_t nRichId; Float_t rad2deg; HLocation locTofHit; Int_t testIndex; Bool_t isPrint; Bool_t isPrint0; Bool_t stNotMatTracks; // kTRUE - store not matched tracks in cat. public: HMetaMatchF(void); HMetaMatchF(const Text_t *name,const Text_t *title); ~HMetaMatchF(); Int_t execute(); Bool_t init(); Bool_t reinit(); Bool_t finalize(); void storeNotMatchedTracks(Bool_t fl=kTRUE) {stNotMatTracks = fl;} private: void setInitParam(void); void makeRichMatching(void); void collectTofHits(void); void collectShowerHits(void); Bool_t makeOuterSegMatch(HMdcTrkCand* pTrkCand); Int_t fillMeta(Int_t hShower, Int_t hTof, HMetaMatch* metaOld); Int_t getMetaMatchSlot(HMetaMatch* prevMM); Double_t qualityTof(Int_t hit,Float_t& dX_n, Float_t& dY_n); Double_t qualityShower(Int_t hit,Float_t& dX_n, Float_t& dY_n); void setCurrentSector(Int_t sec); void addTofCluster(HTofCluster* pTofCluster); void addTofHit(HTofHit* pTofHit,Int_t clSize=0); void addTof(HTofHit* pTofHit,Int_t index, Int_t clSize); void addRing(Float_t quality, Short_t ind, Short_t* indTable,Int_t& nRich); void fillMetaHitsInd(void); HMetaMatch *getMMObj(Int_t ind); void fillTofClstInd(void); HMetaMatch *setMetaHitsInd(HMetaMatch* pMMatch, Int_t mmFirstInd, Int_t mmInd,Int_t totNTrCnd); void setMatchingParam(void); public: ClassDef(HMetaMatchF,0) }; #endif