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