@@ -61,19 +61,21 @@ struct LfTreeCreatorNuclei {
6161 LOGF (fatal, " Cannot enable processData and processMC at the same time. Please choose one." );
6262 }
6363
64- hEvents.add (" eventSelection" , " eventSelection" , kTH1D , {{6 , -0.5 , 5 .5 }});
64+ hEvents.add (" eventSelection" , " eventSelection" , kTH1D , {{9 , -0.5 , 8 .5 }});
6565 auto h = hEvents.get <TH1>(HIST (" eventSelection" ));
66- h->GetXaxis ()->SetBinLabel (1 , " z-vertex cut" );
67- h->GetXaxis ()->SetBinLabel (2 , " sel8" );
68- h->GetXaxis ()->SetBinLabel (3 , " TFborder" );
69- h->GetXaxis ()->SetBinLabel (4 , " not empty" );
70- h->GetXaxis ()->SetBinLabel (5 , " |z|<10 normalization" );
71- h->GetXaxis ()->SetBinLabel (6 , " With a good track" );
66+ h->GetXaxis ()->SetBinLabel (1 , " Custom z-vertex cut" );
67+ h->GetXaxis ()->SetBinLabel (2 , " TVX trigger cut" );
68+ h->GetXaxis ()->SetBinLabel (3 , " TF border cut" );
69+ h->GetXaxis ()->SetBinLabel (4 , " ITS ROF cut" );
70+ h->GetXaxis ()->SetBinLabel (5 , " TVX + TF + ITS ROF" );
71+ h->GetXaxis ()->SetBinLabel (6 , " Sel8 cut" );
72+ h->GetXaxis ()->SetBinLabel (7 , " Not empty events" );
73+ h->GetXaxis ()->SetBinLabel (8 , " |z|<10 norm" );
74+ h->GetXaxis ()->SetBinLabel (9 , " With a good track" );
7275 customTrackSelection = myTrackSelection ();
7376 }
7477
7578 // track
76- // Configurable<float> yCut{"yCut", 1.f, "Rapidity cut"};
7779 Configurable<float > cfgCutDCAxy{" cfgCutDCAxy" , 2 .0f , " DCAxy range for tracks" };
7880 Configurable<float > cfgCutDCAz{" cfgCutDCAz" , 2 .0f , " DCAz range for tracks" };
7981 Configurable<float > cfgCutEta{" cfgCutEta" , 0 .8f , " Eta range for tracks" };
@@ -89,8 +91,11 @@ struct LfTreeCreatorNuclei {
8991 // events
9092 Configurable<float > cfgHighCutVertex{" cfgHighCutVertex" , 10 .0f , " Accepted z-vertex range" };
9193 Configurable<float > cfgLowCutVertex{" cfgLowCutVertex" , -10 .0f , " Accepted z-vertex range" };
92- Configurable<bool > useEvsel{" useEvsel" , true , " Use sel8 for run3 Event Selection" };
93- Configurable<bool > removeTFBorder{" removeTFBorder" , true , " Remove TimeFrame border" };
94+ Configurable<bool > useSel8{" useSel8" , true , " Use Sel8 for run3 Event Selection" };
95+ Configurable<bool > TVXtrigger{" TVXtrigger" , false , " Use TVX for Event Selection (default w/ Sel8)" };
96+ Configurable<bool > removeTFBorder{" removeTFBorder" , false , " Remove TimeFrame border (default w/ Sel8)" };
97+ Configurable<bool > removeITSROFBorder{" removeITSROFBorder" , false , " Remove ITS Read-Out Frame border (default w/ Sel8)" };
98+
9499 Configurable<bool > doSkim{" doSkim" , false , " Save events that contains only selected tracks (for filtered mode)" };
95100
96101 // custom track cut
@@ -302,29 +307,51 @@ struct LfTreeCreatorNuclei {
302307 for (const auto & collision : collisions) {
303308 hEvents.fill (HIST (" eventSelection" ), 0 );
304309
305- if (useEvsel && !collision.sel8 ()) {
306- continue ;
310+ if (!collision.selection_bit (aod::evsel::kIsTriggerTVX )) {
311+ if (TVXtrigger)
312+ continue ;
313+ } else {
314+ hEvents.fill (HIST (" eventSelection" ), 1 );
315+ }
316+
317+ if (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
318+ if (removeTFBorder)
319+ continue ;
320+ } else {
321+ hEvents.fill (HIST (" eventSelection" ), 2 );
307322 }
308- hEvents.fill (HIST (" eventSelection" ), 1 );
309323
310- if (removeTFBorder && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))
324+ if (!collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
325+ if (removeITSROFBorder)
326+ continue ;
327+ } else {
328+ hEvents.fill (HIST (" eventSelection" ), 3 );
329+ }
330+
331+ if ((collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) &&
332+ (collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) &&
333+ (collision.selection_bit (aod::evsel::kIsTriggerTVX ))) {
334+ hEvents.fill (HIST (" eventSelection" ), 4 );
335+ }
336+
337+ if (useSel8 && !collision.sel8 ())
311338 continue ;
312- hEvents.fill (HIST (" eventSelection" ), 2 );
339+ hEvents.fill (HIST (" eventSelection" ), 5 );
313340
314341 const auto & tracksInCollision = tracks.sliceBy (perCollision, collision.globalIndex ());
315342 if (doSkim && tracksInCollision.size () == 0 )
316343 continue ;
317- hEvents.fill (HIST (" eventSelection" ), 3 );
344+ hEvents.fill (HIST (" eventSelection" ), 6 );
318345
319346 // Fill the norm. column with good events with |z| < 10 cm before skimming
320347 if (collision.posZ () < 10 && collision.posZ () > -10 ) {
321- hEvents.fill (HIST (" eventSelection" ), 4 );
348+ hEvents.fill (HIST (" eventSelection" ), 7 );
322349 }
323350
324351 if (doSkim && (trackSelType.value == 3 ) && !checkQuality<false >(collision, tracksInCollision))
325352 continue ;
326353 fillForOneEvent<false >(collision, tracksInCollision);
327- hEvents.fill (HIST (" eventSelection" ), 5 );
354+ hEvents.fill (HIST (" eventSelection" ), 8 );
328355 }
329356 }
330357
@@ -335,25 +362,48 @@ struct LfTreeCreatorNuclei {
335362 aod::BCs const &, aod::McCollisions const & mcCollisions, aod::McParticles const & mcParticles)
336363 {
337364 for (const auto & collision : collisions) {
365+
338366 hEvents.fill (HIST (" eventSelection" ), 0 );
339367
340- if (useEvsel && !collision.sel8 ()) {
341- continue ;
368+ if (!collision.selection_bit (aod::evsel::kIsTriggerTVX )) {
369+ if (TVXtrigger)
370+ continue ;
371+ } else {
372+ hEvents.fill (HIST (" eventSelection" ), 1 );
373+ }
374+
375+ if (!collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
376+ if (removeTFBorder)
377+ continue ;
378+ } else {
379+ hEvents.fill (HIST (" eventSelection" ), 2 );
342380 }
343- hEvents.fill (HIST (" eventSelection" ), 1 );
344381
345- if (removeTFBorder && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))
382+ if (!collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
383+ if (removeITSROFBorder)
384+ continue ;
385+ } else {
386+ hEvents.fill (HIST (" eventSelection" ), 3 );
387+ }
388+
389+ if ((collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) &&
390+ (collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) &&
391+ (collision.selection_bit (aod::evsel::kIsTriggerTVX ))) {
392+ hEvents.fill (HIST (" eventSelection" ), 4 );
393+ }
394+
395+ if (useSel8 && !collision.sel8 ())
346396 continue ;
347- hEvents.fill (HIST (" eventSelection" ), 2 );
397+ hEvents.fill (HIST (" eventSelection" ), 5 );
348398
349399 // Fill the norm. column with good events with |z| < 10 cm before skimming
350400 if (collision.posZ () < 10 && collision.posZ () > -10 ) {
351- hEvents.fill (HIST (" eventSelection" ), 4 );
401+ hEvents.fill (HIST (" eventSelection" ), 7 );
352402 }
353403
354404 const auto & tracksInCollision = tracks.sliceBy (perCollision, collision.globalIndex ());
355405 fillForOneEvent<true >(collision, tracksInCollision);
356- hEvents.fill (HIST (" eventSelection" ), 5 );
406+ hEvents.fill (HIST (" eventSelection" ), 8 );
357407 }
358408 }
359409
0 commit comments