]>
Commit | Line | Data |
---|---|---|
a1f80595 | 1 | #ifndef AliFMDInput_H |
2 | #define AliFMDInput_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights | |
4 | * reserved. | |
5 | * | |
6 | * See cxx source for full Copyright notice | |
7 | */ | |
8 | //___________________________________________________________________ | |
9 | // | |
10 | // The classes defined here, are utility classes for reading in data | |
11 | // for the FMD. They are put in a seperate library to not polute the | |
12 | // normal libraries. The classes are intended to be used as base | |
13 | // classes for customized class that do some sort of analysis on the | |
14 | // various types of data produced by the FMD. | |
15 | // | |
16 | #ifndef ALILOADER_H | |
17 | # include <AliLoader.h> | |
18 | #endif | |
19 | #ifndef ALIRUNLOADER_H | |
20 | # include <AliRunLoader.h> | |
21 | #endif | |
22 | #ifndef ALIRUN_H | |
23 | # include <AliRun.h> | |
24 | #endif | |
25 | #ifndef ALISTACK_H | |
26 | # include <AliStack.h> | |
27 | #endif | |
28 | #ifndef ALIFMD_H | |
29 | # include <AliFMD.h> | |
30 | #endif | |
31 | #ifndef ROOT_TTree | |
32 | # include <TTree.h> | |
33 | #endif | |
34 | #ifndef ROOT_TParticle | |
35 | # include <TParticle.h> | |
36 | #endif | |
37 | #ifndef ROOT_TString | |
38 | # include <TString.h> | |
39 | #endif | |
40 | ||
41 | //___________________________________________________________________ | |
42 | class AliFMDInput : public TObject | |
43 | { | |
44 | public: | |
45 | enum ETrees { | |
46 | kHits = 1, | |
47 | kKinematics, | |
48 | kDigits, | |
49 | kSDigits, | |
50 | kHeader, | |
51 | kRecPoints | |
52 | }; | |
53 | AliFMDInput(); | |
54 | AliFMDInput(const char* gAliceFile); | |
55 | virtual ~AliFMDInput() {} | |
56 | ||
57 | virtual void AddLoad(ETrees tree) { SETBIT(fTreeMask, tree); } | |
58 | virtual void RemoveLoad(ETrees tree) { CLRBIT(fTreeMask, tree); } | |
59 | virtual Int_t NEvents() const; | |
60 | ||
61 | virtual Bool_t Init(); | |
62 | virtual Bool_t Begin(Int_t event); | |
63 | virtual Bool_t Event() = 0; | |
64 | virtual Bool_t End(); | |
65 | virtual Bool_t Finish() { return kTRUE; } | |
66 | virtual Bool_t Run(); | |
67 | protected: | |
68 | TString fGAliceFile; // File name of gAlice file | |
69 | AliRunLoader* fLoader; // Loader of FMD data | |
70 | AliRun* fRun; // Run information | |
71 | AliStack* fStack; // Stack of particles | |
72 | AliLoader* fFMDLoader; // Loader of FMD data | |
73 | AliFMD* fFMD; // FMD object | |
74 | TTree* fTreeE; // Header tree | |
75 | TTree* fTreeH; // Hits tree | |
76 | TTree* fTreeD; // Digit tree | |
77 | TTree* fTreeS; // SDigit tree | |
78 | TTree* fTreeR; // RecPoint tree | |
79 | TClonesArray* fArrayE; // Event info array | |
80 | TClonesArray* fArrayH; // Hit info array | |
81 | TClonesArray* fArrayD; // Digit info array | |
82 | TClonesArray* fArrayS; // SDigit info array | |
83 | TClonesArray* fArrayN; // Mult (single) info array | |
84 | TClonesArray* fArrayP; // Mult (region) info array | |
85 | Int_t fTreeMask; // Which tree's to load | |
86 | Bool_t fIsInit; | |
87 | ClassDef(AliFMDInput,0) //Hits for detector FMD | |
88 | }; | |
89 | ||
90 | ||
91 | //____________________________________________________________________ | |
92 | class AliFMDHit; | |
93 | class AliFMDInputHits : public AliFMDInput | |
94 | { | |
95 | public: | |
96 | AliFMDInputHits(const char* file="galice.root") | |
97 | : AliFMDInput(file) { AddLoad(kHits); } | |
98 | virtual Bool_t Event(); | |
99 | virtual Bool_t ProcessHit(AliFMDHit* hit, TParticle* track) = 0; | |
100 | ClassDef(AliFMDInputHits, 0); | |
101 | }; | |
102 | ||
103 | //____________________________________________________________________ | |
104 | class AliFMDDigit; | |
105 | class AliFMDInputDigits : public AliFMDInput | |
106 | { | |
107 | public: | |
108 | AliFMDInputDigits(const char* file="galice.root") | |
109 | : AliFMDInput(file) { AddLoad(kDigits); } | |
110 | virtual Bool_t Event(); | |
111 | virtual Bool_t ProcessDigit(AliFMDDigit* digit) = 0; | |
112 | ClassDef(AliFMDInputDigits, 0); | |
113 | }; | |
114 | ||
115 | //____________________________________________________________________ | |
116 | class AliFMDSDigit; | |
117 | class AliFMDInputSDigits : public AliFMDInput | |
118 | { | |
119 | public: | |
120 | AliFMDInputSDigits(const char* file="galice.root") | |
121 | : AliFMDInput(file) { AddLoad(kSDigits); } | |
122 | virtual Bool_t Event(); | |
123 | virtual Bool_t ProcessSDigit(AliFMDSDigit* sdigit) = 0; | |
124 | ClassDef(AliFMDInputSDigits, 0); | |
125 | }; | |
126 | ||
127 | //____________________________________________________________________ | |
128 | class AliFMDMultStrip; | |
129 | class AliFMDMultRegion; | |
130 | class AliFMDInputRecPoints : public AliFMDInput | |
131 | { | |
132 | public: | |
133 | AliFMDInputRecPoints(const char* file="galice.root") | |
134 | : AliFMDInput(file) { AddLoad(kRecPoints); } | |
135 | virtual Bool_t Event(); | |
136 | virtual Bool_t ProcessStrip(AliFMDMultStrip* mult) = 0; | |
137 | virtual Bool_t ProcessRegion(AliFMDMultRegion* mult) = 0; | |
138 | ClassDef(AliFMDInputRecPoints, 0); | |
139 | }; | |
140 | ||
141 | #endif | |
142 | //____________________________________________________________________ | |
143 | // | |
144 | // Local Variables: | |
145 | // mode: C++ | |
146 | // End: | |
147 | // | |
148 | // EOF | |
149 | // |