@@ -337,6 +337,7 @@ struct lambdakzeroBuilder {
337337 // Helper struct to do bookkeeping of building parameters
338338 struct {
339339 std::array<int32_t , kNV0Steps > v0stats;
340+ std::array<int32_t , kNV0Steps > v0statsUnassociated;
340341 std::array<int32_t , 10 > posITSclu;
341342 std::array<int32_t , 10 > negITSclu;
342343 int32_t exceptions;
@@ -408,8 +409,10 @@ struct lambdakzeroBuilder {
408409 {
409410 statisticsRegistry.exceptions = 0 ;
410411 statisticsRegistry.eventCounter = 0 ;
411- for (Int_t ii = 0 ; ii < kNV0Steps ; ii++)
412+ for (Int_t ii = 0 ; ii < kNV0Steps ; ii++) {
412413 statisticsRegistry.v0stats [ii] = 0 ;
414+ statisticsRegistry.v0statsUnassociated [ii] = 0 ;
415+ }
413416 for (Int_t ii = 0 ; ii < 10 ; ii++) {
414417 statisticsRegistry.posITSclu [ii] = 0 ;
415418 statisticsRegistry.negITSclu [ii] = 0 ;
@@ -420,8 +423,10 @@ struct lambdakzeroBuilder {
420423 {
421424 registry.fill (HIST (" hEventCounter" ), 0.0 , statisticsRegistry.eventCounter );
422425 registry.fill (HIST (" hCaughtExceptions" ), 0.0 , statisticsRegistry.exceptions );
423- for (Int_t ii = 0 ; ii < kNV0Steps ; ii++)
426+ for (Int_t ii = 0 ; ii < kNV0Steps ; ii++) {
424427 registry.fill (HIST (" hV0Criteria" ), ii, statisticsRegistry.v0stats [ii]);
428+ registry.fill (HIST (" hV0CriteriaUnassociated" ), ii, statisticsRegistry.v0statsUnassociated [ii]);
429+ }
425430 if (qaConfigurations.d_doTrackQA ) {
426431 for (Int_t ii = 0 ; ii < 10 ; ii++) {
427432 registry.fill (HIST (" hPositiveITSClusters" ), ii, statisticsRegistry.posITSclu [ii]);
@@ -450,6 +455,17 @@ struct lambdakzeroBuilder {
450455 h->GetXaxis ()->SetBinLabel (8 , " Count: Standard V0" );
451456 h->GetXaxis ()->SetBinLabel (9 , " Count: V0 exc. for casc" );
452457
458+ auto h2 = registry.add <TH1 >(" hV0CriteriaUnassociated" , " hV0CriteriaUnassociated" , kTH1D , {{10 , -0 .5f , 9 .5f }});
459+ h2->GetXaxis ()->SetBinLabel (1 , " All sel" );
460+ h2->GetXaxis ()->SetBinLabel (2 , " TPC requirement" );
461+ h2->GetXaxis ()->SetBinLabel (3 , " DCAxy Dau to PV" );
462+ h2->GetXaxis ()->SetBinLabel (4 , " DCA V0 Dau" );
463+ h2->GetXaxis ()->SetBinLabel (5 , " CosPA" );
464+ h2->GetXaxis ()->SetBinLabel (6 , " Radius" );
465+ h2->GetXaxis ()->SetBinLabel (7 , " Within momentum range" );
466+ h2->GetXaxis ()->SetBinLabel (8 , " Count: Standard V0" );
467+ h2->GetXaxis ()->SetBinLabel (9 , " Count: V0 exc. for casc" );
468+
453469 randomSeed = static_cast <unsigned int >(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now ().time_since_epoch ()).count ());
454470
455471 // Optionally, add extra QA histograms to processing chain
@@ -801,6 +817,9 @@ struct lambdakzeroBuilder {
801817
802818 // value 0.5: any considered V0
803819 statisticsRegistry.v0stats [kV0All ]++;
820+ if (!V0 .has_collision ())
821+ statisticsRegistry.v0statsUnassociated [kV0All ]++;
822+
804823 if (tpcrefit) {
805824 if (!(posTrack.trackType () & o2::aod::track::TPCrefit)) {
806825 return false ;
@@ -812,6 +831,8 @@ struct lambdakzeroBuilder {
812831
813832 // Passes TPC refit
814833 statisticsRegistry.v0stats [kV0TPCrefit ]++;
834+ if (!V0 .has_collision ())
835+ statisticsRegistry.v0statsUnassociated [kV0TPCrefit ]++;
815836
816837 // Calculate DCA with respect to the collision associated to the V0, not individual tracks
817838 gpu::gpustd::array<float , 2 > dcaInfo;
@@ -834,6 +855,8 @@ struct lambdakzeroBuilder {
834855
835856 // passes DCAxy
836857 statisticsRegistry.v0stats [kV0DCAxy ]++;
858+ if (!V0 .has_collision ())
859+ statisticsRegistry.v0statsUnassociated [kV0DCAxy ]++;
837860
838861 // Change strangenessBuilder tracks
839862 lPositiveTrack = getTrackParCov (posTrack);
@@ -881,6 +904,8 @@ struct lambdakzeroBuilder {
881904
882905 // Passes DCA between daughters check
883906 statisticsRegistry.v0stats [kV0DCADau ]++;
907+ if (!V0 .has_collision ())
908+ statisticsRegistry.v0statsUnassociated [kV0DCADau ]++;
884909
885910 v0candidate.cosPA = RecoDecay::cpa (array{primaryVertex.getX (), primaryVertex.getY (), primaryVertex.getZ ()}, array{v0candidate.pos [0 ], v0candidate.pos [1 ], v0candidate.pos [2 ]}, array{v0candidate.posP [0 ] + v0candidate.negP [0 ], v0candidate.posP [1 ] + v0candidate.negP [1 ], v0candidate.posP [2 ] + v0candidate.negP [2 ]});
886911 if (v0candidate.cosPA < v0cospa) {
@@ -896,6 +921,8 @@ struct lambdakzeroBuilder {
896921
897922 // Passes CosPA check
898923 statisticsRegistry.v0stats [kV0CosPA ]++;
924+ if (!V0 .has_collision ())
925+ statisticsRegistry.v0statsUnassociated [kV0CosPA ]++;
899926
900927 v0candidate.V0radius = RecoDecay::sqrtSumOfSquares (v0candidate.pos [0 ], v0candidate.pos [1 ]);
901928 if (v0candidate.V0radius < v0radius) {
@@ -904,6 +931,8 @@ struct lambdakzeroBuilder {
904931
905932 // Passes radius check
906933 statisticsRegistry.v0stats [kV0Radius ]++;
934+ if (!V0 .has_collision ())
935+ statisticsRegistry.v0statsUnassociated [kV0Radius ]++;
907936 // Return OK: passed all v0 candidate selecton criteria
908937
909938 auto px = v0candidate.posP [0 ] + v0candidate.negP [0 ];
@@ -931,6 +960,8 @@ struct lambdakzeroBuilder {
931960
932961 // Passes momentum window check
933962 statisticsRegistry.v0stats [kWithinMomentumRange ]++;
963+ if (!V0 .has_collision ())
964+ statisticsRegistry.v0statsUnassociated [kWithinMomentumRange ]++;
934965
935966 // Calculate masses
936967 auto lGammaMass = RecoDecay::m (array{array{v0candidate.posP [0 ], v0candidate.posP [1 ], v0candidate.posP [2 ]}, array{v0candidate.negP [0 ], v0candidate.negP [1 ], v0candidate.negP [2 ]}}, array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
@@ -1164,6 +1195,9 @@ struct lambdakzeroBuilder {
11641195
11651196 // populates the various tables for analysis
11661197 statisticsRegistry.v0stats [kCountStandardV0 ]++;
1198+ if (!V0 .has_collision ())
1199+ statisticsRegistry.v0statsUnassociated [kCountStandardV0 ]++;
1200+
11671201 v0indices (V0 .posTrackId (), V0 .negTrackId (),
11681202 V0 .collisionId (), V0 .globalIndex ());
11691203 v0trackXs (v0candidate.posTrackX , v0candidate.negTrackX );
0 commit comments