#include <TDirectory.h>
#include <TTree.h>
#include <TROOT.h>
-#include <iostream>
-#include <iomanip>
//====================================================================
AliForwardMCMultiplicityTask::AliForwardMCMultiplicityTask()
// Initialise the sub objects and stuff. Called on first event
//
//
- UInt_t what = AliForwardCorrectionManager::kAll;
- if (!fEnableLowFlux)
- what ^= AliForwardCorrectionManager::kDoubleHit;
- if (!fCorrections.IsUseMergingEfficiency())
- what ^= AliForwardCorrectionManager::kMergingEfficiency;
-
- AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
- fcm.Init(fEventInspector.GetCollisionSystem(),
- fEventInspector.GetEnergy(),
- fEventInspector.GetField(),
- true,
- what);
- if (!CheckCorrections(what)) return;
-
- const TAxis* pe = fcm.GetEtaAxis();
- const TAxis* pv = fcm.GetVertexAxis();
- if (!pe) AliFatal("No eta axis defined");
- if (!pv) AliFatal("No vertex axis defined");
+ const TAxis* pe = 0;
+ const TAxis* pv = 0;
+
+ if (!ReadCorrections(pe,pv)) return;
fHistos.Init(*pe);
fAODFMD.Init(*pe);
//
// Get the input data
- AliESDEvent* esd = dynamic_cast<AliESDEvent*>(InputEvent());
- if (!esd) {
- AliWarning("No ESD event found for input event");
- return;
- }
+ AliESDEvent* esd = GetESDEvent();
- // On the first event, initialize the parameters
- if (fFirstEvent && esd->GetESDRun()) {
- fEventInspector.ReadRunDetails(esd);
-
- AliInfo(Form("Initializing with parameters from the ESD:\n"
- " AliESDEvent::GetBeamEnergy() ->%f\n"
- " AliESDEvent::GetBeamType() ->%s\n"
- " AliESDEvent::GetCurrentL3() ->%f\n"
- " AliESDEvent::GetMagneticField()->%f\n"
- " AliESDEvent::GetRunNumber() ->%d\n",
- esd->GetBeamEnergy(),
- esd->GetBeamType(),
- esd->GetCurrentL3(),
- esd->GetMagneticField(),
- esd->GetRunNumber()));
-
- fFirstEvent = false;
-
- InitializeSubs();
- }
// Clear stuff
fHistos.Clear();
fESDFMD.Clear();