2 * @file MakeMCCorrTrain.C
3 * @author Christian Holm Christensen <cholm@master.hehi.nbi.dk>
4 * @date Fri Jun 1 13:54:47 2012
8 * @ingroup pwglf_forward_trains_specific
10 #include "TrainSetup.C"
12 //====================================================================
14 * Analysis train to make Forward and Central MC corrections
17 * @ingroup pwglf_forward_mc
18 * @ingroup pwglf_forward_trains_specific
20 class MakeMCCorrTrain : public TrainSetup
24 * Constructor. Date and time must be specified when running this
25 * in Termiante mode on Grid
27 * @param name Name of train (free form)
29 MakeMCCorrTrain(const char* name)
32 fOptions.Set("type", "ESD");
38 * @param par Whether to use par files
39 * @param mgr Analysis manager
41 void CreateTasks(AliAnalysisManager* mgr)
43 // --- Output file name ------------------------------------------
44 AliAnalysisManager::SetCommonFileName("forward_mccorr.root");
46 // --- Load libraries/pars ---------------------------------------
47 LoadLibrary("PWGLFforward2");
49 // --- Set load path ---------------------------------------------
50 gROOT->SetMacroPath(Form("%s:$(ALICE_ROOT)/PWGLF/FORWARD/analysis2",
51 gROOT->GetMacroPath()));
53 // --- Check if this is MC ---------------------------------------
54 if (!mgr->GetMCtruthEventHandler()) return;
56 // --- Task to copy header information ---------------------------
57 gROOT->Macro("AddTaskCopyHeader.C");
59 // --- Add the task ----------------------------------------------
60 gROOT->Macro("AddTaskForwardMCCorr.C");
62 // --- Add the task ----------------------------------------------
63 gROOT->Macro("AddTaskCentralMCCorr.C");
65 //__________________________________________________________________
67 * Create physics selection , and add to manager
69 * @param mc Whether this is for MC
72 void CreatePhysicsSelection(Bool_t mc,
73 AliAnalysisManager* mgr)
75 TrainSetup::CreatePhysicsSelection(mc, mgr);
77 // --- Get input event handler -----------------------------------
78 AliInputEventHandler* ih =
79 dynamic_cast<AliInputEventHandler*>(mgr->GetInputEventHandler());
81 Fatal("CreatePhysicsSelection", "Couldn't get input handler (%p)", ih);
83 // --- Get Physics selection -------------------------------------
84 AliPhysicsSelection* ps =
85 dynamic_cast<AliPhysicsSelection*>(ih->GetEventSelection());
87 Fatal("CreatePhysicsSelection", "Couldn't get PhysicsSelection (%p)", ps);
89 // --- Ignore trigger class when selecting events. This means ---
90 // --- that we get offline+(A,C,E) events too --------------------
91 // ps->SetSkipTriggerClassSelection(true);
94 * Do not the centrality selection
96 // void CreateCentralitySelection(Bool_t, AliAnalysisManager*) {}
97 //__________________________________________________________________
98 const char* ClassName() const { return "MakeMCCorrTrain"; }