/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Log$ Revision 1.2 2000/10/02 15:51:49 jbarbosa Fixed forward declarations. Moved constructor into implementation file. Revision 1.1 2000/06/12 15:27:26 jbarbosa Cleaned up version. */ #include "AliRICHRawCluster.h" #include #include ClassImp(AliRICHRawCluster) AliRICHRawCluster :: AliRICHRawCluster() { fTracks[0]=fTracks[1]=fTracks[2]=-1; fQ=0; fX=fY=0; fMultiplicity=0; for (int k=0;k<50;k++) { fIndexMap[k]=-1; fOffsetMap[k]=0; fContMap[k]=0; fPhysicsMap[k]=-1; fCtype=-1; } fNcluster[0]=fNcluster[1]=-1; } Int_t AliRICHRawCluster::Compare(const TObject *obj) const { // Compare two clusters AliRICHRawCluster *raw=(AliRICHRawCluster *)obj; Float_t y=fY; Float_t yo=raw->fY; if (y>yo) return 1; else if (y1) { half=(high+low)/2; if(y>coord[half]) low=half; else high=half; } return low; } void AliRICHRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr) { // // Get the 3 closest points(cog) one can find on the second cathode // starting from a given cog on first cathode // // // Loop over deltax, only 3 times // Float_t xmin; Int_t jmin; Int_t id[3] = {-2,-2,-2}; Float_t jx[3] = {0.,0.,0.}; Float_t jy[3] = {0.,0.,0.}; Float_t jq[3] = {0.,0.,0.}; Int_t jid[3] = {-2,-2,-2}; Int_t i,j,imax; if (ntr<3) imax=ntr; else imax=3; for(i=0;i