1 SteerESDAnalysisTaskPIDFluctuation(const Char_t *inputfilename, Int_t maxFiles = kMaxInt, Int_t maxEv = kMaxInt)
4 /* include path for ACLic */
5 gSystem->AddIncludePath("-I$ALICE_ROOT/include");
6 gSystem->AddIncludePath("-I$ALICE_ROOT/TOF");
8 gSystem->Load("libANALYSIS");
9 gSystem->Load("libANALYSISalice");
10 /* build analysis task class */
11 gROOT->LoadMacro("AliAnalysisTaskPIDFluctuation.cxx+g");
13 /* setup input chain */
14 TString str = inputfilename;
15 const Char_t *filename;
16 TChain *chain = new TChain("esdTree");
17 if (str.EndsWith(".xml")) {
18 TGrid::Connect("alien://");
19 Info("", "reading data list from collection:");
20 TAlienCollection coll(inputfilename, maxFiles);
23 filename = coll.GetTURL();
24 Info("", Form("%s", filename));
28 else if (str.EndsWith(".txt")) {
29 Info("", "reading data list from text file:");
30 ifstream is(inputfilename);
33 is.getline(buf, 4096);
36 Info("", Form("%s", buf));
41 Info("", "single file:");
42 filename = inputfilename;
43 Info("", Form("%s", filename));
46 Info("", Form("chain is ready: %d events", chain->GetEntries()));
48 /* create analysis manager */
49 AliAnalysisManager *mgr = new AliAnalysisManager("EbyEFluctuationPID");
51 /* define input event handler */
52 AliESDInputHandler *esdh = new AliESDInputHandler();
53 esdh->SetReadFriends(kFALSE);
54 mgr->SetInputEventHandler(esdh);
57 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
58 AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kFALSE);
59 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
60 AliCentralitySelectionTask *centralityTask = AddTaskCentrality();
61 gROOT->LoadMacro("AddAnalysisTaskPIDFluctuation.C");
63 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkGlobal, 0., 10., -0.8, 0.8);
64 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkTPCOnly, 0., 10., -0.8, 0.8);
65 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkTPCOnly, 0.3, 1.5, -0.8, 0.8);
66 AddAnalysisTaskPIDFluctuation(AliAODTrack::kTrkTPCOnly, 0.3, 1.5, -0.4, 0.4);
68 printf("ready-steady-go\n");
71 mgr->SetDebugLevel(0);
72 if (!mgr->InitAnalysis()) return;
74 mgr->StartAnalysis("local", chain, maxEv);
76 /* create dummy file to tell we are done */
77 gSystem->Exec("touch done");