4 static enum LMMECutSet {
5 kPbPb2011TPCandTOF, //TOF required
6 kPbPb2011TPCandTOFwide, //TOF required, more relaxed cut on TPC
13 static enum LMMECentSel {
15 kPbPb2011SemiCentral1,
16 kPbPb2011SemiCentral2,
22 static enum LMMEPairCutSet {
23 kPbPb2011Mass, //Mass cut
24 kPbPb2011OP, //Opening angle cut
25 kPbPb2011Phiv, //Phiv cut
30 //char* LMEECutNames[kCUTSETMAX] = { "PbPb2011TPCandTOF","PbPb2011TPCorTOF"};
35 LMEECutLib() {useMC=kFALSE;}
37 AliDielectronEventCuts* GetEventCuts(Int_t cutSet);
38 AliAnalysisCuts* GetCentralityCuts(Int_t centSel);
39 AliDielectronTrackRotator* GetTrackRotator(Int_t cutSet);
40 AliDielectronMixingHandler* GetMixingHandler(Int_t cutSet);
42 AliAnalysisCuts* GetPIDCutsAna(Int_t cutSet);
43 AliAnalysisCuts* GetPIDCutsPre(Int_t cutSet);
45 AliAnalysisCuts* GetPairCuts(Int_t cutSet);
46 AliAnalysisCuts* GetPairPreFilterCuts(Int_t cutSet);
48 AliAnalysisCuts* GetTrackCutsAna(Int_t cutSet);
49 AliAnalysisCuts* GetTrackCutsPre(Int_t cutSet);
51 void SetMCFlag( Bool_t isMC=kTRUE) {useMC=isMC;}
56 AliDielectronEventCuts* GetEventCuts(Int_t cutSet) {
57 AliDielectronEventCuts* eventCuts = 0x0;
59 case kPbPb2011TPCandTOF :
60 case kPbPb2011TPCandTOFwide :
61 case kPbPb2011TPCorTOF :
62 case kpp2010TPCandTOF :
63 case kpp2010TPCorTOF :
64 eventCuts=new AliDielectronEventCuts("eventCuts","Vertex Track && |vtxZ|<10 && ncontrib>0");
65 eventCuts->SetRequireVertex();
66 eventCuts->SetMinVtxContributors(1);
67 eventCuts->SetVertexZ(-10.,10.);
69 default: cout << "No Event Cut defined" << endl;
74 AliAnalysisCuts* GetCentralityCuts(Int_t centSel) {
75 AliDielectronVarCuts* centCuts = 0x0;
77 case kPbPb2011Central:
78 centCuts = new AliDielectronVarCuts("centCuts","CentralityPbPb2011Central");
79 centCuts->AddCut(AliDielectronVarManager::kCentrality,0.,10.);
81 case kPbPb2011SemiCentral1:
82 centCuts = new AliDielectronVarCuts("centCuts","CentralityPbPb2011SemiCentral1");
83 centCuts->AddCut(AliDielectronVarManager::kCentrality,10.,30.);
85 case kPbPb2011SemiCentral2:
86 centCuts = new AliDielectronVarCuts("centCuts","CentralityPbPb2011SemiCentral2");
87 centCuts->AddCut(AliDielectronVarManager::kCentrality,30.,50.);
89 case kPbPb2011Peripheral:
90 centCuts = new AliDielectronVarCuts("centCuts","CentralityPbPb2011Peripheral");
91 centCuts->AddCut(AliDielectronVarManager::kCentrality,50.,90.);
93 default: cout << "No Centrality selected" << endl;
99 AliDielectronTrackRotator* GetTrackRotator(Int_t cutSet) {
100 AliDielectronTrackRotator* trackRotator = 0x0;
102 case kPbPb2011TPCandTOF :
103 case kPbPb2011TPCandTOFwide :
104 case kPbPb2011TPCorTOF :
105 case kpp2010TPCandTOF :
106 case kpp2010TPCorTOF :
107 trackRotator = new AliDielectronTrackRotator();
108 trackRotator->SetIterations(20);
109 trackRotator->SetConeAnglePhi(TMath::Pi()/180*165);
110 trackRotator->SetStartAnglePhi(TMath::Pi());
112 default: cout << "No Rotator defined" << endl;
118 AliDielectronMixingHandler* GetMixingHandler(Int_t cutSet) {
119 AliDielectronMixingHandler* mixingHandler = 0x0;
121 case kPbPb2011TPCandTOF :
122 case kPbPb2011TPCandTOFwide :
123 case kPbPb2011TPCorTOF :
124 mixingHandler = new AliDielectronMixingHandler;
125 mixingHandler->AddVariable(AliDielectronVarManager::kZvPrim,"-10,-5,0,5,10");
126 mixingHandler->AddVariable(AliDielectronVarManager::kCentrality,"0,5,10,20,40,80,100");
127 mixingHandler->AddVariable(AliDielectronVarManager::kv0ACrpH2,"-6*(TMath::Pi()/6),-5*(TMath::Pi()/6),-4*(TMath::Pi()/6),-3*(TMath::Pi()/6),-2*(TMath::Pi()/6),-1*(TMath::Pi()/6),0,1*(TMath::Pi()/6),2*(TMath::Pi()/6),3*(TMath::Pi()/6),4*(TMath::Pi()/6),5*(TMath::Pi()/6),6*(TMath::Pi()/6)");
128 //mixingHandler->SetDepth(50);
129 mixingHandler->SetDepth(15);
130 mixingHandler->SetMixType(AliDielectronMixingHandler::kAll);
132 case kpp2010TPCandTOF :
133 case kpp2010TPCorTOF :
134 mixingHandler = new AliDielectronMixingHandler;
135 mixingHandler->AddVariable(AliDielectronVarManager::kZvPrim,"-10,-5,0,5,10");
136 mixingHandler->AddVariable(AliDielectronVarManager::kNacc,"0,10000");
137 //might want to add multiplicity?
138 mixingHandler->SetDepth(25);
139 mixingHandler->SetMixType(AliDielectronMixingHandler::kAll);
141 default: cout << "No Mixing Handler defined" << endl;
143 return mixingHandler;
147 AliAnalysisCuts* GetPIDCutsAna(Int_t cutSet) {
148 AliAnalysisCuts* anaCuts=0x0;
150 // + [2] added for Dec2010 Cut!
151 TF1 *lowerCut = new TF1("lowerCut", "[0] * TMath::Exp([1]*x) + [2]", 0, 20);
153 lowerCut->SetParameter(0, -2.7);
154 lowerCut->SetParameter(1, -0.4357);
156 /* 18.01.2011 ALiHFEpid.cxx */
157 lowerCut->SetParameter(0,-3.7);
158 lowerCut->SetParameter(1,-0.8);
159 lowerCut->SetParameter(2,-0.35);
161 if (useMC) { //overwrite parameters
162 lowerCut->SetParameter(0,-2.5);
163 lowerCut->SetParameter(2,-2.2);
166 //---------------------------------------------
167 AliDielectronPID *pidTPCTOFeOnly = new AliDielectronPID("TPC-TOF","TPC-TOF");
168 pidTPCTOFeOnly->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3. ,3.,0.0,100.,kFALSE);
169 pidTPCTOFeOnly->AddCut(AliDielectronPID::kTOF ,AliPID::kElectron , -3. , 3. , 0.0 , 100., kFALSE );
171 AliDielectronPID *pidTPCandTOF = new AliDielectronPID("TPC-TOF-HFE","TPC-TOF-HFE");
172 pidTPCandTOF->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3.,3.,0.0,100.,kFALSE);
173 pidTPCandTOF->AddCut(AliDielectronPID::kTPC,AliPID::kPion,-3.,3.,0.,100.,kTRUE);
174 pidTPCandTOF->AddCut(AliDielectronPID::kTOF ,AliPID::kElectron , -3. , 3. , 0.0 , 100., kFALSE );
176 AliDielectronPID *pidTPChardTOF = new AliDielectronPID("TPC-TOF-HFE","TPC-TOF-HFE");
177 pidTPChardTOF->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,lowerCut,3.,0.0,100.,kFALSE);
178 pidTPChardTOF->AddCut(AliDielectronPID::kTPC,AliPID::kPion,-3.,3.,0.,100.,kTRUE);
179 pidTPChardTOF->AddCut(AliDielectronPID::kTPC,AliPID::kProton,-3.,3.,0.,100.,kTRUE);
180 pidTPChardTOF->AddCut(AliDielectronPID::kTPC,AliPID::kKaon,-3.,3.,0.,100.,kTRUE);
181 pidTPChardTOF->AddCut(AliDielectronPID::kTOF ,AliPID::kElectron , -3. , 3. , 0.0 , 100., kFALSE );
182 //___________________________________________
183 AliDielectronPID *pidTT = new AliDielectronPID("TPC-TOF","TPC-TOF");
184 pidTT->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-1.5,3.,0.2,0.4,kFALSE);
185 pidTT->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3,3.,0.4,100.,kFALSE);
186 pidTT->AddCut(AliDielectronPID::kTOF ,AliPID::kElectron , -3. , 3. , 0.2 , 100., kFALSE );
188 pidTT->AddCut(AliDielectronPID::kTPC,AliPID::kPion,-3,3.,0.,100.,kTRUE);
189 pidTT->AddCut(AliDielectronPID::kTPC,AliPID::kProton,-3.,3.,0.,100.,kTRUE);
190 pidTT->AddCut(AliDielectronPID::kTPC,AliPID::kKaon,-3.,3.,0.,100.,kTRUE);
191 //___________________________________________
192 AliDielectronVarCuts *pidTPCsignal = new AliDielectronVarCuts("pidTPCsignal","cut on the TPC signal");
194 pidTPCsignal->AddCut(AliDielectronVarManager::kTPCsignal,65.,85.);
197 pidTPCsignal->AddCut(AliDielectronVarManager::kTPCsignal,75.,90.);
199 //___________________________________________
200 AliDielectronVarCuts *pidTPCsignalWide = new AliDielectronVarCuts("pidTPCsignalWide","cut on the TPC signal");
201 pidTPCsignalWide->AddCut(AliDielectronVarManager::kTPCsignal,70.,90.);
202 //___________________________________________
204 AliDielectronVarCuts *pTPC = new AliDielectronVarCuts("Py>.4","Py>.4");
205 pTPC->AddCut(AliDielectronVarManager::kPt,.4,5.);
207 AliDielectronVarCuts *pMin = new AliDielectronVarCuts("P>.2","P>.2");
208 pMin->AddCut(AliDielectronVarManager::kPt,.2,5.);
211 case kPbPb2011TPCandTOF :
212 AliDielectronCutGroup* cgSecondTrackFilterPIDTPC1 = new AliDielectronCutGroup("cgPIDTPC1","cgPIDTPC1",AliDielectronCutGroup::kCompAND);
213 cgSecondTrackFilterPIDTPC1->AddCut(pTPC);
214 cgSecondTrackFilterPIDTPC1->AddCut(pidTPCandTOF);
215 cgSecondTrackFilterPIDTPC1->AddCut(pidTPCsignal);
216 cgSecondTrackFilterPIDTPC1->AddCut(GetTrackCutsAna(cutSet));
217 anaCuts = cgSecondTrackFilterPIDTPC1;
219 case kPbPb2011TPCandTOFwide :
220 AliDielectronCutGroup* cgSecondTrackFilterPIDTPC1 = new AliDielectronCutGroup("cgPIDTPC1","cgPIDTPC1",AliDielectronCutGroup::kCompAND);
221 cgSecondTrackFilterPIDTPC1->AddCut(pTPC);
222 cgSecondTrackFilterPIDTPC1->AddCut(pidTPCandTOF);
223 cgSecondTrackFilterPIDTPC1->AddCut(pidTPCsignalWide);
224 cgSecondTrackFilterPIDTPC1->AddCut(GetTrackCutsAna(cutSet));
225 anaCuts = cgSecondTrackFilterPIDTPC1;
227 case kPbPb2011TPCorTOF :
228 AliDielectronCutGroup* cgSecondTrackFilterPIDTPC2 = new AliDielectronCutGroup("cgPIDTPC2","cgPIDTPC2",AliDielectronCutGroup::kCompAND);
229 cgSecondTrackFilterPIDTPC2->AddCut(pMin);
230 cgSecondTrackFilterPIDTPC2->AddCut(pidTT);
231 cgSecondTrackFilterPIDTPC2->AddCut(pidTPCsignal);
232 cgSecondTrackFilterPIDTPC2->AddCut(GetTrackCutsAna(cutSet));
233 anaCuts = cgSecondTrackFilterPIDTPC2;
235 case kpp2010TPCandTOF :
236 AliDielectronCutGroup* cgSecondTrackFilterPIDTPC = new AliDielectronCutGroup("cgPIDTPC","cgPIDTPC",AliDielectronCutGroup::kCompAND);
237 cgSecondTrackFilterPIDTPC->AddCut(pTPC);
238 //cgSecondTrackFilterPIDTPC->AddCut(pidTPChardTOF);
239 cgSecondTrackFilterPIDTPC->AddCut(pidTPCandTOF);
240 cgSecondTrackFilterPIDTPC->AddCut(pidTPCTOFeOnly);
241 cgSecondTrackFilterPIDTPC->AddCut(GetTrackCutsAna(cutSet));
242 anaCuts = cgSecondTrackFilterPIDTPC;
244 case kpp2010TPCorTOF :
245 AliDielectronCutGroup* cgSecondTrackFilterPIDTPC = new AliDielectronCutGroup("cgPIDTPC","cgPIDTPC",AliDielectronCutGroup::kCompAND);
246 cgSecondTrackFilterPIDTPC->AddCut(pMin);
247 cgSecondTrackFilterPIDTPC->AddCut(pidTT);
248 cgSecondTrackFilterPIDTPC->AddCut(GetTrackCutsAna(cutSet));
249 anaCuts = cgSecondTrackFilterPIDTPC;
251 default: cout << "No Analysis PID Cut defined " << endl;
256 AliAnalysisCuts* GetPIDCutsPre(Int_t cutSet) {
257 AliAnalysisCuts* anaCuts=0x0;
259 case kPbPb2011TPCandTOF :
260 case kPbPb2011TPCandTOFwide :
261 case kPbPb2011TPCorTOF :
262 case kpp2010TPCandTOF :
263 case kpp2010TPCorTOF :
264 AliDielectronCutGroup* cgSecondTrackFilterPIDTPC = new AliDielectronCutGroup("cgPIDTPC","cgPIDTPC",AliDielectronCutGroup::kCompAND);
265 AliDielectronCutGroup* cgITSTPC = new AliDielectronCutGroup("cgITSTPC","cgITSTPC",AliDielectronCutGroup::kCompAND);
266 AliDielectronPID *pidITSTPC = new AliDielectronPID("TPCpre","TPCpre");
267 pidITSTPC->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3.,3.);
268 cgITSTPC->AddCut(pidITSTPC);
269 cgITSTPC->AddCut(GetTrackCutsAna(cutSet));
271 AliDielectronCutGroup* cgITSSA = new AliDielectronCutGroup("cgITSSA","cgITSSA",AliDielectronCutGroup::kCompAND);
272 AliDielectronPID *pidITSSA = new AliDielectronPID("pidITSSA","pidITSSA");
273 pidITSSA->AddCut(AliDielectronPID::kITS,AliPID::kElectron,-3.,3.);
274 cgITSSA->AddCut(pidITSSA);
275 cgITSSA->AddCut(GetTrackCutsPre(cutSet));
277 AliDielectronCutGroup* cgInitialTrackFilter = new AliDielectronCutGroup("cgInitialTrackFilter","cgInitialTrackFilter",AliDielectronCutGroup::kCompOR);
278 cgInitialTrackFilter->AddCut(cgITSTPC);
279 cgInitialTrackFilter->AddCut(cgITSSA);
280 anaCuts = cgInitialTrackFilter;
282 default: cout << "No Pre-PID Cut defined " << endl;
288 AliAnalysisCuts* GetPairCuts(Int_t cutSet) {
289 AliDielectronVarCuts* pairCuts=0x0;
291 case kPbPb2011TPCorTOF :
292 case kpp2010TPCandTOF :
293 pairCuts = new AliDielectronVarCuts("InvMass","InvMass > 150 MeV");
294 pairCuts->AddCut(AliDielectronVarManager::kM,0.15,100.,kTRUE);
296 case kPbPb2011TPCandTOF :
297 case kPbPb2011TPCandTOFwide :
298 case kpp2010TPCorTOF :
299 pairCuts =new AliDielectronVarCuts("OpeningAngle","Opening angle > .035rad");
300 pairCuts->AddCut(AliDielectronVarManager::kOpeningAngle, 0. , 0.035);
302 default: cout << "No Pair Cuts defined " << endl;
308 AliAnalysisCuts* GetPairCuts(Int_t cutSet) {
309 AliDielectronVarCuts* pairCuts=0x0;
312 pairCuts = new AliDielectronVarCuts("InvMass","InvMass > 150 MeV");
313 pairCuts->AddCut(AliDielectronVarManager::kM, 0.15,100.);
316 pairCuts =new AliDielectronVarCuts("OpeningAngle","Opening angle > .035rad");
317 pairCuts->AddCut(AliDielectronVarManager::kOpeningAngle, 0. , 0.035, kTRUE); ///exclude
320 pairCuts =new AliDielectronVarCuts("Phiv Cuts","Phiv<2.0rad");
321 pairCuts->SetCutType(AliDielectronVarCuts::kAny);
322 pairCuts->AddCut(AliDielectronVarManager::kPhivPair, 0.0, 2.0);
323 pairCuts->AddCut(AliDielectronVarManager::kM, 0.15, 100.0);
325 default: cout << "No Pair Cuts defined " << endl;
331 //// for the pairprefilter
332 //// this cut is defined to "reject" pairs
333 //// for the paircuts, defintion is based on "accept" pairs.
334 AliAnalysisCuts* GetPairPreFilterCuts(Int_t cutSet) {
335 AliDielectronVarCuts* pairCuts=0x0;
338 pairCuts = new AliDielectronVarCuts("InvMass","InvMass > 150 MeV");
339 pairCuts->AddCut(AliDielectronVarManager::kM, 0.15,100.,kTRUE);
342 pairCuts =new AliDielectronVarCuts("OpeningAngle","Opening angle > .035rad");
343 pairCuts->AddCut(AliDielectronVarManager::kOpeningAngle, 0. , 0.035);
346 pairCuts =new AliDielectronVarCuts("Phiv Cut and Mee Cut","Phiv<2.0rad");
347 pairCuts->AddCut(AliDielectronVarManager::kPhivPair, 2.0, TMath::ACos(-1.0));
348 pairCuts->AddCut(AliDielectronVarManager::kM, 0, 0.15);
350 default: cout << "No Pair Cuts defined " << endl;
356 AliAnalysisCuts* GetTrackCutsAna(Int_t cutSet) {
357 AliESDtrackCuts* trackCuts=0x0;
359 case kPbPb2011TPCandTOF :
360 case kPbPb2011TPCandTOFwide :
361 case kPbPb2011TPCorTOF :
362 case kpp2010TPCandTOF :
363 case kpp2010TPCorTOF :
364 trackCuts = new AliESDtrackCuts();
365 trackCuts->SetDCAToVertex2D(kTRUE);
366 trackCuts->SetMaxDCAToVertexZ(3.0);
367 trackCuts->SetMaxDCAToVertexXY(1.0);
368 //trackCuts->SetMaxNsigmaToVertex(3.0);
369 trackCuts->SetPtRange( 0.05 , 200.0);
370 trackCuts->SetEtaRange( -0.84 , 0.84 );
371 trackCuts->SetAcceptKinkDaughters(kFALSE);
372 trackCuts->SetRequireITSRefit(kTRUE);
373 trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kFirst);
374 trackCuts->SetMinNClustersITS(3);
375 trackCuts->SetRequireTPCRefit(kTRUE);
376 //trackCuts->SetMinNClustersTPC(60);
377 trackCuts->SetMinNCrossedRowsTPC(110);
378 trackCuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.7);
379 trackCuts->SetMaxChi2PerClusterTPC(3.5);
380 //trackCuts->SetMaxChi2PerClusterITS(6);
382 default: cout << "No Analysis Track Cut defined " << endl;
387 AliAnalysisCuts* GetTrackCutsPre(Int_t cutSet) {
388 AliESDtrackCuts* trackCuts=0x0;
390 case kPbPb2011TPCandTOF :
391 case kPbPb2011TPCandTOFwide :
392 case kPbPb2011TPCorTOF :
393 case kpp2010TPCandTOF :
394 case kpp2010TPCorTOF :
395 trackCuts = new AliESDtrackCuts();
396 trackCuts->SetDCAToVertex2D(kTRUE);
397 trackCuts->SetMaxDCAToVertexZ(3.0);
398 trackCuts->SetMaxDCAToVertexXY(1.0);
399 trackCuts->SetEtaRange( -0.84 , 0.84 );
400 trackCuts->SetPtRange( 0.05 , 0.5);
401 trackCuts->SetAcceptKinkDaughters(kFALSE);
402 trackCuts->SetRequireITSRefit(kTRUE);
403 trackCuts->SetRequireITSStandAlone(kTRUE);
404 trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kFirst);
405 trackCuts->SetMinNClustersITS(3); //PhotonGroup-Dalitz: 2?!
407 default: cout << "No Pre-Track Cut defined " << endl;