forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCutsLibrary.cxx
More file actions
579 lines (549 loc) · 19 KB
/
CutsLibrary.cxx
File metadata and controls
579 lines (549 loc) · 19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//
// Contact: daiki.sekihata@cern.ch
//
#include <string>
#include <vector>
#include <regex>
#include "PWGEM/PhotonMeson/Core/CutsLibrary.h"
//_______________________________________________
int customAtoi(const std::string& str)
{
std::regex pattern(R"(\d+)"); // extract only numbers
std::smatch match;
if (std::regex_search(str, match, pattern)) {
return std::stoi(match.str());
}
return -1;
}
//_______________________________________________
std::vector<std::string> splitString(const std::string& str, char delimiter)
{
std::istringstream iss(str);
std::vector<std::string> ret;
for (std::string temp; std::getline(iss, temp, delimiter); ret.push_back(temp))
;
return ret;
}
//_______________________________________________
EMPhotonEventCut* o2::aod::pwgem::photon::eventcuts::GetCut(const char* cutName)
{
EMPhotonEventCut* cut = new EMPhotonEventCut(cutName, cutName);
std::string nameStr = cutName;
if (!nameStr.compare("nocut")) {
cut->SetRequireSel8(false);
cut->SetRequireFT0AND(false);
cut->SetZvtxRange(-1e+10, +1e+10);
cut->SetRequireNoTFB(false);
cut->SetRequireNoITSROFB(false);
cut->SetRequireNoSameBunchPileup(false);
cut->SetRequireVertexITSTPC(false);
cut->SetRequireGoodZvtxFT0vsPV(false);
return cut;
}
if (!nameStr.compare("ft0and")) {
cut->SetRequireSel8(false);
cut->SetRequireFT0AND(true);
cut->SetZvtxRange(-10.f, +10.f);
cut->SetRequireNoTFB(false);
cut->SetRequireNoITSROFB(false);
cut->SetRequireNoSameBunchPileup(false);
cut->SetRequireVertexITSTPC(false);
cut->SetRequireGoodZvtxFT0vsPV(false);
return cut;
}
if (!nameStr.compare("minbias")) {
cut->SetRequireSel8(true);
cut->SetRequireFT0AND(true);
cut->SetZvtxRange(-10.f, +10.f);
cut->SetRequireNoTFB(false); // included in sel8
cut->SetRequireNoITSROFB(false); // included in sel8
cut->SetRequireNoSameBunchPileup(false);
cut->SetRequireVertexITSTPC(false);
cut->SetRequireGoodZvtxFT0vsPV(false);
if (nameStr.find("notfb") != std::string::npos) {
cut->SetRequireNoTFB(true);
}
if (nameStr.find("noitsrofb") != std::string::npos) {
cut->SetRequireNoITSROFB(true);
}
if (nameStr.find("nosbp") != std::string::npos) {
cut->SetRequireNoSameBunchPileup(true);
}
if (nameStr.find("vtxitstpc") != std::string::npos) {
cut->SetRequireVertexITSTPC(true);
}
if (nameStr.find("goodvtx") != std::string::npos) {
cut->SetRequireGoodZvtxFT0vsPV(true);
}
return cut;
}
delete cut;
LOGF(info, Form("Did not find cut %s", cutName));
return nullptr;
}
V0PhotonCut* o2::aod::pwgem::photon::pcmcuts::GetCut(const char* cutName)
{
V0PhotonCut* cut = new V0PhotonCut(cutName, cutName);
std::string nameStr = cutName;
// e.g. qc_minpt100_mexeta09
float min_pt = 0.1;
float max_eta = 0.9;
std::vector<std::string> tmp = splitString(nameStr, '_');
for (size_t i = 0; i < tmp.size(); i++) {
if (tmp[i].find("minpt") != std::string::npos) {
min_pt = static_cast<float>(customAtoi(tmp[i])) * 1e-3; // convert MeV to GeV
}
if (tmp[i].find("maxeta") != std::string::npos) {
max_eta = static_cast<float>(customAtoi(tmp[i])) * 0.1;
}
} // end of split string loop
// apply kinetic cuts
cut->SetTrackPtRange(min_pt * 0.4, 1e+10f); // this does not make sense, beucase pT, eta, phi are measured at SV, not at PV. But, reject some low-quality tracks.
// cut->SetTrackEtaRange(-max_eta, +max_eta); // this does not make sense, beucase pT, eta, phi are measured at SV, not at PV.
cut->SetV0PtRange(min_pt, 1e10f);
cut->SetV0EtaRange(-max_eta, +max_eta);
if (nameStr.find("qc") != std::string::npos) {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(true);
// for v0
cut->SetMinCosPA(0.99);
cut->SetMaxPCA(3.0);
cut->SetRxyRange(4, 90);
cut->SetAPRange(0.95, 0.01);
cut->RejectITSib(true);
if (nameStr.find("ITSTPC") != std::string::npos) {
cut->SetRequireITSTPC(true);
cut->SetMaxPCA(1.0);
cut->SetRxyRange(4, 40);
return cut;
} else if (nameStr.find("ITSonly") != std::string::npos) {
cut->SetRequireITSonly(true);
cut->SetMaxPCA(1.0);
cut->SetRxyRange(4, 24);
return cut;
} else if (nameStr.find("TPConly") != std::string::npos) {
cut->SetRequireTPConly(true);
cut->SetMaxPCA(3.0);
cut->SetRxyRange(36, 90);
return cut;
}
return cut;
}
if (nameStr.find("wire") != std::string::npos) {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetNClustersITS(2, 4);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(true);
// for v0
cut->SetMinCosPA(0.99);
cut->SetMaxPCA(0.3);
cut->SetOnWwireIB(true);
cut->SetOnWwireOB(true);
cut->SetAPRange(0.95, 0.01);
cut->RejectITSib(true);
if (nameStr.find("ib") != std::string::npos) {
cut->SetOnWwireIB(true);
cut->SetOnWwireOB(false);
cut->SetRxyRange(7, 14);
return cut;
} else if (nameStr.find("ob") != std::string::npos) {
cut->SetOnWwireIB(false);
cut->SetOnWwireOB(true);
cut->SetRxyRange(28, 33);
return cut;
}
return cut;
}
if (nameStr.find("analysis") != std::string::npos) {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(true);
// for v0
cut->SetMinCosPA(0.995);
cut->SetMaxPCA(0.5);
cut->SetRxyRange(1, 90);
return cut;
} else if (nameStr.find("tag_track") != std::string::npos) {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(true);
cut->SetRequireITSTPC(true);
// for v0
cut->SetMinCosPA(0.99);
cut->SetMaxPCA(1.0);
cut->SetRxyRange(1, 90);
cut->SetAPRange(0.95, 0.01);
return cut;
} else if (nameStr.find("nopid") != std::string::npos) {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(true);
// for v0
cut->SetMinCosPA(0.99);
cut->SetMaxPCA(3.0);
cut->SetRxyRange(1, 90);
cut->SetAPRange(0.95, 0.01);
cut->RejectITSib(true);
return cut;
} else if (nameStr.find("nocut") != std::string::npos) {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(false);
// for v0
cut->SetMinCosPA(0.95);
cut->SetMaxPCA(3.0);
cut->SetRxyRange(1, 90);
cut->SetAPRange(0.95, 0.01);
return cut;
} else {
// for track
cut->SetMinNCrossedRowsTPC(20);
cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
cut->SetChi2PerClusterTPC(0.0, 4.0);
cut->SetTPCNsigmaElRange(-3, +3);
cut->SetChi2PerClusterITS(-1e+10, 5.0);
cut->SetNClustersITS(2, 4);
cut->SetMeanClusterSizeITSob(0.0, 16.0);
// cut->SetIsWithinBeamPipe(false);
// for v0
cut->SetMinCosPA(0.95);
cut->SetMaxPCA(3.0);
cut->SetRxyRange(1, 90);
cut->SetAPRange(0.95, 0.01);
return cut;
}
delete cut;
LOGF(info, Form("Did not find cut %s", cutName));
return nullptr;
}
DalitzEECut* o2::aod::pwgem::photon::dalitzeecuts::GetCut(const char* cutName)
{
DalitzEECut* cut = new DalitzEECut(cutName, cutName);
std::string nameStr = cutName;
// cut name should be like this mee0_120_minpt200_maxeta09_dca20_100_tpchadronbandrej_lowB in unit of MeV.
return cut;
// if (!nameStr.compare("nocut")) {
// // apply kinetic cuts
// cut->SetTrackPtRange(0.1, 1e+10f);
// cut->SetTrackEtaRange(-0.9, +0.9);
//
// // for pair
// cut->SetMeeRange(0, 1e+10);
// cut->SetMaxPhivPairMeeDep([](float mee) { return (mee - -0.028) / 0.0185; });
// cut->ApplyPhiV(false);
// cut->ApplyPrefilter(false);
//
// // for track cuts
// cut->SetMinNCrossedRowsTPC(40);
// cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
// cut->SetChi2PerClusterTPC(0.0, 4.0);
// cut->SetChi2PerClusterITS(0.0, 5.0);
// cut->SetNClustersITS(4, 7);
// cut->SetMaxDcaXY(1.0);
// cut->SetMaxDcaZ(1.0);
// return cut;
// }
//
// if (!nameStr.compare("pc_itsib")) {
// // for pair
// cut->ApplyPhiV(true);
// cut->SelectPhotonConversion(true);
// cut->SetMeeRange(0.f, 0.03f);
// cut->SetMaxPhivPairMeeDep([](float mee) {
// return (mee - -0.028) / 0.0185;
// });
//
// // for track
// cut->SetTrackPtRange(0.05f, 1e10f);
// cut->SetTrackEtaRange(-0.9, +0.9);
// cut->SetMinNCrossedRowsTPC(40);
// cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
// cut->SetChi2PerClusterTPC(0.0, 4.0);
// cut->SetChi2PerClusterITS(0.0, 5.0);
// cut->SetNClustersITS(2, 7);
// cut->SetMaxDcaXY(1.0);
// cut->SetMaxDcaZ(1.0);
//
// // for PID
// cut->SetPIDScheme(static_cast<int>(DalitzEECut::PIDSchemes::kTPConly));
// cut->SetTOFbetaRange(true, 0.0, 0.95);
// cut->SetTPCNsigmaElRange(-3, +3);
// cut->SetTPCNsigmaPiRange(0, 0);
// return cut;
// }
//
// float min_mass = 0.0;
// float max_mass = 1e+10;
// float min_pt = 0.05;
// float max_eta = 0.9;
// float min_dca3d_pair = 0.0;
// float max_dca3d_pair = 1e+10;
// std::vector<std::string> tmp = splitString(nameStr, '_');
// for (size_t i = 0; i < tmp.size(); i++) {
// // printf("string = %s , num = %d\n", tmp[i].data(), customAtoi(tmp[i]));
// if (tmp[i].find("mee") != std::string::npos || tmp[i].find("mmumu") != std::string::npos) {
// min_mass = static_cast<float>(customAtoi(tmp[i])) * 1e-3; // convert MeV to GeV
// max_mass = static_cast<float>(customAtoi(tmp[i + 1])) * 1e-3; // convert MeV to GeV
// }
// if (tmp[i].find("minpt") != std::string::npos) {
// min_pt = static_cast<float>(customAtoi(tmp[i])) * 1e-3; // convert MeV to GeV
// }
// if (tmp[i].find("maxeta") != std::string::npos) {
// max_eta = static_cast<float>(customAtoi(tmp[i])) * 0.1;
// }
// if (tmp[i].find("dca") != std::string::npos) {
// min_dca3d_pair = static_cast<float>(customAtoi(tmp[i])) * 0.1; // 3d dca in sigma
// max_dca3d_pair = static_cast<float>(customAtoi(tmp[i + 1])) * 0.1; // 3d dca in sigma
// }
// } // end of split string loop
//
// // apply kinetic cuts
// cut->SetTrackPtRange(min_pt, 1e+10f);
// cut->SetTrackEtaRange(-max_eta, +max_eta);
//
// // for pair
// cut->SetMeeRange(min_mass, max_mass);
// cut->SetMaxPhivPairMeeDep([](float mee) { return (mee - -0.028) / 0.0185; });
// cut->SetPairDCARange(min_dca3d_pair, max_dca3d_pair); // in sigma
//
// cut->ApplyPhiV(true);
// if (nameStr.find("wophiv") != std::string::npos) {
// cut->ApplyPhiV(false);
// } else if (nameStr.find("wphiv") != std::string::npos) {
// cut->ApplyPhiV(true);
// }
//
// cut->ApplyPrefilter(false);
// if (nameStr.find("wpf") != std::string::npos) {
// cut->ApplyPrefilter(true);
// } else if (nameStr.find("wopf") != std::string::npos) {
// cut->ApplyPrefilter(false);
// }
//
// // for track cuts
// cut->SetMinNCrossedRowsTPC(100);
// cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
// cut->SetChi2PerClusterTPC(0.0, 4.0);
// cut->SetChi2PerClusterITS(0.0, 5.0);
// cut->SetNClustersITS(5, 7);
// cut->SetMeanClusterSizeITSob(0, 16);
// cut->SetMaxDcaXY(1.0);
// cut->SetMaxDcaZ(1.0);
//
// if (nameStr.find("lowB") != std::string::npos) {
// cut->SetMinNCrossedRowsTPC(40);
// cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
// cut->SetChi2PerClusterTPC(0.0, 4.0);
// cut->SetChi2PerClusterITS(0.0, 5.0);
// cut->SetNClustersITS(4, 7);
// cut->SetMeanClusterSizeITSob(0, 16);
// cut->SetMaxDcaXY(1.0);
// cut->SetMaxDcaZ(1.0);
// } else if (nameStr.find("nominalB") != std::string::npos) {
// cut->SetMinNCrossedRowsTPC(100);
// cut->SetMinNCrossedRowsOverFindableClustersTPC(0.8);
// cut->SetChi2PerClusterTPC(0.0, 4.0);
// cut->SetChi2PerClusterITS(0.0, 5.0);
// cut->SetNClustersITS(5, 7);
// cut->SetMeanClusterSizeITSob(0, 16);
// cut->SetMaxDcaXY(1.0);
// cut->SetMaxDcaZ(1.0);
// }
//
// // long pid name should be top, because of if--else if conditions.
//
// if (nameStr.find("mee") != std::string::npos) { // for electron
// if (nameStr.find("tpcmupikaprrejortofreq") != std::string::npos) {
// cut->SetPIDScheme(static_cast<int>(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq));
// cut->SetTOFbetaRange(true, 0.0, 0.95);
// cut->SetTPCNsigmaElRange(-2, +3);
// cut->SetTPCNsigmaPiRange(-3, +3);
// cut->SetTPCNsigmaKaRange(-3, +3);
// cut->SetTPCNsigmaPrRange(-3, +3);
// cut->SetTOFNsigmaElRange(-3, +3);
// cut->SetTPCNsigmaMuRange(-2, +2);
// cut->SetMuonExclusionTPC(true);
// return cut;
// } else if (nameStr.find("tpcpikaprrejortofreq") != std::string::npos) {
// cut->SetPIDScheme(static_cast<int>(DalitzEECut::PIDSchemes::kTPChadrejORTOFreq));
// cut->SetTOFbetaRange(true, 0.0, 0.95);
// cut->SetTPCNsigmaElRange(-2, +3);
// cut->SetTPCNsigmaPiRange(-3, +3);
// cut->SetTPCNsigmaKaRange(-3, +3);
// cut->SetTPCNsigmaPrRange(-3, +3);
// cut->SetTOFNsigmaElRange(-3, +3);
// return cut;
// } else if (nameStr.find("tpconly") != std::string::npos) {
// cut->SetPIDScheme(static_cast<int>(DalitzEECut::PIDSchemes::kTPConly));
// cut->SetTOFbetaRange(true, 0.0, 0.95);
// cut->SetTPCNsigmaElRange(-2, +3);
// cut->SetTPCNsigmaPiRange(-3, +3);
// return cut;
// } else if (nameStr.find("tpcelonly") != std::string::npos) {
// cut->SetPIDScheme(static_cast<int>(DalitzEECut::PIDSchemes::kTPConly));
// cut->SetTOFbetaRange(true, 0.0, 0.95);
// cut->SetTPCNsigmaElRange(-2, +3);
// cut->SetTPCNsigmaPiRange(0, 0);
// return cut;
// } else if (nameStr.find("mleidlocal") != std::string::npos) {
// // cut->EnableEIDML(false, "/Users/d/dsekihat/pidml/", false, -1, "eid_lightgbm.onnx");
// return cut;
// } else if (nameStr.find("mleid") != std::string::npos) {
// // cut->EnableEIDML(true, "/Users/d/dsekihat/pidml/", false, -1, "eid_lightgbm.onnx");
// return cut;
// } else { // not match electron cut
// LOGF(info, Form("Did not find electron ID cut %s", cutName));
// return cut;
// }
// } else { // do not match mee
// LOGF(info, Form("Did not find any pid cut %s", cutName));
// return cut;
// }
}
PHOSPhotonCut* o2::aod::pwgem::photon::phoscuts::GetCut(const char* cutName)
{
PHOSPhotonCut* cut = new PHOSPhotonCut(cutName, cutName);
std::string nameStr = cutName;
if (!nameStr.compare("test01")) {
cut->SetEnergyRange(0.1f, 1e10f);
return cut;
}
if (!nameStr.compare("test02")) {
cut->SetEnergyRange(0.2f, 1e10f);
return cut;
}
if (!nameStr.compare("test03")) {
cut->SetEnergyRange(0.3f, 1e10f);
return cut;
}
if (!nameStr.compare("test05")) {
cut->SetEnergyRange(0.5f, 1e10f);
return cut;
}
if (!nameStr.compare("test10")) {
cut->SetEnergyRange(1.0f, 1e10f);
return cut;
}
if (!nameStr.compare("tag")) {
cut->SetEnergyRange(1.0f, 1e10f);
return cut;
}
delete cut;
LOGF(info, Form("Did not find cut %s", cutName));
return nullptr;
}
EMCPhotonCut* o2::aod::pwgem::photon::emccuts::GetCut(const char* cutName)
{
EMCPhotonCut* cut = new EMCPhotonCut(cutName, cutName);
std::string nameStr = cutName;
if (!nameStr.compare("standard")) {
cut->SetMinE(0.7f);
cut->SetMinNCell(1);
cut->SetM02Range(0.1f, 0.7f);
cut->SetTimeRange(-20.f, 25.f);
cut->SetTrackMatchingEta([](float pT) {
return 0.01f + pow(pT + 4.07f, -2.5f);
});
cut->SetTrackMatchingPhi([](float pT) {
return 0.015f + pow(pT + 3.65f, -2.f);
});
cut->SetMinEoverP(1.75f);
cut->SetUseExoticCut(true);
return cut;
}
if (!nameStr.compare("nocut")) {
cut->SetMinE(0.f);
cut->SetMinNCell(1);
cut->SetM02Range(0.0f, 1000.f);
cut->SetTimeRange(-500.f, 500.f);
cut->SetTrackMatchingEta([](float /*pT*/) {
return -1.f;
});
cut->SetTrackMatchingPhi([](float /*pT*/) {
return -1.f;
});
cut->SetMinEoverP(0.f);
cut->SetUseExoticCut(false);
return cut;
}
if (!nameStr.compare("tag")) {
cut->SetMinE(0.7f);
cut->SetMinNCell(1);
cut->SetM02Range(0.1f, 0.7f);
cut->SetTimeRange(-20.f, 25.f);
cut->SetTrackMatchingEta([](float pT) {
return 0.01f + pow(pT + 4.07f, -2.5f);
});
cut->SetTrackMatchingPhi([](float pT) {
return 0.015f + pow(pT + 3.65f, -2.f);
});
cut->SetMinEoverP(1.75f);
cut->SetUseExoticCut(true);
return cut;
}
delete cut;
LOGF(info, Form("Did not find cut %s", cutName));
return nullptr;
}
PairCut* o2::aod::pwgem::photon::paircuts::GetCut(const char* cutName)
{
PairCut* cut = new PairCut(cutName, cutName);
std::string nameStr = cutName;
if (!nameStr.compare("nocut")) {
cut->SetAsymRange(-1e+10f, +1e+10f);
return cut;
}
if (!nameStr.compare("asym08")) {
cut->SetAsymRange(0, 0.8);
return cut;
}
delete cut;
LOGF(info, Form("Did not find cut %s", cutName));
return nullptr;
}