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