4 // script to run the AliMultiplicityESDSelector
7 #include "../CreateESDChain.C"
9 void runMultiplicitySelector(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE)
14 gSystem->Load("libEG");
15 gSystem->Load("libGeom");
16 gSystem->Load("libESD");
17 gSystem->Load("libPWG0base");
19 gSystem->Load("libPWG0dep");
21 gROOT->ProcessLine(".L CreatedNdEta.C");
22 gROOT->ProcessLine(".L CreateCuts.C");
23 gROOT->ProcessLine(".L drawPlots.C");
25 TChain* chain = CreateESDChain(data, nRuns, offset);
26 TVirtualProof* proof = 0;
30 proof = TProof::Open("jgrosseo@lxb6046");
34 printf("ERROR: PROOF connection not established.\n");
38 if (proof->EnablePackage("ESD"))
40 printf("ERROR: ESD package could not be enabled.\n");
44 if (proof->EnablePackage("PWG0base"))
46 printf("ERROR: PWG0base package could not be enabled.\n");
52 if (proof->EnablePackage("PWG0dep"))
54 printf("ERROR: PWG0dep package could not be enabled.\n");
59 //chain->SetProof(proof);
62 // ########################################################
63 // selection of esd tracks
64 AliESDtrackCuts* esdTrackCuts = CreateTrackCuts();
67 printf("ERROR: esdTrackCuts could not be created\n");
71 chain->GetUserInfo()->Add(esdTrackCuts);
73 proof->AddInput(esdTrackCuts);
75 TString selectorName = ((aMC == kFALSE) ? "AliMultiplicityESDSelector" : "AliMultiplicityMCSelector");
76 AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo);
78 selectorName += ".cxx++";
86 result = chain->MakeTDSet()->Process(selectorName);
88 result = chain->Process(selectorName);
92 printf("ERROR: Executing process failed with %d.\n", result);