@@ -75,7 +75,7 @@ DECLARE_SOA_TABLE(CascadeFlags, "AOD", "CASCADEFLAGS", //!
7575using CascDataExtSelected = soa::Join<CascDataExt, CascadeFlags>;
7676} // namespace o2::aod
7777
78- using MyCollisions = soa::Join<aod::Collisions, aod::EvSels>;
78+ using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::PVMults >;
7979using MyCollisionsMult = soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults>;
8080using MyCascades = soa::Filtered<aod::CascDataExtSelected>;
8181
@@ -90,6 +90,9 @@ struct CascadeSelector {
9090 Configurable<std::string> triggerList{" triggerList" , " fDoubleXi, fDoubleOmega, fOmegaXi" , " List of triggers used to select events" };
9191 Configurable<bool > doTFBorderCut{" doTFBorderCut" , true , " Switch to apply TimeframeBorderCut event selection" };
9292 Configurable<bool > doSel8{" doSel8" , true , " Switch to apply sel8 event selection" };
93+ Configurable<bool > doNoSameBunchPileUp{" doNoSameBunchPileUp" , true , " Switch to apply NoSameBunchPileUp event selection" };
94+ Configurable<int > INEL{" INEL" , 0 , " Number of charged tracks within |eta| < 1 has to be greater than value" };
95+ Configurable<double > maxVertexZ{" maxVertexZ" , 10 ., " Maximum value of z coordinate of PV" };
9396
9497 // Tracklevel
9598 Configurable<float > tpcNsigmaBachelor{" tpcNsigmaBachelor" , 3 , " TPC NSigma bachelor" };
@@ -117,39 +120,47 @@ struct CascadeSelector {
117120 // TODO: variables as function of Omega mass, only do Xi for now
118121 AxisSpec vertexAxis = {100 , -10 .0f , 10 .0f , " cm" };
119122 AxisSpec dcaAxis = {50 , 0 .0f , 5 .0f , " cm" };
120- AxisSpec invMassAxis = {100 , 1 .25f , 1 .45f , " Inv. Mass (GeV/c^{2})" };
121- AxisSpec ptAxis = {100 , 0 , 15 , " #it{p}_{T}" };
123+ // AxisSpec invMassAxis = {1000, 1.0f, 2.0f, "Inv. Mass (GeV/c^{2})"};
124+ AxisSpec invXiMassAxis = {100 , 1 .28f , 1 .38f , " Inv. Mass (GeV/c^{2})" };
125+ AxisSpec invOmegaMassAxis = {100 , 1 .62f , 1 .72f , " Inv. Mass (GeV/c^{2})" };
126+ AxisSpec ptAxis = {150 , 0 , 15 , " #it{p}_{T}" };
127+ AxisSpec rapidityAxis{100 , -1 .f , 1 .f , " y" };
122128 HistogramRegistry registry{
123129 " registry" ,
124130 {
125131 // basic selection variables
126- {" hV0Radius" , " hV0Radius" , {HistType::kTH3F , {{100 , 0 .0f , 100 .0f , " cm" }, invMassAxis, ptAxis}}},
127- {" hCascRadius" , " hCascRadius" , {HistType::kTH3F , {{100 , 0 .0f , 100 .0f , " cm" }, invMassAxis, ptAxis}}},
128- {" hV0CosPA" , " hV0CosPA" , {HistType::kTH3F , {{100 , 0 .95f , 1 .0f }, invMassAxis, ptAxis}}},
129- {" hCascCosPA" , " hCascCosPA" , {HistType::kTH3F , {{100 , 0 .95f , 1 .0f }, invMassAxis, ptAxis}}},
130- {" hDCAPosToPV" , " hDCAPosToPV" , {HistType::kTH3F , {vertexAxis, invMassAxis, ptAxis}}},
131- {" hDCANegToPV" , " hDCANegToPV" , {HistType::kTH3F , {vertexAxis, invMassAxis, ptAxis}}},
132- {" hDCABachToPV" , " hDCABachToPV" , {HistType::kTH3F , {vertexAxis, invMassAxis, ptAxis}}},
133- {" hDCAV0ToPV" , " hDCAV0ToPV" , {HistType::kTH3F , {vertexAxis, invMassAxis, ptAxis}}},
134- {" hDCAV0Dau" , " hDCAV0Dau" , {HistType::kTH3F , {dcaAxis, invMassAxis, ptAxis}}},
135- {" hDCACascDau" , " hDCACascDau" , {HistType::kTH3F , {dcaAxis, invMassAxis, ptAxis}}},
136- {" hLambdaMass" , " hLambdaMass" , {HistType::kTH3F , {{100 , 1 .0f , 1 .2f , " Inv. Mass (GeV/c^{2})" }, invMassAxis, ptAxis}}},
137-
138- // invariant mass per cut, start with Xi
139- {" hMassXi0" , " Xi inv mass before selections" , {HistType::kTH2F , {invMassAxis, ptAxis}}},
140- {" hMassXi1" , " Xi inv mass after TPCnCrossedRows cut" , {HistType::kTH2F , {invMassAxis, ptAxis}}},
141- {" hMassXi2" , " Xi inv mass after ITSnClusters cut" , {HistType::kTH2F , {invMassAxis, ptAxis}}},
142- {" hMassXi3" , " Xi inv mass after topo cuts" , {HistType::kTH2F , {invMassAxis, ptAxis}}},
143- {" hMassXi4" , " Xi inv mass after V0 daughters PID cut" , {HistType::kTH2F , {invMassAxis, ptAxis}}},
144- {" hMassXi5" , " Xi inv mass after bachelor PID cut" , {HistType::kTH2F , {invMassAxis, ptAxis}}},
132+ {" hV0Radius" , " hV0Radius" , {HistType::kTH3F , {{100 , 0 .0f , 100 .0f , " cm" }, invXiMassAxis, ptAxis}}},
133+ {" hCascRadius" , " hCascRadius" , {HistType::kTH3F , {{100 , 0 .0f , 100 .0f , " cm" }, invXiMassAxis, ptAxis}}},
134+ {" hV0CosPA" , " hV0CosPA" , {HistType::kTH3F , {{100 , 0 .95f , 1 .0f }, invXiMassAxis, ptAxis}}},
135+ {" hCascCosPA" , " hCascCosPA" , {HistType::kTH3F , {{100 , 0 .95f , 1 .0f }, invXiMassAxis, ptAxis}}},
136+ {" hDCAPosToPV" , " hDCAPosToPV" , {HistType::kTH3F , {vertexAxis, invXiMassAxis, ptAxis}}},
137+ {" hDCANegToPV" , " hDCANegToPV" , {HistType::kTH3F , {vertexAxis, invXiMassAxis, ptAxis}}},
138+ {" hDCABachToPV" , " hDCABachToPV" , {HistType::kTH3F , {vertexAxis, invXiMassAxis, ptAxis}}},
139+ {" hDCAV0ToPV" , " hDCAV0ToPV" , {HistType::kTH3F , {vertexAxis, invXiMassAxis, ptAxis}}},
140+ {" hDCAV0Dau" , " hDCAV0Dau" , {HistType::kTH3F , {dcaAxis, invXiMassAxis, ptAxis}}},
141+ {" hDCACascDau" , " hDCACascDau" , {HistType::kTH3F , {dcaAxis, invXiMassAxis, ptAxis}}},
142+ {" hLambdaMass" , " hLambdaMass" , {HistType::kTH3F , {{100 , 1 .0f , 1 .2f , " Inv. Mass (GeV/c^{2})" }, invXiMassAxis, ptAxis}}},
143+
144+ {" hMassXiMinus" , " hMassXiMinus" , {HistType::kTH3F , {invXiMassAxis, ptAxis, rapidityAxis}}},
145+ {" hMassXiPlus" , " hMassXiPlus" , {HistType::kTH3F , {invXiMassAxis, ptAxis, rapidityAxis}}},
146+ {" hMassOmegaMinus" , " hMassOmegaMinus" , {HistType::kTH3F , {invOmegaMassAxis, ptAxis, rapidityAxis}}},
147+ {" hMassOmegaPlus" , " hMassOmegaPlus" , {HistType::kTH3F , {invOmegaMassAxis, ptAxis, rapidityAxis}}},
148+
149+ // // invariant mass per cut, start with Xi
150+ // {"hMassXi0", "Xi inv mass before selections", {HistType::kTH2F, {invMassAxis, ptAxis}}},
151+ // {"hMassXi1", "Xi inv mass after TPCnCrossedRows cut", {HistType::kTH2F, {invMassAxis, ptAxis}}},
152+ // {"hMassXi2", "Xi inv mass after ITSnClusters cut", {HistType::kTH2F, {invMassAxis, ptAxis}}},
153+ // {"hMassXi3", "Xi inv mass after topo cuts", {HistType::kTH2F, {invMassAxis, ptAxis}}},
154+ // {"hMassXi4", "Xi inv mass after V0 daughters PID cut", {HistType::kTH2F, {invMassAxis, ptAxis}}},
155+ // {"hMassXi5", "Xi inv mass after bachelor PID cut", {HistType::kTH2F, {invMassAxis, ptAxis}}},
145156
146157 // ITS & TPC clusters, with Xi inv mass
147- {" hTPCnCrossedRowsPos" , " hTPCnCrossedRowsPos" , {HistType::kTH3F , {{160 , -0.5 , 159.5 , " TPC crossed rows" }, invMassAxis , ptAxis}}},
148- {" hTPCnCrossedRowsNeg" , " hTPCnCrossedRowsNeg" , {HistType::kTH3F , {{160 , -0.5 , 159.5 , " TPC crossed rows" }, invMassAxis , ptAxis}}},
149- {" hTPCnCrossedRowsBach" , " hTPCnCrossedRowsBach" , {HistType::kTH3F , {{160 , -0.5 , 159.5 , " TPC crossed rows" }, invMassAxis , ptAxis}}},
150- {" hITSnClustersPos" , " hITSnClustersPos" , {HistType::kTH3F , {{8 , -0.5 , 7.5 , " number of ITS clusters" }, invMassAxis , ptAxis}}},
151- {" hITSnClustersNeg" , " hITSnClustersNeg" , {HistType::kTH3F , {{8 , -0.5 , 7.5 , " number of ITS clusters" }, invMassAxis , ptAxis}}},
152- {" hITSnClustersBach" , " hITSnClustersBach" , {HistType::kTH3F , {{8 , -0.5 , 7.5 , " number of ITS clusters" }, invMassAxis , ptAxis}}},
158+ {" hTPCnCrossedRowsPos" , " hTPCnCrossedRowsPos" , {HistType::kTH3F , {{160 , -0.5 , 159.5 , " TPC crossed rows" }, invXiMassAxis , ptAxis}}},
159+ {" hTPCnCrossedRowsNeg" , " hTPCnCrossedRowsNeg" , {HistType::kTH3F , {{160 , -0.5 , 159.5 , " TPC crossed rows" }, invXiMassAxis , ptAxis}}},
160+ {" hTPCnCrossedRowsBach" , " hTPCnCrossedRowsBach" , {HistType::kTH3F , {{160 , -0.5 , 159.5 , " TPC crossed rows" }, invXiMassAxis , ptAxis}}},
161+ {" hITSnClustersPos" , " hITSnClustersPos" , {HistType::kTH3F , {{8 , -0.5 , 7.5 , " number of ITS clusters" }, invXiMassAxis , ptAxis}}},
162+ {" hITSnClustersNeg" , " hITSnClustersNeg" , {HistType::kTH3F , {{8 , -0.5 , 7.5 , " number of ITS clusters" }, invXiMassAxis , ptAxis}}},
163+ {" hITSnClustersBach" , " hITSnClustersBach" , {HistType::kTH3F , {{8 , -0.5 , 7.5 , " number of ITS clusters" }, invXiMassAxis , ptAxis}}},
153164
154165 {" hTriggerQA" , " hTriggerQA" , {HistType::kTH1F , {{2 , -0.5 , 1.5 , " Trigger y/n" }}}},
155166 },
@@ -169,7 +180,16 @@ struct CascadeSelector {
169180 h->GetXaxis ()->SetBinLabel (5 , " Track eta OK" );
170181 h->GetXaxis ()->SetBinLabel (6 , " V0 PID OK" );
171182 h->GetXaxis ()->SetBinLabel (7 , " Bach PID OK" );
183+
184+ auto hEventSel = registry.add <TH1>(" hEventSel" , " hEventSel" , HistType::kTH1I , {{10 , 0 , 10 , " selection criteria" }});
185+ hEventSel->GetXaxis ()->SetBinLabel (1 , " All" );
186+ hEventSel->GetXaxis ()->SetBinLabel (2 , " sel8" );
187+ hEventSel->GetXaxis ()->SetBinLabel (3 , " INEL0" );
188+ hEventSel->GetXaxis ()->SetBinLabel (4 , " V_z" );
189+ hEventSel->GetXaxis ()->SetBinLabel (5 , " NoSameBunchPileUp" );
190+ hEventSel->GetXaxis ()->SetBinLabel (6 , " Selected events" );
172191 }
192+
173193 void process (MyCollisions::iterator const & collision, aod::CascDataExt const & Cascades, FullTracksExtIUWithPID const &, aod::BCsWithTimestamps const &)
174194 {
175195 bool evSel = true ;
@@ -185,9 +205,24 @@ struct CascadeSelector {
185205 }
186206 }
187207
188- if ((doSel8 && !collision.sel8 ()) || (doTFBorderCut && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))) {
189- evSel = false ; // do not skip the collision - this will lead to the cascadeFlag table having less entries than the Cascade table, and therefor not joinable.
208+ // fill event selection based on which selection criteria are applied and passed
209+ // do not skip the collision - this will lead to the cascadeFlag table having less entries than the Cascade table, and therefor not joinable.
210+ registry.fill (HIST (" hEventSel" ), 0 );
211+ if (doSel8 && !collision.sel8 ()) {
212+ evSel = false ;
213+ registry.fill (HIST (" hEventSel" ), 1 );
214+ } else if (collision.multNTracksPVeta1 () <= INEL) {
215+ evSel = false ;
216+ registry.fill (HIST (" hEventSel" ), 2 );
217+ } else if (std::abs (collision.posZ ()) > maxVertexZ) {
218+ evSel = false ;
219+ registry.fill (HIST (" hEventSel" ), 3 );
220+ } else if (doNoSameBunchPileUp && !collision.selection_bit (aod::evsel::kNoSameBunchPileup )) {
221+ evSel = false ;
222+ registry.fill (HIST (" hEventSel" ), 4 );
190223 }
224+ if (evSel) // passes all selections
225+ registry.fill (HIST (" hEventSel" ), 5 );
191226
192227 for (auto const & casc : Cascades) {
193228 if (!evSel) {
@@ -221,23 +256,23 @@ struct CascadeSelector {
221256 registry.fill (HIST (" hTPCnCrossedRowsBach" ), bachTrack.tpcNClsCrossedRows (), casc.mXi (), casc.pt ());
222257
223258 registry.fill (HIST (" hSelectionStatus" ), 0 ); // all the cascade before selections
224- registry.fill (HIST (" hMassXi0" ), casc.mXi (), casc.pt ());
259+ // registry.fill(HIST("hMassXi0"), casc.mXi(), casc.pt());
225260
226261 // TPC N crossed rows todo: check if minTPCCrossedRows > 50
227262 if (posTrack.tpcNClsCrossedRows () < minTPCCrossedRows || negTrack.tpcNClsCrossedRows () < minTPCCrossedRows || bachTrack.tpcNClsCrossedRows () < minTPCCrossedRows) {
228263 cascflags (0 );
229264 continue ;
230265 }
231266 registry.fill (HIST (" hSelectionStatus" ), 1 ); // passes nTPC crossed rows
232- registry.fill (HIST (" hMassXi1" ), casc.mXi (), casc.pt ());
267+ // registry.fill(HIST("hMassXi1"), casc.mXi(), casc.pt());
233268
234269 // ITS N clusters todo: check if minITSClusters > 0
235270 if (posTrack.itsNCls () < minITSClusters || negTrack.itsNCls () < minITSClusters || bachTrack.itsNCls () < minITSClusters) {
236271 cascflags (0 );
237272 continue ;
238273 }
239274 registry.fill (HIST (" hSelectionStatus" ), 2 ); // passes nITS clusters
240- registry.fill (HIST (" hMassXi2" ), casc.mXi (), casc.pt ());
275+ // registry.fill(HIST("hMassXi2"), casc.mXi(), casc.pt());
241276
242277 // // TOPO CUTS //// TODO: improve!
243278 double pvx = collision.posX ();
@@ -254,7 +289,7 @@ struct CascadeSelector {
254289 continue ;
255290 }
256291 registry.fill (HIST (" hSelectionStatus" ), 3 ); // passes topo
257- registry.fill (HIST (" hMassXi3" ), casc.mXi (), casc.pt ());
292+ // registry.fill(HIST("hMassXi3"), casc.mXi(), casc.pt());
258293
259294 if (TMath::Abs (posTrack.eta ()) > etaTracks || TMath::Abs (negTrack.eta ()) > etaTracks || TMath::Abs (bachTrack.eta ()) > etaTracks) {
260295 cascflags (0 );
@@ -290,24 +325,41 @@ struct CascadeSelector {
290325 }
291326 }
292327 registry.fill (HIST (" hSelectionStatus" ), 5 ); // passes V0 daughters PID
293- registry.fill (HIST (" hMassXi4" ), casc.mXi (), casc.pt ());
328+ // registry.fill(HIST("hMassXi4"), casc.mXi(), casc.pt());
294329
295330 // Bachelor check
296331 if (TMath::Abs (bachTrack.tpcNSigmaPi ()) < tpcNsigmaBachelor) {
297332 if (TMath::Abs (bachTrack.tpcNSigmaKa ()) < tpcNsigmaBachelor) {
298333 // consistent with both!
299334 cascflags (2 );
300335 registry.fill (HIST (" hSelectionStatus" ), 6 ); // passes bach PID
301- registry.fill (HIST (" hMassXi5" ), casc.mXi (), casc.pt ());
336+ // registry.fill(HIST("hMassXi5"), casc.mXi(), casc.pt());
337+ if (casc.sign () < 0 ) {
338+ registry.fill (HIST (" hMassXiMinus" ), casc.mXi (), casc.pt (), casc.yXi ());
339+ registry.fill (HIST (" hMassOmegaMinus" ), casc.mOmega (), casc.pt (), casc.yOmega ());
340+ } else {
341+ registry.fill (HIST (" hMassXiPlus" ), casc.mXi (), casc.pt (), casc.yXi ());
342+ registry.fill (HIST (" hMassOmegaPlus" ), casc.mOmega (), casc.pt (), casc.yOmega ());
343+ }
302344 continue ;
303345 }
304346 cascflags (1 );
305347 registry.fill (HIST (" hSelectionStatus" ), 6 ); // passes bach PID
306- registry.fill (HIST (" hMassXi5" ), casc.mXi (), casc.pt ());
348+ // registry.fill(HIST("hMassXi5"), casc.mXi(), casc.pt());
349+ if (casc.sign () < 0 ) {
350+ registry.fill (HIST (" hMassXiMinus" ), casc.mXi (), casc.pt (), casc.yXi ());
351+ } else {
352+ registry.fill (HIST (" hMassXiPlus" ), casc.mXi (), casc.pt (), casc.yXi ());
353+ }
307354 continue ;
308355 } else if (TMath::Abs (bachTrack.tpcNSigmaKa ()) < tpcNsigmaBachelor) {
309356 cascflags (3 );
310357 registry.fill (HIST (" hSelectionStatus" ), 6 ); // passes bach PID
358+ if (casc.sign () < 0 ) {
359+ registry.fill (HIST (" hMassOmegaMinus" ), casc.mOmega (), casc.pt (), casc.yOmega ());
360+ } else {
361+ registry.fill (HIST (" hMassOmegaPlus" ), casc.mOmega (), casc.pt (), casc.yOmega ());
362+ }
311363 continue ;
312364 }
313365 // if we reach here, the bachelor was neither pion nor kaon
@@ -467,10 +519,6 @@ struct CascadeCorrelations {
467519 }
468520 }
469521
470- if ((doSel8 && !collision.sel8 ()) || (doTFBorderCut && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))) {
471- return ;
472- }
473-
474522 double weight;
475523 // Some QA on the cascades
476524 for (auto const & casc : Cascades) {
0 commit comments