ROOT logo
//*-- Author   : Diego Gonzalez-Diaz
//*-- Created  : 20/12/07
//*-- Modified : 30/12/09 Diego Gonzalez-Diaz
//*-- Modified : 24/11/10 Pablo Cabanelas (ClusFPar moved to condition)
//*-- Modified : 27/06/12 Alessio Mangiarotti Added filling of xlab,
//*-- Modified :          ylab and zlab for simulation.
//
//_HADES_CLASS_DESCRIPTION 
////////////////////////////////////////////////////////////////////
//
//  HRpcClusterF: RPC detector cluster finder
//
//  Gets hits from RpcHit(Sim) and writes to RpcCluster(Sim)
//
///////////////////////////////////////////////////////////////////

#include "TRandom.h"
#include "hrpcdetector.h"
#include "hrpcclusterf.h"
#include "rpcdef.h"
#include "hrpchit.h"
#include "hrpchitsim.h"
#include "hrpccluster.h"
#include "hrpcclustersim.h"
#include "hgeantrpc.h"
#include "hrpcgeomcellpar.h"
#include "hrpcclusfpar.h"
#include "hdebug.h"
#include "hades.h"
#include "hruntimedb.h"
#include "hspectrometer.h"
#include "hdetector.h"
#include "hevent.h"
#include "hgeantkine.h"
#include "hcategory.h"
#include <iostream>
#include <iomanip>
#include <time.h>
using namespace std;

void HRpcClusterF::initParContainer() {
    pGeomCellPar   = (HRpcGeomCellPar*)(gHades->getRuntimeDb()->getContainer("RpcGeomCellPar"));
    pClusFPar      = (HRpcClusFPar*)(gHades->getRuntimeDb()->getContainer("RpcClusFPar"));
}

HRpcClusterF::HRpcClusterF(void)
{
    pClusterCat  = NULL;
    pHitCat      = NULL;
    pGeomCellPar = NULL;
    pClusFPar    = NULL;
    doSingleCluster = kFALSE;
}

HRpcClusterF::HRpcClusterF(const Text_t *name, const Text_t *title) :
HReconstructor(name,title)
{
    pClusterCat  = NULL;
    pHitCat      = NULL;
    pGeomCellPar = NULL;
    pClusFPar    = NULL;
    doSingleCluster = kFALSE;
}

HRpcClusterF::~HRpcClusterF(void)
{
}

Bool_t HRpcClusterF::init(void)
{
    initParContainer();

    HRpcDetector *rpc;
    rpc=(HRpcDetector *)gHades->getSetup()->getDetector("Rpc");

    maxcells=rpc->getMaxCells();

    if (!pGeomCellPar){
	Error("init","No RpcGeomCellPar Parameters");
	return kFALSE;
    }
    if (!pClusFPar){
	Error("init","No RpcClusFPar Parameters");
	return kFALSE;
    }
    if(!rpc){
	Error("HRpcClusterF::init()","No Rpc Detector");
	return kFALSE;
    }

    // Create category for hit
    pHitCat=gHades->getCurrentEvent()->getCategory(catRpcHit);
    if (!pHitCat) {
	Error("HRpcClusterF::init()","No RpcHit Category");
	return kFALSE;
    }

    // Decide whether we are running for simulation or real data
    HCategory* catKin=gHades->getCurrentEvent()->getCategory(catGeantKine);

    if(catKin) simulation=kTRUE;
    else       simulation=kFALSE;

    // Create category for cluster data
    pClusterCat=gHades->getCurrentEvent()->getCategory(catRpcCluster);

    if (!pClusterCat) {

	if (simulation) pClusterCat=rpc->buildMatrixCategory("HRpcClusterSim",0.5);
	else            pClusterCat=rpc->buildMatrixCategory("HRpcCluster",0.5);

	gHades->getCurrentEvent()->addCategory(catRpcCluster,pClusterCat,"Rpc");

    }


    // Search for hgeantrpc in case of simulation

    if(simulation) {
	pGeantRpcCat = gHades->getCurrentEvent()->getCategory(catRpcGeantRaw);
	if (!pGeantRpcCat) {
	    Error("HRpcClusterF::init()","No HGeant RPC Category");
	    return kFALSE;
	}
    }

    loc.set(3,0,0,0);
    loc_cluster.set(1,0);

    return kTRUE;
}

Int_t HRpcClusterF::execute(void)
{

    HRpcHitSim     *pHit        = NULL; //Only reading, use the same class for HRpcHitSim and HRpcHit objects
    HRpcClusterSim *pClusterSim = NULL; //Reading and STORING in category, use 2 different classes.
    HRpcCluster    *pCluster    = NULL; //Reading and STORING in category, use 2 different classes.

    Int_t cluster_type  = -1;
    Int_t sign          = 0;            //Function sign;
    Float_t tof, charge, xmod, ymod, zmod, xsec, ysec, zsec;
    Float_t xlab, ylab, zlab, theta, phi;

    Float_t tof_neigb, charge_neigb, xmod_neigb, ymod_neigb, xsec_neigb, ysec_neigb, zsec_neigb;
    Float_t xlab_neigb, ylab_neigb, zlab_neigb, theta_neigb, phi_neigb;
    Float_t tof_neigb2;
    Float_t sigma_X, sigma_Y, sigma_Z, sigma_T;
    Float_t tof_cut, x_cut, DPlanes, tof_next; //[ns], [mm], [mm], [ns]
    Float_t v_light=300; //300mm/ns

    Int_t Track1L=-999, Track1R=-999, Track2L=-999, Track2R=-999, Track=-999;
    Int_t Ref1L=-999, Ref1R=-999, Ref2L=-999, Ref2R=-999;
    Bool_t LisAtBox1=kFALSE, LisAtBox2=kFALSE, RisAtBox1=kFALSE, RisAtBox2=kFALSE, IsAtBox=kFALSE;

    Float_t NsigmasT, NsigmasX;
    Int_t cell1=-1, column1=-1, sector1=-1, cell2=-1, column2=-1, sector2=-1;
    Bool_t inFlag1=kFALSE, inFlag2=kFALSE;
    //NOTE: Biggest cluster is assumed to include only 2 cells. More rare cases are likely to not be relevant.
    //Even if in these very rare cases (i.e. 3 cells firing) the only problem of this assumption is
    //that only the closest neighbouring cell will be considered for the cluster, the remaining cell will be
    //counted as a different cluster --> so 1 track would produce 2 clusters but even so, this is not conceptually
    //a problem. Tracking and matching should take care of this.

    Int_t weight[4], array[4], ref_array[4];
    Bool_t isAtBox_array[4];

    Bool_t BC1IsNotIn=kFALSE; //FIXME: Flag to indicate if the BC1 is in or not. It is not needed and
    //it must dissappear

    for (Int_t i=0;i<4;i++) weight[i]        =      0;
    for (Int_t i=0;i<4;i++) array[i]         =   -999;
    for (Int_t i=0;i<4;i++) ref_array[i]     =   -999;
    for (Int_t i=0;i<4;i++) isAtBox_array[i] = kFALSE;

    //HRpcGeomCellParCell& pGeoCell  = (*pGeomCellPar)[0][0][0];
    DPlanes = pGeomCellPar->getDPlanes();



    //---------------------------------------------------------------
    if(doSingleCluster && pHitCat && pClusterCat){ // just do a copy from hit to cluster
	TIterator *pRpcHitIter  = pHitCat->MakeIterator("native");

	if (pRpcHitIter) {
	    HRpcHit* rpc_hit=0;

	    pRpcHitIter->Reset();
	    while ((rpc_hit = (HRpcHit*)pRpcHitIter->Next())) {

		loc[0] = rpc_hit->getSector();
		loc[1] = rpc_hit->getColumn();
		loc[2] = rpc_hit->getCell();
                Int_t index_cluster;
                loc_cluster[0] = rpc_hit->getSector(); //sector

		pClusterSim = (HRpcClusterSim*)pClusterCat->getNewSlot(loc_cluster,&index_cluster);
		if ( !pClusterSim ) {
		    Error ("execute()", "Can't get slot in cluster finder: sec %i", loc_cluster[0]);
		    return EXIT_FAILURE;
		}
		if (simulation)pClusterSim = new(pClusterSim) HRpcClusterSim;
		else           pClusterSim = (HRpcClusterSim*) new(pClusterSim) HRpcCluster;

		pClusterSim->setClusterType   (1);
		pClusterSim->setInsideCellFlag(rpc_hit->getInsideCellFlag());
		pClusterSim->setDetID1 (rpc_hit->getSector(),rpc_hit->getColumn(),rpc_hit->getCell());
		pClusterSim->setCluster(rpc_hit->getTof()   ,rpc_hit->getCharge(),rpc_hit->getXMod(),rpc_hit->getYMod(),rpc_hit->getZMod());
		pClusterSim->setRSEC   (rpc_hit->getXSec()  ,rpc_hit->getYSec()  ,rpc_hit->getZSec());
		pClusterSim->setRMS    (rpc_hit->getTOFRMS(),rpc_hit->getXRMS()  ,rpc_hit->getYRMS(),rpc_hit->getZRMS());
		pClusterSim->setAddress(rpc_hit->getSector(),index_cluster);
		pClusterSim->setTheta  (rpc_hit->getTheta());
		pClusterSim->setPhi    (rpc_hit->getPhi());
		rpc_hit    ->getXYZLab (xlab,ylab,zlab);
		pClusterSim->setXYZLab (xlab,ylab,zlab);


		if (simulation) {

		    //Initialization of parameters
		    for (Int_t t=0;t<4;t++) weight[t]        = 0;
		    for (Int_t t=0;t<4;t++) array[t]         = -999;
		    for (Int_t t=0;t<4;t++) ref_array[t]     = -999;
		    for (Int_t t=0;t<4;t++) isAtBox_array[t] = kFALSE;

		    array        [0] = pHit->getTrackL();
		    array        [1] = pHit->getTrackR();
		    ref_array    [0] = pHit->getRefL();
		    ref_array    [1] = pHit->getRefR();
		    isAtBox_array[0] = pHit->getLisAtBox();
		    isAtBox_array[1] = pHit->getRisAtBox();

		    //Algorithm for deciding the preferred track
		    for(Int_t m=0;m<4;m++){
			for(Int_t n=0;n<4;n++){
			    if(array[m]==array[n]) weight[m]++;
			}
		    }
		    //Note that double-counting and self-counting does not affect the meaning of weight here :)

		    Track   = array        [0];
		    IsAtBox = isAtBox_array[0];

		    for(Int_t m=0;m<3;m++)   {
			if (weight[m+1]>weight[m]) {
			    Track=array[m+1];
			    IsAtBox = isAtBox_array[m];}
		    }

		    pClusterSim->setTrack(Track);
		    pClusterSim->setIsAtBox(IsAtBox);


		    //Fill the lists
		    for(Int_t m=0;m<4;m++) {
			pClusterSim->setTrackList  (m,array[m]);
			pClusterSim->setRefList    (m,ref_array[m]);
			pClusterSim->setIsAtBoxList(m,isAtBox_array[m]);
		    }

		    pClusterSim->setNTracksAtBox  (howManyTracks       (pClusterSim));
		    pClusterSim->setNTracksAtCells(howManyTracksAtCells(pClusterSim));

		}



	    }
	}

        delete  pRpcHitIter ;


	return EXIT_SUCCESS;
    }
    //---------------------------------------------------------------





    //Simple and robust sequencial algorithm for cluster finding enforcing no double-counting
    //If algorithm becomes slow, this must be done in a more clever way

    for(Int_t i=0;i<6;i++) {                 //6 sectors

	NsigmasX = pClusFPar->getNsigmasX();
	NsigmasT = pClusFPar->getNsigmasT();

	for(Int_t j=0;j<3;j++) {               //3 groups of 2 columns
	    for(Int_t k=0;k<(maxcells*2-1);k++){ //2 columns with maxcells

		//Initialization of parameters
		for (Int_t t=0;t<4;t++) weight[t]        = 0;
		for (Int_t t=0;t<4;t++) array[t]         = -999;
		for (Int_t t=0;t<4;t++) ref_array[t]     = -999;
		for (Int_t t=0;t<4;t++) isAtBox_array[t] = kFALSE;

		cell1 = column1 = sector1 = -1;
		cell2 = column2 = sector2 = -1;
		//End of initialization of parameters

		loc[0] = i;
		loc[1] = 2*j+1-k%2;                //Alternates the columns (down, up, down, up...)
		loc[2] = k/2;

		if(BC1IsNotIn && j==1) loc[1] = 2+k%2;

		pHit = (HRpcHitSim*)pHitCat->getObject(loc);

		if(!pHit) continue;

		//Otherwise. A cluster will be created. Check if it can be allocated.

		loc_cluster[0]=i; //sector
		Int_t index_cluster;

		sigma_X= pHit->getXRMS();
		sigma_Y= pHit->getYRMS();
		sigma_Z= pHit->getZRMS();
		sigma_T= pHit->getTOFRMS();

		tof_cut = sigma_T*NsigmasT;
		x_cut   = sigma_X*NsigmasX;

		if (simulation) {
		    pClusterSim = (HRpcClusterSim*)pClusterCat->getNewSlot(loc_cluster,&index_cluster);
		    if ( !pClusterSim ) {
			Error ("execute()", "Can't get slot in cluster finder: sec %i", loc_cluster[0]);
			return EXIT_FAILURE;
		    }
		    pClusterSim = new(pClusterSim) HRpcClusterSim;
		}
		else {
		    pCluster = (HRpcCluster*)pClusterCat->getNewSlot(loc_cluster,&index_cluster);
		    if ( !pCluster ) {
			Error ("execute()", "Can't get slot in cluster finder: sec %i", loc_cluster[0]);
			return EXIT_FAILURE;
		    }
		    pCluster = new(pCluster) HRpcCluster;
		}

		//Read data members from hit

		tof     = pHit->getTof();
		charge  = pHit->getCharge();
		xmod    = pHit->getXMod();
		ymod    = pHit->getYMod();
		zmod    = DPlanes*(0.5-k%2);
		if(BC1IsNotIn && j==1) zmod   = DPlanes*(k%2-0.5);
		xsec    = pHit->getXSec();
		ysec    = pHit->getYSec();
		zsec    = pHit->getZSec();
		theta   = pHit->getTheta();
		phi     = pHit->getPhi();
		sector1 = pHit->getSector();
		column1 = pHit->getColumn();
		cell1   = pHit->getCell();
		inFlag1 = pHit->getInsideCellFlag();

		pHit->getXYZLab(xlab,ylab,zlab);

		cluster_type=1;

		if (simulation){

		    Ref1L       = pHit->getRefL();
		    Ref1R       = pHit->getRefR();
		    Track1L     = pHit->getTrackL();
		    Track1R     = pHit->getTrackR();
		    LisAtBox1   = pHit->getLisAtBox();
		    RisAtBox1   = pHit->getRisAtBox();
		}

		//Look for next cell in next column. True cluster finder starts here.

		loc[1] = 2*j + 1 - (k+1)%2;
		loc[2] = (k+1)/2;
		if(BC1IsNotIn && j==1) loc[1] = 2 + (k+1)%2;

		pHit = (HRpcHitSim*)pHitCat->getObject(loc);


		if (pHit) {	//Neighbour

		    tof_neigb    = pHit->getTof();
		    charge_neigb = pHit->getCharge();
		    xmod_neigb   = pHit->getXMod();
		    ymod_neigb   = pHit->getYMod();
		    xsec_neigb   = pHit->getXSec();
		    ysec_neigb   = pHit->getYSec();
		    zsec_neigb   = pHit->getZSec();
		    theta_neigb  = pHit->getTheta();
		    phi_neigb    = pHit->getPhi();
		    sector2      = pHit->getSector();
		    column2      = pHit->getColumn();
		    cell2        = pHit->getCell();
		    inFlag2      = pHit->getInsideCellFlag();

		    pHit->getXYZLab(xlab_neigb,ylab_neigb,zlab_neigb);

		    //Offset to the next station. Positive or negative, it depends
		    sign         = (2*loc[2]%2-1);
		    tof_next     = sign*DPlanes/v_light;
		    //NOTE: Probably it is *enough* in practice to consider that *all*
		    //particles travel at the speed of light and are perpendicular?.

		    //Cluster condition
		    if((fabs(xmod-xmod_neigb)<x_cut) && fabs(tof+tof_next-tof_neigb)<tof_cut){

			tof    = (tof    + tof_neigb)/2;
			charge = (charge + charge_neigb)/2;
			xmod   = (xmod   + xmod_neigb)/2;
			ymod   = (ymod   + ymod_neigb)/2;
			zmod   =  0.001; //must be different from zero for metamatch
			xsec   = (xsec   + xsec_neigb)/2;
			ysec   = (ysec   + ysec_neigb)/2;
			zsec   = (zsec   + zsec_neigb)/2;
			xlab   = (xlab   + xlab_neigb)/2;
			ylab   = (ylab   + ylab_neigb)/2;
			zlab   = (zlab   + zlab_neigb)/2;
			theta  = (theta  + theta_neigb)/2;
			phi    = (phi    + phi_neigb)/2;

			cluster_type=2;

			if (simulation) {

			    Ref2L       = pHit->getRefL();
			    Ref2R       = pHit->getRefR();
			    Track2L     = pHit->getTrackL();
			    Track2R     = pHit->getTrackR();
			    LisAtBox2   = pHit->getLisAtBox();
			    RisAtBox2   = pHit->getRisAtBox();
			}

			//At last, it must be checked that the cell can NOT form a cluster with the
			//next neigbour, then the counter -k- should be increased. Otherwise,
			//this will be double-counted in the next iteration as a new cluster
			//with cluster_type=1 [!!]

			loc[1] = 2*j + 1 - (k+2)%2;
			loc[2] = (k+2)/2;
			if(BC1IsNotIn && j==1) loc[1] = 2 + (k+2)%2;

			pHit = (HRpcHitSim*)pHitCat->getObject(loc);

			if (pHit) {

			    tof_neigb2   = pHit->getTof();

			    sign         = (2*loc[2]%2-1);
			    tof_next     = sign*DPlanes/v_light;
			    if((fabs(xmod-xmod_neigb)>=x_cut) || fabs(tof+tof_next-tof_neigb2)>=tof_cut) k=k+1;
			}
			else k=k+1;
			//Note that only if a new cluster will be formed, the loop goes on normaly.
			//If not, -k- is increased.
		    } // end cluster condition
		} // end neighbour

		//Fill cluster

		//If simulation
		if (simulation) {

		    pClusterSim->setClusterType(cluster_type);
		    pClusterSim->setCluster(tof, charge, xmod, ymod, zmod);
		    pClusterSim->setRSEC(xsec,ysec,zsec);
		    pClusterSim->setXYZLab(xlab,ylab,zlab);
		    pClusterSim->setTheta(theta);
		    pClusterSim->setPhi(phi);
		    pClusterSim->setAddress(loc_cluster[0], index_cluster);

		    //Storing cell info of cluster size, trackID and Ref for simulation:

		    if(cluster_type==1) {
			pClusterSim->setDetID1(sector1, column1, cell1);
			array[0]=Track1L; array[1]=Track1R;
			ref_array[0]=Ref1L; ref_array[1]=Ref1R;
			isAtBox_array[0]=LisAtBox1; isAtBox_array[1]=RisAtBox1;
			pClusterSim->setRMS(sigma_T, sigma_X, sigma_Y, sigma_Z);
		    }
		    //Just for convenience the first cell upstream is stored as DetID1
		    else{
			if(column1==0 || column1==2 || column1==4) {
			    pClusterSim->setDetID1(sector1, column1, cell1);
			    pClusterSim->setDetID2(sector2, column2, cell2);
			    array[0]=Track1L; array[1]=Track1R; array[2]=Track2L; array[3]=Track2R;
			    ref_array[0]=Ref1L; ref_array[1]=Ref1R; ref_array[2]=Ref2L; ref_array[3]=Ref2R;
			    isAtBox_array[0]=LisAtBox1; isAtBox_array[1]=RisAtBox1; isAtBox_array[2]=LisAtBox2; isAtBox_array[3]=RisAtBox2;
			}

			if(column1==1 || column1==3 || column1==5) {
			    pClusterSim->setDetID1(sector2, column2, cell2);
			    pClusterSim->setDetID2(sector1, column1, cell1);
			    array[0]=Track2L; array[1]=Track2R; array[2]=Track1L; array[3]=Track1R;
			    ref_array[0]=Ref2L; ref_array[1]=Ref2R; ref_array[2]=Ref1L; ref_array[3]=Ref1R;
			    isAtBox_array[0]=LisAtBox2; isAtBox_array[1]=RisAtBox2; isAtBox_array[2]=LisAtBox1; isAtBox_array[3]=RisAtBox1;
			}
			pClusterSim->setRMS(sigma_T/sqrt(2.), sigma_X/sqrt(2.), sigma_Y/sqrt(2.), sigma_Z/sqrt(2.));
		    }

		    //Algorithm for deciding the preferred track
		    for(Int_t m=0;m<4;m++){
			for(Int_t n=0;n<4;n++){
			    if(array[m]==array[n]) 		  weight[m]++;
			}
		    }
		    //Note that double-counting and self-counting does not affect the meaning of weight here :)

		    Track   = array[0];
		    IsAtBox = isAtBox_array[0];

		    for(Int_t m=0;m<3;m++)   {
			if (weight[m+1]>weight[m]) {
			    Track=array[m+1];
			    IsAtBox = isAtBox_array[m];}
		    }

		    pClusterSim->setTrack(Track);
		    pClusterSim->setIsAtBox(IsAtBox);


		    //Fill the lists
		    for(Int_t m=0;m<4;m++) {
			pClusterSim->setTrackList(m,array[m]);
			pClusterSim->setRefList(m,ref_array[m]);
			pClusterSim->setIsAtBoxList(m,isAtBox_array[m]);
		    }

		    pClusterSim->setNTracksAtBox(howManyTracks(pClusterSim));
		    pClusterSim->setNTracksAtCells(howManyTracksAtCells(pClusterSim));
		}

		//if real data
		else {

		    pCluster->setClusterType(cluster_type);
		    pCluster->setCluster(tof, charge, xmod, ymod, zmod);
		    pCluster->setRSEC(xsec,ysec,zsec);
		    pCluster->setXYZLab(xlab,ylab,zlab);
		    pCluster->setTheta(theta);
		    pCluster->setPhi(phi);
		    pCluster->setAddress(loc_cluster[0], index_cluster);

		    if(cluster_type==1) {
			pCluster->setDetID1(sector1, column1, cell1);
			pCluster->setRMS(sigma_T, sigma_X, sigma_Y, sigma_Z);
			if(inFlag1) pCluster->setInsideCellFlag(1);
		    }
		    else{
			if(column1==0 || column1==2 || column1==4) {
			    pCluster->setDetID1(sector1, column1, cell1);
			    pCluster->setDetID2(sector2, column2, cell2);
			}

			if(column1==1 || column1==3 || column1==5) {
			    pCluster->setDetID1(sector2, column2, cell2);
			    pCluster->setDetID2(sector1, column1, cell1);
			}

			pCluster->setRMS(sigma_T/sqrt(2.), sigma_X/sqrt(2.), sigma_Y/sqrt(2.), sigma_Z/sqrt(2.));

			if(inFlag1 && inFlag2) {
			    pCluster->setInsideCellFlag(1);
			} else {
			    pCluster->setInsideCellFlag(0);
			    if(inFlag1) pCluster->setInsideCellFlag(2);
			    if(inFlag2) pCluster->setInsideCellFlag(3);
			}
		    }
		}
	    } // end loop k (cells)
	} // end loop j (groups of columns)
    } // end sector loop

    return EXIT_SUCCESS;
}

Int_t HRpcClusterF::howManyTracks(HRpcClusterSim* pClusterSim) {

    HRpcHitSim     *pHit1        = 0;
    HRpcHitSim     *pHit2        = 0;
    HLocation 	 loc1;
    HLocation 	 loc2;
    loc1.set(3,0,0,0);
    loc2.set(3,0,0,0);

    Int_t TrackL1[10], TrackR1[10];
    Int_t TrackL2[10], TrackR2[10];
    Int_t TrackTot[40], TrackDifferent[40];

    loc1[0] = pClusterSim->getSector1();
    loc1[1] = pClusterSim->getColumn1();
    loc1[2] = pClusterSim->getCell1();
    pHit1 = (HRpcHitSim*)pHitCat->getObject(loc1);
    pHit1->getTrackLArray(TrackL1);
    pHit1->getTrackRArray(TrackR1);
    for(Int_t i=0;i<10;i++) TrackL2[i]    = -999;
    for(Int_t i=0;i<10;i++) TrackR2[i]    = -999;

    if((pClusterSim->getClusterType())==2) {
	loc2[0] = pClusterSim->getSector2();
	loc2[1] = pClusterSim->getColumn2();
	loc2[2] = pClusterSim->getCell2();

	pHit2 = (HRpcHitSim*)pHitCat->getObject(loc2);
	pHit2->getTrackLArray(TrackL2);
	pHit2->getTrackRArray(TrackR2);
    }

    for(Int_t i=0;i<40;i++) TrackDifferent[i]=-999;

    for(Int_t i=0;i<10;i++) TrackTot[i]    = TrackL1[i];
    for(Int_t i=0;i<10;i++) TrackTot[i+10] = TrackR1[i];
    for(Int_t i=0;i<10;i++) TrackTot[i+20] = TrackL2[i];
    for(Int_t i=0;i<10;i++) TrackTot[i+30] = TrackR2[i];

    Int_t nTracks=0;

    for(Int_t i=0;i<40;i++) {
	if(TrackTot[i]<0) continue;
	Int_t count=0;
	for(Int_t j=0;j<40;j++) if(TrackDifferent[j]==TrackTot[i]) count++;
	if(count==0) {
	    TrackDifferent[nTracks] = TrackTot[i];
	    nTracks++;
	}
    }

    return nTracks;
}

Int_t HRpcClusterF::howManyTracksAtCells(HRpcClusterSim* pClusterSim)
{

    HRpcHitSim     *pHit1        = 0;
    HRpcHitSim     *pHit2        = 0;
    HLocation 	 loc1;
    HLocation 	 loc2;
    loc1.set(3,0,0,0);
    loc2.set(3,0,0,0);

    Int_t TrackLDgtr1[10], TrackRDgtr1[10];
    Int_t TrackLDgtr2[10], TrackRDgtr2[10];
    Int_t TrackTot[40], TrackDifferent[40];

    loc1[0] = pClusterSim->getSector1();
    loc1[1] = pClusterSim->getColumn1();
    loc1[2] = pClusterSim->getCell1();
    pHit1 = (HRpcHitSim*)pHitCat->getObject(loc1);
    pHit1->getTrackLDgtrArray(TrackLDgtr1);
    pHit1->getTrackRDgtrArray(TrackRDgtr1);
    for(Int_t i=0;i<10;i++) TrackLDgtr2[i]    = -999;
    for(Int_t i=0;i<10;i++) TrackRDgtr2[i]    = -999;

    if((pClusterSim->getClusterType())==2) {
	loc2[0] = pClusterSim->getSector2();
	loc2[1] = pClusterSim->getColumn2();
	loc2[2] = pClusterSim->getCell2();

	pHit2 = (HRpcHitSim*)pHitCat->getObject(loc2);
	pHit2->getTrackLDgtrArray(TrackLDgtr2);
	pHit2->getTrackRDgtrArray(TrackRDgtr2);
    }

    for(Int_t i=0;i<40;i++) TrackDifferent[i]=-999;

    for(Int_t i=0;i<10;i++) TrackTot[i]    = TrackLDgtr1[i];
    for(Int_t i=0;i<10;i++) TrackTot[i+10] = TrackRDgtr1[i];
    for(Int_t i=0;i<10;i++) TrackTot[i+20] = TrackLDgtr2[i];
    for(Int_t i=0;i<10;i++) TrackTot[i+30] = TrackRDgtr2[i];

    Int_t nTracks=0;

    for(Int_t i=0;i<40;i++) {
	if(TrackTot[i]<0) continue;
	Int_t count=0;
	for(Int_t j=0;j<40;j++) if(TrackDifferent[j]==TrackTot[i]) count++;
	if(count==0) {
	    TrackDifferent[nTracks] = TrackTot[i];
	    nTracks++;
	}
    }

    return nTracks;
}

ClassImp(HRpcClusterF)
 hrpcclusterf.cc:1
 hrpcclusterf.cc:2
 hrpcclusterf.cc:3
 hrpcclusterf.cc:4
 hrpcclusterf.cc:5
 hrpcclusterf.cc:6
 hrpcclusterf.cc:7
 hrpcclusterf.cc:8
 hrpcclusterf.cc:9
 hrpcclusterf.cc:10
 hrpcclusterf.cc:11
 hrpcclusterf.cc:12
 hrpcclusterf.cc:13
 hrpcclusterf.cc:14
 hrpcclusterf.cc:15
 hrpcclusterf.cc:16
 hrpcclusterf.cc:17
 hrpcclusterf.cc:18
 hrpcclusterf.cc:19
 hrpcclusterf.cc:20
 hrpcclusterf.cc:21
 hrpcclusterf.cc:22
 hrpcclusterf.cc:23
 hrpcclusterf.cc:24
 hrpcclusterf.cc:25
 hrpcclusterf.cc:26
 hrpcclusterf.cc:27
 hrpcclusterf.cc:28
 hrpcclusterf.cc:29
 hrpcclusterf.cc:30
 hrpcclusterf.cc:31
 hrpcclusterf.cc:32
 hrpcclusterf.cc:33
 hrpcclusterf.cc:34
 hrpcclusterf.cc:35
 hrpcclusterf.cc:36
 hrpcclusterf.cc:37
 hrpcclusterf.cc:38
 hrpcclusterf.cc:39
 hrpcclusterf.cc:40
 hrpcclusterf.cc:41
 hrpcclusterf.cc:42
 hrpcclusterf.cc:43
 hrpcclusterf.cc:44
 hrpcclusterf.cc:45
 hrpcclusterf.cc:46
 hrpcclusterf.cc:47
 hrpcclusterf.cc:48
 hrpcclusterf.cc:49
 hrpcclusterf.cc:50
 hrpcclusterf.cc:51
 hrpcclusterf.cc:52
 hrpcclusterf.cc:53
 hrpcclusterf.cc:54
 hrpcclusterf.cc:55
 hrpcclusterf.cc:56
 hrpcclusterf.cc:57
 hrpcclusterf.cc:58
 hrpcclusterf.cc:59
 hrpcclusterf.cc:60
 hrpcclusterf.cc:61
 hrpcclusterf.cc:62
 hrpcclusterf.cc:63
 hrpcclusterf.cc:64
 hrpcclusterf.cc:65
 hrpcclusterf.cc:66
 hrpcclusterf.cc:67
 hrpcclusterf.cc:68
 hrpcclusterf.cc:69
 hrpcclusterf.cc:70
 hrpcclusterf.cc:71
 hrpcclusterf.cc:72
 hrpcclusterf.cc:73
 hrpcclusterf.cc:74
 hrpcclusterf.cc:75
 hrpcclusterf.cc:76
 hrpcclusterf.cc:77
 hrpcclusterf.cc:78
 hrpcclusterf.cc:79
 hrpcclusterf.cc:80
 hrpcclusterf.cc:81
 hrpcclusterf.cc:82
 hrpcclusterf.cc:83
 hrpcclusterf.cc:84
 hrpcclusterf.cc:85
 hrpcclusterf.cc:86
 hrpcclusterf.cc:87
 hrpcclusterf.cc:88
 hrpcclusterf.cc:89
 hrpcclusterf.cc:90
 hrpcclusterf.cc:91
 hrpcclusterf.cc:92
 hrpcclusterf.cc:93
 hrpcclusterf.cc:94
 hrpcclusterf.cc:95
 hrpcclusterf.cc:96
 hrpcclusterf.cc:97
 hrpcclusterf.cc:98
 hrpcclusterf.cc:99
 hrpcclusterf.cc:100
 hrpcclusterf.cc:101
 hrpcclusterf.cc:102
 hrpcclusterf.cc:103
 hrpcclusterf.cc:104
 hrpcclusterf.cc:105
 hrpcclusterf.cc:106
 hrpcclusterf.cc:107
 hrpcclusterf.cc:108
 hrpcclusterf.cc:109
 hrpcclusterf.cc:110
 hrpcclusterf.cc:111
 hrpcclusterf.cc:112
 hrpcclusterf.cc:113
 hrpcclusterf.cc:114
 hrpcclusterf.cc:115
 hrpcclusterf.cc:116
 hrpcclusterf.cc:117
 hrpcclusterf.cc:118
 hrpcclusterf.cc:119
 hrpcclusterf.cc:120
 hrpcclusterf.cc:121
 hrpcclusterf.cc:122
 hrpcclusterf.cc:123
 hrpcclusterf.cc:124
 hrpcclusterf.cc:125
 hrpcclusterf.cc:126
 hrpcclusterf.cc:127
 hrpcclusterf.cc:128
 hrpcclusterf.cc:129
 hrpcclusterf.cc:130
 hrpcclusterf.cc:131
 hrpcclusterf.cc:132
 hrpcclusterf.cc:133
 hrpcclusterf.cc:134
 hrpcclusterf.cc:135
 hrpcclusterf.cc:136
 hrpcclusterf.cc:137
 hrpcclusterf.cc:138
 hrpcclusterf.cc:139
 hrpcclusterf.cc:140
 hrpcclusterf.cc:141
 hrpcclusterf.cc:142
 hrpcclusterf.cc:143
 hrpcclusterf.cc:144
 hrpcclusterf.cc:145
 hrpcclusterf.cc:146
 hrpcclusterf.cc:147
 hrpcclusterf.cc:148
 hrpcclusterf.cc:149
 hrpcclusterf.cc:150
 hrpcclusterf.cc:151
 hrpcclusterf.cc:152
 hrpcclusterf.cc:153
 hrpcclusterf.cc:154
 hrpcclusterf.cc:155
 hrpcclusterf.cc:156
 hrpcclusterf.cc:157
 hrpcclusterf.cc:158
 hrpcclusterf.cc:159
 hrpcclusterf.cc:160
 hrpcclusterf.cc:161
 hrpcclusterf.cc:162
 hrpcclusterf.cc:163
 hrpcclusterf.cc:164
 hrpcclusterf.cc:165
 hrpcclusterf.cc:166
 hrpcclusterf.cc:167
 hrpcclusterf.cc:168
 hrpcclusterf.cc:169
 hrpcclusterf.cc:170
 hrpcclusterf.cc:171
 hrpcclusterf.cc:172
 hrpcclusterf.cc:173
 hrpcclusterf.cc:174
 hrpcclusterf.cc:175
 hrpcclusterf.cc:176
 hrpcclusterf.cc:177
 hrpcclusterf.cc:178
 hrpcclusterf.cc:179
 hrpcclusterf.cc:180
 hrpcclusterf.cc:181
 hrpcclusterf.cc:182
 hrpcclusterf.cc:183
 hrpcclusterf.cc:184
 hrpcclusterf.cc:185
 hrpcclusterf.cc:186
 hrpcclusterf.cc:187
 hrpcclusterf.cc:188
 hrpcclusterf.cc:189
 hrpcclusterf.cc:190
 hrpcclusterf.cc:191
 hrpcclusterf.cc:192
 hrpcclusterf.cc:193
 hrpcclusterf.cc:194
 hrpcclusterf.cc:195
 hrpcclusterf.cc:196
 hrpcclusterf.cc:197
 hrpcclusterf.cc:198
 hrpcclusterf.cc:199
 hrpcclusterf.cc:200
 hrpcclusterf.cc:201
 hrpcclusterf.cc:202
 hrpcclusterf.cc:203
 hrpcclusterf.cc:204
 hrpcclusterf.cc:205
 hrpcclusterf.cc:206
 hrpcclusterf.cc:207
 hrpcclusterf.cc:208
 hrpcclusterf.cc:209
 hrpcclusterf.cc:210
 hrpcclusterf.cc:211
 hrpcclusterf.cc:212
 hrpcclusterf.cc:213
 hrpcclusterf.cc:214
 hrpcclusterf.cc:215
 hrpcclusterf.cc:216
 hrpcclusterf.cc:217
 hrpcclusterf.cc:218
 hrpcclusterf.cc:219
 hrpcclusterf.cc:220
 hrpcclusterf.cc:221
 hrpcclusterf.cc:222
 hrpcclusterf.cc:223
 hrpcclusterf.cc:224
 hrpcclusterf.cc:225
 hrpcclusterf.cc:226
 hrpcclusterf.cc:227
 hrpcclusterf.cc:228
 hrpcclusterf.cc:229
 hrpcclusterf.cc:230
 hrpcclusterf.cc:231
 hrpcclusterf.cc:232
 hrpcclusterf.cc:233
 hrpcclusterf.cc:234
 hrpcclusterf.cc:235
 hrpcclusterf.cc:236
 hrpcclusterf.cc:237
 hrpcclusterf.cc:238
 hrpcclusterf.cc:239
 hrpcclusterf.cc:240
 hrpcclusterf.cc:241
 hrpcclusterf.cc:242
 hrpcclusterf.cc:243
 hrpcclusterf.cc:244
 hrpcclusterf.cc:245
 hrpcclusterf.cc:246
 hrpcclusterf.cc:247
 hrpcclusterf.cc:248
 hrpcclusterf.cc:249
 hrpcclusterf.cc:250
 hrpcclusterf.cc:251
 hrpcclusterf.cc:252
 hrpcclusterf.cc:253
 hrpcclusterf.cc:254
 hrpcclusterf.cc:255
 hrpcclusterf.cc:256
 hrpcclusterf.cc:257
 hrpcclusterf.cc:258
 hrpcclusterf.cc:259
 hrpcclusterf.cc:260
 hrpcclusterf.cc:261
 hrpcclusterf.cc:262
 hrpcclusterf.cc:263
 hrpcclusterf.cc:264
 hrpcclusterf.cc:265
 hrpcclusterf.cc:266
 hrpcclusterf.cc:267
 hrpcclusterf.cc:268
 hrpcclusterf.cc:269
 hrpcclusterf.cc:270
 hrpcclusterf.cc:271
 hrpcclusterf.cc:272
 hrpcclusterf.cc:273
 hrpcclusterf.cc:274
 hrpcclusterf.cc:275
 hrpcclusterf.cc:276
 hrpcclusterf.cc:277
 hrpcclusterf.cc:278
 hrpcclusterf.cc:279
 hrpcclusterf.cc:280
 hrpcclusterf.cc:281
 hrpcclusterf.cc:282
 hrpcclusterf.cc:283
 hrpcclusterf.cc:284
 hrpcclusterf.cc:285
 hrpcclusterf.cc:286
 hrpcclusterf.cc:287
 hrpcclusterf.cc:288
 hrpcclusterf.cc:289
 hrpcclusterf.cc:290
 hrpcclusterf.cc:291
 hrpcclusterf.cc:292
 hrpcclusterf.cc:293
 hrpcclusterf.cc:294
 hrpcclusterf.cc:295
 hrpcclusterf.cc:296
 hrpcclusterf.cc:297
 hrpcclusterf.cc:298
 hrpcclusterf.cc:299
 hrpcclusterf.cc:300
 hrpcclusterf.cc:301
 hrpcclusterf.cc:302
 hrpcclusterf.cc:303
 hrpcclusterf.cc:304
 hrpcclusterf.cc:305
 hrpcclusterf.cc:306
 hrpcclusterf.cc:307
 hrpcclusterf.cc:308
 hrpcclusterf.cc:309
 hrpcclusterf.cc:310
 hrpcclusterf.cc:311
 hrpcclusterf.cc:312
 hrpcclusterf.cc:313
 hrpcclusterf.cc:314
 hrpcclusterf.cc:315
 hrpcclusterf.cc:316
 hrpcclusterf.cc:317
 hrpcclusterf.cc:318
 hrpcclusterf.cc:319
 hrpcclusterf.cc:320
 hrpcclusterf.cc:321
 hrpcclusterf.cc:322
 hrpcclusterf.cc:323
 hrpcclusterf.cc:324
 hrpcclusterf.cc:325
 hrpcclusterf.cc:326
 hrpcclusterf.cc:327
 hrpcclusterf.cc:328
 hrpcclusterf.cc:329
 hrpcclusterf.cc:330
 hrpcclusterf.cc:331
 hrpcclusterf.cc:332
 hrpcclusterf.cc:333
 hrpcclusterf.cc:334
 hrpcclusterf.cc:335
 hrpcclusterf.cc:336
 hrpcclusterf.cc:337
 hrpcclusterf.cc:338
 hrpcclusterf.cc:339
 hrpcclusterf.cc:340
 hrpcclusterf.cc:341
 hrpcclusterf.cc:342
 hrpcclusterf.cc:343
 hrpcclusterf.cc:344
 hrpcclusterf.cc:345
 hrpcclusterf.cc:346
 hrpcclusterf.cc:347
 hrpcclusterf.cc:348
 hrpcclusterf.cc:349
 hrpcclusterf.cc:350
 hrpcclusterf.cc:351
 hrpcclusterf.cc:352
 hrpcclusterf.cc:353
 hrpcclusterf.cc:354
 hrpcclusterf.cc:355
 hrpcclusterf.cc:356
 hrpcclusterf.cc:357
 hrpcclusterf.cc:358
 hrpcclusterf.cc:359
 hrpcclusterf.cc:360
 hrpcclusterf.cc:361
 hrpcclusterf.cc:362
 hrpcclusterf.cc:363
 hrpcclusterf.cc:364
 hrpcclusterf.cc:365
 hrpcclusterf.cc:366
 hrpcclusterf.cc:367
 hrpcclusterf.cc:368
 hrpcclusterf.cc:369
 hrpcclusterf.cc:370
 hrpcclusterf.cc:371
 hrpcclusterf.cc:372
 hrpcclusterf.cc:373
 hrpcclusterf.cc:374
 hrpcclusterf.cc:375
 hrpcclusterf.cc:376
 hrpcclusterf.cc:377
 hrpcclusterf.cc:378
 hrpcclusterf.cc:379
 hrpcclusterf.cc:380
 hrpcclusterf.cc:381
 hrpcclusterf.cc:382
 hrpcclusterf.cc:383
 hrpcclusterf.cc:384
 hrpcclusterf.cc:385
 hrpcclusterf.cc:386
 hrpcclusterf.cc:387
 hrpcclusterf.cc:388
 hrpcclusterf.cc:389
 hrpcclusterf.cc:390
 hrpcclusterf.cc:391
 hrpcclusterf.cc:392
 hrpcclusterf.cc:393
 hrpcclusterf.cc:394
 hrpcclusterf.cc:395
 hrpcclusterf.cc:396
 hrpcclusterf.cc:397
 hrpcclusterf.cc:398
 hrpcclusterf.cc:399
 hrpcclusterf.cc:400
 hrpcclusterf.cc:401
 hrpcclusterf.cc:402
 hrpcclusterf.cc:403
 hrpcclusterf.cc:404
 hrpcclusterf.cc:405
 hrpcclusterf.cc:406
 hrpcclusterf.cc:407
 hrpcclusterf.cc:408
 hrpcclusterf.cc:409
 hrpcclusterf.cc:410
 hrpcclusterf.cc:411
 hrpcclusterf.cc:412
 hrpcclusterf.cc:413
 hrpcclusterf.cc:414
 hrpcclusterf.cc:415
 hrpcclusterf.cc:416
 hrpcclusterf.cc:417
 hrpcclusterf.cc:418
 hrpcclusterf.cc:419
 hrpcclusterf.cc:420
 hrpcclusterf.cc:421
 hrpcclusterf.cc:422
 hrpcclusterf.cc:423
 hrpcclusterf.cc:424
 hrpcclusterf.cc:425
 hrpcclusterf.cc:426
 hrpcclusterf.cc:427
 hrpcclusterf.cc:428
 hrpcclusterf.cc:429
 hrpcclusterf.cc:430
 hrpcclusterf.cc:431
 hrpcclusterf.cc:432
 hrpcclusterf.cc:433
 hrpcclusterf.cc:434
 hrpcclusterf.cc:435
 hrpcclusterf.cc:436
 hrpcclusterf.cc:437
 hrpcclusterf.cc:438
 hrpcclusterf.cc:439
 hrpcclusterf.cc:440
 hrpcclusterf.cc:441
 hrpcclusterf.cc:442
 hrpcclusterf.cc:443
 hrpcclusterf.cc:444
 hrpcclusterf.cc:445
 hrpcclusterf.cc:446
 hrpcclusterf.cc:447
 hrpcclusterf.cc:448
 hrpcclusterf.cc:449
 hrpcclusterf.cc:450
 hrpcclusterf.cc:451
 hrpcclusterf.cc:452
 hrpcclusterf.cc:453
 hrpcclusterf.cc:454
 hrpcclusterf.cc:455
 hrpcclusterf.cc:456
 hrpcclusterf.cc:457
 hrpcclusterf.cc:458
 hrpcclusterf.cc:459
 hrpcclusterf.cc:460
 hrpcclusterf.cc:461
 hrpcclusterf.cc:462
 hrpcclusterf.cc:463
 hrpcclusterf.cc:464
 hrpcclusterf.cc:465
 hrpcclusterf.cc:466
 hrpcclusterf.cc:467
 hrpcclusterf.cc:468
 hrpcclusterf.cc:469
 hrpcclusterf.cc:470
 hrpcclusterf.cc:471
 hrpcclusterf.cc:472
 hrpcclusterf.cc:473
 hrpcclusterf.cc:474
 hrpcclusterf.cc:475
 hrpcclusterf.cc:476
 hrpcclusterf.cc:477
 hrpcclusterf.cc:478
 hrpcclusterf.cc:479
 hrpcclusterf.cc:480
 hrpcclusterf.cc:481
 hrpcclusterf.cc:482
 hrpcclusterf.cc:483
 hrpcclusterf.cc:484
 hrpcclusterf.cc:485
 hrpcclusterf.cc:486
 hrpcclusterf.cc:487
 hrpcclusterf.cc:488
 hrpcclusterf.cc:489
 hrpcclusterf.cc:490
 hrpcclusterf.cc:491
 hrpcclusterf.cc:492
 hrpcclusterf.cc:493
 hrpcclusterf.cc:494
 hrpcclusterf.cc:495
 hrpcclusterf.cc:496
 hrpcclusterf.cc:497
 hrpcclusterf.cc:498
 hrpcclusterf.cc:499
 hrpcclusterf.cc:500
 hrpcclusterf.cc:501
 hrpcclusterf.cc:502
 hrpcclusterf.cc:503
 hrpcclusterf.cc:504
 hrpcclusterf.cc:505
 hrpcclusterf.cc:506
 hrpcclusterf.cc:507
 hrpcclusterf.cc:508
 hrpcclusterf.cc:509
 hrpcclusterf.cc:510
 hrpcclusterf.cc:511
 hrpcclusterf.cc:512
 hrpcclusterf.cc:513
 hrpcclusterf.cc:514
 hrpcclusterf.cc:515
 hrpcclusterf.cc:516
 hrpcclusterf.cc:517
 hrpcclusterf.cc:518
 hrpcclusterf.cc:519
 hrpcclusterf.cc:520
 hrpcclusterf.cc:521
 hrpcclusterf.cc:522
 hrpcclusterf.cc:523
 hrpcclusterf.cc:524
 hrpcclusterf.cc:525
 hrpcclusterf.cc:526
 hrpcclusterf.cc:527
 hrpcclusterf.cc:528
 hrpcclusterf.cc:529
 hrpcclusterf.cc:530
 hrpcclusterf.cc:531
 hrpcclusterf.cc:532
 hrpcclusterf.cc:533
 hrpcclusterf.cc:534
 hrpcclusterf.cc:535
 hrpcclusterf.cc:536
 hrpcclusterf.cc:537
 hrpcclusterf.cc:538
 hrpcclusterf.cc:539
 hrpcclusterf.cc:540
 hrpcclusterf.cc:541
 hrpcclusterf.cc:542
 hrpcclusterf.cc:543
 hrpcclusterf.cc:544
 hrpcclusterf.cc:545
 hrpcclusterf.cc:546
 hrpcclusterf.cc:547
 hrpcclusterf.cc:548
 hrpcclusterf.cc:549
 hrpcclusterf.cc:550
 hrpcclusterf.cc:551
 hrpcclusterf.cc:552
 hrpcclusterf.cc:553
 hrpcclusterf.cc:554
 hrpcclusterf.cc:555
 hrpcclusterf.cc:556
 hrpcclusterf.cc:557
 hrpcclusterf.cc:558
 hrpcclusterf.cc:559
 hrpcclusterf.cc:560
 hrpcclusterf.cc:561
 hrpcclusterf.cc:562
 hrpcclusterf.cc:563
 hrpcclusterf.cc:564
 hrpcclusterf.cc:565
 hrpcclusterf.cc:566
 hrpcclusterf.cc:567
 hrpcclusterf.cc:568
 hrpcclusterf.cc:569
 hrpcclusterf.cc:570
 hrpcclusterf.cc:571
 hrpcclusterf.cc:572
 hrpcclusterf.cc:573
 hrpcclusterf.cc:574
 hrpcclusterf.cc:575
 hrpcclusterf.cc:576
 hrpcclusterf.cc:577
 hrpcclusterf.cc:578
 hrpcclusterf.cc:579
 hrpcclusterf.cc:580
 hrpcclusterf.cc:581
 hrpcclusterf.cc:582
 hrpcclusterf.cc:583
 hrpcclusterf.cc:584
 hrpcclusterf.cc:585
 hrpcclusterf.cc:586
 hrpcclusterf.cc:587
 hrpcclusterf.cc:588
 hrpcclusterf.cc:589
 hrpcclusterf.cc:590
 hrpcclusterf.cc:591
 hrpcclusterf.cc:592
 hrpcclusterf.cc:593
 hrpcclusterf.cc:594
 hrpcclusterf.cc:595
 hrpcclusterf.cc:596
 hrpcclusterf.cc:597
 hrpcclusterf.cc:598
 hrpcclusterf.cc:599
 hrpcclusterf.cc:600
 hrpcclusterf.cc:601
 hrpcclusterf.cc:602
 hrpcclusterf.cc:603
 hrpcclusterf.cc:604
 hrpcclusterf.cc:605
 hrpcclusterf.cc:606
 hrpcclusterf.cc:607
 hrpcclusterf.cc:608
 hrpcclusterf.cc:609
 hrpcclusterf.cc:610
 hrpcclusterf.cc:611
 hrpcclusterf.cc:612
 hrpcclusterf.cc:613
 hrpcclusterf.cc:614
 hrpcclusterf.cc:615
 hrpcclusterf.cc:616
 hrpcclusterf.cc:617
 hrpcclusterf.cc:618
 hrpcclusterf.cc:619
 hrpcclusterf.cc:620
 hrpcclusterf.cc:621
 hrpcclusterf.cc:622
 hrpcclusterf.cc:623
 hrpcclusterf.cc:624
 hrpcclusterf.cc:625
 hrpcclusterf.cc:626
 hrpcclusterf.cc:627
 hrpcclusterf.cc:628
 hrpcclusterf.cc:629
 hrpcclusterf.cc:630
 hrpcclusterf.cc:631
 hrpcclusterf.cc:632
 hrpcclusterf.cc:633
 hrpcclusterf.cc:634
 hrpcclusterf.cc:635
 hrpcclusterf.cc:636
 hrpcclusterf.cc:637
 hrpcclusterf.cc:638
 hrpcclusterf.cc:639
 hrpcclusterf.cc:640
 hrpcclusterf.cc:641
 hrpcclusterf.cc:642
 hrpcclusterf.cc:643
 hrpcclusterf.cc:644
 hrpcclusterf.cc:645
 hrpcclusterf.cc:646
 hrpcclusterf.cc:647
 hrpcclusterf.cc:648
 hrpcclusterf.cc:649
 hrpcclusterf.cc:650
 hrpcclusterf.cc:651
 hrpcclusterf.cc:652
 hrpcclusterf.cc:653
 hrpcclusterf.cc:654
 hrpcclusterf.cc:655
 hrpcclusterf.cc:656
 hrpcclusterf.cc:657
 hrpcclusterf.cc:658
 hrpcclusterf.cc:659
 hrpcclusterf.cc:660
 hrpcclusterf.cc:661
 hrpcclusterf.cc:662
 hrpcclusterf.cc:663
 hrpcclusterf.cc:664
 hrpcclusterf.cc:665
 hrpcclusterf.cc:666
 hrpcclusterf.cc:667
 hrpcclusterf.cc:668
 hrpcclusterf.cc:669
 hrpcclusterf.cc:670
 hrpcclusterf.cc:671
 hrpcclusterf.cc:672
 hrpcclusterf.cc:673
 hrpcclusterf.cc:674
 hrpcclusterf.cc:675
 hrpcclusterf.cc:676
 hrpcclusterf.cc:677
 hrpcclusterf.cc:678
 hrpcclusterf.cc:679
 hrpcclusterf.cc:680
 hrpcclusterf.cc:681
 hrpcclusterf.cc:682
 hrpcclusterf.cc:683
 hrpcclusterf.cc:684
 hrpcclusterf.cc:685
 hrpcclusterf.cc:686
 hrpcclusterf.cc:687
 hrpcclusterf.cc:688
 hrpcclusterf.cc:689
 hrpcclusterf.cc:690