]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | |
2 | /* $Id$ */ | |
3 | ||
866de0ba | 4 | #include "AliEventPoolMuon.h" |
5 | #include "AliRunTagCuts.h" | |
6 | #include "AliLHCTagCuts.h" | |
7 | #include "AliDetectorTagCuts.h" | |
8 | #include "AliEventTagCuts.h" | |
9 | #include "AliTagAnalysis.h" | |
10 | ||
11 | // Realisation of an AliVEventPool via | |
12 | // on the flight generation of the bin using AliTagAnalysis. | |
13 | // Created expanding AliEventPoolOTF functionalities | |
14 | // | |
15 | // Authors Alessandro De Falco and Antonio Uras, INFN Cagliari | |
16 | // alessandro.de.falco@ca.infn.it antonio.uras@ca.infn.it | |
17 | ||
18 | #define AliEventPoolMuon_CXX | |
19 | ||
20 | ClassImp(AliEventPoolMuon) | |
21 | ||
22 | //===================================================================================================== | |
23 | ||
24 | AliEventPoolMuon::AliEventPoolMuon(): | |
25 | AliVEventPool(), | |
26 | fTagAnalysis(0), | |
27 | fRunCuts(0), | |
28 | fLHCCuts(0), | |
29 | fDetectorCuts(0), | |
30 | fEventCuts(0), | |
31 | fTagDirectory(0), | |
32 | fMultiplicityMin(0), | |
33 | fMultiplicityMax(0), | |
34 | fMultiplicityStep(0), | |
35 | fMultiplicity(0), | |
36 | fNFWMuonMin(0), | |
37 | fNFWMuonMax(0), | |
38 | fNFWMuonStep(0), | |
39 | fNFWMuon(0), | |
40 | fPrimaryVertexZMin(0), | |
41 | fPrimaryVertexZMax(0), | |
42 | fPrimaryVertexZStep(0), | |
43 | fPrimaryVertexZ(0), | |
44 | fBinNumber(0) { | |
45 | ||
46 | // Default constructor | |
47 | ||
48 | } | |
49 | ||
50 | //===================================================================================================== | |
51 | ||
52 | AliEventPoolMuon::AliEventPoolMuon(const Char_t *name, const Char_t *title): | |
53 | AliVEventPool(name, title), | |
54 | fTagAnalysis(new AliTagAnalysis(title)), | |
55 | fRunCuts(new AliRunTagCuts()), | |
56 | fLHCCuts(new AliLHCTagCuts()), | |
57 | fDetectorCuts(new AliDetectorTagCuts()), | |
58 | fEventCuts(new AliEventTagCuts()), | |
59 | fTagDirectory("."), | |
60 | fMultiplicityMin(0), | |
61 | fMultiplicityMax(0), | |
62 | fMultiplicityStep(0), | |
63 | fMultiplicity(0), | |
64 | fNFWMuonMin(0), | |
65 | fNFWMuonMax(0), | |
66 | fNFWMuonStep(0), | |
67 | fNFWMuon(0), | |
68 | fPrimaryVertexZMin(0), | |
69 | fPrimaryVertexZMax(0), | |
70 | fPrimaryVertexZStep(0), | |
71 | fPrimaryVertexZ(0), | |
72 | fBinNumber(0) { | |
73 | ||
74 | // Constructor | |
75 | ||
76 | } | |
77 | ||
78 | //===================================================================================================== | |
79 | ||
80 | AliEventPoolMuon::AliEventPoolMuon(const AliEventPoolMuon& obj): | |
81 | AliVEventPool(obj), | |
82 | fTagAnalysis(0), | |
83 | fRunCuts(0), | |
84 | fLHCCuts(0), | |
85 | fDetectorCuts(0), | |
86 | fEventCuts(0), | |
87 | fTagDirectory(0), | |
88 | fMultiplicityMin(0), | |
89 | fMultiplicityMax(0), | |
90 | fMultiplicityStep(0), | |
91 | fMultiplicity(0), | |
92 | fNFWMuonMin(0), | |
93 | fNFWMuonMax(0), | |
94 | fNFWMuonStep(0), | |
95 | fNFWMuon(0), | |
96 | fPrimaryVertexZMin(0), | |
97 | fPrimaryVertexZMax(0), | |
98 | fPrimaryVertexZStep(0), | |
99 | fPrimaryVertexZ(0), | |
100 | fBinNumber(0) { | |
101 | ||
102 | // Copy constructor | |
103 | ||
104 | } | |
105 | ||
106 | //===================================================================================================== | |
107 | ||
108 | AliEventPoolMuon& AliEventPoolMuon::operator=(const AliEventPoolMuon& other) { | |
109 | ||
110 | // Assignment operator | |
111 | AliVEventPool::operator=(other); | |
112 | return *this; | |
113 | ||
114 | } | |
115 | ||
116 | //===================================================================================================== | |
117 | ||
118 | void AliEventPoolMuon::Init() { | |
119 | ||
120 | fTagAnalysis -> ChainLocalTags(fTagDirectory); | |
121 | ||
122 | fMultiplicity = fMultiplicityMin; | |
123 | fNFWMuon = fNFWMuonMin; | |
124 | fPrimaryVertexZ = fPrimaryVertexZMin; | |
125 | ||
126 | } | |
127 | ||
128 | //===================================================================================================== | |
129 | ||
130 | TChain* AliEventPoolMuon::GetNextChain() { | |
131 | ||
132 | TChain *chain = 0; | |
133 | fBinNumber++; | |
134 | ||
135 | // hierarchic order of variables: multiplicity -> nFWMuons -> primaryVertexZ | |
136 | ||
137 | Double_t primaryVertexZMax_TMP = fPrimaryVertexZ + fPrimaryVertexZStep; | |
138 | if (primaryVertexZMax_TMP > fPrimaryVertexZMax) { | |
139 | fPrimaryVertexZ = fPrimaryVertexZMin; | |
140 | primaryVertexZMax_TMP = fPrimaryVertexZ + fPrimaryVertexZStep; | |
141 | fNFWMuon += fNFWMuonStep; | |
142 | } | |
143 | ||
144 | Int_t nFWMuonMax_TMP = fNFWMuon + fNFWMuonStep - 1; | |
145 | if (nFWMuonMax_TMP > fNFWMuonMax) { | |
146 | fNFWMuon = fNFWMuonMin; | |
147 | nFWMuonMax_TMP = fNFWMuon + fNFWMuonStep - 1; | |
148 | fMultiplicity += fMultiplicityStep; | |
149 | } | |
150 | ||
151 | Int_t multiplicityMax_TMP = fMultiplicity + fMultiplicityStep - 1; | |
152 | if (multiplicityMax_TMP > fMultiplicityMax) return 0; | |
153 | else { | |
154 | printf("\n"); | |
155 | printf("mixing events in pool #%02d: multiplicity %d -> %d\n",fBinNumber,fMultiplicity,multiplicityMax_TMP); | |
156 | printf(" nFWMuons %d -> %d\n",fNFWMuon,nFWMuonMax_TMP); | |
157 | printf(" vertexZ %f -> %f\n\n",fPrimaryVertexZ, primaryVertexZMax_TMP); | |
158 | fEventCuts->SetPrimaryVertexZRange(fPrimaryVertexZ, primaryVertexZMax_TMP); | |
159 | fEventCuts->SetNFWMuonRange(fNFWMuon, nFWMuonMax_TMP); | |
160 | fEventCuts->SetMultiplicityRange(fMultiplicity, multiplicityMax_TMP); | |
161 | chain = fTagAnalysis->QueryTags(fRunCuts, fLHCCuts, fDetectorCuts, fEventCuts); | |
162 | fPrimaryVertexZ += fPrimaryVertexZStep; // here the innermost bin-variable has to be increased | |
163 | return chain; | |
164 | } | |
165 | ||
166 | } | |
167 | ||
168 | //===================================================================================================== | |
169 | ||
170 | void AliEventPoolMuon::GetCurrentBin(Float_t* /*bin*/) { | |
171 | ||
172 | // | |
173 | ||
174 | } | |
175 | ||
176 | //===================================================================================================== | |
177 | ||
178 | Int_t AliEventPoolMuon::GetDimension() { | |
179 | ||
180 | return (1); | |
181 | ||
182 | } | |
183 | ||
184 | //===================================================================================================== |