@@ -96,6 +96,7 @@ struct phianalysisrun3_PbPb {
9696 Configurable<bool > additionalEvSel5{" additionalEvSel5" , true , " Additional evsel5" };
9797 Configurable<bool > additionalEvSel6{" additionalEvSel6" , true , " Additional evsel6" };
9898 Configurable<bool > cutvz{" cutvz" , true , " Vz cut" };
99+ Configurable<bool > cutvzgen{" cutvzgen" , true , " Vz cut" };
99100 Configurable<bool > isINELgt0{" isINELgt0" , true , " INEL>0 selection" };
100101 } selectionConfig;
101102 Configurable<bool > cfgMultFT0{" cfgMultFT0" , true , " cfgMultFT0" };
@@ -134,7 +135,8 @@ struct phianalysisrun3_PbPb {
134135 ConfigurableAxis binsMult{" binsMult" , {500 , 0 .0f , +500 .0f }, " " };
135136 Configurable<bool > isApplyCentFT0C{" isApplyCentFT0C" , true , " Centrality based on FT0C" };
136137 Configurable<bool > isApplyCentFT0M{" isApplyCentFV0M" , false , " Centrality based on FT0M" };
137-
138+ Configurable<bool > isApplyInelgt0{" isApplyInelgt0" , false , " Enable INEL > 0 condition" };
139+ Configurable<bool > isApplyTVX{" isApplyTVX" , false , " Enable TVX trigger sel" };
138140 Configurable<bool > genacceptancecut{" genacceptancecut" , true , " use acceptance cut for generated" };
139141 // MC
140142 Configurable<bool > isMC{" isMC" , false , " Run MC" };
@@ -1693,59 +1695,77 @@ struct phianalysisrun3_PbPb {
16931695 }
16941696 }
16951697 PROCESS_SWITCH (phianalysisrun3_PbPb, processMixedEventMC, " Process Mixed event MC" , true );
1696- void processGen1 (aod::McCollision const & mcCollision, aod::McParticles const & mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
1698+ void processGen1 (McCollisionMults::iterator const & mcCollision, aod::McParticles const & mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
16971699 {
1700+ // all events
16981701 histos.fill (HIST (" hMC1" ), 0.5 );
1699- if (!selectionConfig.cutvz || std::abs (mcCollision.posZ ()) < selectionConfig.cfgCutVertex ) {
1702+
1703+ // vertex QA (not selection)
1704+ if (!selectionConfig.cutvzgen ||
1705+ std::abs (mcCollision.posZ ()) < selectionConfig.cfgCutVertex ) {
17001706 histos.fill (HIST (" hMC1" ), 1.5 );
17011707 }
1708+
1709+ // INEL>0 selection
1710+ if (isApplyInelgt0 && !mcCollision.isInelGt0 ())
1711+ return ;
1712+
1713+ histos.fill (HIST (" hMC1" ), 2.5 );
1714+
1715+ // TVX selection
1716+ if (isApplyTVX &&
1717+ !(mcCollision.multMCFT0C () > 0 && mcCollision.multMCFT0A () > 0 ))
1718+ return ;
1719+
1720+ histos.fill (HIST (" hMC1" ), 3.5 );
17021721 std::vector<int64_t > selectedEvents (collisions.size ());
17031722 int nevts = 0 ;
17041723 auto multiplicity = -1.0 ;
17051724 for (const auto & collision : collisions) {
1706- histos.fill (HIST (" hMC1" ), 2 .5 );
1725+ histos.fill (HIST (" hMC1" ), 4 .5 );
17071726 if (cfgDoSel8 && !collision.sel8 ()) {
17081727 continue ;
17091728 }
1729+ histos.fill (HIST (" hMC1" ), 5.5 );
17101730 if (selectionConfig.cutvz &&
17111731 std::abs (collision.mcCollision ().posZ ()) > selectionConfig.cfgCutVertex ) {
17121732 continue ;
17131733 }
17141734
1715- histos.fill (HIST (" hMC1" ), 3 .5 );
1735+ histos.fill (HIST (" hMC1" ), 6 .5 );
17161736 if (selectionConfig.additionalEvSel1 && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
17171737 continue ;
17181738 }
1719- histos.fill (HIST (" hMC1" ), 4 .5 );
1739+ histos.fill (HIST (" hMC1" ), 7 .5 );
17201740 if (selectionConfig.additionalEvSel2 && !collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
17211741 continue ;
17221742 }
1723- histos.fill (HIST (" hMC1" ), 5 .5 );
1743+ histos.fill (HIST (" hMC1" ), 8 .5 );
17241744 if (selectionConfig.additionalEvSel3 && !collision.selection_bit (aod::evsel::kNoSameBunchPileup )) {
17251745 continue ;
17261746 }
1727- histos.fill (HIST (" hMC1" ), 6 .5 );
1747+ histos.fill (HIST (" hMC1" ), 9 .5 );
17281748 if (selectionConfig.additionalEvSel4 && !collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll )) {
17291749 continue ;
17301750 }
1731- histos.fill (HIST (" hMC1" ), 7 .5 );
1751+ histos.fill (HIST (" hMC1" ), 10 .5 );
17321752 if (selectionConfig.additionalEvSel5 && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
17331753 continue ;
17341754 }
1735- histos.fill (HIST (" hMC1" ), 8 .5 );
1755+ histos.fill (HIST (" hMC1" ), 11 .5 );
17361756 if (selectionConfig.additionalEvSel6 && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
17371757 continue ;
17381758 }
1739- histos.fill (HIST (" hMC1" ), 9 .5 );
1759+ histos.fill (HIST (" hMC1" ), 12 .5 );
17401760 if (selectionConfig.isINELgt0 && !collision.isInelGt0 ()) {
17411761 continue ;
17421762 }
1743- histos.fill (HIST (" hMC1" ), 10 .5 );
1763+ histos.fill (HIST (" hMC1" ), 13 .5 );
17441764 int occupancy = collision.trackOccupancyInTimeRange ();
17451765 if (selectionConfig.fillOccupancy && (occupancy < cfgMinOccupancy || occupancy > cfgMaxOccupancy)) {
17461766 continue ;
17471767 }
1748- histos.fill (HIST (" hMC1" ), 11 .5 );
1768+ histos.fill (HIST (" hMC1" ), 14 .5 );
17491769 const int kCentFT0C = 0 ;
17501770 const int kCentFT0A = 1 ;
17511771 const int kCentFT0M = 2 ;
@@ -1765,11 +1785,11 @@ struct phianalysisrun3_PbPb {
17651785 }
17661786 selectedEvents.resize (nevts);
17671787 const auto evtReconstructedAndSelected = std::find (selectedEvents.begin (), selectedEvents.end (), mcCollision.globalIndex ()) != selectedEvents.end ();
1768- histos.fill (HIST (" hMC1" ), 12 .5 );
1788+ histos.fill (HIST (" hMC1" ), 15 .5 );
17691789 if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection
17701790 return ;
17711791 }
1772- histos.fill (HIST (" hMC1" ), 13 .5 );
1792+ histos.fill (HIST (" hMC1" ), 16 .5 );
17731793 for (const auto & mcParticle : mcParticles) {
17741794
17751795 if (mcParticle.y () < rapiditycut1 || mcParticle.y () > rapiditycut2) {
@@ -1861,7 +1881,7 @@ struct phianalysisrun3_PbPb {
18611881 multiplicity = collision.centFV0A ();
18621882 }
18631883 histos.fill (HIST (" Centrec1" ), multiplicity);
1864- histos.fill (HIST (" hMC1" ), 14 .5 );
1884+ histos.fill (HIST (" hMC1" ), 17 .5 );
18651885 auto oldindex = -999 ;
18661886 for (const auto & track1 : tracks) {
18671887 if (!selectionTrack (track1)) {
@@ -1958,10 +1978,17 @@ struct phianalysisrun3_PbPb {
19581978 void processEvtLossSigLossMC (McCollisionMults::iterator const & mcCollision, aod::McParticles const & mcParticles, const soa::SmallGroups<EventCandidatesMC>& recCollisions)
19591979 {
19601980
1961- if (selectionConfig.cutvz &&
1981+ if (selectionConfig.cutvzgen &&
19621982 std::abs (mcCollision.posZ ()) > selectionConfig.cfgCutVertex ) {
19631983 return ;
19641984 }
1985+ if (isApplyInelgt0 && !mcCollision.isInelGt0 ()) {
1986+ return ;
1987+ }
1988+
1989+ if (isApplyTVX && !(mcCollision.multMCFT0C () > 0 && mcCollision.multMCFT0A () > 0 )) {
1990+ return ;
1991+ }
19651992 // Event loss estimation
19661993 auto impactPar = mcCollision.impactParameter ();
19671994 histos.fill (HIST (" QAevent/hImpactParameterGen" ), impactPar);
@@ -2026,10 +2053,17 @@ struct phianalysisrun3_PbPb {
20262053 PROCESS_SWITCH (phianalysisrun3_PbPb, processEvtLossSigLossMC, " Process Signal Loss, Event Loss" , false );
20272054 void processEvtLossSigLossMC1 (McCollisionMults::iterator const & mcCollision, soa::SmallGroups<EventCandidatesMC> const & collisions, aod::McParticles const & GenParticles)
20282055 {
2029- if (selectionConfig.cutvz &&
2056+ if (selectionConfig.cutvzgen &&
20302057 std::abs (mcCollision.posZ ()) > selectionConfig.cfgCutVertex ) {
20312058 return ;
20322059 }
2060+ if (isApplyInelgt0 && !mcCollision.isInelGt0 ()) {
2061+ return ;
2062+ }
2063+
2064+ if (isApplyTVX && !(mcCollision.multMCFT0C () > 0 && mcCollision.multMCFT0A () > 0 )) {
2065+ return ;
2066+ }
20332067 // All generated events
20342068 histos.fill (HIST (" MCEventHist" ), 1 );
20352069 histos.fill (HIST (" hImpactParameterGen1" ), mcCollision.impactParameter ());
0 commit comments