committing on behalf of Silvia... new macros for HFE analysis on the train (Markus
[u/mrichter/AliRoot.git] / PWG3 / hfe / macros / ConfigHFEstandard_PbPb.C
CommitLineData
d3338371 1AliAnalysisTaskHFE* ConfigHFEstandard_PbPb(Bool_t useMC){
2 //
3 // HFE standard task configuration
4 //
5
6 AliHFEcuts *hfecuts = new AliHFEcuts("hfeCuts","HFE Standard Cuts");
7 hfecuts->CreateStandardCuts();
8 hfecuts->SetMinNClustersTPC(80);
9 hfecuts->SetMinNClustersITS(3);
10 hfecuts->SetCutITSpixel(AliHFEextraCuts::kFirst);
11 hfecuts->SetCheckITSLayerStatus(kFALSE);
12 hfecuts->UnsetVertexRequirement();
13 hfecuts->SetSigmaToVertex(10);
14 hfecuts->SetQAOn();
15 //hfecuts->SetMinNTrackletsTRD(5);
16
17 AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE("HFEanalysisStandard");
18 task->SetHFECuts(hfecuts);
19// task->SetRemovePileUp(kTRUE);
20
21 // Define Variables
22 AliHFEvarManager *vm = task->GetVarManager();
23 vm->AddVariable("pt");
24 vm->AddVariable("eta");
25 vm->AddVariable("phi");
26 vm->AddVariable("charge");
27 vm->AddVariable("source");
28 vm->AddVariable("centrality");
29
30 if(!useMC){
31 TF1 *hBackground = new TF1("hadronicBackgroundFunction", "[0]+[1]*TMath::Erf([2]*x+[3])", 0, 20);
32 hBackground->SetParameter(0, 8.19639e-02);
33 hBackground->SetParameter(1, 7.66857e-02);
34 hBackground->SetParameter(2, 8.74797e-01);
35 hBackground->SetParameter(3, -2.69972e+00);
36/* hBackground->SetParameter(0, 0.1249);
37 hBackground->SetParameter(1, 0.1239);
38 hBackground->SetParameter(2, 0.8156);
39 hBackground->SetParameter(3, -2.867);*/
40 task->SetBackGroundFactorsFunction(hBackground);
41 }
42
43 // Define PID
44 AliHFEpid *pid = task->GetPID();
45 if(useMC) pid->SetHasMCData(kTRUE);
46 pid->AddDetector("TOF", 0);
47 pid->AddDetector("TPC", 1);
48 pid->ConfigureTPCrejection();
49
50 // QA
51 task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);
52 task->SetQAOn(AliAnalysisTaskHFE::kMCqa);
53 task->SwitchOnPlugin(AliAnalysisTaskHFE::kIsElecBackGround);
54 task->SwitchOnPlugin(AliAnalysisTaskHFE::kSecVtx);
55
56 printf("*************************************\n");
57 printf("Configuring standard Task:\n");
58 task->Print();
59 pid->PrintStatus();
60 printf("*************************************\n");
61 return task;
62}