ROOT logo
//Task for all Matchings, fills hmetamatch
//*-- Author : Anar Rustamov (27.08.2003)
//*-- Modified : 14/10/2004 by V. Pechenov
//*-- Modified : 07/12/2007 by A. Rustamov
//*-- Modified : 16/12/2009 by V. Pechenov

using namespace std;

#include "hmetamatchF2.h"
#include "hmetamatch2.h"
#include "hevent.h"
#include "hcategory.h"
#include "hiterator.h"
#include "hspectrometer.h"
#include "hruntimedb.h"
#include "hmdcdetector.h"
#include "hspecgeompar.h"
#include "tofdef.h"
#include "richdef.h"
#include "rpcdef.h"
#include "emcdef.h"
#include "hmatrixcategory.h"
#include "hshowergeometry.h"
#include "hgeomtransform.h"
#include "hmdctrackddef.h"
#include "hmdctrackgdef.h"
#include "hmdcseg.h"
#include "hmdctrkcand.h"
#include "hmdctrackgspline.h"
#include "hmdctrackgcorrpar.h"
#include "hshowerhitsim.h"
#include "hemccal.h"
#include "hemccluster.h"
#include "hmdcgetcontainers.h"
#include "htofhit.h"
#include "htofcluster.h"
#include "htofgeompar.h"
#include "hrpcgeompar.h"
#include "hemcgeompar.h"
#include "hgeomcompositevolume.h"
#include "hrichhit.h"
#include "hmetamatchpar.h"
#include "hmdcsizescells.h"
#include "hrpccluster.h"
#include <iostream>

ClassImp(HMetaMatchF2)

Float_t HMetaMatchF2::scaleRpcRMS   [2] = {1.0,1.0};
Float_t HMetaMatchF2::scaleShowerRMS[2] = {1.0,1.0};
Float_t HMetaMatchF2::scaleTofRMS   [2] = {1.0,1.0};
Float_t HMetaMatchF2::scaleEmcRMS   [2] = {1.0,1.0};
Float_t HMetaMatchF2::scaleRpcCut   =1.0;
Float_t HMetaMatchF2::scaleShowerCut=1.0;
Float_t HMetaMatchF2::scaleTofCut   =1.0;
Float_t HMetaMatchF2::scaleEmcCut   =1.0;

HMetaMatchF2::HMetaMatchF2() {
  setInitParam();
}

HMetaMatchF2::HMetaMatchF2(const Text_t *name,const Text_t *title):
  HReconstructor(name,title) {
  setInitParam();
}

void HMetaMatchF2::setInitParam(void) {
  fMatchPar      = NULL;
  fCatTrkCand    = NULL;
  fCatMdcSeg     = NULL;
  fCatRich       = NULL;
  pSpline        = NULL;
  fTrkCandIter   = NULL;
  fTofGeometry   = NULL;
  fCatTof        = NULL;
  iterTof        = NULL;
  fCatTofCluster = NULL;
  iterTofCluster = NULL;
  iterRich       = NULL;
  fTrkCandIter   = NULL;
  fCatShower     = NULL;
  iterShower     = NULL;
  fCatEmc        = NULL;
  fCatEmcCluster = NULL;
  fShrGeometry   = NULL;
  fRpcGeometry   = NULL;
  fEmcGeometry   = NULL;
  fCatRpcCluster = NULL;
  iterRpcCluster = NULL;
  stNotMatTracks = kFALSE;
  sigmaEmc       = 0.;
  
  
  for(Int_t s=0;s<6;s++) labTrans[s]  = NULL;
  for(Int_t i=0;i<9;i++) qual2TofC[i] = 0.f;
  for(Int_t i=0;i<3;i++) indTofC[i]   = -1;
}

HMetaMatchF2::~HMetaMatchF2() {
     HMdcSizesCells::deleteCont();
   //HMdcGetContainers::deleteCont();

  if(fTrkCandIter) {
     delete fTrkCandIter;
     fTrkCandIter=0;
  }
  if(iterRich){
    delete iterRich;
    iterRich=0;
  }
  if(iterTof) {
    delete iterTof;
    iterTof=0;
  }
  if(iterTofCluster) {
    delete iterTofCluster;
    iterTofCluster=0;
  }
  if(iterShower) {
    delete iterShower;
    iterShower=0;
  }
}

Bool_t HMetaMatchF2::init() {
  if (!gHades) return kFALSE;
  HRuntimeDb *rtdb = gHades->getRuntimeDb();
  if(!rtdb) return kFALSE;
  HEvent *event = gHades->getCurrentEvent();
  if(!event) return kFALSE;
  
  HMdcTrackGCorrPar* corr=(HMdcTrackGCorrPar*)(rtdb->getContainer("MdcTrackGCorrPar"));
  if(corr){
      pSpline = corr->getSPline();
  } else {
      Error("init()","ZERO pointer for MdcTrackGCorrPar received!");
      return kFALSE;
  }
  fGetCont    = HMdcGetContainers::getObject();
  pSizesCells = HMdcSizesCells::getObject();
  fGetCont->getMdcGeomPar();  // for spline ???
  fGetCont->getSpecGeomPar(); // for lab-sec. transf
  fCatTrkCand=event->getCategory(catMdcTrkCand);
  if (!fCatTrkCand) {
     Error("init","NO catMdcTrkCand in input! STOP!!!");
     return kFALSE;
  }
  fTrkCandIter=(HIterator*)fCatTrkCand->MakeIterator();
  if(!fTrkCandIter) return kFALSE;
  fCatMdcSeg=event->getCategory(catMdcSeg);

  // TOF:
  fCatTof=event->getCategory(catTofHit);
  if(!fCatTof) Warning("init",
      "No catTofHit in input! \n Matching with TofHits will be skipped!");
  else iterTof=(HIterator*)fCatTof->MakeIterator();
  fCatTofCluster=event->getCategory(catTofCluster);
  if(!fCatTofCluster) {
    Warning("init","NO catTofCluster in input! \n Matching with TofClusters will be skipped!");
  } else iterTofCluster=(HIterator*)fCatTofCluster->MakeIterator();
  if(fCatTof || fCatTofCluster) fTofGeometry=
      (HTofGeomPar *)rtdb->getContainer("TofGeomPar");

  // Shower:
  fCatShower = event->getCategory(catShowerHit);
  if(fCatShower == NULL) {
    Warning("init","NO catShowerHit in input! \n Matching with Shower will be skipped!");
  } else {
    iterShower   = (HIterator*)fCatShower->MakeIterator("native");
    fShrGeometry = (HShowerGeometry*)rtdb->getContainer("ShowerGeometry");
  }
  
  // Emc:
  if(fCatShower == NULL) {
    fCatEmc        = event->getCategory(catEmcCal);
    fCatEmcCluster = event->getCategory(catEmcCluster);
    if(fCatEmc == NULL)        Warning("init","No catEmcCal in input! \n Matching with EmcCal will be skipped!");
    if(fCatEmcCluster == NULL) Warning("init","NO catEmcCluster in input! \n Matching with EmcCluster will be skipped!");
    if(fCatEmc!=NULL || fCatEmcCluster!=NULL) fEmcGeometry = (HEmcGeomPar *)rtdb->getContainer("EmcGeomPar");
  }
  
 
  // RPC:
  fCatRpcCluster = event->getCategory(catRpcCluster);
  if(!fCatRpcCluster) {
    Warning("init","NO catRpcCluster in input! \n Matching with RpcClusters will be skipped!");
  } else {
    iterRpcCluster = (HIterator*)fCatRpcCluster->MakeIterator("native");
    fRpcGeometry   = (HRpcGeomPar*)rtdb->getContainer("RpcGeomPar");
  }
  
  // RICH:
  fCatRich=event->getCategory(catRichHit);
  if(fCatRich) iterRich=(HIterator*)fCatRich->MakeIterator("native");
  else Warning("init","NO RICH catRichHit in input! \n Matching with Rich will be skipped!");

  fCatMetaMatch=event->getCategory(catMetaMatch);
  if(!fCatMetaMatch) {
    Int_t size[2]={6,8000};
    fCatMetaMatch=new HMatrixCategory("HMetaMatch2",2,size,0.5);
    if(fCatMetaMatch)
       event->addCategory(catMetaMatch,fCatMetaMatch,"Tracks");
  }
  fMatchPar=(HMetaMatchPar*)rtdb->getContainer("MetaMatchPar");

  return kTRUE;
}

Bool_t HMetaMatchF2::reinit() {
  if(!pSizesCells->initContainer()) return kFALSE;
  if (pSizesCells->hasChanged()) {
     // Geometry transformation from module to sector coord system for MDCs
     for(Int_t is=0; is<6; is++) {
	HMdcSizesCellsSec& fSCSec = (*pSizesCells)[is];
	if(&fSCSec == 0) continue; // sector is not active
	for(Int_t im=0; im<4; im++) {
	   HMdcSizesCellsMod& fSCMod=fSCSec[im];
	   if (&fSCMod) {
	      const HGeomTransform* tr = fSCMod.getSecTrans();
	      pSpline->takeMiddleParams(tr,is,im);
	   }
	}
     }
  }
  pSpline->initMiddleParamsAll();
  pSpline->setKickPointer(&kickplane);
  for(Int_t s=0; s<6; s++) {
     if(fGetCont->getMdcDetector()->isSectorActive(s)) {
	labTrans[s] = &(fGetCont->getLabTransSec(s));
	if(labTrans[s]==0) return kFALSE;
     } else labTrans[s]=0;
  }
  if(fTofGeometry && !HMdcGetContainers::isInited(fTofGeometry)) return kFALSE;
  if(fShrGeometry && !HMdcGetContainers::isInited(fShrGeometry)) return kFALSE;
  if(fRpcGeometry && !HMdcGetContainers::isInited(fRpcGeometry)) return kFALSE;
  if(fEmcGeometry && !HMdcGetContainers::isInited(fEmcGeometry)) return kFALSE;

  if(fMatchPar==0 || !HMdcGetContainers::isInited(fMatchPar)) {
    Error("reinit","no parameters for matching!");
    return kFALSE;
  }
  setMatchingParam();
  return kTRUE;
}

void HMetaMatchF2::setMatchingParam(void) {
  // Matching parameters.
  for(Int_t s=0;s<6;s++) {
    dThRich[s]            = fabs( fMatchPar->getRichThetaMaxCut(s) -
                                  fMatchPar->getRichThetaMinCut(s) )/2.;
    dPhRich[s]            = fMatchPar->getRichSigmaPhi(s);
    dPhRichOff[s]         = fMatchPar->getRichSigmaPhiOffset(s);
    qualityRichCut[s]     = fMatchPar->getRichQualityCut(s);

    sigma2MdcInRpcX[s]    = fMatchPar->getRpcSigmaXMdc(s)*fMatchPar->getRpcSigmaXMdc(s);
    sigma2MdcInRpcY[s]    = fMatchPar->getRpcSigmaYMdc(s)*fMatchPar->getRpcSigmaYMdc(s);
    sRpcX[s]              = fMatchPar->getRpcSigmaXOffset(s);
    sRpcY[s]              = fMatchPar->getRpcSigmaYOffset(s);
    quality2RPCCut[s]     = fMatchPar->getRpcQualityCut(s)*fMatchPar->getRpcQualityCut(s)*scaleRpcCut*scaleRpcCut;

    sigma2MdcInShrX[s]    = fMatchPar->getShowerSigmaXMdc(s)*fMatchPar->getShowerSigmaXMdc(s);
    sigma2MdcInShrY[s]    = fMatchPar->getShowerSigmaYMdc(s)*fMatchPar->getShowerSigmaYMdc(s);
    sShowerX[s]           = fMatchPar->getShowerSigmaXOffset(s);
    sShowerY[s]           = fMatchPar->getShowerSigmaYOffset(s);
    quality2SHOWERCut[s]  = fMatchPar->getShowerQualityCut(s)*fMatchPar->getShowerQualityCut(s)*scaleShowerCut*scaleShowerCut;

    invSigma2TofX[s]      = 1./( (fMatchPar->getTofSigmaX(s)*scaleTofRMS[0])*(fMatchPar->getTofSigmaX(s)*scaleTofRMS[0]));
    invSigma2TofY[s]      = 1./( (fMatchPar->getTofSigmaY(s)*scaleTofRMS[1])*(fMatchPar->getTofSigmaY(s)*scaleTofRMS[1]));
    sTofX[s]              = fMatchPar->getTofSigmaXOffset(s);
    sTofY[s]              = fMatchPar->getTofSigmaYOffset(s);
    quality2TOFCut[s]     = fMatchPar->getTofQualityCut(s)*fMatchPar->getTofQualityCut(s)*scaleTofCut*scaleTofCut;
    richThetaMinCut[s]    = fMatchPar->getRichThetaMinCut(s);
    richThetaMaxCut[s]    = fMatchPar->getRichThetaMaxCut(s);
    
    sigma2MdcInEmcX[s]    = fMatchPar->getEmcSigmaXMdc(s)*fMatchPar->getEmcSigmaXMdc(s);
    sigma2MdcInEmcY[s]    = fMatchPar->getEmcSigmaYMdc(s)*fMatchPar->getEmcSigmaYMdc(s);
    sEmcX[s]              = fMatchPar->getEmcSigmaXOffset(s);
    sEmcY[s]              = fMatchPar->getEmcSigmaYOffset(s);
    quality2EMCCut[s]     = fMatchPar->getEmcQualityCut(s)*fMatchPar->getEmcQualityCut(s)*scaleEmcCut*scaleEmcCut;
    
    nShowerHits[s]        = 0;
    nEmcHits[s]           = 0;
    sigmaEmc              = 92./TMath::Sqrt(12.);   // 92 mm - size of one cell in X and Y
  }
}

Bool_t HMetaMatchF2::finalize() {
  return kTRUE;
}

Int_t HMetaMatchF2::execute() {
  if(fCatTrkCand->getEntries()<=0) return 0;

  collectRpcClusters();
  if(fCatShower != NULL) collectShowerHits();
  else {
    collectEmcHits();
    collectEmcClusters();
  }
  collectTofHits();

  fTrkCandIter->Reset();
  HMdcTrkCand *pTrkCand=0;
  for(Int_t sec=0;sec<6;sec++) {
    setCurrentSector(sec);
    if(!fTrkCandIter->gotoLocation(sectorLoc)) continue;
    while((pTrkCand=(HMdcTrkCand*)(fTrkCandIter->Next()))!=0) {
      if(pTrkCand->getNCandForSeg1()<0) continue; // This TrkCand was analysed in makeOuterSegMatch
      Int_t index1 = pTrkCand->getSeg1Ind();
      if(index1<0) continue;
      segments[0] = (HMdcSeg*)fCatMdcSeg->getObject(index1);
      if(segments[0] ==  NULL) continue;
      makeRichMatching();                 // MDC-RICH matching
      makeOuterSegMatch(pTrkCand);        //Outer segment matching       
    }
  }
  return 0;
}

void HMetaMatchF2::makeOuterSegMatch(HMdcTrkCand* pTrkCand) {
  // Matching outer mdc segments with meta hits.
  // Inner mdc segment is the same.
  Int_t firstTrkCandIndex = pTrkCand->getFirstCandInd();
  Bool_t isMMatch = kFALSE;
  isPrint = kTRUE;   // For Warning(...,"No slot available...
  Int_t trkCandIndex = -1;
  meta = 0;
  while((trkCandIndex = pTrkCand->getNextCandInd())>=0) {
    pTrkCand = (HMdcTrkCand*)fCatTrkCand->getObject(trkCandIndex);
    // MDC-Meta matching with outer mdc segment:
    meta = 0;
    Int_t index2=pTrkCand->getSeg2Ind();
    if(index2<0) continue;               // It can happen by error only.
    segments[1]=(HMdcSeg*)fCatMdcSeg->getObject(index2);
    if(!segments[1]) continue;           // It can happen by error only.

    if(segments[1]->getHitInd(1)<0)
    {
       pSpline->calcSegPoints123(segments,mdcTrackPar);
       }
       else if(segments[1]->getHitInd(0)<0)
       {
       pSpline->calcSegPoints123P4(segments,mdcTrackPar);
       }
    else
    {
       pSpline->calcSegPoints(segments,mdcTrackPar);
    }
    for(Int_t p=0;p<4;p++) mdcTrackPar[p] *= 10.; // cm => mm
    mdcTrackPar[2] = secLabTrans->transFrom(mdcTrackPar[2]);
    mdcTrackPar[3] = secLabTrans->transFrom(mdcTrackPar[3]);

    nTofMatched = 0;
    for(Int_t nTof=0; nTof<nTofHitsSec;nTof++) {
      Char_t clusSize = tofClustSizeSec[nTof];
      if(clusSize > 2) continue;  // Should never happend

      //Variables to store x/y-deviation of META hit and segment normalized to META resolution

      if(clusSize == 2)      quality2TofClustS2(nTof);
      else if(clusSize == 1) quality2TofClustS1(nTof);
      else                   quality2TofHit(nTof);
    }

    nRpcMatched = 0;
    if(fRpcGeometry && fRpcGeometry->getModule(sector,0)){
	transMdcToMeta(fRpcGeometry->getModule(sector,0)->getLabTransform());
	for(Int_t nRpc=0; nRpc<nRpcClustersSec;nRpc++) {
	    Float_t qual2 = quality2Rpc(fRpcClustersSec[nRpc]);
	    if(qual2>quality2RPCCut[sector]) continue;
	    insertQual(qual2,fRpcClustersSec[nRpc]->getIndex(),nRpcMatched,qual2RpcAr,rpcInd);
	}
    }
    
    nShrMatched = 0;
    if(fShrGeometry != NULL) {
      transMdcToMeta(fShrGeometry->getTransform(sector,0)); // Module 0 only!
      for(Int_t nSh=0; nSh<nShowerHitsSec;nSh++) {
        Float_t qual2 = quality2Shower(fShowerHitsSec[nSh]);
        if(qual2>quality2SHOWERCut[sector]) continue;
        insertQual(qual2,indexShrHitSec[nSh],nShrMatched,qual2ShrAr,shrInd);
      }
    }
    
    nEmcMatched     = 0;
    nEmcClusMatched = 0;
    if(fEmcGeometry != NULL) {
      HModGeomPar *pmodgeom = fEmcGeometry->getModule(sector);
      transMdcToMeta(pmodgeom->getLabTransform()); // Module 0 only!
      Double_t zp1    = p1SegInMod.getZ(); //-zEmc;  zEmc=0
      Double_t zp2    = p2SegInMod.getZ(); //-zEmc;  zEmc=0
      Double_t xSegCr = (zp1*p2SegInMod.getX()-p1SegInMod.getX()*zp2)*invDZ; // invDZ = 1./(zp1-zp2);
      Double_t ySegCr = (zp1*p2SegInMod.getY()-p1SegInMod.getY()*zp2)*invDZ;
      for(Int_t nEmc=0; nEmc<nEmcHitsSec;nEmc++) {
        Float_t qual2 = quality2Emc(fEmcHitsSec[nEmc],pmodgeom,xSegCr,ySegCr);
        if(qual2>quality2EMCCut[sector]) continue; //??????????????????????????????
        insertQual(qual2,indexEmcHitSec[nEmc],nEmcMatched,qual2EmcAr,emcInd);
        Short_t status = fEmcHitsSec[nEmc]->getStatus();
        if(status >= 0) fEmcHitsSec[nEmc]->setStatus(++status);
      }
      for(Int_t nEmc=0; nEmc<nEmcClusSec;nEmc++) {
        Float_t qual2 = quality2EmcClus(fEmcClusSec[nEmc],xSegCr,ySegCr);
        if(qual2>quality2EMCCut[sector]) continue; //??????????????????????????????
        emcPath = emcCellPath(fEmcClusSec[nEmc],pmodgeom,xSegCr,ySegCr);
        insertQualEmcCl(qual2,indexEmcClusSec[nEmc],nEmcClusMatched,qual2EmcClusAr,emcClusInd);
      }
    }

    if(nRpcMatched>0 || nShrMatched>0 || nTofMatched>0 || nEmcClusMatched>0) {  // Is matching:
	isMMatch = kTRUE;
      if(getMetaMatchSlot(trkCandIndex)) {
        if(nRpcMatched>0) meta->setRpcClstMMF(nRpcMatched,rpcInd,qual2RpcAr);
        if(nShrMatched>0) meta->setShrHitMMF(nShrMatched,shrInd,qual2ShrAr);
        else if(nEmcClusMatched>0) meta->setEmcClstMMF(nEmcClusMatched,emcClusInd,qual2EmcClusAr);    
        if(nTofMatched>0) meta->setTofClstMMF(nTofMatched,tofInd,qual2TofAr);
      }
    } else if(stNotMatTracks) {                            // No matching:
	if(getMetaMatchSlot(trkCandIndex)) isMMatch = kTRUE;
    }
    if(meta){
	if(pTrkCand ) {
	    meta->setInnerFake(pTrkCand->isSeg1Fake());
	    meta->setOuterFake(pTrkCand->isSeg2Fake());
	}
    }


  }
  
  // No outer segment or no matching (meta!=0 if stNotMatTracks=kTRUE):
  if(!isMMatch && meta==0) {
      getMetaMatchSlot(firstTrkCandIndex);
      if(fCatTrkCand && meta) {
	  HMdcTrkCand* trk=(HMdcTrkCand*)fCatTrkCand->getObject(firstTrkCandIndex);
	  if(trk) {
	      meta->setInnerFake(trk->isSeg1Fake());
	      meta->setOuterFake(trk->isSeg2Fake());
	  }
      }
  }
}

void HMetaMatchF2::transMdcToMeta(const HGeomTransform& modSys) {
  p1SegInMod = modSys.transTo(mdcTrackPar[2]);
  p2SegInMod = modSys.transTo(mdcTrackPar[3]);
  invDZ      = 1./(p1SegInMod.Z()-p2SegInMod.Z());
}

void HMetaMatchF2::insertQual(Float_t qual,Short_t ind,UChar_t& nEl,Float_t qualArr[][3],Short_t indArr[]) {
  Int_t nt = nEl;
  if(nt == MMF_BUF) {
    nt--;
    if(qual>=qualArr[nt][0]) return;
  } else nEl++;    // Counter increasing (if nEl<MMF_BUF).
  if(nt>0) {
    for(Int_t ns=nt-1;nt>0;nt--,ns--) {
      if(qual>=qualArr[ns][0]) break;
      for(Int_t i=0;i<3;i++) qualArr[nt][i] = qualArr[ns][i];
      indArr[nt] = indArr[ns];
    }
  }
  indArr[nt]     = ind;
  qualArr[nt][0] = qual;
  qualArr[nt][1] = dX;
  qualArr[nt][2] = dY;
}

void HMetaMatchF2::insertQualEmcCl(Float_t qual,Short_t ind,UChar_t& nEl,Float_t qualArr[][4],Short_t indArr[]) {
  Int_t nt = nEl;
  if(nt == MMF_BUF) {
    nt--;
    if(qual>=qualArr[nt][0]) return;
  } else nEl++;    // Counter increasing (if nEl<MMF_BUF).
  if(nt>0) {
    for(Int_t ns=nt-1;nt>0;nt--,ns--) {
      if(qual>=qualArr[ns][0]) break;
      for(Int_t i=0;i<4;i++) qualArr[nt][i] = qualArr[ns][i];
      indArr[nt] = indArr[ns];
    }
  }
  indArr[nt]     = ind;
  qualArr[nt][0] = qual;
  qualArr[nt][1] = dX;
  qualArr[nt][2] = dY;
  qualArr[nt][3] = emcPath;
}

void HMetaMatchF2::insertQualTof(Float_t qual) {
  Int_t nt = nTofMatched;
  if(nt == MMF_BUF) {
    nt--;
    if(qual>=qual2TofBestAr[nt]) return;
  } else nTofMatched++;
  if(nt>0) for(Int_t ns=nt-1;nt>0;nt--,ns--) {
    if(qual>=qual2TofBestAr[ns]) break;
    qual2TofBestAr[nt] = qual2TofBestAr[ns];
    for(Int_t i=0;i<9;i++) qual2TofAr[nt][i] = qual2TofAr[ns][i];
    for(Int_t j=0;j<3;j++) tofInd[nt][j]     = tofInd[ns][j];
  }
  
  qual2TofBestAr[nt] = qual;
  for(Int_t i=0;i<9;i++) qual2TofAr[nt][i] = qual2TofC[i];
  for(Int_t j=0;j<3;j++) tofInd[nt][j]     = indTofC[j];
}

Bool_t HMetaMatchF2::getMetaMatchSlot(Int_t trCandInd) {
  Int_t metaIndex = -1;
  HMetaMatch2 *metaNew=(HMetaMatch2*)fCatMetaMatch->getNewSlot(sectorLoc,&metaIndex);
  if(metaNew == NULL) { 
    if(isPrint) {
      Warning("getMetaMatchSlot","No slot available in sector %i. size of catMetaMatch is %i!",
              sectorLoc[0]+1,fCatMetaMatch->getEntries());
      isPrint = kFALSE;
    }
    return kFALSE;
  }
  meta = new(metaNew) HMetaMatch2(sector,trCandInd,metaIndex);
  
  HMdcTrkCand* pTrkCand = (HMdcTrkCand*)fCatTrkCand->getObject(trCandInd);
  if(pTrkCand) pTrkCand->setMetaMatchInd(metaIndex);
  // Filling MDC-RICH matching result:
  if( nRichId > 0) {
    if(nRichId>3) nRichId=3;
    meta->setNCandForRich(nRichId);
    for(UChar_t i = 0; i < nRichId; i++) meta->setRichInd(i,richInd[i]);
  }
  return kTRUE;
}

Bool_t HMetaMatchF2::quality2TofHit(Int_t hit) {
  // Calc. quality for one cell HTofCluster or HTofHit
  HGeomTransform &tofModSys =
      fTofGeometry->getModule(sector,tofModuleSec[hit])->getLabTransform();
  HGeomVector p1 = tofModSys.transTo(mdcTrackPar[2]);
  HGeomVector p2 = tofModSys.transTo(mdcTrackPar[3]);
  
  Float_t xSeg  = (p1(2)*p2(0)-p1(0)*p2(2))/(p1(2)-p2(2));
  Float_t ySeg  = (p1(2)*p2(1)-p1(1)*p2(2))/(p1(2)-p2(2));
  Float_t dX    = tofHitsSec[hit].getX()-xSeg-sTofX[sector];
  Float_t dY    = tofHitsSec[hit].getY()-ySeg-sTofY[sector];
  Float_t qual2 = dX*dX*invSigma2TofX[sector] + dY*dY*invSigma2TofY[sector];

  if(qual2 < quality2TOFCut[sector]) { // Is matching:
    indTofC[1]   = indexTofHitSec[hit];  
    qual2TofC[3] = qual2;
    qual2TofC[4] = dX;
    qual2TofC[5] = dY;
    insertQualTof(qual2);
    
    // Clean arrays:
    for(Int_t i=3;i<6;i++) qual2TofC[i] = 0.f;
    indTofC[1] = -1;
    return kTRUE;
  }
  return kFALSE;         // No matching
}

Bool_t HMetaMatchF2::quality2TofClustS1(Int_t hit) {
  // Calc. quality for one cell HTofCluster object
  HGeomTransform &tofModSys =
      fTofGeometry->getModule(sector,tofModuleSec[hit])->getLabTransform();
  HGeomVector p1 = tofModSys.transTo(mdcTrackPar[2]);
  HGeomVector p2 = tofModSys.transTo(mdcTrackPar[3]);
  
  Float_t xSeg  = (p1(2)*p2(0)-p1(0)*p2(2))/(p1(2)-p2(2));
  Float_t ySeg  = (p1(2)*p2(1)-p1(1)*p2(2))/(p1(2)-p2(2));
  Float_t dX    = tofHitsSec[hit].getX()-xSeg-sTofX[sector];
  Float_t dY    = tofHitsSec[hit].getY()-ySeg-sTofY[sector];
  Float_t qual2 = dX*dX*invSigma2TofX[sector] + dY*dY*invSigma2TofY[sector];

  if(qual2 < quality2TOFCut[sector]) { // Is matching: 
    indTofC[0]   = indexTofHitSec[hit];
    qual2TofC[0] = qual2;
    qual2TofC[1] = dX;
    qual2TofC[2] = dY;
    insertQualTof(qual2);
    // Clean arrays:
    for(Int_t i=0;i<3;i++) qual2TofC[i] = 0.f;
    indTofC[0] = -1;
    return kTRUE;
  }
  return kFALSE;         // No matching
}

Bool_t HMetaMatchF2::quality2TofClustS2(Int_t& hit) {
  // Calc. quality for cluster (size=2) and two cells in from this cluster
  // Return best quality value for matching with cluster, cell1 and cell2
  Float_t bestQual2 = -1.f;
  Char_t clusMod = tofModuleSec[hit];
  HGeomTransform &tofModSys = fTofGeometry->getModule(sector,clusMod)->getLabTransform();
  HGeomVector p1  = tofModSys.transTo(mdcTrackPar[2]);
  HGeomVector p2  = tofModSys.transTo(mdcTrackPar[3]);
  Float_t xSeg  = (p1(2)*p2(0)-p1(0)*p2(2))/(p1(2)-p2(2));
  Float_t ySeg  = (p1(2)*p2(1)-p1(1)*p2(2))/(p1(2)-p2(2));
  Float_t dX    = tofHitsSec[hit].getX()-xSeg-sTofX[sector];
  Float_t dY    = tofHitsSec[hit].getY()-ySeg-sTofY[sector];
  Float_t qual2 = dX*dX*invSigma2TofX[sector] + dY*dY*invSigma2TofY[sector];
  if(qual2 < quality2TOFCut[sector]) {
    indTofC[0]   = indexTofHitSec[hit];
    qual2TofC[0] = qual2;
    qual2TofC[1] = dX;
    qual2TofC[2] = dY;
    bestQual2    = qual2;
  }
  
  // First cell in cluster (cluster module == firts cell module):
  hit++;
  dX    = tofHitsSec[hit].getX()-xSeg-sTofX[sector];
  dY    = tofHitsSec[hit].getY()-ySeg-sTofY[sector];
  qual2 = dX*dX*invSigma2TofX[sector] + dY*dY*invSigma2TofY[sector];
  if(qual2 < quality2TOFCut[sector]) {
    indTofC[1]   = indexTofHitSec[hit];
    qual2TofC[3] = qual2;
    qual2TofC[4] = dX;
    qual2TofC[5] = dY;
    if(bestQual2<0. || bestQual2>qual2) bestQual2 = qual2;
  }
  
  // Secont cell in cluster (cluster module can be != firts cell module):
  hit++;
  if(clusMod != tofModuleSec[hit]) {
    HGeomTransform &tofModSys =
        fTofGeometry->getModule(sector,tofModuleSec[hit])->getLabTransform();
    p1     = tofModSys.transTo(mdcTrackPar[2]);
    p2     = tofModSys.transTo(mdcTrackPar[3]);
    xSeg = (p1(2)*p2(0)-p1(0)*p2(2))/(p1(2)-p2(2));
    ySeg = (p1(2)*p2(1)-p1(1)*p2(2))/(p1(2)-p2(2)); 
  }
  dX    = tofHitsSec[hit].getX()-xSeg-sTofX[sector];
  dY    = tofHitsSec[hit].getY()-ySeg-sTofY[sector];
  qual2 = dX*dX*invSigma2TofX[sector] + dY*dY*invSigma2TofY[sector];
  if(qual2 < quality2TOFCut[sector]) {
    indTofC[2]   = indexTofHitSec[hit]; 
    qual2TofC[6] = qual2;
    qual2TofC[7] = dX;
    qual2TofC[8] = dY;
    if(bestQual2<0.f || bestQual2>qual2) bestQual2 = qual2;
  }
  if(bestQual2>=0.f) {  // Is matching:
    insertQualTof(bestQual2);
    // Clean arrays:
    for(Int_t i=0;i<9;i++) qual2TofC[i] = 0.f;
    for(Int_t i=0;i<3;i++) indTofC[i]   = -1;
    return kTRUE;
  }
  return kFALSE;         // No matching
}

Float_t HMetaMatchF2::quality2Rpc(HRpcCluster* pRpcCl)  {
  Double_t zRpc   = pRpcCl->getZMod();      // Zmod can be not eq.0 !
  Double_t zp1    = p1SegInMod.getZ()-zRpc;
  Double_t zp2    = p2SegInMod.getZ()-zRpc;
  Float_t  xSegCr = (zp1*p2SegInMod.getX()-p1SegInMod.getX()*zp2)*invDZ; // invDZ = 1./(zp1-zp2);
  Float_t  ySegCr = (zp1*p2SegInMod.getY()-p1SegInMod.getY()*zp2)*invDZ;
  dX              = pRpcCl->getXMod() - xSegCr - sRpcX[sector];
  dY              = pRpcCl->getYMod() - ySegCr - sRpcY[sector];
  Float_t  dXrms2 = pRpcCl->getXRMS() * scaleRpcRMS[0];
  dXrms2          = dXrms2*dXrms2 + sigma2MdcInRpcX[sector];
  Float_t  dYrms2 = pRpcCl->getYRMS() * scaleRpcRMS[1];
  dYrms2          = dYrms2*dYrms2 + sigma2MdcInRpcY[sector];
  return dX*dX/dXrms2 + dY*dY/dYrms2;
}

Float_t HMetaMatchF2::quality2Shower(HShowerHit* pShrHit)  {
  Float_t xShr, yShr; 
  pShrHit->getXY(&xShr, &yShr);
  Double_t zShr   = pShrHit->getZ(); // Zmod can be not eq.0 !
  Double_t zp1    = p1SegInMod.getZ()-zShr;
  Double_t zp2    = p2SegInMod.getZ()-zShr;
  Float_t  xSegCr = (zp1*p2SegInMod.getX()-p1SegInMod.getX()*zp2)*invDZ; // invDZ = 1./(zp1-zp2);
  Float_t  ySegCr = (zp1*p2SegInMod.getY()-p1SegInMod.getY()*zp2)*invDZ; 
  dX              = xShr-xSegCr-sShowerX[sector];
  dY              = yShr-ySegCr-sShowerY[sector];
  Float_t  dXsig2 = pShrHit->getSigmaX() * scaleShowerRMS[0];
  dXsig2          = dXsig2*dXsig2 + sigma2MdcInShrX[sector];
  Float_t  dYsig2 = pShrHit->getSigmaY() * scaleShowerRMS[1];
  dYsig2          = dYsig2*dYsig2 + sigma2MdcInShrY[sector];
  return dX*dX/dXsig2 + dY*dY/dYsig2;
}

Float_t HMetaMatchF2::quality2Emc(HEmcCal* pEmcHit,HModGeomPar *pmodgeom,Double_t xSegCr,Double_t ySegCr)  {
  HGeomVolume* fVol = pmodgeom->getRefVolume()->getComponent(pEmcHit->getCell());
  const HGeomVector& pos  = fVol->getTransform().getTransVector();
  Double_t xEmc   = pos.getX();
  Double_t yEmc   = pos.getY();
  dX              = xEmc-xSegCr-sEmcX[sector];
  dY              = yEmc-ySegCr-sEmcY[sector];
  Float_t  dXsig2 = sigmaEmc * scaleEmcRMS[0];
  dXsig2          = dXsig2*dXsig2 + sigma2MdcInEmcX[sector];
  Float_t  dYsig2 = sigmaEmc * scaleEmcRMS[1];
  dYsig2          = dYsig2*dYsig2 + sigma2MdcInEmcY[sector];
  return dX*dX/dXsig2 + dY*dY/dYsig2;
}

Float_t HMetaMatchF2::quality2EmcClus(HEmcCluster* pEmcClus,Double_t xSegCr,Double_t ySegCr)  {
  Double_t xEmc   = pEmcClus->getXMod();
  Double_t yEmc   = pEmcClus->getYMod();
  dX              = xEmc-xSegCr-sEmcX[sector];
  dY              = yEmc-ySegCr-sEmcY[sector];
  Float_t  dXsig2 = sigmaEmc * scaleEmcRMS[0];
  dXsig2          = pEmcClus->getSigmaXMod()*pEmcClus->getSigmaXMod() + sigma2MdcInEmcX[sector];
  Float_t  dYsig2 = sigmaEmc * scaleEmcRMS[1];
  dYsig2          = pEmcClus->getSigmaYMod()*pEmcClus->getSigmaYMod() + sigma2MdcInEmcY[sector];
  return dX*dX/dXsig2 + dY*dY/dYsig2;
}

Float_t HMetaMatchF2::emcCellPath(HEmcCluster* pEmcClus,HModGeomPar *pmodgeom,Double_t xSegCr,Double_t ySegCr)  {
  HGeomVolume* fVol = pmodgeom->getRefVolume()->getComponent(pEmcClus->getCell());
  const HGeomVector& pos  = fVol->getTransform().getTransVector();
  Double_t xEmc      = pos.getX();
  Double_t yEmc      = pos.getY();
  Double_t zCellEnd  = fVol->getPoint(4)->getZ();
  Double_t dXcell    = TMath::Abs(fVol->getPoint(4)->getX());
  Double_t dYcell    = TMath::Abs(fVol->getPoint(4)->getY());
  Double_t zp1e      = p1SegInMod.getZ()-zCellEnd; //-zEmc;  zEmc=0
  Double_t zp2e      = p2SegInMod.getZ()-zCellEnd; //-zEmc;  zEmc=0
  Double_t xSegCrEnd = (zp1e*p2SegInMod.getX()-p1SegInMod.getX()*zp2e)*invDZ; // invDZ = 1./(zp1-zp2);
  Double_t ySegCrEnd = (zp1e*p2SegInMod.getY()-p1SegInMod.getY()*zp2e)*invDZ;
  
  Double_t xDir = xSegCrEnd - xSegCr;
  Double_t yDir = ySegCrEnd - ySegCr;
  Double_t zDir = zCellEnd;
  Double_t x1   = xEmc-dXcell;
  Double_t x2   = xEmc+dXcell;
  Double_t y1   = yEmc-dYcell;
  Double_t y2   = yEmc+dYcell;
  
  Bool_t inWin1 = xSegCr   >x1 && xSegCr   <x2 && ySegCr   >y1 && ySegCr   <y2;
  Bool_t inWin2 = xSegCrEnd>x1 && xSegCrEnd<x2 && ySegCrEnd>y1 && ySegCrEnd<y2;

  Int_t ncr = 0;
  HGeomVector cr[4];
  if(inWin1) {
    cr[0].setXYZ(xSegCr,ySegCr,0);
    ncr = 1;
  }
  if(inWin2) {
    cr[ncr].setXYZ(xSegCrEnd,ySegCrEnd,zCellEnd);
    ncr++;
  }
  if(ncr < 2) {
    if(yDir != 0.) {
      Double_t v   = (y2 - ySegCr)/yDir;
      Double_t xCr = v*xDir + xSegCr; // intersection with upper cell side
      Double_t zCr = v*zDir;          // intersection with upper cell side
      if(xCr>x1 && xCr<x2 && zCr>0 && zCr<zCellEnd) {
        cr[ncr].setXYZ(xCr,y2,zCr);
        ncr++;
      }
      v   = (y1 - ySegCr)/yDir;
      xCr = v*xDir + xSegCr; // intersection with down cell side
      zCr = v*zDir;          // intersection with down cell side
      if(xCr>x1 && xCr<x2 && zCr>0 && zCr<zCellEnd) {
        cr[ncr].setXYZ(xCr,y1,zCr);
        ncr++;
      }
    }
    if(ncr<2 && xDir != 0.) {
      Double_t v = (x2 - xSegCr)/xDir;
      Double_t yCr = v*yDir + ySegCr; // intersection with left cell side
      Double_t zCr = v*zDir;          // intersection with left cell side
      if(yCr>y1 && yCr<y2 && zCr>0 && zCr<zCellEnd) {
        cr[ncr].setXYZ(x1,yCr,zCr);
        ncr++;
      }
      v = (x1 - xSegCr)/xDir;
      yCr = v*yDir + ySegCr; // intersection with right cell side
      zCr = v*zDir;          // intersection with right cell side
      if(yCr>y1 && yCr<y2 && zCr>0 && zCr<zCellEnd) {
        cr[ncr].setXYZ(x2,yCr,zCr);
        ncr++;
      }
    }
  }
  if(ncr<2) return -100.;
  return (cr[1]-cr[0]).length();
}

void HMetaMatchF2::collectTofHits(void) {
  if(fCatTof) iterTof->Reset();
  HTofHit *pTofHit;
  for(Int_t s=0;s<6;s++) nTofHits[s]=0;
  if(!fCatTofCluster) {
    // No TofCluster category:
    if(fCatTof) while((pTofHit=(HTofHit*)(iterTof->Next()))!=0 ) addTofHit(pTofHit,0);
  } else {
    // TofCluster category exist:
    iterTofCluster->Reset();
    HTofCluster *pTofCluster;
    while((pTofCluster=(HTofCluster*)(iterTofCluster->Next()))!=0 ) {
      Int_t tofClSize = pTofCluster->getClusterSize();
      if(tofClSize>2) continue;                  // tofClSize<=2 only !
      addTofCluster(pTofCluster);
      if(tofClSize<2) continue;
      if(fCatTof==0) continue;
      Int_t sec  = pTofCluster->getSector();
      Int_t mod  = pTofCluster->getModule();
      Int_t cell = pTofCluster->getCell();
      while((pTofHit=(HTofHit*)(iterTof->Next()))!=0 ) {
        if(sec!=pTofHit->getSector() || mod!=pTofHit->getModule() ||
                                        cell!=pTofHit->getCell()) continue;
        if(tofClSize==2) {  // two TofHits adding, tofClSize==2 only !
          addTofHit(pTofHit,0);                  // first TofHit for TofCluster
          pTofHit = (HTofHit*)(iterTof->Next());   // second ...
          addTofHit(pTofHit,0);                  // clust.size==2 selected !!!
        } else {            // tofClSize>2 only HTofHits can be used
          addTofHit(pTofHit,-1);
          for(Int_t h=0;h<tofClSize-1;h++) {
            pTofHit=(HTofHit*)(iterTof->Next());
            addTofHit(pTofHit,-1);
          }
        }
        break;
      }
    }
  }
}

void HMetaMatchF2::addTofCluster(HTofCluster* pTofCluster) {
  addTof(pTofCluster,fCatTofCluster->getIndex(pTofCluster),
      pTofCluster->getClusterSize());
}

void HMetaMatchF2::addTofHit(HTofHit* pTofHit,Int_t clSize) {
  if(pTofHit==0) Error("addTofHit"," Pointer to HTofHit == 0 !");
  else addTof(pTofHit,fCatTof->getIndex(pTofHit),clSize);
}

void HMetaMatchF2::addTof(HTofHit* pTofHit,Int_t index, Int_t clSize) {
  Int_t sec = pTofHit->getSector();
  Int_t &nTofHSec = nTofHits[sec];
  if(nTofHSec>=100) {
    Error("addTof","Sector %i. Number of HTofCluster+HTofHit objects >100 !!!",sec+1);
    return;
  }
  Float_t Xtof,Ytof,Ztof;
  pTofHit->getXYZLab(Xtof,Ytof,Ztof);
  HGeomVector& point = tofHits[sec][nTofHSec];
  point.setXYZ(Xtof,Ytof,Ztof);
  HModGeomPar *module=fTofGeometry->getModule(sec,pTofHit->getModule());
  if(module==0) {
    Error("addTof"," Can't get transformation for tof. %i sec. %imod",
        sec,pTofHit->getModule());
    return;
  }
  HGeomTransform &trans = module->getLabTransform();
  point = trans.transTo(point);    // transformation to coor.sys. of tof module

  indexTofHit[sec][nTofHSec]  = index;
  tofClustSize[sec][nTofHSec] = clSize;
  tofModule[sec][nTofHSec]    = pTofHit->getModule();
  if(nTofHSec<100) nTofHSec++;
}

void HMetaMatchF2::collectRpcClusters(void) {
  for(Int_t s=0;s<6;s++) nRpcClusters[s] = 0;
  if(!fCatRpcCluster) return;
  iterRpcCluster->Reset();
  HRpcCluster *pRpcCluster;
  while((pRpcCluster = (HRpcCluster*)(iterRpcCluster->Next()))!=0) {
    Int_t sec = pRpcCluster->getSector();
    if(nRpcClusters[sec]>=200) {
      Error("collectRpcClusters","Sector %i. Number of HRpcCluster objects >200 !!!",sec+1);
      continue;
    }
    fRpcClusters[sec][nRpcClusters[sec]] = pRpcCluster;
    nRpcClusters[sec]++;
  }
}

void HMetaMatchF2::collectShowerHits(void) {
  for(Int_t s=0;s<6;s++) nShowerHits[s]=0;
  if(fCatShower == NULL) return;
  iterShower->Reset();
  HShowerHit *pShowerHit;
  while((pShowerHit = (HShowerHit*)(iterShower->Next()))!=0) {
    if(pShowerHit->getModule() != 0) continue;     // Module 0 only !!!
    Int_t sec = pShowerHit->getSector();
    if(nShowerHits[sec]>=200) {
      Error("collectShowerHits","Sector %i. Number of HShowerHit objects >200 !!!",sec+1);
      continue;
    }
    fShowerHits[sec][nShowerHits[sec]] = pShowerHit;
    indexShrHit[sec][nShowerHits[sec]] = fCatShower->getIndex(pShowerHit);
    nShowerHits[sec]++;
  }
}

void HMetaMatchF2::collectEmcHits(void) {
  for(Int_t s=0;s<6;s++) nEmcHits[s]=0;
  if(fCatEmc == NULL) return;
  Int_t ncals = fCatEmc->getEntries();
  for(Int_t ind=0;ind<ncals;ind++) {
    HEmcCal *pEmcCal = (HEmcCal*)fCatEmc->getObject(ind);
    if(pEmcCal->getStatus() < 0) continue;              // Energy < energyCut for sim.data
    Int_t sec = pEmcCal->getSector();
    fEmcHits[sec][nEmcHits[sec]]        = pEmcCal;
    indexEmcHit[sec][nEmcHits[sec]]     = ind;
    nEmcHits[sec]++;
  }
}

void HMetaMatchF2::collectEmcClusters(void) {
  for(Int_t s=0;s<6;s++) nEmcClusters[s]=0;
  if(fCatEmcCluster == NULL) return;
  Int_t nclus = fCatEmcCluster->getEntries();
  for(Int_t ind=0;ind<nclus;ind++) {
    HEmcCluster *pEmcCluster = (HEmcCluster*)fCatEmcCluster->getObject(ind);
    if( !pEmcCluster->ifActive() ) continue;              // Bad cluster
    Int_t sec = pEmcCluster->getSector();
    fEmcCluster[sec][nEmcClusters[sec]]     = pEmcCluster;
    indexEmcCluster[sec][nEmcClusters[sec]] = ind;
    nEmcClusters[sec]++;
  }
}

void HMetaMatchF2::makeRichMatching(void) {
  
  Float_t mdcPhi    = segments[0]->getPhi()*TMath::RadToDeg() + (sector!=5 ? sector*60.:-60.);
  Float_t mdcTheta  = segments[0]->getTheta()*TMath::RadToDeg();
  Float_t sinMTheta = TMath::Sin(segments[0]->getTheta());
  
  // Matching with HRichHit's:
  nRichId = 0;
  if(fCatRich) {
    HRichHit* pRichHit;
    iterRich->Reset();
    while((pRichHit=(HRichHit*)(iterRich->Next()))!=0) {
      if(pRichHit->getSector() != sector) continue;
      Float_t dTheta  = pRichHit->getTheta()-mdcTheta;
      if(dTheta<richThetaMinCut[sector] || dTheta>richThetaMaxCut[sector]) continue;
      Float_t qualPhi = pRichHit->getPhi() - mdcPhi - dPhRichOff[sector];
      qualPhi = TMath::Abs(qualPhi *sinMTheta/dPhRich[sector]);
      if(qualPhi>qualityRichCut[sector]) continue;
      Short_t ind=fCatRich->getIndex(pRichHit);
      addRing(qualPhi,ind,richInd, nRichId);
    }
  }
}

void HMetaMatchF2::addRing(Float_t quality, Short_t ind,Short_t* indTable,UChar_t& nRich) {
  // Adding matched ring in sorted list
  if(nRich==0 || quality>=qualRich[nRich-1]) {
    // if ring is first in the list or ring must be added to the end of list:
    if(nRich>=RICH_BUF) return;
    indTable[nRich] = ind;
    qualRich[nRich] = quality;
    nRich++;
  } else {
    // if ring must be inserted in list:
    for(Int_t i=0;i<nRich;i++) {
      if(quality>=qualRich[i]) continue;
      if(nRich<RICH_BUF) nRich++;
      for(Int_t ish=nRich-1;ish>i;ish--) {  // Shift of rings in list
        indTable[ish]=indTable[ish-1];      // ...
        qualRich[ish]=qualRich[ish-1];      // ...
      }
      indTable[i]=ind;                      // Inserting ring in list
      qualRich[i]=quality;                  // ...
      return;
    }
  }
}

void HMetaMatchF2::setCurrentSector(Int_t sec) {
  sector          = sec;
  sectorLoc.set(1,sector);
  secLabTrans     = labTrans[sector];

  nRpcClustersSec = nRpcClusters[sector];
  fRpcClustersSec = fRpcClusters[sector];
  
  nShowerHitsSec  = nShowerHits[sector];
  indexShrHitSec  = indexShrHit[sector];
  fShowerHitsSec  = fShowerHits[sector];
  
  nEmcHitsSec     = nEmcHits[sector];
  indexEmcHitSec  = indexEmcHit[sector];
  fEmcHitsSec     = fEmcHits[sector];
  nEmcClusSec     = nEmcClusters[sector];
  indexEmcClusSec = indexEmcCluster[sector];
  fEmcClusSec     = fEmcCluster[sector];
  
  nTofHitsSec     = nTofHits[sector];
  tofHitsSec      = tofHits[sector];
  indexTofHitSec  = indexTofHit[sector];
  tofModuleSec    = tofModule[sector];

  tofClustSizeSec = tofClustSize[sector];
}
 hmetamatchF2.cc:1
 hmetamatchF2.cc:2
 hmetamatchF2.cc:3
 hmetamatchF2.cc:4
 hmetamatchF2.cc:5
 hmetamatchF2.cc:6
 hmetamatchF2.cc:7
 hmetamatchF2.cc:8
 hmetamatchF2.cc:9
 hmetamatchF2.cc:10
 hmetamatchF2.cc:11
 hmetamatchF2.cc:12
 hmetamatchF2.cc:13
 hmetamatchF2.cc:14
 hmetamatchF2.cc:15
 hmetamatchF2.cc:16
 hmetamatchF2.cc:17
 hmetamatchF2.cc:18
 hmetamatchF2.cc:19
 hmetamatchF2.cc:20
 hmetamatchF2.cc:21
 hmetamatchF2.cc:22
 hmetamatchF2.cc:23
 hmetamatchF2.cc:24
 hmetamatchF2.cc:25
 hmetamatchF2.cc:26
 hmetamatchF2.cc:27
 hmetamatchF2.cc:28
 hmetamatchF2.cc:29
 hmetamatchF2.cc:30
 hmetamatchF2.cc:31
 hmetamatchF2.cc:32
 hmetamatchF2.cc:33
 hmetamatchF2.cc:34
 hmetamatchF2.cc:35
 hmetamatchF2.cc:36
 hmetamatchF2.cc:37
 hmetamatchF2.cc:38
 hmetamatchF2.cc:39
 hmetamatchF2.cc:40
 hmetamatchF2.cc:41
 hmetamatchF2.cc:42
 hmetamatchF2.cc:43
 hmetamatchF2.cc:44
 hmetamatchF2.cc:45
 hmetamatchF2.cc:46
 hmetamatchF2.cc:47
 hmetamatchF2.cc:48
 hmetamatchF2.cc:49
 hmetamatchF2.cc:50
 hmetamatchF2.cc:51
 hmetamatchF2.cc:52
 hmetamatchF2.cc:53
 hmetamatchF2.cc:54
 hmetamatchF2.cc:55
 hmetamatchF2.cc:56
 hmetamatchF2.cc:57
 hmetamatchF2.cc:58
 hmetamatchF2.cc:59
 hmetamatchF2.cc:60
 hmetamatchF2.cc:61
 hmetamatchF2.cc:62
 hmetamatchF2.cc:63
 hmetamatchF2.cc:64
 hmetamatchF2.cc:65
 hmetamatchF2.cc:66
 hmetamatchF2.cc:67
 hmetamatchF2.cc:68
 hmetamatchF2.cc:69
 hmetamatchF2.cc:70
 hmetamatchF2.cc:71
 hmetamatchF2.cc:72
 hmetamatchF2.cc:73
 hmetamatchF2.cc:74
 hmetamatchF2.cc:75
 hmetamatchF2.cc:76
 hmetamatchF2.cc:77
 hmetamatchF2.cc:78
 hmetamatchF2.cc:79
 hmetamatchF2.cc:80
 hmetamatchF2.cc:81
 hmetamatchF2.cc:82
 hmetamatchF2.cc:83
 hmetamatchF2.cc:84
 hmetamatchF2.cc:85
 hmetamatchF2.cc:86
 hmetamatchF2.cc:87
 hmetamatchF2.cc:88
 hmetamatchF2.cc:89
 hmetamatchF2.cc:90
 hmetamatchF2.cc:91
 hmetamatchF2.cc:92
 hmetamatchF2.cc:93
 hmetamatchF2.cc:94
 hmetamatchF2.cc:95
 hmetamatchF2.cc:96
 hmetamatchF2.cc:97
 hmetamatchF2.cc:98
 hmetamatchF2.cc:99
 hmetamatchF2.cc:100
 hmetamatchF2.cc:101
 hmetamatchF2.cc:102
 hmetamatchF2.cc:103
 hmetamatchF2.cc:104
 hmetamatchF2.cc:105
 hmetamatchF2.cc:106
 hmetamatchF2.cc:107
 hmetamatchF2.cc:108
 hmetamatchF2.cc:109
 hmetamatchF2.cc:110
 hmetamatchF2.cc:111
 hmetamatchF2.cc:112
 hmetamatchF2.cc:113
 hmetamatchF2.cc:114
 hmetamatchF2.cc:115
 hmetamatchF2.cc:116
 hmetamatchF2.cc:117
 hmetamatchF2.cc:118
 hmetamatchF2.cc:119
 hmetamatchF2.cc:120
 hmetamatchF2.cc:121
 hmetamatchF2.cc:122
 hmetamatchF2.cc:123
 hmetamatchF2.cc:124
 hmetamatchF2.cc:125
 hmetamatchF2.cc:126
 hmetamatchF2.cc:127
 hmetamatchF2.cc:128
 hmetamatchF2.cc:129
 hmetamatchF2.cc:130
 hmetamatchF2.cc:131
 hmetamatchF2.cc:132
 hmetamatchF2.cc:133
 hmetamatchF2.cc:134
 hmetamatchF2.cc:135
 hmetamatchF2.cc:136
 hmetamatchF2.cc:137
 hmetamatchF2.cc:138
 hmetamatchF2.cc:139
 hmetamatchF2.cc:140
 hmetamatchF2.cc:141
 hmetamatchF2.cc:142
 hmetamatchF2.cc:143
 hmetamatchF2.cc:144
 hmetamatchF2.cc:145
 hmetamatchF2.cc:146
 hmetamatchF2.cc:147
 hmetamatchF2.cc:148
 hmetamatchF2.cc:149
 hmetamatchF2.cc:150
 hmetamatchF2.cc:151
 hmetamatchF2.cc:152
 hmetamatchF2.cc:153
 hmetamatchF2.cc:154
 hmetamatchF2.cc:155
 hmetamatchF2.cc:156
 hmetamatchF2.cc:157
 hmetamatchF2.cc:158
 hmetamatchF2.cc:159
 hmetamatchF2.cc:160
 hmetamatchF2.cc:161
 hmetamatchF2.cc:162
 hmetamatchF2.cc:163
 hmetamatchF2.cc:164
 hmetamatchF2.cc:165
 hmetamatchF2.cc:166
 hmetamatchF2.cc:167
 hmetamatchF2.cc:168
 hmetamatchF2.cc:169
 hmetamatchF2.cc:170
 hmetamatchF2.cc:171
 hmetamatchF2.cc:172
 hmetamatchF2.cc:173
 hmetamatchF2.cc:174
 hmetamatchF2.cc:175
 hmetamatchF2.cc:176
 hmetamatchF2.cc:177
 hmetamatchF2.cc:178
 hmetamatchF2.cc:179
 hmetamatchF2.cc:180
 hmetamatchF2.cc:181
 hmetamatchF2.cc:182
 hmetamatchF2.cc:183
 hmetamatchF2.cc:184
 hmetamatchF2.cc:185
 hmetamatchF2.cc:186
 hmetamatchF2.cc:187
 hmetamatchF2.cc:188
 hmetamatchF2.cc:189
 hmetamatchF2.cc:190
 hmetamatchF2.cc:191
 hmetamatchF2.cc:192
 hmetamatchF2.cc:193
 hmetamatchF2.cc:194
 hmetamatchF2.cc:195
 hmetamatchF2.cc:196
 hmetamatchF2.cc:197
 hmetamatchF2.cc:198
 hmetamatchF2.cc:199
 hmetamatchF2.cc:200
 hmetamatchF2.cc:201
 hmetamatchF2.cc:202
 hmetamatchF2.cc:203
 hmetamatchF2.cc:204
 hmetamatchF2.cc:205
 hmetamatchF2.cc:206
 hmetamatchF2.cc:207
 hmetamatchF2.cc:208
 hmetamatchF2.cc:209
 hmetamatchF2.cc:210
 hmetamatchF2.cc:211
 hmetamatchF2.cc:212
 hmetamatchF2.cc:213
 hmetamatchF2.cc:214
 hmetamatchF2.cc:215
 hmetamatchF2.cc:216
 hmetamatchF2.cc:217
 hmetamatchF2.cc:218
 hmetamatchF2.cc:219
 hmetamatchF2.cc:220
 hmetamatchF2.cc:221
 hmetamatchF2.cc:222
 hmetamatchF2.cc:223
 hmetamatchF2.cc:224
 hmetamatchF2.cc:225
 hmetamatchF2.cc:226
 hmetamatchF2.cc:227
 hmetamatchF2.cc:228
 hmetamatchF2.cc:229
 hmetamatchF2.cc:230
 hmetamatchF2.cc:231
 hmetamatchF2.cc:232
 hmetamatchF2.cc:233
 hmetamatchF2.cc:234
 hmetamatchF2.cc:235
 hmetamatchF2.cc:236
 hmetamatchF2.cc:237
 hmetamatchF2.cc:238
 hmetamatchF2.cc:239
 hmetamatchF2.cc:240
 hmetamatchF2.cc:241
 hmetamatchF2.cc:242
 hmetamatchF2.cc:243
 hmetamatchF2.cc:244
 hmetamatchF2.cc:245
 hmetamatchF2.cc:246
 hmetamatchF2.cc:247
 hmetamatchF2.cc:248
 hmetamatchF2.cc:249
 hmetamatchF2.cc:250
 hmetamatchF2.cc:251
 hmetamatchF2.cc:252
 hmetamatchF2.cc:253
 hmetamatchF2.cc:254
 hmetamatchF2.cc:255
 hmetamatchF2.cc:256
 hmetamatchF2.cc:257
 hmetamatchF2.cc:258
 hmetamatchF2.cc:259
 hmetamatchF2.cc:260
 hmetamatchF2.cc:261
 hmetamatchF2.cc:262
 hmetamatchF2.cc:263
 hmetamatchF2.cc:264
 hmetamatchF2.cc:265
 hmetamatchF2.cc:266
 hmetamatchF2.cc:267
 hmetamatchF2.cc:268
 hmetamatchF2.cc:269
 hmetamatchF2.cc:270
 hmetamatchF2.cc:271
 hmetamatchF2.cc:272
 hmetamatchF2.cc:273
 hmetamatchF2.cc:274
 hmetamatchF2.cc:275
 hmetamatchF2.cc:276
 hmetamatchF2.cc:277
 hmetamatchF2.cc:278
 hmetamatchF2.cc:279
 hmetamatchF2.cc:280
 hmetamatchF2.cc:281
 hmetamatchF2.cc:282
 hmetamatchF2.cc:283
 hmetamatchF2.cc:284
 hmetamatchF2.cc:285
 hmetamatchF2.cc:286
 hmetamatchF2.cc:287
 hmetamatchF2.cc:288
 hmetamatchF2.cc:289
 hmetamatchF2.cc:290
 hmetamatchF2.cc:291
 hmetamatchF2.cc:292
 hmetamatchF2.cc:293
 hmetamatchF2.cc:294
 hmetamatchF2.cc:295
 hmetamatchF2.cc:296
 hmetamatchF2.cc:297
 hmetamatchF2.cc:298
 hmetamatchF2.cc:299
 hmetamatchF2.cc:300
 hmetamatchF2.cc:301
 hmetamatchF2.cc:302
 hmetamatchF2.cc:303
 hmetamatchF2.cc:304
 hmetamatchF2.cc:305
 hmetamatchF2.cc:306
 hmetamatchF2.cc:307
 hmetamatchF2.cc:308
 hmetamatchF2.cc:309
 hmetamatchF2.cc:310
 hmetamatchF2.cc:311
 hmetamatchF2.cc:312
 hmetamatchF2.cc:313
 hmetamatchF2.cc:314
 hmetamatchF2.cc:315
 hmetamatchF2.cc:316
 hmetamatchF2.cc:317
 hmetamatchF2.cc:318
 hmetamatchF2.cc:319
 hmetamatchF2.cc:320
 hmetamatchF2.cc:321
 hmetamatchF2.cc:322
 hmetamatchF2.cc:323
 hmetamatchF2.cc:324
 hmetamatchF2.cc:325
 hmetamatchF2.cc:326
 hmetamatchF2.cc:327
 hmetamatchF2.cc:328
 hmetamatchF2.cc:329
 hmetamatchF2.cc:330
 hmetamatchF2.cc:331
 hmetamatchF2.cc:332
 hmetamatchF2.cc:333
 hmetamatchF2.cc:334
 hmetamatchF2.cc:335
 hmetamatchF2.cc:336
 hmetamatchF2.cc:337
 hmetamatchF2.cc:338
 hmetamatchF2.cc:339
 hmetamatchF2.cc:340
 hmetamatchF2.cc:341
 hmetamatchF2.cc:342
 hmetamatchF2.cc:343
 hmetamatchF2.cc:344
 hmetamatchF2.cc:345
 hmetamatchF2.cc:346
 hmetamatchF2.cc:347
 hmetamatchF2.cc:348
 hmetamatchF2.cc:349
 hmetamatchF2.cc:350
 hmetamatchF2.cc:351
 hmetamatchF2.cc:352
 hmetamatchF2.cc:353
 hmetamatchF2.cc:354
 hmetamatchF2.cc:355
 hmetamatchF2.cc:356
 hmetamatchF2.cc:357
 hmetamatchF2.cc:358
 hmetamatchF2.cc:359
 hmetamatchF2.cc:360
 hmetamatchF2.cc:361
 hmetamatchF2.cc:362
 hmetamatchF2.cc:363
 hmetamatchF2.cc:364
 hmetamatchF2.cc:365
 hmetamatchF2.cc:366
 hmetamatchF2.cc:367
 hmetamatchF2.cc:368
 hmetamatchF2.cc:369
 hmetamatchF2.cc:370
 hmetamatchF2.cc:371
 hmetamatchF2.cc:372
 hmetamatchF2.cc:373
 hmetamatchF2.cc:374
 hmetamatchF2.cc:375
 hmetamatchF2.cc:376
 hmetamatchF2.cc:377
 hmetamatchF2.cc:378
 hmetamatchF2.cc:379
 hmetamatchF2.cc:380
 hmetamatchF2.cc:381
 hmetamatchF2.cc:382
 hmetamatchF2.cc:383
 hmetamatchF2.cc:384
 hmetamatchF2.cc:385
 hmetamatchF2.cc:386
 hmetamatchF2.cc:387
 hmetamatchF2.cc:388
 hmetamatchF2.cc:389
 hmetamatchF2.cc:390
 hmetamatchF2.cc:391
 hmetamatchF2.cc:392
 hmetamatchF2.cc:393
 hmetamatchF2.cc:394
 hmetamatchF2.cc:395
 hmetamatchF2.cc:396
 hmetamatchF2.cc:397
 hmetamatchF2.cc:398
 hmetamatchF2.cc:399
 hmetamatchF2.cc:400
 hmetamatchF2.cc:401
 hmetamatchF2.cc:402
 hmetamatchF2.cc:403
 hmetamatchF2.cc:404
 hmetamatchF2.cc:405
 hmetamatchF2.cc:406
 hmetamatchF2.cc:407
 hmetamatchF2.cc:408
 hmetamatchF2.cc:409
 hmetamatchF2.cc:410
 hmetamatchF2.cc:411
 hmetamatchF2.cc:412
 hmetamatchF2.cc:413
 hmetamatchF2.cc:414
 hmetamatchF2.cc:415
 hmetamatchF2.cc:416
 hmetamatchF2.cc:417
 hmetamatchF2.cc:418
 hmetamatchF2.cc:419
 hmetamatchF2.cc:420
 hmetamatchF2.cc:421
 hmetamatchF2.cc:422
 hmetamatchF2.cc:423
 hmetamatchF2.cc:424
 hmetamatchF2.cc:425
 hmetamatchF2.cc:426
 hmetamatchF2.cc:427
 hmetamatchF2.cc:428
 hmetamatchF2.cc:429
 hmetamatchF2.cc:430
 hmetamatchF2.cc:431
 hmetamatchF2.cc:432
 hmetamatchF2.cc:433
 hmetamatchF2.cc:434
 hmetamatchF2.cc:435
 hmetamatchF2.cc:436
 hmetamatchF2.cc:437
 hmetamatchF2.cc:438
 hmetamatchF2.cc:439
 hmetamatchF2.cc:440
 hmetamatchF2.cc:441
 hmetamatchF2.cc:442
 hmetamatchF2.cc:443
 hmetamatchF2.cc:444
 hmetamatchF2.cc:445
 hmetamatchF2.cc:446
 hmetamatchF2.cc:447
 hmetamatchF2.cc:448
 hmetamatchF2.cc:449
 hmetamatchF2.cc:450
 hmetamatchF2.cc:451
 hmetamatchF2.cc:452
 hmetamatchF2.cc:453
 hmetamatchF2.cc:454
 hmetamatchF2.cc:455
 hmetamatchF2.cc:456
 hmetamatchF2.cc:457
 hmetamatchF2.cc:458
 hmetamatchF2.cc:459
 hmetamatchF2.cc:460
 hmetamatchF2.cc:461
 hmetamatchF2.cc:462
 hmetamatchF2.cc:463
 hmetamatchF2.cc:464
 hmetamatchF2.cc:465
 hmetamatchF2.cc:466
 hmetamatchF2.cc:467
 hmetamatchF2.cc:468
 hmetamatchF2.cc:469
 hmetamatchF2.cc:470
 hmetamatchF2.cc:471
 hmetamatchF2.cc:472
 hmetamatchF2.cc:473
 hmetamatchF2.cc:474
 hmetamatchF2.cc:475
 hmetamatchF2.cc:476
 hmetamatchF2.cc:477
 hmetamatchF2.cc:478
 hmetamatchF2.cc:479
 hmetamatchF2.cc:480
 hmetamatchF2.cc:481
 hmetamatchF2.cc:482
 hmetamatchF2.cc:483
 hmetamatchF2.cc:484
 hmetamatchF2.cc:485
 hmetamatchF2.cc:486
 hmetamatchF2.cc:487
 hmetamatchF2.cc:488
 hmetamatchF2.cc:489
 hmetamatchF2.cc:490
 hmetamatchF2.cc:491
 hmetamatchF2.cc:492
 hmetamatchF2.cc:493
 hmetamatchF2.cc:494
 hmetamatchF2.cc:495
 hmetamatchF2.cc:496
 hmetamatchF2.cc:497
 hmetamatchF2.cc:498
 hmetamatchF2.cc:499
 hmetamatchF2.cc:500
 hmetamatchF2.cc:501
 hmetamatchF2.cc:502
 hmetamatchF2.cc:503
 hmetamatchF2.cc:504
 hmetamatchF2.cc:505
 hmetamatchF2.cc:506
 hmetamatchF2.cc:507
 hmetamatchF2.cc:508
 hmetamatchF2.cc:509
 hmetamatchF2.cc:510
 hmetamatchF2.cc:511
 hmetamatchF2.cc:512
 hmetamatchF2.cc:513
 hmetamatchF2.cc:514
 hmetamatchF2.cc:515
 hmetamatchF2.cc:516
 hmetamatchF2.cc:517
 hmetamatchF2.cc:518
 hmetamatchF2.cc:519
 hmetamatchF2.cc:520
 hmetamatchF2.cc:521
 hmetamatchF2.cc:522
 hmetamatchF2.cc:523
 hmetamatchF2.cc:524
 hmetamatchF2.cc:525
 hmetamatchF2.cc:526
 hmetamatchF2.cc:527
 hmetamatchF2.cc:528
 hmetamatchF2.cc:529
 hmetamatchF2.cc:530
 hmetamatchF2.cc:531
 hmetamatchF2.cc:532
 hmetamatchF2.cc:533
 hmetamatchF2.cc:534
 hmetamatchF2.cc:535
 hmetamatchF2.cc:536
 hmetamatchF2.cc:537
 hmetamatchF2.cc:538
 hmetamatchF2.cc:539
 hmetamatchF2.cc:540
 hmetamatchF2.cc:541
 hmetamatchF2.cc:542
 hmetamatchF2.cc:543
 hmetamatchF2.cc:544
 hmetamatchF2.cc:545
 hmetamatchF2.cc:546
 hmetamatchF2.cc:547
 hmetamatchF2.cc:548
 hmetamatchF2.cc:549
 hmetamatchF2.cc:550
 hmetamatchF2.cc:551
 hmetamatchF2.cc:552
 hmetamatchF2.cc:553
 hmetamatchF2.cc:554
 hmetamatchF2.cc:555
 hmetamatchF2.cc:556
 hmetamatchF2.cc:557
 hmetamatchF2.cc:558
 hmetamatchF2.cc:559
 hmetamatchF2.cc:560
 hmetamatchF2.cc:561
 hmetamatchF2.cc:562
 hmetamatchF2.cc:563
 hmetamatchF2.cc:564
 hmetamatchF2.cc:565
 hmetamatchF2.cc:566
 hmetamatchF2.cc:567
 hmetamatchF2.cc:568
 hmetamatchF2.cc:569
 hmetamatchF2.cc:570
 hmetamatchF2.cc:571
 hmetamatchF2.cc:572
 hmetamatchF2.cc:573
 hmetamatchF2.cc:574
 hmetamatchF2.cc:575
 hmetamatchF2.cc:576
 hmetamatchF2.cc:577
 hmetamatchF2.cc:578
 hmetamatchF2.cc:579
 hmetamatchF2.cc:580
 hmetamatchF2.cc:581
 hmetamatchF2.cc:582
 hmetamatchF2.cc:583
 hmetamatchF2.cc:584
 hmetamatchF2.cc:585
 hmetamatchF2.cc:586
 hmetamatchF2.cc:587
 hmetamatchF2.cc:588
 hmetamatchF2.cc:589
 hmetamatchF2.cc:590
 hmetamatchF2.cc:591
 hmetamatchF2.cc:592
 hmetamatchF2.cc:593
 hmetamatchF2.cc:594
 hmetamatchF2.cc:595
 hmetamatchF2.cc:596
 hmetamatchF2.cc:597
 hmetamatchF2.cc:598
 hmetamatchF2.cc:599
 hmetamatchF2.cc:600
 hmetamatchF2.cc:601
 hmetamatchF2.cc:602
 hmetamatchF2.cc:603
 hmetamatchF2.cc:604
 hmetamatchF2.cc:605
 hmetamatchF2.cc:606
 hmetamatchF2.cc:607
 hmetamatchF2.cc:608
 hmetamatchF2.cc:609
 hmetamatchF2.cc:610
 hmetamatchF2.cc:611
 hmetamatchF2.cc:612
 hmetamatchF2.cc:613
 hmetamatchF2.cc:614
 hmetamatchF2.cc:615
 hmetamatchF2.cc:616
 hmetamatchF2.cc:617
 hmetamatchF2.cc:618
 hmetamatchF2.cc:619
 hmetamatchF2.cc:620
 hmetamatchF2.cc:621
 hmetamatchF2.cc:622
 hmetamatchF2.cc:623
 hmetamatchF2.cc:624
 hmetamatchF2.cc:625
 hmetamatchF2.cc:626
 hmetamatchF2.cc:627
 hmetamatchF2.cc:628
 hmetamatchF2.cc:629
 hmetamatchF2.cc:630
 hmetamatchF2.cc:631
 hmetamatchF2.cc:632
 hmetamatchF2.cc:633
 hmetamatchF2.cc:634
 hmetamatchF2.cc:635
 hmetamatchF2.cc:636
 hmetamatchF2.cc:637
 hmetamatchF2.cc:638
 hmetamatchF2.cc:639
 hmetamatchF2.cc:640
 hmetamatchF2.cc:641
 hmetamatchF2.cc:642
 hmetamatchF2.cc:643
 hmetamatchF2.cc:644
 hmetamatchF2.cc:645
 hmetamatchF2.cc:646
 hmetamatchF2.cc:647
 hmetamatchF2.cc:648
 hmetamatchF2.cc:649
 hmetamatchF2.cc:650
 hmetamatchF2.cc:651
 hmetamatchF2.cc:652
 hmetamatchF2.cc:653
 hmetamatchF2.cc:654
 hmetamatchF2.cc:655
 hmetamatchF2.cc:656
 hmetamatchF2.cc:657
 hmetamatchF2.cc:658
 hmetamatchF2.cc:659
 hmetamatchF2.cc:660
 hmetamatchF2.cc:661
 hmetamatchF2.cc:662
 hmetamatchF2.cc:663
 hmetamatchF2.cc:664
 hmetamatchF2.cc:665
 hmetamatchF2.cc:666
 hmetamatchF2.cc:667
 hmetamatchF2.cc:668
 hmetamatchF2.cc:669
 hmetamatchF2.cc:670
 hmetamatchF2.cc:671
 hmetamatchF2.cc:672
 hmetamatchF2.cc:673
 hmetamatchF2.cc:674
 hmetamatchF2.cc:675
 hmetamatchF2.cc:676
 hmetamatchF2.cc:677
 hmetamatchF2.cc:678
 hmetamatchF2.cc:679
 hmetamatchF2.cc:680
 hmetamatchF2.cc:681
 hmetamatchF2.cc:682
 hmetamatchF2.cc:683
 hmetamatchF2.cc:684
 hmetamatchF2.cc:685
 hmetamatchF2.cc:686
 hmetamatchF2.cc:687
 hmetamatchF2.cc:688
 hmetamatchF2.cc:689
 hmetamatchF2.cc:690
 hmetamatchF2.cc:691
 hmetamatchF2.cc:692
 hmetamatchF2.cc:693
 hmetamatchF2.cc:694
 hmetamatchF2.cc:695
 hmetamatchF2.cc:696
 hmetamatchF2.cc:697
 hmetamatchF2.cc:698
 hmetamatchF2.cc:699
 hmetamatchF2.cc:700
 hmetamatchF2.cc:701
 hmetamatchF2.cc:702
 hmetamatchF2.cc:703
 hmetamatchF2.cc:704
 hmetamatchF2.cc:705
 hmetamatchF2.cc:706
 hmetamatchF2.cc:707
 hmetamatchF2.cc:708
 hmetamatchF2.cc:709
 hmetamatchF2.cc:710
 hmetamatchF2.cc:711
 hmetamatchF2.cc:712
 hmetamatchF2.cc:713
 hmetamatchF2.cc:714
 hmetamatchF2.cc:715
 hmetamatchF2.cc:716
 hmetamatchF2.cc:717
 hmetamatchF2.cc:718
 hmetamatchF2.cc:719
 hmetamatchF2.cc:720
 hmetamatchF2.cc:721
 hmetamatchF2.cc:722
 hmetamatchF2.cc:723
 hmetamatchF2.cc:724
 hmetamatchF2.cc:725
 hmetamatchF2.cc:726
 hmetamatchF2.cc:727
 hmetamatchF2.cc:728
 hmetamatchF2.cc:729
 hmetamatchF2.cc:730
 hmetamatchF2.cc:731
 hmetamatchF2.cc:732
 hmetamatchF2.cc:733
 hmetamatchF2.cc:734
 hmetamatchF2.cc:735
 hmetamatchF2.cc:736
 hmetamatchF2.cc:737
 hmetamatchF2.cc:738
 hmetamatchF2.cc:739
 hmetamatchF2.cc:740
 hmetamatchF2.cc:741
 hmetamatchF2.cc:742
 hmetamatchF2.cc:743
 hmetamatchF2.cc:744
 hmetamatchF2.cc:745
 hmetamatchF2.cc:746
 hmetamatchF2.cc:747
 hmetamatchF2.cc:748
 hmetamatchF2.cc:749
 hmetamatchF2.cc:750
 hmetamatchF2.cc:751
 hmetamatchF2.cc:752
 hmetamatchF2.cc:753
 hmetamatchF2.cc:754
 hmetamatchF2.cc:755
 hmetamatchF2.cc:756
 hmetamatchF2.cc:757
 hmetamatchF2.cc:758
 hmetamatchF2.cc:759
 hmetamatchF2.cc:760
 hmetamatchF2.cc:761
 hmetamatchF2.cc:762
 hmetamatchF2.cc:763
 hmetamatchF2.cc:764
 hmetamatchF2.cc:765
 hmetamatchF2.cc:766
 hmetamatchF2.cc:767
 hmetamatchF2.cc:768
 hmetamatchF2.cc:769
 hmetamatchF2.cc:770
 hmetamatchF2.cc:771
 hmetamatchF2.cc:772
 hmetamatchF2.cc:773
 hmetamatchF2.cc:774
 hmetamatchF2.cc:775
 hmetamatchF2.cc:776
 hmetamatchF2.cc:777
 hmetamatchF2.cc:778
 hmetamatchF2.cc:779
 hmetamatchF2.cc:780
 hmetamatchF2.cc:781
 hmetamatchF2.cc:782
 hmetamatchF2.cc:783
 hmetamatchF2.cc:784
 hmetamatchF2.cc:785
 hmetamatchF2.cc:786
 hmetamatchF2.cc:787
 hmetamatchF2.cc:788
 hmetamatchF2.cc:789
 hmetamatchF2.cc:790
 hmetamatchF2.cc:791
 hmetamatchF2.cc:792
 hmetamatchF2.cc:793
 hmetamatchF2.cc:794
 hmetamatchF2.cc:795
 hmetamatchF2.cc:796
 hmetamatchF2.cc:797
 hmetamatchF2.cc:798
 hmetamatchF2.cc:799
 hmetamatchF2.cc:800
 hmetamatchF2.cc:801
 hmetamatchF2.cc:802
 hmetamatchF2.cc:803
 hmetamatchF2.cc:804
 hmetamatchF2.cc:805
 hmetamatchF2.cc:806
 hmetamatchF2.cc:807
 hmetamatchF2.cc:808
 hmetamatchF2.cc:809
 hmetamatchF2.cc:810
 hmetamatchF2.cc:811
 hmetamatchF2.cc:812
 hmetamatchF2.cc:813
 hmetamatchF2.cc:814
 hmetamatchF2.cc:815
 hmetamatchF2.cc:816
 hmetamatchF2.cc:817
 hmetamatchF2.cc:818
 hmetamatchF2.cc:819
 hmetamatchF2.cc:820
 hmetamatchF2.cc:821
 hmetamatchF2.cc:822
 hmetamatchF2.cc:823
 hmetamatchF2.cc:824
 hmetamatchF2.cc:825
 hmetamatchF2.cc:826
 hmetamatchF2.cc:827
 hmetamatchF2.cc:828
 hmetamatchF2.cc:829
 hmetamatchF2.cc:830
 hmetamatchF2.cc:831
 hmetamatchF2.cc:832
 hmetamatchF2.cc:833
 hmetamatchF2.cc:834
 hmetamatchF2.cc:835
 hmetamatchF2.cc:836
 hmetamatchF2.cc:837
 hmetamatchF2.cc:838
 hmetamatchF2.cc:839
 hmetamatchF2.cc:840
 hmetamatchF2.cc:841
 hmetamatchF2.cc:842
 hmetamatchF2.cc:843
 hmetamatchF2.cc:844
 hmetamatchF2.cc:845
 hmetamatchF2.cc:846
 hmetamatchF2.cc:847
 hmetamatchF2.cc:848
 hmetamatchF2.cc:849
 hmetamatchF2.cc:850
 hmetamatchF2.cc:851
 hmetamatchF2.cc:852
 hmetamatchF2.cc:853
 hmetamatchF2.cc:854
 hmetamatchF2.cc:855
 hmetamatchF2.cc:856
 hmetamatchF2.cc:857
 hmetamatchF2.cc:858
 hmetamatchF2.cc:859
 hmetamatchF2.cc:860
 hmetamatchF2.cc:861
 hmetamatchF2.cc:862
 hmetamatchF2.cc:863
 hmetamatchF2.cc:864
 hmetamatchF2.cc:865
 hmetamatchF2.cc:866
 hmetamatchF2.cc:867
 hmetamatchF2.cc:868
 hmetamatchF2.cc:869
 hmetamatchF2.cc:870
 hmetamatchF2.cc:871
 hmetamatchF2.cc:872
 hmetamatchF2.cc:873
 hmetamatchF2.cc:874
 hmetamatchF2.cc:875
 hmetamatchF2.cc:876
 hmetamatchF2.cc:877
 hmetamatchF2.cc:878
 hmetamatchF2.cc:879
 hmetamatchF2.cc:880
 hmetamatchF2.cc:881
 hmetamatchF2.cc:882
 hmetamatchF2.cc:883
 hmetamatchF2.cc:884
 hmetamatchF2.cc:885
 hmetamatchF2.cc:886
 hmetamatchF2.cc:887
 hmetamatchF2.cc:888
 hmetamatchF2.cc:889
 hmetamatchF2.cc:890
 hmetamatchF2.cc:891
 hmetamatchF2.cc:892
 hmetamatchF2.cc:893
 hmetamatchF2.cc:894
 hmetamatchF2.cc:895
 hmetamatchF2.cc:896
 hmetamatchF2.cc:897
 hmetamatchF2.cc:898
 hmetamatchF2.cc:899
 hmetamatchF2.cc:900
 hmetamatchF2.cc:901
 hmetamatchF2.cc:902
 hmetamatchF2.cc:903
 hmetamatchF2.cc:904
 hmetamatchF2.cc:905
 hmetamatchF2.cc:906
 hmetamatchF2.cc:907
 hmetamatchF2.cc:908
 hmetamatchF2.cc:909
 hmetamatchF2.cc:910
 hmetamatchF2.cc:911
 hmetamatchF2.cc:912
 hmetamatchF2.cc:913
 hmetamatchF2.cc:914
 hmetamatchF2.cc:915
 hmetamatchF2.cc:916
 hmetamatchF2.cc:917
 hmetamatchF2.cc:918
 hmetamatchF2.cc:919
 hmetamatchF2.cc:920
 hmetamatchF2.cc:921
 hmetamatchF2.cc:922
 hmetamatchF2.cc:923
 hmetamatchF2.cc:924
 hmetamatchF2.cc:925
 hmetamatchF2.cc:926
 hmetamatchF2.cc:927
 hmetamatchF2.cc:928
 hmetamatchF2.cc:929
 hmetamatchF2.cc:930
 hmetamatchF2.cc:931
 hmetamatchF2.cc:932
 hmetamatchF2.cc:933
 hmetamatchF2.cc:934
 hmetamatchF2.cc:935
 hmetamatchF2.cc:936
 hmetamatchF2.cc:937
 hmetamatchF2.cc:938
 hmetamatchF2.cc:939
 hmetamatchF2.cc:940
 hmetamatchF2.cc:941
 hmetamatchF2.cc:942
 hmetamatchF2.cc:943
 hmetamatchF2.cc:944
 hmetamatchF2.cc:945
 hmetamatchF2.cc:946
 hmetamatchF2.cc:947
 hmetamatchF2.cc:948
 hmetamatchF2.cc:949
 hmetamatchF2.cc:950
 hmetamatchF2.cc:951
 hmetamatchF2.cc:952
 hmetamatchF2.cc:953
 hmetamatchF2.cc:954
 hmetamatchF2.cc:955
 hmetamatchF2.cc:956
 hmetamatchF2.cc:957
 hmetamatchF2.cc:958
 hmetamatchF2.cc:959
 hmetamatchF2.cc:960
 hmetamatchF2.cc:961
 hmetamatchF2.cc:962
 hmetamatchF2.cc:963
 hmetamatchF2.cc:964
 hmetamatchF2.cc:965
 hmetamatchF2.cc:966
 hmetamatchF2.cc:967
 hmetamatchF2.cc:968
 hmetamatchF2.cc:969
 hmetamatchF2.cc:970
 hmetamatchF2.cc:971
 hmetamatchF2.cc:972
 hmetamatchF2.cc:973
 hmetamatchF2.cc:974
 hmetamatchF2.cc:975
 hmetamatchF2.cc:976
 hmetamatchF2.cc:977
 hmetamatchF2.cc:978
 hmetamatchF2.cc:979
 hmetamatchF2.cc:980
 hmetamatchF2.cc:981
 hmetamatchF2.cc:982
 hmetamatchF2.cc:983
 hmetamatchF2.cc:984
 hmetamatchF2.cc:985
 hmetamatchF2.cc:986
 hmetamatchF2.cc:987
 hmetamatchF2.cc:988
 hmetamatchF2.cc:989
 hmetamatchF2.cc:990