1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 // Realisation of an AliVEventPool via
20 // on the flight (OTF) generation of the bin using AliTagAnalysis.
21 // Author Andreas Morsch
22 // andreas.morsch@cern.ch
24 #include "AliEventPoolOTF.h"
26 #include "AliRunTagCuts.h"
27 #include "AliLHCTagCuts.h"
28 #include "AliDetectorTagCuts.h"
29 #include "AliEventTagCuts.h"
30 #include "AliTagAnalysis.h"
34 #include <TGridResult.h>
36 ClassImp(AliEventPoolOTF)
39 ////////////////////////////////////////////////////////////////////////
41 AliEventPoolOTF::AliEventPoolOTF():
59 // Default constructor
63 AliEventPoolOTF::AliEventPoolOTF(const char* name, const char* title):
64 AliVEventPool(name, title),
65 fTagAnalysis(new AliTagAnalysis(title)),
66 fRunCuts(new AliRunTagCuts()),
67 fLHCCuts(new AliLHCTagCuts()),
68 fDetectorCuts(new AliDetectorTagCuts()),
69 fEventCuts(new AliEventTagCuts()),
86 AliEventPoolOTF::AliEventPoolOTF(const AliEventPoolOTF& obj):
108 AliEventPoolOTF::~AliEventPoolOTF()
115 delete fDetectorCuts;
119 AliEventPoolOTF& AliEventPoolOTF::operator=(const AliEventPoolOTF& other)
121 // Assignment operator
122 AliVEventPool::operator=(other);
127 void AliEventPoolOTF::Init()
131 fTagAnalysis->ChainLocalTags(fTagDirectory);
133 fTagAnalysis->ChainGridTags(fGridTags);
137 for (Int_t i = 0; i < 5; i++) fValue[i] = fValueMin[i];
140 TChain* AliEventPoolOTF::GetNextChain()
152 printf("Current bin (lower) %13.3f %13.3f %13.3f %13.3f %13.3f \n", fValue[kMultiplicity], fValue[kZVertex], fValue[kEventPlane],fValue[kLeadingParticleEta],fValue[kLeadingParticlePhi]);
153 printf("Current bin (upper) %13.3f %13.3f %13.3f %13.3f %13.3f \n", fValue[kMultiplicity] + fValueStep[kMultiplicity] - 1,
154 fValue[kZVertex] + fValueStep[kZVertex],
155 fValue[kEventPlane] + fValueStep[kEventPlane],
156 fValue[kLeadingParticleEta] + fValueStep[kLeadingParticleEta],
157 fValue[kLeadingParticlePhi] + fValueStep[kLeadingParticlePhi]
161 fEventCuts->SetMultiplicityRange(Int_t(fValue[kMultiplicity]) , Int_t(fValue[kMultiplicity] + fValueStep[kMultiplicity] - 1));
162 fEventCuts->SetPrimaryVertexZRange(fValue[kZVertex] , fValue[kZVertex] + fValueStep[kZVertex]);
163 fEventCuts->SetEtaLeadingParticleRange(fValue[kLeadingParticleEta] , fValue[kLeadingParticleEta] + fValueStep[kLeadingParticleEta]);
164 fEventCuts->SetPhiLeadingParticleRange(fValue[kLeadingParticlePhi] , fValue[kLeadingParticlePhi] + fValueStep[kLeadingParticlePhi]);
165 fEventCuts->SetEventPlaneAngleRange(fValue[kEventPlane] , fValue[kEventPlane] + fValueStep[kEventPlane]);
167 fChain = fTagAnalysis->QueryTags(fRunCuts, fLHCCuts, fDetectorCuts, fEventCuts);
171 for (Int_t i = 5; i >= 0; i--)
173 fValue[i] += fValueStep[i];
174 if (i > 0 && fValue[i] >= fValueMax[i]) {
175 fValue[i] = fValueMin[i];
176 } else if (i == 0 && fValue[i] >= fValueMax[i]) {
186 void AliEventPoolOTF::GetCurrentBin(Float_t* /*bin*/)
191 Int_t AliEventPoolOTF::GetDimension()
197 void AliEventPoolOTF::InitArrays()
199 // Initializes the pool axis
201 SetMultiplicityBinning(0, 20000, 20000);
202 SetZVertexBinning(-1000., 1000., 2000.);
203 SetEventPlaneBinning(-1000., 1000., 2000.);
204 SetLeadingParticleEtaBinning(-13.0, 13.0, 27.);
205 SetLeadingParticlePhiBinning(0., 2*(TMath::Pi()),2*(TMath::Pi()));
206 for (Int_t i = 0; i < 5; i++) fValue[i] = fValueMin[i];