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