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