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 **************************************************************************/
21 #include "DataStructures.h"
23 #include <TObjArray.h>
24 #include <TParticle.h>
26 ClassImp(AliRICHPadHit)
30 //___________________________________________
31 AliRICHHit::AliRICHHit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
43 fPHfirst=(Int_t) hits[8];
44 fPHlast=(Int_t) hits[9];
51 ClassImp(AliRICHCerenkov)
52 //___________________________________________
53 AliRICHCerenkov::AliRICHCerenkov(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
63 fPHfirst=(Int_t) hits[8];
64 fPHlast=(Int_t) hits[9];
65 fCMother=Int_t(hits[10]);
67 fProduction = hits[12];
74 //___________________________________________
75 AliRICHPadHit::AliRICHPadHit(Int_t *clhits)
86 ClassImp(AliRICHDigit)
87 //_____________________________________________________________________________
88 AliRICHDigit::AliRICHDigit(Int_t *digits)
91 // Creates a RICH digit object to be updated
98 //_____________________________________________________________________________
99 AliRICHDigit::AliRICHDigit(Int_t *tracks, Int_t *charges, Int_t *digits)
102 // Creates a RICH digit object
107 for(Int_t i=0; i<100; i++) {
108 fTcharges[i] = charges[i];
109 fTracks[i] = tracks[i];
113 ClassImp(AliRICHTransientDigit)
115 //____________________________________________________________________________
116 AliRICHTransientDigit::AliRICHTransientDigit(Int_t ich, Int_t *digits):
120 // Creates a RICH digit list object
124 fTrackList = new TObjArray;
127 //_____________________________________________________________________________
130 ClassImp(AliRICHRawCluster)
131 Int_t AliRICHRawCluster::Compare(TObject *obj)
133 AliRICHRawCluster *raw=(AliRICHRawCluster *)obj;
137 else if (y<yo) return -1;
142 Int_t AliRICHRawCluster::
143 BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto)
145 // Find object using a binary search. Array must first have been sorted.
146 // Search can be limited by setting upto to desired index.
148 Int_t low=from, high=upto-1, half;
151 if(y>coord[half]) low=half;
157 void AliRICHRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr)
160 // Get the 3 closest points(cog) one can find on the second cathode
161 // starting from a given cog on first cathode
165 // Loop over deltax, only 3 times
170 Int_t id[3] = {-2,-2,-2};
171 Float_t jx[3] = {0.,0.,0.};
172 Float_t jy[3] = {0.,0.,0.};
173 Float_t jq[3] = {0.,0.,0.};
174 Int_t jid[3] = {-2,-2,-2};
184 if ((i == 1 && j == id[i-1])
185 ||(i == 2 && (j == id[i-1] || j == id[i-2]))) continue;
186 if (TMath::Abs(xdarray[j]) < xmin) {
187 xmin = TMath::Abs(xdarray[j]);
218 Int_t AliRICHRawCluster::PhysicsContribution()
223 for (Int_t i=0; i<fMultiplicity; i++) {
224 if (fPhysicsMap[i]==2) iPhys++;
225 if (fPhysicsMap[i]==1) iMixed++;
226 if (fPhysicsMap[i]==0) iBg++;
228 if (iMixed==0 && iBg==0) {
230 } else if ((iPhys != 0 && iBg !=0) || iMixed != 0) {
236 //_____________________________________________________________________________
239 ClassImp(AliRICHRecHit)
242 //_____________________________________________________________________________
243 AliRICHRecHit::AliRICHRecHit(Int_t id, Float_t *rechit)
246 // Creates a RICH rec. hit object