@@ -381,7 +381,7 @@ struct ExclusiveRhoTo4Pi {
381381 Produces<aod::BkgroundData> bkgFromData;
382382 // Histogram Registry
383383 HistogramRegistry histosData{" histosData" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
384- // Configurable parameters
384+ // Configurable Event parameters:1
385385 Configurable<bool > ifCheckUPCmode{" ifCheckUPCmode" , false , " Enable UPC reconstruction only" };
386386 Configurable<float > vZCut{" vZCut" , 10 ., " Vertex Cut" };
387387 Configurable<float > fv0Cut{" fv0Cut" , 50 ., " FV0A threshold" };
@@ -394,20 +394,31 @@ struct ExclusiveRhoTo4Pi {
394394 Configurable<int > itsROFbCut{" itsROFbCut" , 1 , " itsROFbCut" };
395395 Configurable<int > vtxITSTPCcut{" vtxITSTPCcut" , 1 , " vtxITSTPCcut" };
396396 Configurable<int > tfbCut{" tfbCut" , 1 , " tfbCut" };
397- Configurable<float > pvCut{" pvCut" , 1.0 , " Use Only PV tracks" };
398- Configurable<int > hasITSCut{" hasITSCut" , 1 , " has hit is ITS" };
399- Configurable<int > hasTPCCut{" hasTPCCut" , 1 , " has hit is TPC" };
400- Configurable<float > dcaZcut{" dcaZcut" , 2 , " dcaZ cut" };
401- Configurable<float > dcaXYcut{" dcaXYcut" , 0 , " dcaXY cut" };
402- Configurable<float > tpcChi2Cut{" tpcChi2Cut" , 4 , " Max tpcChi2NCl" };
403- Configurable<float > tpcNClsFindableCut{" tpcNClsFindableCut" , 70 , " Min tpcNClsFindable" };
404- Configurable<float > itsChi2Cut{" itsChi2Cut" , 36 , " Max itsChi2NCl" };
397+ // Configurable Track parameters:1
398+ Configurable<bool > useOnlyPVtracks{" useOnlyPVtracks" , true , " Use Only PV tracks" };
399+ Configurable<bool > useITS{" useITS" , true , " only use tracks with hit in ITS" };
400+ Configurable<uint8_t > itsNClsCut{" itsNClsCut" , 4 , " Min No of itsNCls" };
401+ Configurable<uint8_t > itsClusterMapCut{" itsClusterMapCut" , 1 , " min no of ITS clusters in cluster map" };
402+ Configurable<float > itsChi2NClCut{" itsChi2NClCut" , 3.0 , " Max ITS Chi2/NCl" };
403+ Configurable<bool > useTPC{" useTPC" , true , " has TPC hit" };
404+ Configurable<float > minFoundTPCclusters{" minFoundTPCclusters" , 120 , " Min TPC Findable Clusters" };
405+ Configurable<float > tpcChi2NClsMin{" tpcChi2NClsMin" , 1.0 , " Min TPC Chi2/NCls" };
406+ Configurable<float > tpcChi2NClsMax{" tpcChi2NClsMax" , 3.0 , " Max TPC Chi2/NCls" };
407+ Configurable<float > tpcNClsFindableCut{" tpcNClsFindableCut" , 70 , " Min TPC Findable Clusters" };
408+ Configurable<float > tpcNClsCrossedRowsCut{" tpcNClsCrossedRowsCut" , 130 , " Min TPC Crossed Rows" };
409+ Configurable<float > tpcCrossedRowsOverFindableCut{" tpcCrossedRowsOverFindableCut" , 1.0 , " Min TPC Crossed Rows over Findable Clusters" };
410+ Configurable<float > pTcut{" pTcut" , 0.1 , " Track Pt" };
411+ Configurable<float > dcaZcut{" dcaZcut" , 1 , " dcaZ cut" };
405412 Configurable<float > etaCut{" etaCut" , 0.9 , " Track Pseudorapidity" };
406- Configurable<float > pTcut{" pTcut" , 0.15 , " Track Pt" };
413+ // Configurable PID parameters
414+ Configurable<bool > useTOF{" useTOF" , true , " has TOF for PID" };
407415 Configurable<float > nSigmaTPCcut{" nSigmaTPCcut" , 3 , " TPC cut" };
408416 Configurable<float > nSigmaTOFcut{" nSigmaTOFcut" , 3 , " TOF cut" };
417+ // Configurable Rho parameters
409418 Configurable<float > rhoRapCut{" rhoRapCut" , 0.5 , " Max abs Rapidity of rho" };
410419 Configurable<float > rhoPtCut{" rhoPtCut" , 0.15 , " Min Pt of rho" };
420+ Configurable<float > rhoMassMin{" rhoMassMin" , 1 , " Min Mass of rho" };
421+ Configurable<float > rhoMassMax{" rhoMassMax" , 2.5 , " Max Mass of rho" };
411422 // Axis Configurations
412423 ConfigurableAxis pTAxis{" pTAxis" , {1000 , 0 , 2 }, " Axis for pT histograms" };
413424 ConfigurableAxis etaAxis{" etaAxis" , {1000 , -1.1 , 1.1 }, " Axis for Eta histograms" };
@@ -419,7 +430,7 @@ struct ExclusiveRhoTo4Pi {
419430 void init (InitContext const &)
420431 {
421432 // QA plots: Event Counter
422- histosData.add (" EventsCounts_vs_runNo" , " Number of Selected 4-Pion Events per Run; Run Number; Number of Events" , kTH2F , {{1355 , 544013 , 545367 }, {20 , 0 , 20 }});
433+ histosData.add (" EventsCounts_vs_runNo" , " Number of Selected 4-Pion Events per Run; Run Number; Number of Events" , kTH2F , {{1355 , 544013 , 545367 }, {21 , - 1 , 20 }});
423434 histosData.add (" TracksCounts_vs_runNo" , " Number of Selected Tracks per Run; Run Number; Number of Tracks" , kTH2F , {{1355 , 544013 , 545367 }, {20 , 0 , 20 }});
424435 // QA plots: event selection
425436 histosData.add (" FT0A" , " T0A amplitude" , kTH1F , {{2000 , 0.0 , 500.0 }});
@@ -441,6 +452,7 @@ struct ExclusiveRhoTo4Pi {
441452 histosData.add (" tpcChi2NCl" , " TPC Chi2/NCl; Chi2/NCl; Counts" , kTH1F , {{250 , 0 , 50 }});
442453 histosData.add (" itsChi2NCl" , " ITS Chi2/NCl; Chi2/NCl; Counts" , kTH1F , {{250 , 0 , 50 }});
443454 histosData.add (" tpcNClsFindable" , " TPC N Cls Findable; N Cls Findable; Counts" , kTH1F , {{200 , 0 , 200 }});
455+ histosData.add (" itsClusterMap" , " ITS Cluster Map; itsClusterMap; Counts" , kTH1F , {{200 , 0 , 200 }});
444456 // QA plots: PID
445457 histosData.add (" tpcSignal" , " TPC dEdx vs p; p [GeV/c]; dEdx [a.u.]" , kTH2F , {{500 , 0 , 10 }, {5000 , 0.0 , 5000.0 }});
446458 histosData.add (" tpcSignal_pions" , " TPC dEdx vs p for pions; p [GeV/c]; dEdx [a.u.]" , kTH2F , {{500 , 0 , 10 }, {5000 , 0.0 , 5000.0 }});
@@ -532,18 +544,16 @@ struct ExclusiveRhoTo4Pi {
532544
533545 void processData (UDCollisions::iterator const & collision, UDtracks const & tracks)
534546 {
547+
548+ // no cuts
549+ histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), -1 );
550+
535551 // Check if the event is in UPC mode
536552 if (ifCheckUPCmode && (collision.flags () != 1 )) {
537553 return ;
538554 }
539-
540- // no Cuts
541555 histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 0 );
542556
543- int gapSide = collision.gapSide ();
544- std::vector<float > parameters = {pvCut, dcaZcut, dcaXYcut, tpcChi2Cut, tpcNClsFindableCut, itsChi2Cut, etaCut, pTcut};
545- int truegapSide = sgSelector.trueGap (collision, fv0Cut, ft0aCut, ft0cCut, zdcCut);
546-
547557 // FTOA
548558 if (!(collision.totalFT0AmplitudeA () <= ft0aCut)) {
549559 return ;
@@ -599,7 +609,7 @@ struct ExclusiveRhoTo4Pi {
599609 histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 9 );
600610
601611 // true Gap Side
602- if (truegapSide != gapSideCut) {
612+ if (sgSelector. trueGap (collision, fv0Cut, ft0aCut, ft0cCut, zdcCut) != gapSideCut) {
603613 return ;
604614 }
605615 histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 10 );
@@ -610,8 +620,8 @@ struct ExclusiveRhoTo4Pi {
610620 }
611621 histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 11 );
612622
613- histosData.fill (HIST (" GapSide" ), gapSide);
614- histosData.fill (HIST (" TrueGapSide" ), truegapSide );
623+ histosData.fill (HIST (" GapSide" ), collision. gapSide () );
624+ histosData.fill (HIST (" TrueGapSide" ), sgSelector. trueGap (collision, fv0Cut, ft0aCut, ft0cCut, zdcCut) );
615625 histosData.fill (HIST (" vertexX" ), collision.posX ());
616626 histosData.fill (HIST (" vertexY" ), collision.posY ());
617627 histosData.fill (HIST (" vertexZ" ), collision.posZ ());
@@ -635,76 +645,88 @@ struct ExclusiveRhoTo4Pi {
635645 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 0 );
636646
637647 // is PV Contributor
638- if (!(t0.isPVContributor () == pvCut )) {
648+ if (!(t0.isPVContributor () == useOnlyPVtracks )) {
639649 continue ;
640650 }
641651 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 1 );
642652
643- // track pT cut
644- if (!(trackVector. Pt () >= pTcut )) {
653+ // has ITS hit
654+ if ((useITS == true ) && (t0. hasITS () != true )) {
645655 continue ;
646656 }
647657 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 2 );
648658
649- // track Eta cut
650- if (!( std::abs (trackVector. Eta ()) <= etaCut) ) {
659+ // min no of itsNCls
660+ if (t0. itsNCls () < itsNClsCut ) {
651661 continue ;
652662 }
653663 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 3 );
654664
655- // dcaZ
656- if (!( std::abs ( t0.dcaZ ()) <= dcaZcut) ) {
665+ // min ITS chi2NCl
666+ if (t0.itsChi2NCl () > itsChi2NClCut ) {
657667 continue ;
658668 }
659669 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 4 );
660670
661- // dcaXY
662- if (!( std::abs (t0.dcaXY ()) <= getMaxDCAxy (trackVector. Pt ()) )) {
671+ // has TPC hit
672+ if ((useTPC == true ) && (t0.hasTPC () != true )) {
663673 continue ;
664674 }
665675 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 5 );
666676
667- // has ITS hit
668- if (!( t0.hasITS () == hasITSCut) ) {
677+ // min no of found TPC clusters
678+ if (t0.tpcNClsFindable () - t0. tpcNClsFindableMinusFound () < minFoundTPCclusters ) {
669679 continue ;
670680 }
671681 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 6 );
672682
673- // has TPC hit
674- if (!(t0.hasTPC () == hasTPCCut )) {
683+ // range of tpcChi2NCl
684+ if (!((tpcChi2NClsMin < t0.tpcChi2NCl ()) && (t0. tpcChi2NCl () < tpcChi2NClsMax) )) {
675685 continue ;
676686 }
677687 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 7 );
678688
679- // ITS chi2
680- if (!( t0.itsChi2NCl () <= itsChi2Cut) ) {
689+ // tpcNClsCrossedRows
690+ if (t0.tpcNClsCrossedRows () < tpcNClsCrossedRowsCut ) {
681691 continue ;
682692 }
683693 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 8 );
684694
685- // TPC chi2
686- if (! (t0.tpcChi2NCl () <= tpcChi2Cut) ) {
695+ // ratio of crossed TPC rows over findable clusters
696+ if ((t0.tpcNClsCrossedRows () / t0. tpcNClsFindable ()) < tpcCrossedRowsOverFindableCut ) {
687697 continue ;
688698 }
689699 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 9 );
690700
691- // TPC N Cls Findable
692- if (!(t0. tpcNClsFindable () >= tpcNClsFindableCut) ) {
701+ // pT cut
702+ if (trackVector. Pt () < pTcut ) {
693703 continue ;
694704 }
695705 histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 10 );
696706
707+ // dcaZ cut
708+ if ((std::abs (t0.dcaZ ()) > dcaZcut) || (t0.dcaXY () > getMaxDCAxy (trackVector.Pt ()))) {
709+ continue ;
710+ }
711+ histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 11 );
712+
713+ // eta cut
714+ if (std::abs (trackVector.Eta ()) > etaCut) {
715+ continue ;
716+ }
717+ histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 12 );
718+
697719 selectedTracks.push_back (t0);
698- if (selectionPIDPion (t0, true , nSigmaTPCcut, nSigmaTOFcut)) {
720+ if (selectionPIDPion (t0, useTOF , nSigmaTPCcut, nSigmaTOFcut)) {
699721 selectedPionTracks.push_back (t0);
700- histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 11 );
722+ histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 13 );
701723 if (t0.sign () == 1 ) {
702724 selectedPionPlusTracks.push_back (t0);
703- histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 12 );
725+ histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 14 );
704726 }
705727 if (t0.sign () == -1 ) {
706728 selectedPionMinusTracks.push_back (t0);
707- histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 13 );
729+ histosData.fill (HIST (" TracksCounts_vs_runNo" ), collision.runNumber (), 15 );
708730 }
709731 } // End of Selection PID Pion
710732 } // End of loop over tracks
@@ -729,6 +751,7 @@ struct ExclusiveRhoTo4Pi {
729751 histosData.fill (HIST (" tpcNClsFindable" ), selectedTracks[i].tpcNClsFindable ());
730752 histosData.fill (HIST (" dcaXY" ), selectedTracks[i].dcaXY ());
731753 histosData.fill (HIST (" dcaZ" ), selectedTracks[i].dcaZ ());
754+ histosData.fill (HIST (" itsClusterMap" ), selectedTracks[i].itsClusterMap ());
732755 } // End of loop over tracks with selection only
733756
734757 for (int i = 0 ; i < numSelectedPionTracks; i++) {
@@ -753,13 +776,13 @@ struct ExclusiveRhoTo4Pi {
753776 histosData.fill (HIST (" dcaZ_pions" ), selectedPionTracks[i].dcaZ ());
754777 } // End of loop over tracks with selection and PID of pions
755778
756- // event should have at least 4 pions
779+ // event should have exactly 4 pions
757780 if (numSelectedPionTracks != numFourPionTracks) {
758781 return ;
759782 }
760783 histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 12 );
761784
762- // Check if there is at least one track with TOF in the selected events, otherwise return
785+ // Check if there is at least one track with TOF in the selected events (for derived Data)
763786 bool hasAtleastOneTOF = false ;
764787 for (int i = 0 ; i < numPiPlusTracks; i++) {
765788 if (selectedPionPlusTracks[i].hasTOF () == true ) {
@@ -886,6 +909,10 @@ struct ExclusiveRhoTo4Pi {
886909 histosData.fill (HIST (" fourpion_rap_0_charge_within_rap" ), p1234.Rapidity ());
887910 histosData.fill (HIST (" fourpion_mass_0_charge_within_rap" ), p1234.M ());
888911 if (p1234.Pt () < rhoPtCut) {
912+ histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 14 );
913+ if (rhoMassMin < p1234.M () && p1234.M () < rhoMassMax) {
914+ histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 15 );
915+ }
889916 // Fill the Invariant Mass Histogram
890917 histosData.fill (HIST (" fourpion_mass_0_charge_domA" ), p1234.M ());
891918 // Two Pion Masses
@@ -930,7 +957,7 @@ struct ExclusiveRhoTo4Pi {
930957 // Selecting Events with net charge != 0 for estimation of background
931958 if (numPionMinusTracks != numPiMinus && numPiPlusTracks != numPiPlus) {
932959
933- histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 14 );
960+ histosData.fill (HIST (" EventsCounts_vs_runNo" ), collision.runNumber (), 16 );
934961
935962 ROOT::Math::PxPyPzMVector p1 (selectedPionTracks[0 ].px (), selectedPionTracks[0 ].py (), selectedPionTracks[0 ].pz (), o2::constants::physics::MassPionCharged);
936963 ROOT::Math::PxPyPzMVector p2 (selectedPionTracks[1 ].px (), selectedPionTracks[1 ].py (), selectedPionTracks[1 ].pz (), o2::constants::physics::MassPionCharged);
0 commit comments