several updates for HFEv2 by TPC-EMCal EP
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / configs / PbPb / ConfigHFE_FLOW_TPCEMCal_EP.C
CommitLineData
0f3a6a57 1AliAnalysisTaskFlowTPCEMCalEP* ConfigHFE_FLOW_TPCEMCal_EP(Bool_t useMC, Double_t openingAngle, Double_t invMass,TString nonHFEalgorithm){
a65a7e70 2 //
3 // HFE standard task configuration
4 //
5
6 Bool_t kAnalyseTaggedTracks = kTRUE;
7
8 AliHFEcuts *hfecuts = new AliHFEcuts("hfeCutsEMCAL","HFE Standard Cuts");
9 hfecuts->CreateStandardCuts();
10 hfecuts->SetMinNClustersTPC(100);
11 hfecuts->SetMinRatioTPCclusters(0.6);
12 hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
13 hfecuts->SetMinNClustersITS(3);
14 hfecuts->SetCutITSpixel(AliHFEextraCuts::kFirst);
15 hfecuts->SetCheckITSLayerStatus(kFALSE);
16 hfecuts->SetVertexRange(10.);
17 hfecuts->SetTOFPIDStep(kFALSE);
0f3a6a57 18 hfecuts->SetPtRange(1.5, 50);
a65a7e70 19 hfecuts->SetMaxImpactParam(1,2);
20
21 AliAnalysisTaskFlowTPCEMCalEP *task = new AliAnalysisTaskFlowTPCEMCalEP("HFE v2");
22 printf("task ------------------------ %p\n ", task);
23 task->SetHFECuts(hfecuts);
0f3a6a57 24 task->SetOpeningAngleCut(openingAngle);
25 task->SetInvariantMassCut(invMass);
26 task->SetNonHFEalgorithm(nonHFEalgorithm);
a65a7e70 27
28 // Define PID
29 AliHFEpid *pid = task->GetPID();
30 if(useMC) pid->SetHasMCData(kTRUE);
31 pid->AddDetector("TPC", 0);
32 pid->AddDetector("EMCAL", 1);
33 // change E/p cuts
34 AliHFEpidEMCAL *emcpid = pid->AliHFEpid::GetDetPID(AliHFEpid::kEMCALpid);
35 emcpid->SetEoPMax(1.2);
36 emcpid->SetEoPMim(0.9);
37
38 Double_t params[4];
39 char *cutmodel;
40 if(useMC){
41 // Monte-Carlo needs modelling of the falling mean with momentum at low momentum
42 // for high momentum it is consistent with a flat -0.94
43 cutmodel = "[0]*TMath::Exp([1]*x) + [2] + [3]*x";
44 Double_t paramsMC[4] = {0.7174, -1.588, -0.9395, 0.0246};
45 for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar];
46 } else {
47 // Data is consistent with a flat 0.12
48 cutmodel = "pol0";
49 //params[0] = -0.0015;
50 //params[0] = -3.0;
51 //params[0] = -0.05; //sigma min
52 params[0] = -1.0; //sigma min
53 }
54 pid->ConfigureTPCdefaultCut(cutmodel, params,3.0);
55
56 printf("*************************************\n");
57 printf("Configuring standard Task:\n");
58// task->PrintStatus();
59 pid->PrintStatus();
60 printf("*************************************\n");
61 return task;
62}