1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.2 2000/10/02 15:51:49 jbarbosa
19 Fixed forward declarations.
20 Moved constructor into implementation file.
22 Revision 1.1 2000/06/12 15:27:26 jbarbosa
28 #include "AliRICHRawCluster.h"
34 ClassImp(AliRICHRawCluster)
36 AliRICHRawCluster :: AliRICHRawCluster()
38 fTracks[0]=fTracks[1]=fTracks[2]=-1;
39 fQ=0; fX=fY=0; fMultiplicity=0;
40 for (int k=0;k<50;k++) {
47 fNcluster[0]=fNcluster[1]=-1;
50 Int_t AliRICHRawCluster::Compare(const TObject *obj) const
53 // Compare two clusters
55 AliRICHRawCluster *raw=(AliRICHRawCluster *)obj;
59 else if (y<yo) return -1;
64 Int_t AliRICHRawCluster::
65 BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto)
67 // Find object using a binary search. Array must first have been sorted.
68 // Search can be limited by setting upto to desired index.
70 Int_t low=from, high=upto-1, half;
73 if(y>coord[half]) low=half;
79 void AliRICHRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr)
82 // Get the 3 closest points(cog) one can find on the second cathode
83 // starting from a given cog on first cathode
87 // Loop over deltax, only 3 times
92 Int_t id[3] = {-2,-2,-2};
93 Float_t jx[3] = {0.,0.,0.};
94 Float_t jy[3] = {0.,0.,0.};
95 Float_t jq[3] = {0.,0.,0.};
96 Int_t jid[3] = {-2,-2,-2};
106 if ((i == 1 && j == id[i-1])
107 ||(i == 2 && (j == id[i-1] || j == id[i-2]))) continue;
108 if (TMath::Abs(xdarray[j]) < xmin) {
109 xmin = TMath::Abs(xdarray[j]);
140 Int_t AliRICHRawCluster::PhysicsContribution()
143 // Type of physics processes
148 for (Int_t i=0; i<fMultiplicity; i++) {
149 if (fPhysicsMap[i]==2) iPhys++;
150 if (fPhysicsMap[i]==1) iMixed++;
151 if (fPhysicsMap[i]==0) iBg++;
153 if (iMixed==0 && iBg==0) {
155 } else if ((iPhys != 0 && iBg !=0) || iMixed != 0) {