1 //====================================================================
3 // Base class for classes that calculate the multiplicity in the
4 // forward regions event-by-event
10 // - AliAODForwardMult
15 #include "AliForwardMultiplicityBase.h"
16 #include "AliForwardCorrectionManager.h"
18 #include "AliAODHandler.h"
19 #include "AliInputEventHandler.h"
20 #include "AliAnalysisManager.h"
21 #include "AliFMDEventInspector.h"
22 #include "AliFMDEnergyFitter.h"
23 #include "AliFMDSharingFilter.h"
24 #include "AliFMDDensityCalculator.h"
25 #include "AliFMDCorrector.h"
26 #include "AliFMDHistCollector.h"
31 //====================================================================
33 AliForwardMultiplicityBase::CheckCorrections(UInt_t what) const
36 // Check if all needed corrections are there and accounted for. If not,
40 // what Which corrections is needed
43 // true if all present, false otherwise
46 AliForwardCorrectionManager& fcm = AliForwardCorrectionManager::Instance();
47 // Check that we have the energy loss fits, needed by
48 // AliFMDSharingFilter
49 // AliFMDDensityCalculator
50 if (what & AliForwardCorrectionManager::kELossFits && !fcm.GetELossFit()) {
51 AliFatal(Form("No energy loss fits"));
54 // Check that we have the double hit correction - (optionally) used by
55 // AliFMDDensityCalculator
56 if (what & AliForwardCorrectionManager::kDoubleHit && !fcm.GetDoubleHit()) {
57 AliFatal("No double hit corrections");
60 // Check that we have the secondary maps, needed by
62 // AliFMDHistCollector
63 if (what & AliForwardCorrectionManager::kSecondaryMap &&
64 !fcm.GetSecondaryMap()) {
65 AliFatal("No secondary corrections");
68 // Check that we have the vertex bias correction, needed by
70 if (what & AliForwardCorrectionManager::kVertexBias &&
71 !fcm.GetVertexBias()) {
72 AliFatal("No event vertex bias corrections");
75 // Check that we have the merging efficiencies, optionally used by
77 if (what & AliForwardCorrectionManager::kMergingEfficiency &&
78 !fcm.GetMergingEfficiency()) {
79 AliFatal("No merging efficiencies");
82 // Check that we have the acceptance correction, needed by
84 if (what & AliForwardCorrectionManager::kAcceptance &&
85 !fcm.GetAcceptance()) {
86 AliFatal("No acceptance corrections");
92 //____________________________________________________________________
94 AliForwardMultiplicityBase::MarkEventForStore() const
96 // Make sure the AOD tree is filled
97 AliAnalysisManager* am = AliAnalysisManager::GetAnalysisManager();
99 dynamic_cast<AliAODHandler*>(am->GetOutputEventHandler());
101 AliFatal("No AOD output handler set in analysis manager");
103 ah->SetFillAOD(kTRUE);
106 //____________________________________________________________________
108 AliForwardMultiplicityBase::Print(Option_t* option) const
116 std::cout << "AliForwardMultiplicityBase: " << GetName() << "\n"
117 << " Enable low flux code: " << (fEnableLowFlux ? "yes" : "no")
119 gROOT->IncreaseDirLevel();
120 GetEventInspector() .Print(option);
121 GetEnergyFitter() .Print(option);
122 GetSharingFilter() .Print(option);
123 GetDensityCalculator().Print(option);
124 GetCorrections() .Print(option);
125 GetHistCollector() .Print(option);
126 gROOT->DecreaseDirLevel();