5 //#include "AliESDtrackCuts.h"
6 //#include "AliAnalysisCuts.h"
7 //#include "AliFlowTrackSimple.h" // added as hint for hidden library dependency to libPWGflowBase
8 //#include "AliFlowCandidateTrack.h" // added as hint for hidden library dependency to libPWGflowTasks
9 //#include "AliCFContainer.h" // added as hint for hidden library dependency to libCORRFW
10 //#include "AliAODRecoDecayHF2Prong.h" // added as hint for hidden library dependency to libPWGHFvertexingHF
11 #include "AliAnalysisTaskDxHFECorrelation.h"
12 #include "AliDxHFECorrelation.h"
13 #include "AliAnalysisManager.h"
14 #include "AliAnalysisDataContainer.h"
15 #include "AliHFEcuts.h"
19 #include "TDirectory.h"
21 #include "AliRDHFCutsD0toKpi.h"
22 #include "AliHFAssociatedTrackCuts.h"
27 /// @file AddTaskDxHFECorrelation.C
28 /// @author Matthias.Richter@ift.uib.no, Hege.Erdal@ift.uib.no
30 /// @brief Add two instances of D0-HFE correlation task to the manager, SE and ME
32 int AddTaskDxHFECorrelationME(TString configuration="")
34 //First check to see if user wants to see help
35 if (configuration.BeginsWith("help") ||
36 configuration.BeginsWith("--help") ||
37 configuration.BeginsWith("-h") ||
38 configuration.BeginsWith("options") ) {
39 cout <<"\n\n============================================" << endl;
40 cout << "Keywords for AddTaskDxHFECorrelationME.C:\n"
41 << "file= - Filename to store output in\n"
42 << "name= - Name of analysis, will correspond to directory inside the file \n"
43 << "cutname= - Filename where information on event pool for event-mixing is stored (if use external file)\n"
44 << "runD0MassReference - If you also want to include D2H task for D0selection (for comparison purposes)\n"
46 << "usekine - To run on kinematical level \n"
47 << "PbPb - To run on PbPb \n"
48 << "trigger=D/D0/electron - Which particle to trigger on \n"
49 << "\nD0 settings: \n"
50 << "fillD0scheme=both/D0/D0bar - Which fillsheme to use for D0\n"
51 << "\nelectron settings: \n"
52 << "useinvmasscut - If you want to use invariant mass cut (default is 100MeV/c)\n"
53 << "invmasscut= - If you want to specify a different invariant mass cut \n"
54 << "extraname= - extraname for directory and list if you run several tasks at once\n"
55 << "tpcclusters= - How many TPC clusters to use on single track cuts for electrons (default=120)\n"
56 << "itsclusters= - How many itsclusters to be used in single track cuts for electrons (default=4) \n"
57 << "itsreq= - (kFirst,kAny,kNone) Which ITSpixel requirement you want to impose\n"
58 << "elmcreco= - (aftertrackcuts/aftertofpid/afterfullpid) Where you want to stop in track selection to look for electrons for mc \n\n";
62 TString taskOptions="";
63 Bool_t nameset=kFALSE;
64 Bool_t triggerset=kFALSE;
66 // look for configuration arguments if nothing specified
67 // in the function call
68 if (configuration.IsNull() && gDirectory) {
69 const char* confObjectName="run_single_task_configuration";
70 TObject* confObject=gDirectory->FindObject(confObjectName);
72 configuration=confObject->GetTitle();
77 // TODO: currently the name and trigger type are fixed, this requirement
78 // can be loosened later
79 TString delimiter(" ");
80 TStringToken configurationToken(configuration, delimiter);
81 while (configurationToken.NextToken()) {
82 TString argument=configurationToken;
83 if (argument.BeginsWith("name=")) {
84 //To remove various instances of name, and force directory to be DxHFE
86 taskOptions+=" "+argument;
90 //At the moment: Make sure trigger is D0
91 else if (argument.BeginsWith("trigger=")) {
93 taskOptions+=" trigger=D0";
97 else if(argument.BeginsWith("PbPb") ||
98 argument.BeginsWith("system=1")){
100 taskOptions+=" PbPb";
103 // simply pass argument
104 taskOptions+=" "+argument;
108 path="AddTaskDxHFECorrelation.C";
110 if (gSystem->AccessPathName(path)!=0) {
111 // first try local macro, than AliRoot default path
112 path="$ALICE_ROOT/PWGHF/correlationHF/macros/AddTaskDxHFECorrelation.C";
115 gROOT->LoadMacro(path);
117 if (!nameset) taskOptions+=" name=DxHFE";
118 if (!taskOptions) taskOptions+=" trigger=D0";
120 if(!AddTaskDxHFECorrelation(taskOptions)) {
121 printf("Problem setting up the single event correlation task, returning\n");
125 taskOptions+=" event-mixing";
126 if(!AddTaskDxHFECorrelation(taskOptions)) {
127 printf("Problem setting up the mixed event correlation task, returning\n");