]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPC.h
Correct bug in MakeSlidingCell and define 3 new data members related to the number...
[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"
6d75e4b6 14#include <TVector.h>
fe4da5cc 15
73042f01 16
2b06d5c3 17class TMatrix;
de61d5d5 18
2b06d5c3 19class TTree;
cc80f89e 20
2b06d5c3 21class TFile;
22class AliTPCParam;
cc80f89e 23class AliTPCDigitsArray;
792bb11c 24class AliTPCTrackHitsV2; // M.I.
25class AliTPCTrackHits; // M.I. -MI4 old hits - to be removed later
9bdd974b 26//class TLorentzVector;
27class AliTPCLoader;
792bb11c 28
fe4da5cc 29
30class AliTPC : public AliDetector {
1283eee5 31
fe4da5cc 32public:
9bdd974b 33 AliTPC();
fe4da5cc 34 AliTPC(const char *name, const char *title);
9bdd974b 35 AliTPC(const AliTPC& t);
88cb7938 36
37 virtual AliLoader* MakeLoader(const char* topfoldername);
38
fe4da5cc 39 virtual ~AliTPC();
73042f01 40 virtual void AddHit(Int_t a1, Int_t *a2, Float_t *a3);
fe4da5cc 41 virtual void BuildGeometry();
42 virtual void CreateGeometry() {}
43 virtual void CreateMaterials();
0a61bf9d 44
9bdd974b 45 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
0a61bf9d 46 virtual void SDigits2Digits(){;} //MI change -cycling to production
47 virtual void SDigits2Digits2(Int_t eventnumber=0);
48
49 virtual void Hits2SDigits(); // MI - cycling around
50 virtual void Hits2SDigits2(Int_t eventnumber=0);
51
85a5290f 52 virtual void Hits2Digits();
53 virtual void Hits2Digits(Int_t eventnumber); //MI change
2ab0c725 54 virtual void Hits2DigitsSector(Int_t isec); //MI change
fe4da5cc 55 virtual void Init();
56 virtual Int_t IsVersion() const =0;
cc80f89e 57
0421c3d1 58 virtual void Digits2Raw();
59
9bdd974b 60 Int_t GetNsectors() const {return fNsectors;}
88cb7938 61 virtual void MakeBranch(Option_t *opt=" ");
fe4da5cc 62 virtual void ResetDigits();
63 virtual void SetSecAL(Int_t sec);
64 virtual void SetSecAU(Int_t sec);
65 virtual void SetSecLows(Int_t s1,Int_t s2,Int_t s3,Int_t s4,Int_t s5, Int_t s6);
66 virtual void SetSecUps (Int_t s1,Int_t s2,Int_t s3,Int_t s4,Int_t s5, Int_t s6,
88cb7938 67 Int_t s7,Int_t s8,Int_t s9,Int_t s10, Int_t s11, Int_t s12);
fe4da5cc 68 virtual void SetSens(Int_t sens);
cc80f89e 69
4b0fdcad 70
71 virtual void SetSide(Float_t side);
1283eee5 72 virtual void SetGasMixt(Int_t nc,Int_t c1,Int_t c2,Int_t c3,Float_t p1,
73 Float_t p2,Float_t p3);
74
fe4da5cc 75 virtual void StepManager()=0;
8c555625 76 virtual void DrawDetector() {}
cc80f89e 77 AliTPCDigitsArray* GetDigitsArray() {return fDigitsArray;} //MI change
cc80f89e 78 AliTPCParam *GetParam(){return fTPCParam;} // M.K, M.I changes
79 void SetParam(AliTPCParam *param){fTPCParam=param;} // M.K, M.I changes
80 void SetDigitsArray(AliTPCDigitsArray* param) {fDigitsArray=param;} //MI change
39c8eb58 81
82// additional function neccesary for the new hits
9e1a0ddb 83 virtual void MakeBranch2(Option_t *opt=" ", const char *file=0); //
39c8eb58 84 virtual void SetTreeAddress();
85 virtual void SetTreeAddress2();
86 virtual void AddHit2(Int_t a1, Int_t *a2, Float_t *a3); //
87 virtual void ResetHits();
88 virtual void ResetHits2();
89 virtual AliHit* FirstHit(Int_t track);
90 virtual AliHit* NextHit();
91 virtual AliHit* FirstHit2(Int_t track);
92 virtual AliHit* NextHit2();
39c8eb58 93 virtual void LoadPoints(Int_t dummy);
94 virtual void LoadPoints2(Int_t dummy);
95 virtual void LoadPoints3(Int_t dumy);
96 virtual void FinishPrimary();
97 virtual void RemapTrackHitIDs(Int_t *map);
39c8eb58 98 void SetHitType(Int_t type){fHitType =type;} //set type of hit container
f8cf550c 99 void SetDigitsSwitch(Int_t sw){fDigitsSwitch = sw;}
afc42102 100 void SetDefSwitch(Int_t def){fDefaults = def;}
407ff276 101 Float_t GetNoise(); //get Current noise
102 void GenerNoise(Int_t tablasize); // make noise table
9bdd974b 103 Bool_t IsSectorActive(Int_t sec) const; // check if the sector is active
792bb11c 104 void SetActiveSectors(Int_t * sectors, Int_t n); //set active sectors
9bdd974b 105 Int_t GetHitType() const {return fHitType;}
12d8d654 106 void SetActiveSectors(Int_t flag=0); //loop over al hits and set active only hitted sectors
6d75e4b6 107 Bool_t TrackInVolume(Int_t id,Int_t track); //return true if current track is in volume
42157e55 108
109// static functions
9bdd974b 110 static AliTPCParam* LoadTPCParam(TFile *file);
111protected:
112 Int_t fDefaults; // defaults switch
113 Int_t fSens; // ISENS
114 Int_t fSecAL; // Upper sector selector
115 Int_t fSecAU; // Lower sector selector
116 Int_t fSecLows[6]; // List of lower sectors selected
117 Int_t fSecUps[12]; // List of upper sectors selected
118 Int_t fNsectors; // Number of sectors in TPC
119 //MI changes
120 AliTPCDigitsArray * fDigitsArray; //!detector digit object
9bdd974b 121 AliTPCParam *fTPCParam; // pointer to TPC parameters
122 AliTPCTrackHitsV2 *fTrackHits; //!hits for given track M.I.
be5ffbfe 123 // AliTPCTrackHits *fTrackHitsOld; //!hits for given track M.I. MIold -
9bdd974b 124
125 Int_t fHitType; // if fNewHit = 1 old data structure if 2 new hits if 4 old MI stucture
126 // 3 both types
127 Int_t fDigitsSwitch; // digits type, 0->normal, 1->summable
128
129 //MK changes
130
131 Float_t fSide; // selects left(-1), right(+1), or both(0) sides of the TPC
132 Int_t fNoComp; // number of a drift gas components
133 Int_t fMixtComp[3]; // drift gas components
134 Float_t fMixtProp[3]; // mixture proportions
42157e55 135
136 private:
fe4da5cc 137 //
afc42102 138 void SetDefaults();
8c555625 139 void DigitizeRow(Int_t irow,Int_t isec,TObjArray **rowTriplet);
8c2b3fd7 140 Float_t GetSignal(TObjArray *p1, Int_t ntr, TMatrix *m1,
141 TMatrix *m2,Int_t *IndexRange);
142 void GetList (Float_t label,Int_t np,TMatrix *m,Int_t *IndexRange,
8c555625 143 Float_t **pList);
144 void MakeSector(Int_t isec,Int_t nrows,TTree *TH,Stat_t ntracks,TObjArray **row);
cc80f89e 145 void TransportElectron(Float_t *xyz, Int_t *index);
146 Int_t fCurrentIndex[4];// index[0] indicates coordinate system,
147 // index[1] sector number,
148 // index[2] pad row number
149 // index[3] pad row number for which signal is calculated
407ff276 150 Int_t fNoiseDepth; //!noise table
151 Float_t * fNoiseTable; //![fNoiseDepth] table with noise
152 Int_t fCurrentNoise; //!index of the noise in the noise table
792bb11c 153 Bool_t* fActiveSectors; //!bool indicating which sectors are active
407ff276 154
be5ffbfe 155 ClassDef(AliTPC,11) // Time Projection Chamber class
fe4da5cc 156};
157
fe4da5cc 158
fe4da5cc 159//_____________________________________________________________________________
160
161class AliTPChit : public AliHit {
162public:
163 Int_t fSector; //sector number
164 Int_t fPadRow; //Pad Row number
165 Float_t fQ ; //charge
e61fd20d 166 Float_t fTime; //hit time
fe4da5cc 167
168public:
e61fd20d 169 AliTPChit() {fTime = 0.;}
fe4da5cc 170 AliTPChit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
171 virtual ~AliTPChit() {}
39c8eb58 172 void SetX(Float_t x){fX = x;}
173 void SetY(Float_t y){fY = y;}
174 void SetZ(Float_t z){fZ = z;}
e61fd20d 175
176 Float_t Time() const {return fTime;}
fe4da5cc 177
e61fd20d 178 ClassDef(AliTPChit,2) // Time Projection Chamber hits
fe4da5cc 179};
3c0f9266 180
6d75e4b6 181
73042f01 182#endif
fe4da5cc 183
fe4da5cc 184
3c0f9266 185
fe4da5cc 186
fe4da5cc 187
fe4da5cc 188
fe4da5cc 189
fe4da5cc 190
fe4da5cc 191