Data classes for RICH (completely updated) (JB,AM)
[u/mrichter/AliRoot.git] / RICH / DataStructures.h
CommitLineData
e885d048 1#ifndef RICHDataStructures_H
2#define RICHDataStructures_H
3
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8/* $Id$ */
9
10
11#include "AliHit.h"
12#include "AliDigit.h"
13#include <TObjArray.h>
14#include <TArrayF.h>
15#include <TMath.h>
16
17
18class AliRICHHit : public AliHit {
19 public:
20 Int_t fChamber; // Chamber number
21 Float_t fParticle; // Geant3 particle type
22 Float_t fTheta ; // Incident theta angle in degrees
23 Float_t fPhi ; // Incident phi angle in degrees
24 Float_t fTlength; // Track length inside the chamber
25 Float_t fEloss; // ionisation energy loss in gas
26 Float_t fPHfirst; // first padhit
27 Float_t fPHlast; // last padhit
28 Float_t fLoss; // did it hit the freon?
29 Float_t fMomX; // Local Momentum
30 Float_t fMomY; // Local Momentum
31 Float_t fMomZ; // Local Momentum
32 public:
33 AliRICHHit() {}
34 AliRICHHit(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *hits);
35 virtual ~AliRICHHit() {}
36
37 ClassDef(AliRICHHit,1) //Hits object for set:RICH
38};
39
40//------------------------------------------------
41// Cerenkov photon object
42//------------------------------------------------
43
44class AliRICHCerenkov: public AliHit {
45 public:
46 Int_t fChamber; // Chamber number
47 Float_t fTheta ; // Incident theta angle in degrees
48 Float_t fPhi ; // Incident phi angle in degrees
49 Float_t fTlength; // Track length inside the chamber
50 Float_t fEloss; // ionisation energy loss in gas
51 Int_t fPHfirst; // first padhit
52 Int_t fPHlast; // last padhit
53 Int_t fCMother; // index of mother particle
54 Float_t fLoss; // nature of particle loss
55 Float_t fIndex; // Index of photon
56 Float_t fProduction; // Point of production
57 Float_t fMomX; // Local Momentum
58 Float_t fMomY; // Local Momentum
59 Float_t fMomZ; // Local Momentum
60 public:
61 AliRICHCerenkov() {}
62 AliRICHCerenkov(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *Cerenkovs);
63 virtual ~AliRICHCerenkov() {}
64
65 ClassDef(AliRICHCerenkov,1) //Cerenkovs object for set:RICH
66};
67
68//
69class AliRICHPadHit : public TObject {
70 public:
71
72 Int_t fHitNumber; // Hit number
73 Int_t fCathode; // Cathode number
74 Int_t fQ ; // Total charge
75 Int_t fPadX ; // Pad number along X
76 Int_t fPadY ; // Pad number along Y
77 Int_t fQpad ; // Charge per pad
78 Int_t fRSec ; // R -sector of pad
79
80 public:
81 AliRICHPadHit() {
82 fHitNumber=fQ=fPadX=fPadY=fQpad=fRSec=0;
83 }
84 AliRICHPadHit(Int_t *clhits);
85 virtual ~AliRICHPadHit() {;}
86
87 ClassDef(AliRICHPadHit,1) //Cluster object for set:RICH
88};
89
90class AliRICHDigit : public TObject {
91 public:
92 Int_t fPadX; // Pad number along x
93 Int_t fPadY ; // Pad number along y
94 Int_t fSignal; // Signal amplitude
95
96
97 Int_t fTcharges[100]; // charge per track making this digit (up to 10)
98 Int_t fTracks[100]; // tracks making this digit (up to 10)
99 Int_t fPhysics; // physics contribution to signal
100 Int_t fHit; // hit number - temporary solution
101
102 public:
103 AliRICHDigit() {}
104 AliRICHDigit(Int_t *digits);
105 AliRICHDigit(Int_t *tracks, Int_t *charges, Int_t *digits);
106 virtual ~AliRICHDigit() {}
107 ClassDef(AliRICHDigit,1) //Digits for set:RICH
108};
109//_____________________________________________________________________________
110
111class AliRICHTransientDigit : public AliRICHDigit {
112 public:
113 Int_t fRpad; // r_pos of pad
114 Int_t fChamber; // chamber number of pad
115 TObjArray *fTrackList;
116 public:
117 AliRICHTransientDigit() {fTrackList=0;}
118 AliRICHTransientDigit(Int_t ich, Int_t *digits);
119 virtual ~AliRICHTransientDigit() {}
120
121 TObjArray *TrackList() {return fTrackList;}
122
123 ClassDef(AliRICHTransientDigit,1) //Digits for set:RICH
124};
125//___________________________________________
126class AliRICHRawCluster : public TObject {
127public:
128 Int_t fTracks[3]; //labels of overlapped tracks
129 Int_t fQ ; // Q of cluster (in ADC counts)
130 Float_t fX ; // X of cluster
131 Float_t fY ; // Y of cluster
132 Int_t fPeakSignal;
133 Int_t fIndexMap[50]; //indeces of digits
134 Int_t fOffsetMap[50];
135 Float_t fContMap[50]; //Contribution from digit
136 Int_t fPhysicsMap[50];
137 Int_t fMultiplicity; //cluster multiplicity
138 Int_t fNcluster[2];
139 Int_t fClusterType;
140 Int_t fCtype; //CL0, CL1, etc...
141 public:
142 AliRICHRawCluster() {
143 fTracks[0]=fTracks[1]=fTracks[2]=-1;
144 fQ=0; fX=fY=0; fMultiplicity=0;
145 for (int k=0;k<50;k++) {
146 fIndexMap[k]=-1;
147 fOffsetMap[k]=0;
148 fContMap[k]=0;
149 fPhysicsMap[k]=-1;
150 fCtype=-1;
151 }
152 fNcluster[0]=fNcluster[1]=-1;
153 }
154 virtual ~AliRICHRawCluster() {}
155
156 Float_t GetRadius() {return TMath::Sqrt(fX*fX+fY*fY);}
157
158 Bool_t IsSortable() const {return kTRUE;}
159 Int_t Compare(TObject *obj);
160 Int_t PhysicsContribution();
161 static Int_t BinarySearch(Float_t r, TArrayF, Int_t from, Int_t upto);
162 static void SortMin(Int_t *,Float_t *,Float_t *,Float_t *,Float_t *,Int_t);
163
164 ClassDef(AliRICHRawCluster,1) //Cluster object for set:RICH
165};
166//___________________________________________
167class AliRICHRecHit : public TObject {
168public:
169 Float_t Theta ; //Incidence Angle theta
170 Float_t Phi ; //Incidence Angle phi
171 Float_t Omega; //Cherenkov angle omega
172 Float_t fX; //Impact coordinate x
173 Float_t fY; //Impact coordinate y
174 public:
175 AliRICHRecHit() {
176 Theta=Phi=Omega=0;
177 }
178 AliRICHRecHit(Int_t id, Float_t* rechit);
179 virtual ~AliRICHRecHit() {}
180 ClassDef(AliRICHRecHit,1) //Reconstructed hit object for set:RICH
181};
182
183#endif