]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/macros/configs/PbPb/ConfigHFEElecHadronCorl.C
end-of-line normalization
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / configs / PbPb / ConfigHFEElecHadronCorl.C
1 AliAnalysisTaskElecHadronCorrel* ConfigHFEElecHadronCorl(Bool_t useMC){
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->SetTPCiter1(kTRUE);
11   hfecuts->SetMinNClustersTPC(120);
12   hfecuts->SetMinRatioTPCclusters(0.6);
13   //hfecuts->SetTPCmodes(AliHFEextraCuts::kCrossedRows, AliHFEextraCuts::kFoundOverCR);
14   hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
15   //hfecuts->SetUseMixedVertex(kTRUE);
16
17   hfecuts->SetMinNClustersITS(3);
18   hfecuts->SetCutITSpixel(AliHFEextraCuts::kAny); //shud be put back
19   hfecuts->SetCheckITSLayerStatus(kFALSE); // shud be put back
20 //  hfecuts->UnsetVertexRequirement();
21   hfecuts->SetVertexRange(10.);
22   //hfecuts->SetSigmaToVertex(10);
23   hfecuts->SetTOFPIDStep(kFALSE);
24 //  hfecuts->SetQAOn();
25  hfecuts->SetPtRange(0, 30);
26  hfecuts->SetMaxImpactParam(1,2);
27
28   AliAnalysisTaskElecHadronCorrel *task = new AliAnalysisTaskElecHadronCorrel("HFE-hadron correlations");
29   printf("task ------------------------ %p\n ", task);
30   task->SetHFECuts(hfecuts);
31   task->SetInvariantMassCut(0.05);
32 //  task->SetRemovePileUp(kTRUE);
33
34   // Define PID
35   AliHFEpid *pid = task->GetPID();
36   if(useMC) pid->SetHasMCData(kTRUE);
37   pid->AddDetector("TPC", 0);
38   pid->AddDetector("EMCAL", 1);
39   // change E/p cuts
40   AliHFEpidEMCAL *emcpid = pid->AliHFEpid::GetDetPID(AliHFEpid::kEMCALpid);
41   emcpid->SetEoPMax(1.2);
42   emcpid->SetEoPMim(0.8);
43
44   Double_t params[4];
45   char *cutmodel;
46   if(useMC){
47           // Monte-Carlo needs modelling of the falling mean with momentum at low momentum
48           // for high momentum it is consistent with a flat -0.94
49           cutmodel = "[0]*TMath::Exp([1]*x) + [2] + [3]*x";
50           Double_t paramsMC[4] = {0.7174, -1.588, -0.9395, 0.0246};
51           for(int ipar = 0; ipar < 4; ipar++) params[ipar] = paramsMC[ipar];
52   } else {
53           // Data is consistent with a flat 0.12
54           cutmodel = "pol0";
55           //params[0] = -0.0015;
56           //params[0] = -3.0;
57           //params[0] = -0.05; //sigma min
58           params[0] = -1.0; //sigma min
59   }
60   pid->ConfigureTPCdefaultCut(cutmodel, params,3.0); 
61
62   printf("*************************************\n");
63   printf("Configuring standard Task:\n");
64 //  task->PrintStatus();
65   pid->PrintStatus();
66   printf("*************************************\n"); 
67   return task;
68 }