21
21
#include < Framework/HistogramSpec.h>
22
22
#include < TLorentzVector.h>
23
23
#include < TRandom.h>
24
+ #include < fairlogger/Logger.h>
24
25
25
26
#include " Common/DataModel/PIDResponse.h"
26
27
#include " Common/DataModel/Centrality.h"
@@ -42,6 +43,8 @@ struct lambdaAnalysis_pb {
42
43
Preslice<aod::ResoTracks> perRCol = aod::resodaughter::resoCollisionId;
43
44
Preslice<aod::Tracks> perCollision = aod::track::collisionId;
44
45
// Configurables.
46
+
47
+ Configurable<int > ConfEvtOccupancyInTimeRange{" ConfEvtOccupancyInTimeRange" , -1 , " Evt sel: maximum track occupancy" };
45
48
Configurable<int > nBinsPt{" nBinsPt" , 100 , " N bins in pT histogram" };
46
49
Configurable<int > nBinsInvM{" nBinsInvM" , 120 , " N bins in InvMass histogram" };
47
50
Configurable<int > lambda1520id{" lambda1520id" , 3124 , " pdg" };
@@ -138,7 +141,7 @@ struct lambdaAnalysis_pb {
138
141
histos.add (" QAbefore/Kaon/h2d_ka_nsigma_tof_vs_tpc" , " n#sigma^{TPC} vs n#sigma^{TOF} Kaons" , kTH2F , {axisTPCNsigma, axisTOFNsigma});
139
142
140
143
// QA After
141
- histos.add (" QAafter/Proton/hd_pr_pt" , " p_{T}-spectra Protons" , kTH1F , {axisPt_pid});
144
+ histos.add (" QAafter/Proton/hd_pr_pt" , " p_{T}-spectra Protons" , kTH2F , {axisPt_pid, axisCent });
142
145
histos.add (" QAafter/Proton/h2d_pr_dca_z" , " dca_{z} Protons" , kTH2F , {axisPt_pid, axisDCAz});
143
146
histos.add (" QAafter/Proton/h2d_pr_dca_xy" , " dca_{xy} Protons" , kTH2F , {axisPt_pid, axisDCAxy});
144
147
histos.add (" QAafter/Proton/h2d_pr_dEdx_p" , " TPC Signal Protons" , kTH2F , {axisP_pid, axisdEdx});
@@ -153,7 +156,7 @@ struct lambdaAnalysis_pb {
153
156
histos.add (" QAafter/Proton/h2d_Prka_nsigma_tof_p" , " Protons kaon" , kTH2F , {axisP_pid, axisTOFNsigma});
154
157
histos.add (" QAafter/Proton/h2d_Prel_nsigma_tof_p" , " Protons electron" , kTH2F , {axisP_pid, axisTOFNsigma});
155
158
histos.add (" QAafter/Proton/h2d_pr_nsigma_tof_vs_tpc" , " n#sigma(TOF) vs n#sigma(TPC) Protons" , kTH2F , {axisTPCNsigma, axisTOFNsigma});
156
- histos.add (" QAafter/Kaon/hd_ka_pt" , " p_{T}-spectra Kaons" , kTH1F , {axisPt_pid});
159
+ histos.add (" QAafter/Kaon/hd_ka_pt" , " p_{T}-spectra Kaons" , kTH2F , {axisPt_pid, axisCent });
157
160
histos.add (" QAafter/Kaon/h2d_ka_dca_z" , " dca_{z} Kaons" , kTH2F , {axisPt_pid, axisDCAz});
158
161
histos.add (" QAafter/Kaon/h2d_ka_dca_xy" , " dca_{xy} Kaons" , kTH2F , {axisPt_pid, axisDCAxy});
159
162
histos.add (" QAafter/Kaon/h2d_ka_dEdx_p" , " TPC Signal Kaon" , kTH2F , {axisP_pid, axisdEdx});
@@ -427,7 +430,7 @@ struct lambdaAnalysis_pb {
427
430
auto _tpcnsigmaPr = trkPr.tpcNSigmaPr ();
428
431
429
432
// Proton
430
- histos.fill (HIST (" QAafter/Proton/hd_pr_pt" ), _ptPr);
433
+ histos.fill (HIST (" QAafter/Proton/hd_pr_pt" ), _ptPr, mult );
431
434
histos.fill (HIST (" QAafter/Proton/h2d_pr_dca_z" ), _ptPr, trkPr.dcaZ ());
432
435
histos.fill (HIST (" QAafter/Proton/h2d_pr_dca_xy" ), _ptPr, trkPr.dcaXY ());
433
436
histos.fill (HIST (" QAafter/Proton/h2d_pr_dEdx_p" ), p_ptot, trkPr.tpcSignal ());
@@ -449,7 +452,7 @@ struct lambdaAnalysis_pb {
449
452
auto _tpcnsigmaKa = trkKa.tpcNSigmaKa ();
450
453
451
454
// Kaon
452
- histos.fill (HIST (" QAafter/Kaon/hd_ka_pt" ), _ptKa);
455
+ histos.fill (HIST (" QAafter/Kaon/hd_ka_pt" ), _ptKa, mult );
453
456
histos.fill (HIST (" QAafter/Kaon/h2d_ka_dca_z" ), _ptKa, trkKa.dcaZ ());
454
457
histos.fill (HIST (" QAafter/Kaon/h2d_ka_dca_xy" ), _ptKa, trkKa.dcaXY ());
455
458
histos.fill (HIST (" QAafter/Kaon/h2d_ka_dEdx_p" ), k_ptot, trkKa.tpcSignal ());
@@ -558,6 +561,8 @@ struct lambdaAnalysis_pb {
558
561
{
559
562
560
563
// LOGF(info, " collisions: Index = %d %d", collision.globalIndex(),tracks.size());
564
+ if (ConfEvtOccupancyInTimeRange > 0 && collision.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange)
565
+ return ;
561
566
histos.fill (HIST (" Event/h1d_ft0_mult_percentile" ), collision.cent ());
562
567
fillDataHistos<false , false >(tracks, tracks, collision.cent ());
563
568
}
@@ -597,7 +602,6 @@ struct lambdaAnalysis_pb {
597
602
}
598
603
599
604
for (auto const & part : resoParents) {
600
-
601
605
if (abs (part.pdgCode ()) != lambda1520id) // // L* pdg_code = 3124
602
606
continue ;
603
607
if (abs (part.y ()) > 0.5 ) { // rapidity cut
@@ -616,7 +620,10 @@ struct lambdaAnalysis_pb {
616
620
617
621
if (!pass1 || !pass2) // If we have both decay products
618
622
continue ;
619
- auto mass = 1.520 ; // part.M()
623
+
624
+ TLorentzVector p4;
625
+ p4.SetPxPyPzE (part.px (), part.py (), part.pz (), part.e ());
626
+ auto mass = p4.M ();
620
627
if (part.pdgCode () > 0 )
621
628
histos.fill (HIST (" Analysis/h3d_gen_lstar_PM" ), mass, part.pt (), mult);
622
629
else
@@ -637,7 +644,8 @@ struct lambdaAnalysis_pb {
637
644
638
645
SameKindPair<resoCols, resoTracks, BinningType2> pairs{binningPositions2, cNumMixEv, -1 , collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip
639
646
for (auto & [c1, t1, c2, t2] : pairs) {
640
-
647
+ if (ConfEvtOccupancyInTimeRange > 0 && c1.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange && c2.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange)
648
+ return ;
641
649
// LOGF(info, "processMCMixedDerived: Mixed collisions : %d (%.3f, %.3f,%d), %d (%.3f, %.3f,%d)",c1.globalIndex(), c1.posZ(), c1.cent(),c1.mult(), c2.globalIndex(), c2.posZ(), c2.cent(),c2.mult());
642
650
histos.fill (HIST (" Event/mixing_vzVsmultpercentile" ), c1.cent (), c1.posZ (), c1.evtPl ());
643
651
fillDataHistos<true , false >(t1, t2, c1.cent ());
@@ -656,7 +664,8 @@ struct lambdaAnalysis_pb {
656
664
657
665
if (doprocessData)
658
666
LOG (error) << " Disable processData() first!" ;
659
-
667
+ if (ConfEvtOccupancyInTimeRange > 0 && collision.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange)
668
+ return ;
660
669
// LOGF(info, "inside df collisions: Index = %d %d", collision.globalIndex(),tracks.size());
661
670
histos.fill (HIST (" Event/h1d_ft0_mult_percentile" ), collision.cent ());
662
671
fillDataHistos<false , false >(tracks, tracks, collision.cent ());
@@ -676,6 +685,8 @@ struct lambdaAnalysis_pb {
676
685
677
686
SameKindPair<resoColDFs, resoTrackDFs, BinningTypeDF> pairs{binningPositions2, cNumMixEv, -1 , collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip
678
687
for (auto & [c1, t1, c2, t2] : pairs) {
688
+ if (ConfEvtOccupancyInTimeRange > 0 && c1.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange && c2.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange)
689
+ return ;
679
690
680
691
// LOGF(info, "processMCMixedDerived: Mixed collisions : %d (%.3f, %.3f,%d), %d (%.3f, %.3f,%d)",c1.globalIndex(), c1.posZ(), c1.cent(),c1.mult(), c2.globalIndex(), c2.posZ(), c2.cent(),c2.mult());
681
692
histos.fill (HIST (" Event/mixing_vzVsmultpercentile" ), c1.cent (), c1.posZ (), c1.evtPl ());
@@ -691,13 +702,13 @@ struct lambdaAnalysis_pb {
691
702
if (doprocessMix || doprocessMixDF)
692
703
LOG (fatal) << " Disable processMix() or processMixDF() first!" ;
693
704
LOGF (debug, " Event Mixing Started" );
694
-
695
705
BinningTypeEP binningPositions2{{cMixVtxBins, cMixMultBins, cMixEPAngle}, true };
696
706
auto tracksTuple = std::make_tuple (tracks);
697
707
698
708
SameKindPair<resoColDFs, resoTrackDFs, BinningTypeEP> pairs{binningPositions2, cNumMixEv, -1 , collisions, tracksTuple, &cache}; // -1 is the number of the bin to skip
699
709
for (auto & [c1, t1, c2, t2] : pairs) {
700
-
710
+ if (ConfEvtOccupancyInTimeRange > 0 && c1.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange && c2.trackOccupancyInTimeRange () > ConfEvtOccupancyInTimeRange)
711
+ return ;
701
712
// LOGF(info, "processMCMixedDerived: Mixed collisions : %d (%.3f, %.3f,%.3f), %d (%.3f, %.3f, %.3f)",c1.globalIndex(), c1.posZ(), c1.cent(),c1.evtPl(), c2.globalIndex(), c2.posZ(), c2.cent(),c2.evtPl());
702
713
histos.fill (HIST (" Event/mixing_vzVsmultpercentile" ), c1.cent (), c1.posZ (), c1.evtPl ());
703
714
fillDataHistos<true , false >(t1, t2, c1.cent ());
0 commit comments