]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHRawCluster.cxx
First interation on SplitByLocalMaxima with Nico
[u/mrichter/AliRoot.git] / RICH / AliRICHRawCluster.cxx
CommitLineData
237c933d 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
237c933d 16#include "AliRICHRawCluster.h"
6ce834b4 17#include <iostream.h>
18
237c933d 19
237c933d 20ClassImp(AliRICHRawCluster)
543d5224 21//__________________________________________________________________________________________________
8a235e5c 22
23AliRICHRawCluster :: AliRICHRawCluster()
543d5224 24{//default ctor
8a235e5c 25 fTracks[0]=fTracks[1]=fTracks[2]=-1;
6ce834b4 26 fX=fY=0;
27 fQ=fMultiplicity=0;
8a235e5c 28 for (int k=0;k<50;k++) {
29 fIndexMap[k]=-1;
8a235e5c 30 fContMap[k]=0;
31 fPhysicsMap[k]=-1;
32 fCtype=-1;
33 }
34 fNcluster[0]=fNcluster[1]=-1;
543d5224 35}//ctor
36//__________________________________________________________________________________________________
2a941f4e 37Int_t AliRICHRawCluster::Compare(const TObject *obj) const
543d5224 38{//Compare two clusters
39 AliRICHRawCluster *raw=(AliRICHRawCluster *)obj;
40 Float_t y=fY;
41 Float_t yo=raw->fY;
42 if(y>yo) return 1;
43 else if(y<yo) return -1;
44 else return 0;
45}//Compare()
46//__________________________________________________________________________________________________
237c933d 47Int_t AliRICHRawCluster::PhysicsContribution()
543d5224 48{//Type of physics processes
49 Int_t iPhys=0;
50 Int_t iBg=0;
51 Int_t iMixed=0;
52 for (Int_t i=0; i<fMultiplicity; i++){
53 if(fPhysicsMap[i]==2) iPhys++;
54 if(fPhysicsMap[i]==1) iMixed++;
55 if(fPhysicsMap[i]==0) iBg++;
56 }
57 if(iMixed==0 && iBg==0) return 2;
58 else if((iPhys != 0 && iBg !=0) || iMixed != 0) return 1;
59 else return 0;
60}//PhysicsContribution
61//__________________________________________________________________________________________________
62void AliRICHRawCluster::Print(Option_t*)const
237c933d 63{
6ce834b4 64 Info("","X=%7.2f, Y=%7.2f, Qdc=%4i, Peak=%4i, Multip=%2i, T0=%5i T1=%5i T2=%5i",
65 fX, fY, fQ, fPeakSignal,fMultiplicity, fTracks[0], fTracks[1], fTracks[2]);
66
67 for(int i=0;i<fMultiplicity;i++)
68 cout<<"D"<<i<<"="<<fIndexMap[i]<<" C="<<fContMap[i]<<endl;
543d5224 69}//void AliRICHRawCluster::Print(Option_t *option)const