]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/macros/configs/pPb/ConfigEMCalHFEpA.C
new EMCal tasks for PA analysis
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / configs / pPb / ConfigEMCalHFEpA.C
1 ///*******************************************************
2 ///Config Description
3 //configIndex = 0 ---> Default cuts and PID
4 //configIndex = 1 ---> Non-HFE, Op Angle < 0.1
5 //configIndex = 2 ---> 
6 ///*******************************************************
7
8 AliAnalysisTaskEMCalHFEpA* ConfigEMCalHFEpA(
9
10 Bool_t isMC=kFALSE, 
11 Int_t triggerIndex=0, 
12 Int_t configIndex=0, 
13 Int_t centralityIndex=0, 
14 Bool_t isAOD = kFALSE,
15 Bool_t isEMCal = kFALSE,
16 Int_t EMCalThreshould = 0 //0 == EG1, 1 == EG2
17 )
18
19 {
20 ///_______________________________________________________________________________________________________________
21 ///Track selection: Cuts used to ensure a minimum quality level of the tracks selected to perform the analysis
22         AliHFEcuts *hfecuts = new AliHFEcuts("hfeCutsMinBias","HFE Cuts");
23         hfecuts->CreateStandardCuts();
24         
25         //TPC Cuts
26         hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);     
27         if(configIndex==2)      hfecuts->SetMinNClustersTPC(90);                                        //Minimum number of clusters on TPC
28         else if(configIndex==3)         hfecuts->SetMinNClustersTPC(110);                               //Minimum number of clusters on TPC
29         else hfecuts->SetMinNClustersTPC(100);                                                                  //Minimum number of clusters on TPC
30         
31         hfecuts->SetMinNClustersTPCPID(80);                                                                 //Minimum number of clusters for dE/dx
32         hfecuts->SetMinRatioTPCclusters(0.6);                                                               //Number of clusters (Found/Findable)
33         
34         //ITS
35         //hfecuts->SetCutITSpixel(AliHFEextraCuts::kBoth);                              //Require at least one cluster on SPD
36         hfecuts->SetCutITSpixel(AliHFEextraCuts::kAny);                                     //Require at least one cluster on SPD
37         //hfecuts->SetCutITSdrift(AliHFEextraCuts::kAny);                                           //Require at least one cluster on SDD
38         hfecuts->SetCheckITSLayerStatus(kFALSE); 
39         
40         if(configIndex==4) hfecuts->SetMinNClustersITS(2);                                                              //Minimum number of clusters on ITS
41         else if(configIndex==5) hfecuts->SetMinNClustersITS(4);                                                         //Minimum number of clusters on ITS
42         else hfecuts->SetMinNClustersITS(3);                                                                        //Minimum number of clusters on ITS
43         
44         //Additional Cuts
45         hfecuts->SetPtRange(2, 1e6);                                                                                //Transversal momentum range in GeV/c
46         //hfecuts->SetMaxImpactParam(1,2);                                                                          //DCA to vertex
47         
48         //Event Selection
49         hfecuts->SetVertexRange(10.);                                                                                                   //
50         //hfecuts->SetProductionVertex(0,0.3,0,0.3);                                                                    //
51 ///_______________________________________________________________________________________________________________
52
53 ///_________________________________________________________________________________________________________________________
54 ///Task config
55         AliAnalysisTaskEMCalHFEpA *task = new AliAnalysisTaskEMCalHFEpA(Form("HFECuts%d_%d_%d",triggerIndex,configIndex,centralityIndex));
56         printf("task ------------------------ %p\n ", task);
57         task->SetHFECuts(hfecuts);
58         task->SetCorrelationAnalysis();
59         task->SetAODanalysis(isAOD);
60         task->SetEventMixing(kTRUE);
61         
62         //to separate trigger threshould
63         if(EMCalThreshould==0 && triggerIndex==2) task->SetEMCalTriggerEG1();
64         if(EMCalThreshould==1 && triggerIndex==2) task->SetEMCalTriggerEG2();
65         
66         if(isEMCal) task->SetUseEMCal();
67         
68         if(configIndex==6) task->SetNonHFEmassCut(0.05);
69         else task->SetNonHFEmassCut(0.1);
70         
71         //if(isEMCal) task->SetEtaCut(-0.6,0.6);
72         //else task->SetEtaCut(-0.9,0.9);
73         
74         task->SetEtaCut(-0.6,0.6);
75         
76         if (configIndex==7) task->SetEoverPCut(0.85,1.2);
77         else if (configIndex==8) task->SetEoverPCut(0.75,1.25);
78         else task->SetEoverPCut(0.8,1.2);
79
80         if(configIndex==1) task->SetNonHFEangleCut(0.1);
81         
82         if(centralityIndex==0) task->SetCentrality(0,20);
83         if(centralityIndex==1) task->SetCentrality(20,40);
84         if(centralityIndex==2) task->SetCentrality(40,60);
85         if(centralityIndex==3) task->SetCentrality(60,80);
86         if(centralityIndex==4) task->SetCentrality(80,100);
87         if(centralityIndex==5) task->SetCentrality(0,100);
88 ///_______________________________________________________________________________________________________________
89
90 ///_______________________________________________________________________________________________________________
91 ///Particle identification
92         AliHFEpid *pid = task->GetPID();
93
94 //______________________________________
95 //In the case of a simulation
96         if(isMC)
97         {
98           pid->SetHasMCData(kTRUE);
99           task->SetMCanalysis();
100         }
101 //______________________________________
102
103 //______________________________________________________
104 //Configure PID
105         //_________________________
106         //TPC PID
107         pid->AddDetector("TPC", 1);                             //Add TPC PID
108         
109         //_________________________
110         //Configure TPC cut
111         //Defaul = -1 to 3 sigmas
112         //Note that it is also possible to define a model instead of a constant
113         //--------->For this change the "cut model"
114         
115         Double_t params[4];
116         char *cutmodel;
117         cutmodel = "pol0";
118         
119         if(configIndex==9) params[0] = -1.5;
120         else if (configIndex==10) params[0] = -0.5;
121         else if (configIndex==11) params[0] = 0;
122         else params[0] = -1;
123         
124         pid->ConfigureTPCdefaultCut(cutmodel,params,3.0); 
125 //_______________________________________________________
126 ///_______________________________________________________________________________________________________________
127
128         printf("*************************************\n");
129         printf("Configuring standard Task:\n");
130         pid->PrintStatus();
131         printf("*************************************\n");
132
133         return task;
134 }