forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflowPidCme.cxx
More file actions
3488 lines (3415 loc) · 255 KB
/
flowPidCme.cxx
File metadata and controls
3488 lines (3415 loc) · 255 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
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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.
/// \author ZhengqingWang(zhengqing.wang@cern.ch), KegangXiong(kxiong@cern.ch)
/// \file flowPidCme.cxx
/// \brief task to calculate the pikp cme signal and bacground.
// C++/ROOT includes.
#include <CCDB/BasicCCDBManager.h>
#include <chrono>
#include <string>
#include <vector>
#include <utility>
#include <memory>
#include <TF1.h>
#include <TComplex.h>
#include <TH1F.h>
#include <TH2D.h>
#include <TMath.h>
#include <TVector2.h>
// o2Physics includes.
#include "Framework/ASoA.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/runDataProcessing.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/StaticFor.h"
#include "Common/DataModel/Qvectors.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/Core/EventPlaneHelper.h"
#include "Common/Core/TrackSelection.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/PIDResponseITS.h"
#include "CommonConstants/PhysicsConstants.h"
// o2 includes.
using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
namespace o2::aod
{
namespace cme_track_pid_columns
{
DECLARE_SOA_COLUMN(NPidFlag, nPidFlag, int8_t); // Flag tracks without proper binning as -1, and indicate type of particle [0->(un_Id) 1->(pi_only), 2->(ka_only), 3->(pr_only), 4->(pi_ITSleft), 5->(ka_ITSleft), 6->(pr_ITSleft), 7->(pi_ka), 8->(pi_Pr), 9->(ka_pr), 10->(pi_ka_pr), 11->(pi_ka_ITSleft), 12->(pi_pr_ITSleft), 13->(ka_pr_ITSleft), 14->(pi_ka_pr_ITSleft)]
DECLARE_SOA_COLUMN(AverClusterSizeCosl, averClusterSizeCosl, float);
DECLARE_SOA_COLUMN(NSigmaPiITS, nSigmaPiITS, float);
DECLARE_SOA_COLUMN(NSigmaKaITS, nSigmaKaITS, float);
DECLARE_SOA_COLUMN(NSigmaPrITS, nSigmaPrITS, float);
DECLARE_SOA_COLUMN(NSigmaPiTPC, nSigmaPiTPC, float);
DECLARE_SOA_COLUMN(NSigmaKaTPC, nSigmaKaTPC, float);
DECLARE_SOA_COLUMN(NSigmaPrTPC, nSigmaPrTPC, float);
DECLARE_SOA_COLUMN(NSigmaPiTOF, nSigmaPiTOF, float);
DECLARE_SOA_COLUMN(NSigmaKaTOF, nSigmaKaTOF, float);
DECLARE_SOA_COLUMN(NSigmaPrTOF, nSigmaPrTOF, float);
} // namespace cme_track_pid_columns
DECLARE_SOA_TABLE(Flags, "AOD", "Flags", cme_track_pid_columns::NPidFlag);
DECLARE_SOA_TABLE(PidInfo, "AOD", "PidInfo", cme_track_pid_columns::AverClusterSizeCosl, cme_track_pid_columns::NSigmaPiITS, cme_track_pid_columns::NSigmaKaITS, cme_track_pid_columns::NSigmaPrITS, cme_track_pid_columns::NSigmaPiTPC, cme_track_pid_columns::NSigmaKaTPC, cme_track_pid_columns::NSigmaPrTPC, cme_track_pid_columns::NSigmaPiTOF, cme_track_pid_columns::NSigmaKaTOF, cme_track_pid_columns::NSigmaPrTOF);
} // namespace o2::aod
namespace pid_flags
{
constexpr int8_t kUnqualified = -1;
constexpr int8_t kUnPOIHadron = 0;
constexpr int8_t kPion = 1;
constexpr int8_t kKaon = 2;
constexpr int8_t kProton = 3;
constexpr int8_t kPionITSleft = 4;
constexpr int8_t kKaonITSleft = 5;
constexpr int8_t kProtonITSleft = 6;
constexpr int8_t kPionKaon = 7;
constexpr int8_t kPionProton = 8;
constexpr int8_t kKaonProton = 9;
constexpr int8_t kPionKaonProton = 10;
constexpr int8_t kPionKaonITSleft = 11;
constexpr int8_t kPionProtonITSleft = 12;
constexpr int8_t kKaonProtonITSleft = 13;
constexpr int8_t kPionKaonProtonITSleft = 14;
} // namespace pid_flags
namespace event_selection
{
constexpr int kFT0AV0ASigma = 5;
}
namespace fourier_mode
{
// constexpr int kMode1 = 1;
constexpr int kMode2 = 2;
// constexpr int kMode3 = 3;
} // namespace fourier_mode
using TracksPID = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::TrackSelectionExtension, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr>;
using CollisionPID = soa::Join<aod::Collisions, aod::CentFT0Cs>;
struct FillPIDcolums {
Configurable<float> cfgPtMaxforTPCOnlyPID{"cfgPtMaxforTPCOnlyPID", 0.4, "Maxmium track pt for TPC only PID,only when onlyTOF and onlyTOFHIT closed"};
Configurable<float> cfgMinPtPID{"cfgMinPtPID", 0.15, "Minimum track #P_{t} for PID"};
Configurable<float> cfgMaxPtPID{"cfgMaxPtPID", 99.9, "Maximum track #P_{t} for PID"};
Configurable<float> cfgMaxEtaPID{"cfgMaxEtaPID", 0.8, "Maximum track #eta for PID"};
Configurable<float> cfgMaxTPCChi2NCl{"cfgMaxTPCChi2NCl", 2.5, "Maximum chi2 per cluster TPC for PID if not use costom track cuts"};
Configurable<float> cfgMaxChi2NClITS{"cfgMaxChi2NClITS", 2.5, "Maximum chi2 per cluster ITS for PID if not use costom track cuts"};
Configurable<float> cfgMinTPCCls{"cfgMinTPCCls", 70, "Minimum TPC clusters for PID if not use costom track cuts"};
Configurable<float> cfgMinITSCls{"cfgMinITSCls", 1, "Minimum ITS clusters for PID if not use costom track cuts"};
Configurable<float> cfgMaxTPCCls{"cfgMaxTPCCls", 999, "Max TPC clusters for PID if not use costom track cuts"};
Configurable<float> cfgMaxITSCls{"cfgMaxITSCls", 999, "Max ITS clusters for PID if not use costom track cuts"};
Configurable<float> cfgMaxDCAxy{"cfgMaxDCAxy", 99, "Maxium DCAxy for standard PID tracking"};
Configurable<float> cfgMaxDCAz{"cfgMaxDCAz", 2, "Maxium DCAz for standard PID tracking"};
Configurable<float> cfgAveClusSizeCoslMinPi{"cfgAveClusSizeCoslMinPi", 0, "Base line for minmum ITS cluster size x cos(#lambda) for Pions"};
Configurable<float> cfgAveClusSizeCoslMaxPi{"cfgAveClusSizeCoslMaxPi", 1e9, "Base line for maxmum ITS cluster size x cos(#lambda) for Pions"};
Configurable<float> cfgAveClusSizeCoslMinKa{"cfgAveClusSizeCoslMinKa", 0, "Base line for minmum ITS cluster size x cos(#lambda) for Kaons"};
Configurable<float> cfgAveClusSizeCoslMaxKa{"cfgAveClusSizeCoslMaxKa", 1e9, "Base line for maxmum ITS cluster size x cos(#lambda) for Kaons"};
Configurable<float> cfgAveClusSizeCoslMinPr{"cfgAveClusSizeCoslMinPr", 0, "Base line for minmum ITS cluster size x cos(#lambda) for Protons"};
Configurable<float> cfgAveClusSizeCoslMaxPr{"cfgAveClusSizeCoslMaxPr", 1e9, "Base line for maxmum ITS cluster size x cos(#lambda) for Protons"};
ConfigurableAxis cfgrigidityBins{"cfgrigidityBins", {200, -10.f, 10.f}, "Binning for rigidity #it{p}^{TPC}/#it{z}"};
ConfigurableAxis cfgdedxBins{"cfgdedxBins", {1000, 0.f, 1000.f}, "Binning for dE/dx"};
ConfigurableAxis cfgnSigmaBinsTPC{"cfgnSigmaBinsTPC", {200, -5.f, 5.f}, "Binning for n sigma TPC"};
ConfigurableAxis cfgnSigmaBinsTOF{"cfgnSigmaBinsTOF", {200, -5.f, 5.f}, "Binning for n sigma TOF"};
ConfigurableAxis cfgnSigmaBinsITS{"cfgnSigmaBinsITS", {200, -5.f, 5.f}, "Binning for n sigma ITS"};
ConfigurableAxis cfgnSigmaBinsCom{"cfgnSigmaBinsCom", {100, 0.f, 10.f}, "Combination Binning for TPC&TOF nsigma"};
ConfigurableAxis cfgaxisptPID{"cfgaxisptPID", {120, 0, 12}, "Binning for P_{t} PID"};
ConfigurableAxis cfgaxispPID{"cfgaxispPID", {50, 0, 5}, "Binning for P PID"};
ConfigurableAxis cfgaxisAverClusterCosl{"cfgaxisAverClusterCosl", {50, 0, 10}, "Binning for average cluster size x cos(#lambda)"};
ConfigurableAxis cfgaxisAverClusterCoslnSigma{"cfgaxisAverClusterCoslnSigma", {50, 0, 5}, "Binning for average cluster size x cos(#lambda) vs nSigam"};
ConfigurableAxis cfgaxisetaPID{"cfgaxisetaPID", {90, -0.9, 0.9}, "Binning for Pt QA"};
ConfigurableAxis cfgaxisDCAz{"cfgaxisDCAz", {200, -1, 1}, "Binning for DCAz"};
ConfigurableAxis cfgaxisDCAxy{"cfgaxisDCAxy", {100, -0.5, 0.5}, "Binning for DCAxy"};
ConfigurableAxis cfgaxisChi2Ncls{"cfgaxisChi2Ncls", {50, 0, 5}, "Binning for Chi2Ncls TPC/ITS"};
Configurable<bool> cfgQuietMode{"cfgQuietMode", false, "open quiet mode for saving cpu cost and only do some basic QA plots"};
Configurable<bool> cfgRequireGlobalTrack{"cfgRequireGlobalTrack", false, "Require track used must be the global track"};
Configurable<bool> cfgOpenPIDPtSelection{"cfgOpenPIDPtSelection", false, "Cut Pt reign PID particles for use"};
Configurable<bool> cfgOpenPlotnSigmaOrigin{"cfgOpenPlotnSigmaOrigin", true, "Open origin nSigma plots before PID selections"};
Configurable<bool> cfgOpenPlotnSigmaTOFITSPt{"cfgOpenPlotnSigmaTOFITSPt", true, "plot nSigmaTOF vs nSigmaITS vs Pt"};
Configurable<bool> cfgOpenPlotnSigmaITSTPCPt{"cfgOpenPlotnSigmaITSTPCPt", true, "plot nSigmaITS vs nSigmaTOF vs Pt"};
Configurable<bool> cfgOpenPlotnSigmaTOFTPCPt{"cfgOpenPlotnSigmaTOFTPCPt", true, "plot nSigmaTOF vs nSigmaTPC vs Pt"};
Configurable<bool> cfgOpenPlotAverClus{"cfgOpenPlotAverClus", true, "plot average cluster size x cos(#lambda)"};
Configurable<bool> cfgOpenPlotAverClusP{"cfgOpenPlotAverClusP", true, "plot average cluster size x cos(#lambda) vs p"};
Configurable<bool> cfgOpenPlotAverClusnSigmaTPC{"cfgOpenPlotAverClusnSigmaTPC", true, "plot average cluster size x cos(#lambda) vs nSigmaTPC"};
Configurable<bool> cfgOpenPlotPhiDis{"cfgOpenPlotPhiDis", true, "plot phi distribution QA"};
Configurable<bool> cfgOpenPlotPhiDisPtEta{"cfgOpenPlotPhiDisPtEta", true, "plot phi pt eta distribution QA"};
Configurable<bool> cfgOpenITSCut{"cfgOpenITSCut", true, "open ITSnsigma cut"};
Configurable<bool> cfgOpenITSCutQAPlots{"cfgOpenITSCutQAPlots", true, "open QA plots after ITS nsigma cut"};
Configurable<bool> cfgOpenDetailPlotsTPCITSContaimination{"cfgOpenDetailPlotsTPCITSContaimination", false, "open detail TH3D plots for nSigmaTPC-ITS Pt-eta-Phi nSigmaITS-clustersize"};
Configurable<bool> cfgUseStrictPID{"cfgUseStrictPID", true, "More strict pid strategy"};
Configurable<bool> cfgOpenAllowCrossTrack{"cfgOpenAllowCrossTrack", false, "Allow one track to be identified as different kind of PID particles"};
Configurable<bool> cfgOpenCrossTrackQAPlots{"cfgOpenCrossTrackQAPlots", true, "open cross pid track QA plots"};
Configurable<bool> cfgOpenTOFOnlyPID{"cfgOpenTOFOnlyPID", true, "only accept tracks who has TOF infomation and use TOFnsigma for PID(priority greater than TPConly and combined"};
Configurable<bool> cfgOpenTPCAssistanceTOFOnlyPID{"cfgOpenTPCAssistanceTOFOnlyPID", false, "Set loose TPC nsigma cut for TOFOnlyPID mode using cfg nsigmaTPC configurations"};
Configurable<bool> cfgOpenTPCOnlyPID{"cfgOpenTPCOnlyPID", false, "only use TPCnsigma for PID(priority grater than combined less than TOFOnly)"};
Configurable<bool> cfgUseCostomTrackCuts{"cfgUseCostomTrackCuts", true, "use track cuts from default track selection table producer"};
Configurable<bool> cfgOpenPtRangedTOFnSigmacutPi{"cfgOpenPtRangedTOFnSigmacutPi", false, "use nSigma TOF cut for different pt Pion"};
Configurable<bool> cfgOpenPtRangedTPCnSigmacutPi{"cfgOpenPtRangedTPCnSigmacutPi", false, "use nSigma TPC cut for different pt Pion"};
Configurable<bool> cfgOpenPtRangedITSnSigmacutPi{"cfgOpenPtRangedITSnSigmacutPi", false, "use nSigma ITS cut for different pt Pion"};
Configurable<bool> cfgOpenPtRangedTOFnSigmacutKa{"cfgOpenPtRangedTOFnSigmacutKa", false, "use nSigma TOF cut for different pt Kaon"};
Configurable<bool> cfgOpenPtRangedTPCnSigmacutKa{"cfgOpenPtRangedTPCnSigmacutKa", false, "use nSigma TPC cut for different pt Kaon"};
Configurable<bool> cfgOpenPtRangedITSnSigmacutKa{"cfgOpenPtRangedITSnSigmacutKa", false, "use nSigma ITS cut for different pt Kaon"};
Configurable<bool> cfgOpenPtRangedTOFnSigmacutPr{"cfgOpenPtRangedTOFnSigmacutPr", false, "use nSigma TOF cut for different pt Proton"};
Configurable<bool> cfgOpenPtRangedTPCnSigmacutPr{"cfgOpenPtRangedTPCnSigmacutPr", false, "use nSigma TPC cut for different pt Proton"};
Configurable<bool> cfgOpenPtRangedITSnSigmacutPr{"cfgOpenPtRangedITSnSigmacutPr", false, "use nSigma ITS cut for different pt Proton"};
Configurable<bool> cfgOpenPlotCheckITSOnlytrackInfo{"cfgOpenPlotCheckITSOnlytrackInfo", true, "plot checks if track NclsTPC is 0 for assure it has p info or not"};
Configurable<bool> cfgOpenTrackingInfoCheck{"cfgOpenTrackingInfoCheck", true, "plot track infomation check"};
Configurable<std::vector<float>> cfgPtCutLower{"cfgPtCutLower", {0.15, 0.15, 0.15}, "Pt lower limit for pi k p respectively"};
Configurable<std::vector<float>> cfgPtCutUpper{"cfgPtCutUpper", {99., 99., 99.}, "Pt upper limit for pi k p respectively"};
Configurable<std::vector<float>> cfgnSigmaCutTPCUpper{"cfgnSigmaCutTPCUpper", {3, 3, 3}, "TPC nsigma cut upper limit for pi k p respectively at low pt and for the TPCOnly case"};
Configurable<std::vector<float>> cfgnSigmaCutTOFUpper{"cfgnSigmaCutTOFUpper", {1.5, 1.5, 1.5}, "TOF nsigma cut upper limit for pi k p respectively for the TOFonly case"};
Configurable<std::vector<float>> cfgnSigmaCutRMSUpper{"cfgnSigmaCutRMSUpper", {3, 3, 3}, "TPC_TOF combined cut upper limit for pi k p respectively at high pt"};
Configurable<std::vector<float>> cfgnSigmaCutITSUpper{"cfgnSigmaCutITSUpper", {3, 2.5, 2}, "ITS nSigma cut upper limit for pi k p"};
Configurable<std::vector<float>> cfgnSigmaCutTPCLower{"cfgnSigmaCutTPCLower", {-3, -3, -3}, "TPC nsigma cut lower limit for pi k p respectively at low pt and for the TPCOnly case"};
Configurable<std::vector<float>> cfgnSigmaCutTOFLower{"cfgnSigmaCutTOFLower", {-1.5, -1.5, -1.5}, "TOF nsigma cut lower limit for pi k p respectively for the TOFonly case"};
Configurable<std::vector<float>> cfgnSigmaCutRMSLower{"cfgnSigmaCutRMSLower", {-3, -3, -3}, "TPC_TOF combined cut lower limit for pi k p respectively at high pt"};
Configurable<std::vector<float>> cfgnSigmaCutITSLower{"cfgnSigmaCutITSLower", {-3, -2.5, -2}, "ITS nSigma cut lower limit for pi k p"};
Configurable<std::vector<float>> cfgPtBinPionPID{"cfgPtBinPionPID", {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0, 8.0, 10.0}, "pt bin for pion PIDnsigma"};
Configurable<std::vector<float>> cfgPtBinKaonPID{"cfgPtBinKaonPID", {0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0}, "pt bin for pion PIDnsigma"};
Configurable<std::vector<float>> cfgPtBinProtonPID{"cfgPtBinProtonPID", {0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0}, "pt bin for pion PIDnsigma"};
Configurable<std::vector<float>> cfgnSigmaTPCPionPtUpper{"cfgnSigmaTPCPionPtUpper", {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, "nSigmaTPC cut upper limit anchored to pion pt bins"};
Configurable<std::vector<float>> cfgnSigmaTOFPionPtUpper{"cfgnSigmaTOFPionPtUpper", {1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5}, "nSigmaTOF cut upper limit anchored to pion pt bins"};
Configurable<std::vector<float>> cfgnSigmaITSPionPtUpper{"cfgnSigmaITSPionPtUpper", {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, "nSigmaITS cut upper limit anchored to pion pt bins"};
Configurable<std::vector<float>> cfgnSigmaTPCKaonPtUpper{"cfgnSigmaTPCKaonPtUpper", {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, "nSigmaTPC cut upper limit anchored to kaon pt bins"};
Configurable<std::vector<float>> cfgnSigmaTOFKaonPtUpper{"cfgnSigmaTOFKaonPtUpper", {1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5}, "nSigmaTOF cut upper limit anchored to kaon pt bins"};
Configurable<std::vector<float>> cfgnSigmaITSKaonPtUpper{"cfgnSigmaITSKaonPtUpper", {2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5}, "nSigmaITS cut upper limit anchored to kaon pt bins"};
Configurable<std::vector<float>> cfgnSigmaTPCProtonPtUpper{"cfgnSigmaTPCProtonPtUpper", {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, "nSigmaTPC cut upper limit anchored to proton pt bins"};
Configurable<std::vector<float>> cfgnSigmaTOFProtonPtUpper{"cfgnSigmaTOFProtonPtUpper", {1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5}, "nSigmaTOF cut upper limit anchored to proton pt bins"};
Configurable<std::vector<float>> cfgnSigmaITSProtonPtUpper{"cfgnSigmaITSProtonPtUpper", {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, "nSigmaITS cut upper limit anchored to proton pt bins"};
Configurable<std::vector<float>> cfgnSigmaTPCPionPtLower{"cfgnSigmaTPCPionPtLower", {-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3}, "nSigmaTPC cut lower limit anchored to pion pt bins"};
Configurable<std::vector<float>> cfgnSigmaTOFPionPtLower{"cfgnSigmaTOFPionPtLower", {-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5}, "nSigmaTOF cut lower limit anchored to pion pt bins"};
Configurable<std::vector<float>> cfgnSigmaITSPionPtLower{"cfgnSigmaITSPionPtLower", {-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3}, "nSigmaITS cut lower limit anchored to pion pt bins"};
Configurable<std::vector<float>> cfgnSigmaTPCKaonPtLower{"cfgnSigmaTPCKaonPtLower", {-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3}, "nSigmaTPC cut lower limit anchored to kaon pt bins"};
Configurable<std::vector<float>> cfgnSigmaTOFKaonPtLower{"cfgnSigmaTOFKaonPtLower", {-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5}, "nSigmaTOF cut lower limit anchored to kaon pt bins"};
Configurable<std::vector<float>> cfgnSigmaITSKaonPtLower{"cfgnSigmaITSKaonPtLower", {-2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5, -2.5}, "nSigmaITS cut lower limit anchored to kaon pt bins"};
Configurable<std::vector<float>> cfgnSigmaTPCProtonPtLower{"cfgnSigmaTPCProtonPtLower", {-3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3}, "nSigmaTPC cut lower limit anchored to proton pt bins"};
Configurable<std::vector<float>> cfgnSigmaTOFProtonPtLower{"cfgnSigmaTOFProtonPtLower", {-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.5}, "nSigmaTOF cut lower limit anchored to proton pt bins"};
Configurable<std::vector<float>> cfgnSigmaITSProtonPtLower{"cfgnSigmaITSProtonPtLower", {-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2}, "nSigmaITS cut lower limit anchored to proton pt bins"};
static float averageClusterSizeCosl(uint32_t itsClusterSizes, float eta)
{
float average = 0;
int nclusters = 0;
const float cosl = 1. / std::cosh(eta);
const int nlayerITS = 7;
for (int layer = 0; layer < nlayerITS; layer++) {
if ((itsClusterSizes >> (layer * 4)) & 0xf) {
nclusters++;
average += (itsClusterSizes >> (layer * 4)) & 0xf;
}
}
if (nclusters == 0) {
return 0;
}
return average * cosl / nclusters;
};
template <typename TrackType>
bool selTrackPid(const TrackType track)
{
if ((track.pt() < cfgMinPtPID) || (track.pt() > cfgMaxPtPID))
return false;
if (std::abs(track.eta()) > cfgMaxEtaPID)
return false;
if (cfgRequireGlobalTrack) {
if (!(track.isGlobalTrackSDD() == (uint8_t) true))
return false;
}
if (cfgUseCostomTrackCuts) {
if (!track.passedITSNCls())
return false;
if (!track.passedITSChi2NDF())
return false;
if (!track.passedITSHits())
return false;
if (!track.passedTPCChi2NDF())
return false;
if (!track.passedTPCCrossedRowsOverNCls())
return false;
if (!track.passedDCAxy())
return false;
if (!track.passedDCAz())
return false;
} else {
if (track.tpcChi2NCl() > cfgMaxTPCChi2NCl)
return false;
if (track.tpcNClsFound() < cfgMinTPCCls || track.tpcNClsFound() > cfgMaxTPCCls)
return false;
if (track.itsChi2NCl() > cfgMaxChi2NClITS)
return false;
if (track.itsNCls() < cfgMinITSCls || track.itsNCls() > cfgMaxITSCls)
return false;
if (std::abs(track.dcaXY()) > cfgMaxDCAxy)
return false;
if (std::abs(track.dcaZ()) > cfgMaxDCAz)
return false;
}
return true;
}
template <typename T>
int selectionPidtpctof(const T& candidate, std::array<float, 3> nSigmaTOFCutPtUpper, std::array<float, 3> nSigmaTOFCutPtLower, std::array<float, 3> nSigmaTPCCutPtUpper, std::array<float, 3> nSigmaTPCCutPtLower)
{
// initialization for basic parameter
float averClusSizeCosl = averageClusterSizeCosl(candidate.itsClusterSizes(), candidate.eta());
std::array<float, 3> nSigmaTPC = {candidate.tpcNSigmaPi(), candidate.tpcNSigmaKa(), candidate.tpcNSigmaPr()};
std::array<float, 3> nSigmaTOF = {candidate.tofNSigmaPi(), candidate.tofNSigmaKa(), candidate.tofNSigmaPr()};
std::array<float, 3> nSigmaCombined = {std::hypot(candidate.tpcNSigmaPi(), candidate.tofNSigmaPi()), std::hypot(candidate.tpcNSigmaKa(), candidate.tofNSigmaKa()), std::hypot(candidate.tpcNSigmaPr(), candidate.tofNSigmaPr())};
std::array<float, 3> nSigmaToUse;
std::vector<float> pidVectorUpper;
std::vector<float> pidVectorLower;
std::vector<float> pidVectorTOFPtUpper;
std::vector<float> pidVectorTOFPtLower;
std::vector<float> pidVectorTPCPtUpper;
std::vector<float> pidVectorTPCPtLower;
int pid = -1;
bool kIsPi = false, kIsKa = false, kIsPr = false;
pidVectorTOFPtUpper.push_back(nSigmaTOFCutPtUpper[0]);
pidVectorTOFPtUpper.push_back(nSigmaTOFCutPtUpper[1]);
pidVectorTOFPtUpper.push_back(nSigmaTOFCutPtUpper[2]);
pidVectorTOFPtLower.push_back(nSigmaTOFCutPtLower[0]);
pidVectorTOFPtLower.push_back(nSigmaTOFCutPtLower[1]);
pidVectorTOFPtLower.push_back(nSigmaTOFCutPtLower[2]);
pidVectorTPCPtUpper.push_back(nSigmaTPCCutPtUpper[0]);
pidVectorTPCPtUpper.push_back(nSigmaTPCCutPtUpper[1]);
pidVectorTPCPtUpper.push_back(nSigmaTPCCutPtUpper[2]);
pidVectorTPCPtLower.push_back(nSigmaTPCCutPtLower[0]);
pidVectorTPCPtLower.push_back(nSigmaTPCCutPtLower[1]);
pidVectorTPCPtLower.push_back(nSigmaTPCCutPtLower[2]);
// Choose which nSigma array and PIDcut array to use
if (cfgOpenTOFOnlyPID) {
if (!candidate.hasTOF())
return 0;
nSigmaToUse = nSigmaTOF;
pidVectorUpper = pidVectorTOFPtUpper;
pidVectorLower = pidVectorTOFPtLower;
} else if (cfgOpenTPCOnlyPID) {
nSigmaToUse = nSigmaTPC;
pidVectorUpper = pidVectorTPCPtUpper;
pidVectorLower = pidVectorTPCPtLower;
} else {
if (candidate.pt() > cfgPtMaxforTPCOnlyPID && candidate.hasTOF()) {
nSigmaToUse = nSigmaCombined;
pidVectorUpper = cfgnSigmaCutRMSUpper.value;
pidVectorLower = cfgnSigmaCutRMSLower.value;
} else if (candidate.pt() > cfgPtMaxforTPCOnlyPID && !candidate.hasTOF() && cfgUseStrictPID) {
return 0;
} else {
nSigmaToUse = nSigmaTPC;
pidVectorUpper = cfgnSigmaCutTPCUpper.value;
pidVectorLower = cfgnSigmaCutTPCLower.value;
}
}
float nsigma = 9999.99;
const int nPOI = 3;
const int piCase = 0;
const int kaCase = 1;
const int prCase = 2;
// Fill cross pid QA
for (int i = 0; i < nPOI; ++i) {
if (nSigmaToUse[i] > pidVectorLower[i] && nSigmaToUse[i] < pidVectorUpper[i]) {
if (i == piCase) {
kIsPi = true;
if (!cfgQuietMode) {
if (cfgOpenCrossTrackQAPlots) {
histosQA.fill(HIST("QA/PID/histnSigmaITS_nSigmaTPC_cross_Pi"), candidate.itsNSigmaPi(), candidate.tpcNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigmaTOF_nSigmaITS_cross_Pi"), candidate.tofNSigmaPi(), candidate.itsNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigmaTOF_nSigmaTPC_cross_Pi"), candidate.tofNSigmaPi(), candidate.tpcNSigmaPi());
histosQA.fill(HIST("QA/PID/histdEdxTPC_cross_Pi"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
histosQA.fill(HIST("QA/PID/histnSigma_TOF_cross_Pi"), candidate.tofNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_TOF_Pt_cross_Pi"), candidate.pt(), candidate.tofNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_cross_Pi"), candidate.tpcNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Pt_cross_Pi"), candidate.pt(), candidate.tpcNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_ITS_cross_Pi"), candidate.itsNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_ITS_Pt_cross_Pi"), candidate.pt(), candidate.itsNSigmaPi());
if (cfgOpenPlotnSigmaTOFITSPt) {
histosQA.fill(HIST("QA/PID/histnSigma_TOF_ITS_Pt_cross_Pi"), candidate.pt(), candidate.tofNSigmaPi(), candidate.itsNSigmaPi());
}
if (cfgOpenPlotnSigmaTOFTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_TOF_TPC_Pt_cross_Pi"), candidate.pt(), candidate.tofNSigmaPi(), candidate.tpcNSigmaPi());
}
if (cfgOpenPlotnSigmaITSTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_ITS_TPC_Pt_cross_Pi"), candidate.pt(), candidate.itsNSigmaPi(), candidate.tpcNSigmaPi());
}
if (cfgOpenPlotAverClus) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_cross_Pi"), averClusSizeCosl);
}
if (cfgOpenPlotAverClusP) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_P_cross_Pi"), candidate.p(), averClusSizeCosl);
}
if (cfgOpenPlotAverClusnSigmaTPC) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_nSigmaTPC_cross_Pi"), candidate.tpcNSigmaPi(), averClusSizeCosl);
}
if (cfgOpenPlotPhiDis) {
histosQA.fill(HIST("QA/PID/histPhi_Dis_cross_Pi"), candidate.phi());
}
if (cfgOpenPlotPhiDisPtEta) {
histosQA.fill(HIST("QA/PID/histPhi_Dis_Pt_Eta_cross_Pi"), candidate.phi(), candidate.pt(), candidate.eta());
}
}
}
}
if (i == kaCase) {
kIsKa = true;
if (!cfgQuietMode) {
if (cfgOpenCrossTrackQAPlots) {
histosQA.fill(HIST("QA/PID/histnSigmaITS_nSigmaTPC_cross_Ka"), candidate.itsNSigmaKa(), candidate.tpcNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigmaTOF_nSigmaITS_cross_Ka"), candidate.tofNSigmaKa(), candidate.itsNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigmaTOF_nSigmaTPC_cross_Ka"), candidate.tofNSigmaKa(), candidate.tpcNSigmaKa());
histosQA.fill(HIST("QA/PID/histdEdxTPC_cross_Ka"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
histosQA.fill(HIST("QA/PID/histnSigma_TOF_cross_Ka"), candidate.tofNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_TOF_Pt_cross_Ka"), candidate.pt(), candidate.tofNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_cross_Ka"), candidate.tpcNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Pt_cross_Ka"), candidate.pt(), candidate.tpcNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_ITS_cross_Ka"), candidate.itsNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_ITS_Pt_cross_Ka"), candidate.pt(), candidate.itsNSigmaKa());
if (cfgOpenPlotnSigmaTOFITSPt) {
histosQA.fill(HIST("QA/PID/histnSigma_TOF_ITS_Pt_cross_Ka"), candidate.pt(), candidate.tofNSigmaKa(), candidate.itsNSigmaKa());
}
if (cfgOpenPlotnSigmaTOFTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_TOF_TPC_Pt_cross_Ka"), candidate.pt(), candidate.tofNSigmaKa(), candidate.tpcNSigmaKa());
}
if (cfgOpenPlotnSigmaITSTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_ITS_TPC_Pt_cross_Ka"), candidate.pt(), candidate.itsNSigmaKa(), candidate.tpcNSigmaKa());
}
if (cfgOpenPlotAverClus) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_cross_Ka"), averClusSizeCosl);
}
if (cfgOpenPlotAverClusP) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_P_cross_Ka"), candidate.p(), averClusSizeCosl);
}
if (cfgOpenPlotAverClusnSigmaTPC) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_nSigmaTPC_cross_Ka"), candidate.tpcNSigmaKa(), averClusSizeCosl);
}
if (cfgOpenPlotPhiDis) {
histosQA.fill(HIST("QA/PID/histPhi_Dis_cross_Ka"), candidate.phi());
}
if (cfgOpenPlotPhiDisPtEta) {
histosQA.fill(HIST("QA/PID/histPhi_Dis_Pt_Eta_cross_Ka"), candidate.phi(), candidate.pt(), candidate.eta());
}
}
}
}
if (i == prCase) {
kIsPr = true;
if (!cfgQuietMode) {
if (cfgOpenCrossTrackQAPlots) {
histosQA.fill(HIST("QA/PID/histnSigmaITS_nSigmaTPC_cross_Pr"), candidate.itsNSigmaPr(), candidate.tpcNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigmaTOF_nSigmaITS_cross_Pr"), candidate.tofNSigmaPr(), candidate.itsNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigmaTOF_nSigmaTPC_cross_Pr"), candidate.tofNSigmaPr(), candidate.tpcNSigmaPr());
histosQA.fill(HIST("QA/PID/histdEdxTPC_cross_Pr"), candidate.sign() * candidate.tpcInnerParam(), candidate.tpcSignal());
histosQA.fill(HIST("QA/PID/histnSigma_TOF_cross_Pr"), candidate.tofNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_TOF_Pt_cross_Pr"), candidate.pt(), candidate.tofNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_cross_Pr"), candidate.tpcNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_Pt_cross_Pr"), candidate.pt(), candidate.tpcNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_ITS_cross_Pr"), candidate.itsNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_ITS_Pt_cross_Pr"), candidate.pt(), candidate.itsNSigmaPr());
if (cfgOpenPlotnSigmaTOFITSPt) {
histosQA.fill(HIST("QA/PID/histnSigma_TOF_ITS_Pt_cross_Pr"), candidate.pt(), candidate.tofNSigmaPr(), candidate.itsNSigmaPr());
}
if (cfgOpenPlotnSigmaTOFTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_TOF_TPC_Pt_cross_Pr"), candidate.pt(), candidate.tofNSigmaPr(), candidate.tpcNSigmaPr());
}
if (cfgOpenPlotnSigmaITSTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_ITS_TPC_Pt_cross_Pr"), candidate.pt(), candidate.itsNSigmaPr(), candidate.tpcNSigmaPr());
}
if (cfgOpenPlotAverClus) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_cross_Pr"), averClusSizeCosl);
}
if (cfgOpenPlotAverClusP) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_P_cross_Pr"), candidate.p(), averClusSizeCosl);
}
if (cfgOpenPlotAverClusnSigmaTPC) {
histosQA.fill(HIST("QA/PID/histAverClusterSizeCosl_nSigmaTPC_cross_Pr"), candidate.tpcNSigmaPr(), averClusSizeCosl);
}
if (cfgOpenPlotPhiDis) {
histosQA.fill(HIST("QA/PID/histPhi_Dis_cross_Pr"), candidate.phi());
}
if (cfgOpenPlotPhiDisPtEta) {
histosQA.fill(HIST("QA/PID/histPhi_Dis_Pt_Eta_cross_Pr"), candidate.phi(), candidate.pt(), candidate.eta());
}
}
}
}
}
}
if (cfgUseStrictPID) {
// Only use the track which was recognized as an unique PID particle
int index = (kIsPr << 2) | (kIsKa << 1) | kIsPi;
const int map[] = {0, 1, 2, 0, 3, 0, 0, 0};
return map[index];
} else {
if (cfgOpenAllowCrossTrack) {
// one track can be recognized as different PID particles
int index = (kIsPr << 2) | (kIsKa << 1) | kIsPi;
const int map[] = {0, 1, 2, 7, 3, 8, 9, 10};
return map[index];
} else {
// Select particle with the lowest nsigma (If not allow cross track)
for (int i = 0; i < nPOI; ++i) {
if (std::abs(nSigmaToUse[i]) < nsigma && (nSigmaToUse[i] > pidVectorLower[i] && nSigmaToUse[i] < pidVectorUpper[i])) {
pid = i;
nsigma = std::abs(nSigmaToUse[i]);
}
}
return pid + 1; // shift the pid by 1, 1 = pion, 2 = kaon, 3 = proton
}
}
// Clear the vectors
std::vector<float>().swap(pidVectorLower);
std::vector<float>().swap(pidVectorUpper);
std::vector<float>().swap(pidVectorTOFPtUpper);
std::vector<float>().swap(pidVectorTPCPtLower);
std::vector<float>().swap(pidVectorTOFPtUpper);
std::vector<float>().swap(pidVectorTPCPtLower);
}
template <typename T>
bool selectionITS(const T& candidate, int mode, float avgclssize, std::array<float, 3> nSigmaITSToUseUpper, std::array<float, 3> nSigmaITSToUseLower)
{
switch (mode) {
case 1: // For Pion
if (!((candidate.itsNSigmaPi() > nSigmaITSToUseLower[0] && candidate.itsNSigmaPi() < nSigmaITSToUseUpper[0]) && avgclssize > cfgAveClusSizeCoslMinPi && avgclssize < cfgAveClusSizeCoslMaxPi)) {
return false;
} else {
return true;
}
break;
case 2: // For Kaon
if (!((candidate.itsNSigmaKa() > nSigmaITSToUseLower[1] && candidate.itsNSigmaKa() < nSigmaITSToUseUpper[1]) && avgclssize > cfgAveClusSizeCoslMinKa && avgclssize < cfgAveClusSizeCoslMaxKa)) {
return false;
} else {
return true;
}
break;
case 3: // For Proton
if (!((candidate.itsNSigmaPr() > nSigmaITSToUseLower[2] && candidate.itsNSigmaPr() < nSigmaITSToUseUpper[2]) && avgclssize > cfgAveClusSizeCoslMinPr && avgclssize < cfgAveClusSizeCoslMaxPr)) {
return false;
} else {
return true;
}
break;
}
return false;
}
HistogramRegistry histosQA{"histosQAPID", {}, OutputObjHandlingPolicy::AnalysisObject};
void init(InitContext const&)
{
AxisSpec axisRigidity{cfgrigidityBins, "#it{p}^{TPC}/#it{z}"};
AxisSpec axisdEdx{cfgdedxBins, "d#it{E}/d#it{x}"};
AxisSpec axisnSigmaTPC{cfgnSigmaBinsTPC, "n_{#sigma}TPC"};
AxisSpec axisnSigmaTOF{cfgnSigmaBinsTOF, "n_{#sigma}TOF"};
AxisSpec axisnSigmaITS{cfgnSigmaBinsITS, "n_{#sigma}ITS"};
AxisSpec axisnSigmaCom{cfgnSigmaBinsCom, "hypot(n_{#sigma}TPC,TOF)"};
AxisSpec axisPtPID{cfgaxisptPID, "#it{p}_{T}"};
AxisSpec axisPPID{cfgaxispPID, "#it{p}"};
AxisSpec axisEtaPID{cfgaxisetaPID, "#it{#eta}"};
AxisSpec axisClusterSize{cfgaxisAverClusterCosl, "<ITS Cluster Size> x <cos(#lambda)>"};
AxisSpec axisClusterSizenSigma{cfgaxisAverClusterCoslnSigma, "<ITS Cluster Size> x <cos(#lambda)>"};
AxisSpec axisPhi = {100, 0, 2.1 * constants::math::PI, "#phi"};
AxisSpec axisDCAz{cfgaxisDCAz, "#it{DCA_{z}}"};
AxisSpec axisDCAxy{cfgaxisDCAxy, "#it{DCA_{xy}}"};
AxisSpec axisITSNcls = {10, -1.5, 8.5, "ITSNcls"};
AxisSpec axisTPCNcls = {160, 0, 160, "TPCNcls"};
AxisSpec axisP{50, -5, 5, "#it{p}"};
AxisSpec axisChi2Ncls = {cfgaxisChi2Ncls, "#chi^{2}/Ncls"};
if (!cfgQuietMode) {
// ITSOnly track check
if (cfgOpenPlotCheckITSOnlytrackInfo) {
histosQA.add(Form("QA/PID/histDCAz_ITSOnly_Px"), "", {HistType::kTH1F, {axisP}});
histosQA.add(Form("QA/PID/histDCAz_ITSOnly_Py"), "", {HistType::kTH1F, {axisP}});
histosQA.add(Form("QA/PID/histDCAz_ITSOnly_Pz"), "", {HistType::kTH1F, {axisP}});
}
// TPCChi2Ncls Checking
if (cfgOpenTrackingInfoCheck) {
histosQA.add(Form("QA/PID/histTPCChi2Ncls_total_origin"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_total"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_Pi"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_Ka"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_Pr"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histTPCChi2Ncls_total_AfterITS"), ",#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_Pi_AfterITS"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_Ka_AfterITS"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histTPCChi2Ncls_Pr_AfterITS"), "#chi^{2}/Ncls_{TPC},counts", {HistType::kTH1F, {axisChi2Ncls}});
}
}
// ITSChi2Ncls Checking
if (cfgOpenTrackingInfoCheck) {
histosQA.add(Form("QA/PID/histITSChi2Ncls_total_origin"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_total"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_Pi"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_Ka"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_Pr"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histITSChi2Ncls_total_AfterITS"), ",#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_Pi_AfterITS"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_Ka_AfterITS"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
histosQA.add(Form("QA/PID/histITSChi2Ncls_Pr_AfterITS"), "#chi^{2}/Ncls_{ITS},counts", {HistType::kTH1F, {axisChi2Ncls}});
}
}
// DCA Chencks
if (cfgOpenTrackingInfoCheck) {
histosQA.add(Form("QA/PID/histDCAz_total_origin"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_total_origin"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_total"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_total"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_Pi"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_Pi"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_Ka"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_Ka"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_Pr"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_Pr"), "", {HistType::kTH1F, {axisDCAxy}});
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histDCAz_total_AfterITS"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_total_AfterITS"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_Pi_AfterITS"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_Pi_AfterITS"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_Ka_AfterITS"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_Ka_AfterITS"), "", {HistType::kTH1F, {axisDCAxy}});
histosQA.add(Form("QA/PID/histDCAz_Pr_AfterITS"), "", {HistType::kTH1F, {axisDCAz}});
histosQA.add(Form("QA/PID/histDCAxy_Pr_AfterITS"), "", {HistType::kTH1F, {axisDCAxy}});
}
}
// ITSNcls Checks
if (cfgOpenTrackingInfoCheck) {
histosQA.add(Form("QA/PID/histITSNcls_total_origin"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_total"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_Pi"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_Ka"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_Pr"), "", {HistType::kTH1F, {axisITSNcls}});
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histITSNcls_total_AfterITS"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_Pi_AfterITS"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_Ka_AfterITS"), "", {HistType::kTH1F, {axisITSNcls}});
histosQA.add(Form("QA/PID/histITSNcls_Pr_AfterITS"), "", {HistType::kTH1F, {axisITSNcls}});
}
}
// TPCNcls Checks
if (cfgOpenTrackingInfoCheck) {
histosQA.add(Form("QA/PID/histTPCNcls_total_origin"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_total"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_Pi"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_Ka"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_Pr"), "", {HistType::kTH1F, {axisTPCNcls}});
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histTPCNcls_total_AfterITS"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_Pi_AfterITS"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_Ka_AfterITS"), "", {HistType::kTH1F, {axisTPCNcls}});
histosQA.add(Form("QA/PID/histTPCNcls_Pr_AfterITS"), "", {HistType::kTH1F, {axisTPCNcls}});
}
}
// PID Origin plots
if (cfgOpenPlotnSigmaOrigin) {
if (cfgOpenPlotnSigmaTOFITSPt) {
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_ITS_Pt_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_ITS_Pt_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_ITS_Pt_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
}
if (cfgOpenPlotnSigmaTOFTPCPt) {
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_TPC_Pt_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_TPC_Pt_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_TPC_Pt_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
}
if (cfgOpenPlotnSigmaITSTPCPt) {
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_TPC_Pt_Pi"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_TPC_Pt_Ka"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_TPC_Pt_Pr"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
}
histosQA.add(Form("QA/PID/histnSigma_Origin_TPC_Pi"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TPC_Ka"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TPC_Pr"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TPC_Pt_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TPC_Pt_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TPC_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_Pi"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_Ka"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_Pr"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_Pt_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_Pt_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_Origin_TOF_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_Pi"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_Ka"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_Pr"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_Pt_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_Pt_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_Origin_ITS_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
}
// TH3D NSigmaTPC,NSigmaTOF,NSigmaITS combo vs pt(if necessary for whole centrality)
if (cfgOpenPlotnSigmaTOFITSPt) {
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_cross_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_cross_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_cross_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_AfterITS_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_AfterITS_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_ITS_Pt_AfterITS_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaITS, axisPtPID}});
}
}
if (cfgOpenPlotnSigmaTOFTPCPt) {
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_cross_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_cross_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_cross_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_AfterITS_Pi"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_AfterITS_Ka"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_TOF_TPC_Pt_AfterITS_Pr"), "", {HistType::kTH3F, {axisnSigmaTOF, axisnSigmaTPC, axisPtPID}});
}
}
if (cfgOpenPlotnSigmaITSTPCPt) {
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_Pi"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_Ka"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_Pr"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_cross_Pi"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_cross_Ka"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_cross_Pr"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_AfterITS_Pi"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_AfterITS_Ka"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
histosQA.add(Form("QA/PID/histnSigma_ITS_TPC_Pt_AfterITS_Pr"), "", {HistType::kTH3F, {axisnSigmaITS, axisnSigmaTPC, axisPtPID}});
}
}
if (cfgOpenPlotAverClus) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_Pi"), "", {HistType::kTH1F, {axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_Ka"), "", {HistType::kTH1F, {axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_Pr"), "", {HistType::kTH1F, {axisClusterSize}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_cross_Pi"), "", {HistType::kTH1F, {axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_cross_Ka"), "", {HistType::kTH1F, {axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_cross_Pr"), "", {HistType::kTH1F, {axisClusterSize}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_AfterITS_Pi"), "", {HistType::kTH1F, {axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_AfterITS_Ka"), "", {HistType::kTH1F, {axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_AfterITS_Pr"), "", {HistType::kTH1F, {axisClusterSize}});
}
}
if (cfgOpenPlotAverClusP) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_Pi"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_Ka"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_Pr"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_cross_Pi"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_cross_Ka"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_cross_Pr"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_AfterITS_Pi"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_AfterITS_Ka"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_P_AfterITS_Pr"), "", {HistType::kTH2F, {axisPPID, axisClusterSize}});
}
}
if (cfgOpenPlotAverClusnSigmaTPC) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pi"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Ka"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pr"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_cross_Pi"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_cross_Ka"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_cross_Pr"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_AfterITS_Pi"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_AfterITS_Ka"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
histosQA.add(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_AfterITS_Pr"), "", {HistType::kTH2F, {axisnSigmaTPC, axisClusterSizenSigma}});
}
}
if (cfgOpenPlotPhiDis) {
histosQA.add(Form("QA/PID/histPhi_Dis_Pi"), "", {HistType::kTH1F, {axisPhi}});
histosQA.add(Form("QA/PID/histPhi_Dis_Ka"), "", {HistType::kTH1F, {axisPhi}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pr"), "", {HistType::kTH1F, {axisPhi}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histPhi_Dis_cross_Pi"), "", {HistType::kTH1F, {axisPhi}});
histosQA.add(Form("QA/PID/histPhi_Dis_cross_Ka"), "", {HistType::kTH1F, {axisPhi}});
histosQA.add(Form("QA/PID/histPhi_Dis_cross_Pr"), "", {HistType::kTH1F, {axisPhi}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histPhi_Dis_AfterITS_Pi"), "", {HistType::kTH1F, {axisPhi}});
histosQA.add(Form("QA/PID/histPhi_Dis_AfterITS_Ka"), "", {HistType::kTH1F, {axisPhi}});
histosQA.add(Form("QA/PID/histPhi_Dis_AfterITS_Pr"), "", {HistType::kTH1F, {axisPhi}});
}
}
if (cfgOpenPlotPhiDisPtEta) {
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_Pi"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_Ka"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_Pr"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_cross_Pi"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_cross_Ka"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_cross_Pr"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_AfterITS_Pi"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_AfterITS_Ka"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
histosQA.add(Form("QA/PID/histPhi_Dis_Pt_Eta_AfterITS_Pr"), "", {HistType::kTH3F, {axisPhi, axisPtPID, axisEtaPID}});
}
}
// some basic plots should be ploted (except for the quite mode)
// nSigma TPC TOF ITS combo plots
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_Pi"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_Ka"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_Pr"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_Pi"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_Ka"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_Pr"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_Pi"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_Ka"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_Pr"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_cross_Pi"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_cross_Ka"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_cross_Pr"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_cross_Pi"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_cross_Ka"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_cross_Pr"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_cross_Pi"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_cross_Ka"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_cross_Pr"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_AfterITS_Pi"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_AfterITS_Ka"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaITS_nSigmaTPC_AfterITS_Pr"), "", {HistType::kTH2F, {axisnSigmaITS, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_AfterITS_Pi"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_AfterITS_Ka"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaITS_AfterITS_Pr"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_AfterITS_Pi"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_AfterITS_Ka"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigmaTOF_nSigmaTPC_AfterITS_Pr"), "", {HistType::kTH2F, {axisnSigmaTOF, axisnSigmaTPC}});
}
// nSigma TPC TOF ITS signle and some simple QA plots
histosQA.add(Form("QA/PID/histdEdxTPC_All"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histdEdxTPC_Pi"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histdEdxTPC_Ka"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histdEdxTPC_Pr"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pi"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Ka"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pr"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pt_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pt_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_com_Pi"), "", {HistType::kTH1F, {axisnSigmaCom}});
histosQA.add(Form("QA/PID/histnSigma_com_Ka"), "", {HistType::kTH1F, {axisnSigmaCom}});
histosQA.add(Form("QA/PID/histnSigma_com_Pr"), "", {HistType::kTH1F, {axisnSigmaCom}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pi"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Ka"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pr"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pi"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Ka"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pr"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
if (cfgOpenCrossTrackQAPlots) {
histosQA.add(Form("QA/PID/histdEdxTPC_cross_Pi"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histdEdxTPC_cross_Ka"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histdEdxTPC_cross_Pr"), "", {HistType::kTH2F, {axisRigidity, axisdEdx}});
histosQA.add(Form("QA/PID/histnSigma_TOF_cross_Pi"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_cross_Ka"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_cross_Pr"), "", {HistType::kTH1F, {axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_cross_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_cross_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_cross_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_cross_Pi"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_cross_Ka"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_cross_Pr"), "", {HistType::kTH1F, {axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Pt_cross_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Pt_cross_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_Pt_cross_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_ITS_cross_Pi"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_cross_Ka"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_cross_Pr"), "", {HistType::kTH1F, {axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_cross_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_cross_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_cross_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
}
if (cfgOpenITSCutQAPlots) {
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_AfterITS_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_AfterITS_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TOF_Pt_AfterITS_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTOF}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pt_AfterITS_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pt_AfterITS_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_TPC_Pt_AfterITS_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaTPC}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_AfterITS_Pi"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_AfterITS_Ka"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
histosQA.add(Form("QA/PID/histnSigma_ITS_Pt_AfterITS_Pr"), "", {HistType::kTH2F, {axisPtPID, axisnSigmaITS}});
}
// plots for TPC-ITS contamination (whole centrality)
if (cfgOpenDetailPlotsTPCITSContaimination) {
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_PosPi_Before"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_PosKa_Before"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_PosPr_Before"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_NegPi_Before"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_NegKa_Before"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_NegPr_Before"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pt_PosPi_Before"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pt_PosKa_Before"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pt_PosPr_Before"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pt_NegPi_Before"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pt_NegKa_Before"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSigmaTPC_Pt_NegPr_Before"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
if (cfgOpenITSCutQAPlots) {
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_PosPi_After"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_PosKa_After"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_PosPr_After"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_NegPi_After"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_NegKa_After"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histnSigmaITS_TPC_Pt_NegPr_After"), ";n#sigma_{TPC};n#sigma_{ITS};#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisnSigmaITS, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSIgmaTPC_Pt_PosPi_After"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSIgmaTPC_Pt_PosKa_After"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSIgmaTPC_Pt_PosPr_After"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSIgmaTPC_Pt_NegPi_After"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSIgmaTPC_Pt_NegKa_After"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
histosQA.add<TH3>(Form("QA/PID/histAverClusterSizeCosl_nSIgmaTPC_Pt_NegPr_After"), ";n#sigma_{TPC};<ITS Cluster Size> x <cos(#lambda)>;#p_{t}", {HistType::kTH3F, {axisnSigmaTPC, axisClusterSizenSigma, axisPtPID}});
}
}
}
}
Produces<aod::Flags> pidCmeTable;
Produces<aod::PidInfo> pidInfoTable;
void process(TracksPID const& tracks)
{
auto tracksWithITSPid = soa::Attach<TracksPID,
aod::pidits::ITSNSigmaPi,
aod::pidits::ITSNSigmaKa,
aod::pidits::ITSNSigmaPr>(tracks);
int8_t pidFlag;
for (const auto& track : tracksWithITSPid) {
// Fill the original plots first
if (!cfgQuietMode) {
if (cfgOpenTrackingInfoCheck) {
histosQA.fill(HIST("QA/PID/histDCAz_total_origin"), track.dcaZ());
histosQA.fill(HIST("QA/PID/histDCAxy_total_origin"), track.dcaXY());
histosQA.fill(HIST("QA/PID/histTPCNcls_total_origin"), track.tpcNClsFound());
histosQA.fill(HIST("QA/PID/histITSNcls_total_origin"), track.itsNCls());
histosQA.fill(HIST("QA/PID/histTPCChi2Ncls_total_origin"), track.tpcChi2NCl());
histosQA.fill(HIST("QA/PID/histITSChi2Ncls_total_origin"), track.itsChi2NCl());
}
if (cfgOpenPlotCheckITSOnlytrackInfo && track.tpcNClsFound() == 0) {
histosQA.fill(HIST("QA/PID/histDCAz_ITSOnly_Px"), track.px());
histosQA.fill(HIST("QA/PID/histDCAz_ITSOnly_Py"), track.py());
histosQA.fill(HIST("QA/PID/histDCAz_ITSOnly_Pz"), track.pz());
}
if (cfgOpenPlotnSigmaOrigin) {
if (cfgOpenPlotnSigmaTOFITSPt) {
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_ITS_Pt_Pi"), track.tofNSigmaPi(), track.itsNSigmaPi(), track.pt());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_ITS_Pt_Ka"), track.tofNSigmaKa(), track.itsNSigmaKa(), track.pt());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_ITS_Pt_Pr"), track.tofNSigmaPr(), track.itsNSigmaPr(), track.pt());
}
if (cfgOpenPlotnSigmaTOFTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_TPC_Pt_Pi"), track.tofNSigmaPi(), track.tpcNSigmaPi(), track.pt());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_TPC_Pt_Ka"), track.tofNSigmaKa(), track.tpcNSigmaKa(), track.pt());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_TPC_Pt_Pr"), track.tofNSigmaPr(), track.tpcNSigmaPr(), track.pt());
}
if (cfgOpenPlotnSigmaITSTPCPt) {
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_TPC_Pt_Pi"), track.itsNSigmaPi(), track.tpcNSigmaPi(), track.pt());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_TPC_Pt_Ka"), track.itsNSigmaKa(), track.tpcNSigmaKa(), track.pt());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_TPC_Pt_Pr"), track.itsNSigmaPr(), track.tpcNSigmaPr(), track.pt());
}
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TPC_Pi"), track.tpcNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TPC_Ka"), track.tpcNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TPC_Pr"), track.tpcNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_Pi"), track.tofNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_Ka"), track.tofNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_Pr"), track.tofNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_Pi"), track.itsNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_Ka"), track.itsNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_Pr"), track.itsNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TPC_Pt_Pi"), track.pt(), track.tpcNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TPC_Pt_Ka"), track.pt(), track.tpcNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TPC_Pt_Pr"), track.pt(), track.tpcNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_Pt_Pi"), track.pt(), track.tofNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_Pt_Ka"), track.pt(), track.tofNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_TOF_Pt_Pr"), track.pt(), track.tofNSigmaPr());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_Pt_Pi"), track.pt(), track.itsNSigmaPi());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_Pt_Ka"), track.pt(), track.itsNSigmaKa());
histosQA.fill(HIST("QA/PID/histnSigma_Origin_ITS_Pt_Pr"), track.pt(), track.itsNSigmaPr());
}
}
int currentPtBinPi = -1, currentPtBinKa = -1, currentPtBinPr = -1;
if (cfgOpenPtRangedTOFnSigmacutPi || cfgOpenPtRangedTPCnSigmacutPi || cfgOpenPtRangedITSnSigmacutPi) {
for (int i = 0; i < static_cast<int>(cfgPtBinPionPID.value.size()) - 1; ++i) {
if (track.pt() >= cfgPtBinPionPID.value[i] && track.pt() < cfgPtBinPionPID.value[i + 1]) {
currentPtBinPi = i;
break;
}
}
}
if (cfgOpenPtRangedTOFnSigmacutKa || cfgOpenPtRangedTPCnSigmacutKa || cfgOpenPtRangedITSnSigmacutKa) {
for (int i = 0; i < static_cast<int>(cfgPtBinKaonPID.value.size()) - 1; ++i) {
if (track.pt() >= cfgPtBinKaonPID.value[i] && track.pt() < cfgPtBinKaonPID.value[i + 1]) {
currentPtBinKa = i;
break;
}
}
}
if (cfgOpenPtRangedTOFnSigmacutPr || cfgOpenPtRangedTPCnSigmacutPr || cfgOpenPtRangedITSnSigmacutPr) {
for (int i = 0; i < static_cast<int>(cfgPtBinProtonPID.value.size()) - 1; ++i) {
if (track.pt() >= cfgPtBinProtonPID.value[i] && track.pt() < cfgPtBinProtonPID.value[i + 1]) {
currentPtBinPr = i;
break;
}
}
}
float nSigmaTOFCutPiPtUpper = (currentPtBinPi == -1) ? cfgnSigmaCutTOFUpper.value[0] : cfgnSigmaTOFPionPtUpper.value[currentPtBinPi];
float nSigmaTOFCutKaPtUpper = (currentPtBinKa == -1) ? cfgnSigmaCutTOFUpper.value[1] : cfgnSigmaTOFKaonPtUpper.value[currentPtBinKa];