Added TPC in the macro search path which is useful to run TPC/ITS tracking from withi...
[u/mrichter/AliRoot.git] / TOF / AliTOF.h
CommitLineData
fe4da5cc 1#ifndef TOF_H
2#define TOF_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////////////////////////////////////////////////
2cef3cb2 9// Manager and hits classes for set: TOF //
fe4da5cc 10////////////////////////////////////////////////
2ab0c725 11#include "TObject.h"
12
13class TFile;
fe4da5cc 14
15#include "AliDetector.h"
16#include "AliHit.h"
2cef3cb2 17#include "AliDigit.h"
2cef3cb2 18#include "AliTOFD.h"
19
fe4da5cc 20class AliTOF : public AliDetector {
21
22protected:
2cef3cb2 23 Int_t fIdSens;
24
25public:
26 Int_t fNTof;
27 Float_t fRmax;
28 Float_t fRmin;
29 Float_t fZlenA;
30 Float_t fZlenB;
31 Float_t fZlenC;
32 Float_t fZtof;
33
34 Float_t fStripLn;
35 Float_t fSpace;
36 Float_t fDeadBndZ;
37 Float_t fDeadBndX;
38 Float_t fXpad;
39 Float_t fZpad;
40 Float_t fGapA;
41 Float_t fGapB;
42 Float_t fOverSpc;
43 Int_t fNpadX;
44 Int_t fNpadZ;
45 Int_t fPadXStr;
46
47 Int_t fNStripA;
48 Int_t fNStripB;
49 Int_t fNStripC;
50
51 Float_t fTimeRes;
52 Float_t fChrgRes;
53
54 Int_t fPadXSector;
55 Int_t fNRoc;
56 Int_t fNFec;
57 Int_t fNTdc;
58 Int_t fNPadXRoc;
59
60
fe4da5cc 61public:
62 AliTOF();
63 AliTOF(const char *name, const char *title);
64 virtual ~AliTOF() {}
2cef3cb2 65 virtual void AddHit(Int_t track, Int_t* vol, Float_t* hits);
66 virtual void AddDigit(Int_t*, Int_t*, Float_t*);
fe4da5cc 67 virtual void CreateGeometry();
68 virtual void CreateMaterials();
69 virtual void Init();
2ab0c725 70 virtual void MakeBranch(Option_t*, char *file=0);
2cef3cb2 71 virtual void FinishEvent();
fe4da5cc 72 virtual Int_t IsVersion() const =0;
73 Int_t DistancetoPrimitive(Int_t px, Int_t py);
74 virtual void StepManager()=0;
2cef3cb2 75 virtual void TOFpc(Float_t, Float_t, Float_t,
76 Float_t, Float_t,Float_t) {}
8f72dc0c 77 virtual void DrawModule();
2ab0c725 78 virtual void SDigits2Digits();
2cef3cb2 79 void Hits2Digits(Int_t evNumber=0);
80 void Digits2Raw (Int_t evNumber=0);
81 void Raw2Digits (Int_t evNumber=0);
fe4da5cc 82
2cef3cb2 83private:
84 Bool_t CheckOverlap(Int_t*, Float_t*, Int_t);
85
fe4da5cc 86 ClassDef(AliTOF,1) // Time Of Flight base class
87};
88
89//___________________________________________
90
91class AliTOFhit : public AliHit {
92public:
826b71ec 93 Int_t fSector; // number of sector
94 Int_t fPlate; // number of plate
2cef3cb2 95 Int_t fStrip; // number of strip
826b71ec 96 Int_t fPad_x; // number of pad along x
97 Int_t fPad_z; // number of pad along z
2cef3cb2 98 Float_t fPx; // px in TOF
99 Float_t fPy; // py in TOF
100 Float_t fPz; // pz in TOF
101 Float_t fPmom; // P in TOF
102 Float_t fTof; // Time of Flight
103 Float_t fDx; // x of impact point in pad r.s.
104 Float_t fDy; // y of impact point in pad r.s.
105 Float_t fDz; // z of impact point in pad r.s.
106 Float_t fIncA; // Incidence angle
107 Float_t fEdep; // Energy lost in tof layer
fe4da5cc 108
109public:
110 AliTOFhit() {}
2cef3cb2 111 AliTOFhit(Int_t shunt, Int_t track, Int_t* vol,
112 Float_t *hits);
fe4da5cc 113 virtual ~AliTOFhit() {}
2cef3cb2 114
115 inline Int_t GetSector() {return fSector;}
116 inline Int_t GetPlate() {return fPlate;}
117 inline Int_t GetPad_x() {return fPad_x;}
118 inline Int_t GetPad_z() {return fPad_z;}
119 inline Int_t GetStrip() {return (Int_t)(fPad_z*0.5);}
120 inline Float_t GetTof() {return fTof;}
121 inline Float_t GetMom() {return fPmom;}
122 inline Float_t GetDx() {return fDx;}
123 inline Float_t GetDz() {return fDz;}
124 inline Float_t GetIncA() {return fIncA;}
125 inline Float_t GetEdep() {return fEdep;}
126
fe4da5cc 127 ClassDef(AliTOFhit,1) // Hits for Time Of Flight
128};
2cef3cb2 129
130//_______________________________________________________
131
132class AliTOFdigit : public AliDigit {
133
134 public:
135 Int_t fSector;
136 Int_t fPlate;
137 Int_t fStrip;
138 Int_t fPad_x;
139 Int_t fPad_z;
140 Float_t fTdc;
141 Float_t fAdc;
142
143 public:
144 AliTOFdigit(){}
145 AliTOFdigit(Int_t*, Int_t*, Float_t*);
146 virtual ~AliTOFdigit(){}
147 void GetLocation(Int_t*);
148 Int_t GetTotPad();
149 void AddTrack(Int_t);
150
151 inline Float_t GetTdc() {return fTdc;}
152 inline Float_t GetAdc() {return fAdc;}
153 inline Int_t GetSector() {return fSector;}
154 inline void SetTdc(Float_t TDC){fTdc = TDC;}
155 inline void SetAdc(Float_t ADC){fAdc = ADC;}
156
157 ClassDef(AliTOFdigit,2) // Digits for Time Of Flight
158};
159
fe4da5cc 160#endif