]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGHF/hfe/macros/configs/pPb/ConfigEMCalHFEpA.C
updated
[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                                                                                 
11
12 Bool_t isMC=kFALSE, 
13 Int_t triggerIndex=0, 
14 Int_t configIndex=0, 
15 Int_t centralityIndex=0, 
16 Bool_t isAOD = kFALSE,
17 Bool_t isEMCal = kFALSE,
18 Int_t EMCalThreshould = 0 //0 == EG1, 1 == EG2
19 )
20
21 {
22 ///_______________________________________________________________________________________________________________
23 ///Track selection: Cuts used to ensure a minimum quality level of the tracks selected to perform the analysis
24         AliHFEcuts *hfecuts = new AliHFEcuts("hfeCutsMinBias","HFE Cuts");
25         hfecuts->CreateStandardCuts();
26         
27         //TPC Cuts
28         hfecuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);     
29         if(configIndex==2)      hfecuts->SetMinNClustersTPC(90);                                        //Minimum number of clusters on TPC
30         else if(configIndex==3)         hfecuts->SetMinNClustersTPC(110);                               //Minimum number of clusters on TPC
31         else hfecuts->SetMinNClustersTPC(100);                                                                  //Minimum number of clusters on TPC
32         
33         if(configIndex==22) hfecuts->SetMinNClustersTPCPID(70); 
34         else if (configIndex==23) hfecuts->SetMinNClustersTPCPID(80);                                   //Minimum number of clusters for dE/dx
35         else hfecuts->SetMinNClustersTPCPID(90);                                            //Minimum number of clusters for dE/dx
36         
37         hfecuts->SetMinRatioTPCclusters(0.6);                                                               //Number of clusters (Found/Findable)
38         
39         //ITS
40         if(configIndex==25) hfecuts->SetCutITSpixel(AliHFEextraCuts::kBoth);                    //Require at least one cluster on SPD
41         else hfecuts->SetCutITSpixel(AliHFEextraCuts::kAny);                                                    //Require at least one cluster on SPD
42         //hfecuts->SetCutITSdrift(AliHFEextraCuts::kAny);                                           //Require at least one cluster on SDD
43         hfecuts->SetCheckITSLayerStatus(kFALSE); 
44         
45         if(configIndex==4) hfecuts->SetMinNClustersITS(2);                                                              //Minimum number of clusters on ITS
46         else if(configIndex==5) hfecuts->SetMinNClustersITS(4);                                                         //Minimum number of clusters on ITS
47         else hfecuts->SetMinNClustersITS(3);                                                                        //Minimum number of clusters on ITS
48         
49         //Additional Cuts
50         hfecuts->SetPtRange(2, 1e6);                                                                                //Transversal momentum range in GeV/c
51         //hfecuts->SetMaxImpactParam(1,2);                                                                          //DCA to vertex
52         
53         //Event Selection
54         hfecuts->SetVertexRange(10.);                                                                                                   //
55         //hfecuts->SetProductionVertex(0,0.3,0,0.3);                                                                    //
56 ///_______________________________________________________________________________________________________________
57         // new cuts for event selection
58         
59         //hfecuts->SetUseCorrelationVertex();
60         //hfecuts->SetSPDVtxResolutionCut();
61         //hfecuts->SetpApileupCut();
62
63 ///_________________________________________________________________________________________________________________________
64 ///Task config
65         AliAnalysisTaskEMCalHFEpA *task = new AliAnalysisTaskEMCalHFEpA(Form("HFECuts%d_%d_%d",triggerIndex,configIndex,centralityIndex));
66         printf("task ------------------------ %p\n ", task);
67         task->SetHFECuts(hfecuts);
68         task->SetCorrelationAnalysis(kFALSE);
69         task->SetAODanalysis(isAOD);
70         task->SetEventMixing(kTRUE);
71         
72         //to separate trigger threshould
73         if(EMCalThreshould==0 && triggerIndex==2) task->SetEMCalTriggerEG1();
74         if(EMCalThreshould==1 && triggerIndex==2) task->SetEMCalTriggerEG2();
75         
76         if(isEMCal) task->SetUseEMCal();
77         
78         
79         if(configIndex==26){
80                 task->SetUseShowerShapeCut(kTRUE);
81                 //task->SetM02Cut(0.0,0.3);
82                 task->SetM20Cut(0.0,0.3);
83         }
84         task->SetBackground(kTRUE);
85         
86         if(configIndex==6) task->SetNonHFEmassCut(0.05);
87         else task->SetNonHFEmassCut(0.1);
88         
89         //if(isEMCal) task->SetEtaCut(-0.6,0.6);
90         //else task->SetEtaCut(-0.9,0.9);
91         
92         
93         if(configIndex==12) task->SetEtaCut(-0.6,-0.2);
94         else if (configIndex==13) task->SetEtaCut(-0.5,-0.1);
95         else if (configIndex==14) task->SetEtaCut(-0.4,0);
96         else if (configIndex==15) task->SetEtaCut(-0.3,0.1);
97         else if (configIndex==16) task->SetEtaCut(-0.2,0.2);
98         else if (configIndex==17) task->SetEtaCut(-0.1,0.3);
99         else if (configIndex==18) task->SetEtaCut(0,0.4);
100         else task->SetEtaCut(-0.6,0.6);
101         
102         if(configIndex==19) task->SetdPhidEtaCut(0.02,0.02);
103         else if (configIndex==20) task->SetdPhidEtaCut(0.03,0.03);
104         else if (configIndex==21) task->SetdPhidEtaCut(0.04,0.04);
105         else task->SetdPhidEtaCut(0.05,0.05);
106
107         
108         if (configIndex==7) task->SetEoverPCut(0.85,1.2);
109         else if (configIndex==8) task->SetEoverPCut(0.75,1.25);
110         else task->SetEoverPCut(0.8,1.2);
111
112         if(configIndex==1) task->SetNonHFEangleCut(0.1);
113         
114         if(centralityIndex==0) task->SetCentrality(0,20);
115         if(centralityIndex==1) task->SetCentrality(20,40);
116         if(centralityIndex==2) task->SetCentrality(40,60);
117         if(centralityIndex==3) task->SetCentrality(60,80);
118         if(centralityIndex==4) task->SetCentrality(80,100);
119         if(centralityIndex==5) task->SetCentrality(0,100);
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 PID
139         pid->AddDetector("TPC", 1);                             //Add TPC PID
140         
141         //_________________________
142         //Configure TPC cut
143         //Defaul = -1 to 3 sigmas
144         //Note that it is also possible to define a model instead of a constant
145         //--------->For this change the "cut model"
146         
147         Double_t params[4];
148         char *cutmodel;
149         cutmodel = "pol0";
150         
151         if(configIndex==9) params[0] = -1.5;
152         else if (configIndex==10) params[0] = -0.5;
153         else if (configIndex==11) params[0] = 0;
154         else params[0] = -1;
155         
156         pid->ConfigureTPCdefaultCut(cutmodel,params,3.0); 
157 //_______________________________________________________
158 ///_______________________________________________________________________________________________________________
159
160         printf("*************************************\n");
161         printf("Configuring standard Task:\n");
162         pid->PrintStatus();
163         printf("*************************************\n");
164
165         return task;
166 }