Forward declarations
[u/mrichter/AliRoot.git] / TPC / AliTPC.h
CommitLineData
73042f01 1#ifndef ALITPC_H
2#define ALITPC_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
fe4da5cc 8////////////////////////////////////////////////
9// Manager class for TPC //
10////////////////////////////////////////////////
fe4da5cc 11#include "AliDetector.h"
12#include "AliHit.h"
13#include "AliDigit.h"
fe4da5cc 14#include <TMatrix.h>
8c555625 15#include <TTree.h>
16#include <TClonesArray.h>
fe4da5cc 17
73042f01 18class TFile;
19
8c555625 20class AliTPCParam;
cc80f89e 21
22class AliTPCDigitsArray;
23class AliTPCClustersArray;
fe4da5cc 24
25class AliTPC : public AliDetector {
26protected:
27 Int_t fSens; // ISENS
28 Int_t fSecAL; // Upper sector selector
29 Int_t fSecAU; // Lower sector selector
30 Int_t fSecLows[6]; // List of lower sectors selected
31 Int_t fSecUps[12]; // List of upper sectors selected
32 Int_t fNsectors; // Number of sectors in TPC
cc80f89e 33 //MI changes
34 AliTPCDigitsArray * fDigitsArray; //detector digit object
35 AliTPCClustersArray * fClustersArray; //detector cluster object
36 AliTPCParam *fTPCParam;
4b0fdcad 37
38 //MK changes
39
40 Float_t fSide; // selects left(-1), right(+1), or both(0) sides of the TPC
1283eee5 41 Int_t fNoComp; // number of a drift gas components
42 Int_t fMixtComp[3]; // drift gas components
43 Float_t fMixtProp[3]; // mixture proportions
44
fe4da5cc 45public:
46 AliTPC();
47 AliTPC(const char *name, const char *title);
48 virtual ~AliTPC();
73042f01 49 virtual void AddHit(Int_t a1, Int_t *a2, Float_t *a3);
fe4da5cc 50 Int_t DistancetoPrimitive(Int_t px, Int_t py);
51 virtual void BuildGeometry();
52 virtual void CreateGeometry() {}
53 virtual void CreateMaterials();
73042f01 54 virtual void Hits2Clusters(TFile *of);
cc80f89e 55 virtual void Hits2ExactClustersSector(Int_t isec); // MI change calculate "exact" cluster position
8c555625 56
57 virtual void Hits2Digits(); //MI change
58 virtual void Hits2DigitsSector(Int_t isec); //MI change
fe4da5cc 59 virtual void Init();
60 virtual Int_t IsVersion() const =0;
73042f01 61 virtual void Digits2Clusters(TFile *of);
62 virtual void Clusters2Tracks(TFile *of);
cc80f89e 63
fe4da5cc 64 Int_t GetNsectors() {return fNsectors;}
65 virtual void MakeBranch(Option_t *opt=" ");
66 virtual void ResetDigits();
67 virtual void SetSecAL(Int_t sec);
68 virtual void SetSecAU(Int_t sec);
69 virtual void SetSecLows(Int_t s1,Int_t s2,Int_t s3,Int_t s4,Int_t s5, Int_t s6);
70 virtual void SetSecUps (Int_t s1,Int_t s2,Int_t s3,Int_t s4,Int_t s5, Int_t s6,
71 Int_t s7,Int_t s8,Int_t s9,Int_t s10, Int_t s11, Int_t s12);
72 virtual void SetSens(Int_t sens);
cc80f89e 73
74 //MK changes
75
4b0fdcad 76 //MK changes
77
78 virtual void SetSide(Float_t side);
1283eee5 79 virtual void SetGasMixt(Int_t nc,Int_t c1,Int_t c2,Int_t c3,Float_t p1,
80 Float_t p2,Float_t p3);
81
fe4da5cc 82 virtual void StepManager()=0;
8c555625 83 virtual void DrawDetector() {}
cc80f89e 84 AliTPCDigitsArray* GetDigitsArray() {return fDigitsArray;} //MI change
85 AliTPCClustersArray* GetClustersArray(){return fClustersArray;} //MI change
86 AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes
87 void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes
88 void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;} //MI change
89 void SetClustersArray(AliTPCClustersArray *clusters) {fClustersArray = clusters;} //MI change
fe4da5cc 90private:
91 //
8c555625 92 void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet);
cc80f89e 93 Float_t GetSignal(TObjArray *p1, Int_t ntr, TMatrix *m1, TMatrix *m2,
8c555625 94 Int_t *IndexRange);
95 void GetList (Float_t label,Int_t np,TMatrix *m,Int_t *IndexRange,
96 Float_t **pList);
97 void MakeSector(Int_t isec,Int_t nrows,TTree *TH,Stat_t ntracks,TObjArray **row);
cc80f89e 98 void TransportElectron(Float_t *xyz, Int_t *index);
99 Int_t fCurrentIndex[4];// index[0] indicates coordinate system,
100 // index[1] sector number,
101 // index[2] pad row number
102 // index[3] pad row number for which signal is calculated
fe4da5cc 103
104 ClassDef(AliTPC,2) // Time Projection Chamber class
105};
106
fe4da5cc 107
108//_____________________________________________________________________________
109
110class AliTPCdigit : public AliDigit {
111public:
112 Int_t fSector; //array of volumes
113 Int_t fPadRow; //Row number
114 Int_t fPad ; //Pad number
115 Int_t fTime; //Time bucket
116 Int_t fSignal; //Signal amplitude
117
118public:
119 AliTPCdigit() {}
120 AliTPCdigit(Int_t *tracks, Int_t *digits);
121 virtual ~AliTPCdigit() {}
122
123 ClassDef(AliTPCdigit,1) // Time Projection Chamber digits
124};
125
126
127//_____________________________________________________________________________
128
129class AliTPChit : public AliHit {
130public:
131 Int_t fSector; //sector number
132 Int_t fPadRow; //Pad Row number
133 Float_t fQ ; //charge
134
135public:
136 AliTPChit() {}
137 AliTPChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
138 virtual ~AliTPChit() {}
139
140 ClassDef(AliTPChit,1) // Time Projection Chamber hits
141};
3c0f9266 142
73042f01 143#endif
fe4da5cc 144
fe4da5cc 145
3c0f9266 146
fe4da5cc 147
fe4da5cc 148
fe4da5cc 149
fe4da5cc 150
fe4da5cc 151
fe4da5cc 152