@@ -277,7 +277,7 @@ struct StrangenessBuilder {
277277 // more algorithms to be added as necessary
278278 Configurable<int > deduplicationAlgorithm{" deduplicationAlgorithm" , 1 , " 0: disabled; 1: best pointing angle wins" };
279279
280- // V0 buffer for V0s used in cascades: master switch
280+ // V0 buffer for V0s used in cascades: master switch
281281 // exchanges CPU (generate V0s again) with memory (save pre-generated V0s)
282282 Configurable<bool > useV0BufferForCascades{" useV0BufferForCascades" , false , " store array of V0s for cascades or not. False (default): save RAM, use more CPU; true: save CPU, use more RAM" };
283283
@@ -458,7 +458,7 @@ struct StrangenessBuilder {
458458 auto h2 = histos.add <TH1>(" hInputStatistics" , " hInputStatistics" , kTH1D , {{nTablesConst, -0 .5f , static_cast <float >(nTablesConst)}});
459459 h2->SetTitle (" Input table sizes" );
460460
461- if (v0BuilderOpts.generatePhotonCandidates .value == true ){
461+ if (v0BuilderOpts.generatePhotonCandidates .value == true ) {
462462 auto hDeduplicationStatistics = histos.add <TH1>(" hDeduplicationStatistics" , " hDeduplicationStatistics" , kTH1D , {{2 , -0 .5f , 1 .5f }});
463463 hDeduplicationStatistics->GetXaxis ()->SetBinLabel (1 , " AO2D V0s" );
464464 hDeduplicationStatistics->GetXaxis ()->SetBinLabel (2 , " Deduplicated V0s" );
@@ -722,9 +722,9 @@ struct StrangenessBuilder {
722722 v0Entry currentV0Entry;
723723 cascadeEntry currentCascadeEntry;
724724
725- std::vector<int > ao2dV0toV0List; // index to relate AO2D V0s -> deduplicated V0s
726- std::vector<int > bestCollisionArray; // stores McCollision -> Collision map
727- std::vector<int > bestCollisionNContribsArray; // stores Ncontribs for biggest coll assoc to mccoll
725+ std::vector<int > ao2dV0toV0List; // index to relate AO2D V0s -> deduplicated V0s
726+ std::vector<int > bestCollisionArray; // stores McCollision -> Collision map
727+ std::vector<int > bestCollisionNContribsArray; // stores Ncontribs for biggest coll assoc to mccoll
728728
729729 int collisionLessV0s = 0 ;
730730 int collisionLessCascades = 0 ;
@@ -754,37 +754,37 @@ struct StrangenessBuilder {
754754 ao2dV0toV0List.clear ();
755755 ao2dV0toV0List.resize (v0s.size (), -1 ); // -1 means keep, -2 means do not keep
756756
757- if (deduplicationAlgorithm> 0 && v0BuilderOpts.generatePhotonCandidates ){
757+ if (deduplicationAlgorithm > 0 && v0BuilderOpts.generatePhotonCandidates ) {
758758 // handle duplicates explicitly: group V0s according to (p,n) indices
759- // will provide a list of collisionIds (in V0group), allowing for
759+ // will provide a list of collisionIds (in V0group), allowing for
760760 // easy de-duplication when passing to the v0List
761- std::vector<o2::pwglf::V0group> v0tableGrouped = o2::pwglf::groupDuplicates (v0s);
761+ std::vector<o2::pwglf::V0group> v0tableGrouped = o2::pwglf::groupDuplicates (v0s);
762762 histos.fill (HIST (" hDeduplicationStatistics" ), 0.0 , v0s.size ());
763763 histos.fill (HIST (" hDeduplicationStatistics" ), 1.0 , v0tableGrouped.size ());
764764
765765 // process grouped duplicates, remove 'bad' ones
766- for (size_t iV0 = 0 ; iV0< v0tableGrouped.size (); iV0++){
766+ for (size_t iV0 = 0 ; iV0 < v0tableGrouped.size (); iV0++) {
767767 auto pTrack = tracks.rawIteratorAt (v0tableGrouped[iV0].posTrackId );
768768 auto nTrack = tracks.rawIteratorAt (v0tableGrouped[iV0].negTrackId );
769769
770770 bool isPosTPCOnly = (pTrack.hasTPC () && !pTrack.hasITS () && !pTrack.hasTRD () && !pTrack.hasTOF ());
771771 bool isNegTPCOnly = (nTrack.hasTPC () && !nTrack.hasITS () && !nTrack.hasTRD () && !nTrack.hasTOF ());
772772
773773 // skip single copy V0s
774- if (v0tableGrouped[iV0].collisionIds .size () == 1 ){
774+ if (v0tableGrouped[iV0].collisionIds .size () == 1 ) {
775775 continue ;
776776 }
777777
778778 // don't try to de-duplicate if no track is TPC only
779- if (!isPosTPCOnly && !isNegTPCOnly){
779+ if (!isPosTPCOnly && !isNegTPCOnly) {
780780 continue ;
781781 }
782782
783783 // fitness criteria defined here
784784 float bestPointingAngle = 10 ; // a nonsense angle, anything's better
785785 size_t bestPointingAngleIndex = -1 ;
786786
787- for (size_t ic= 0 ; ic< v0tableGrouped[iV0].collisionIds .size (); ic++){
787+ for (size_t ic = 0 ; ic < v0tableGrouped[iV0].collisionIds .size (); ic++) {
788788 // get track parametrizations, collisions
789789 auto posTrackPar = getTrackParCov (pTrack);
790790 auto negTrackPar = getTrackParCov (nTrack);
@@ -808,32 +808,32 @@ struct StrangenessBuilder {
808808 return ;
809809 }
810810 }
811- } // end TPC drift treatment
811+ } // end TPC drift treatment
812812
813813 // process candidate with helper, generate properties for consulting
814- // <false>: do not apply selections: do as much as possible to preserve
814+ // <false>: do not apply selections: do as much as possible to preserve
815815 // candidate at this level and do not select with topo selections
816- if (straHelper.buildV0Candidate <false >(v0tableGrouped[iV0].collisionIds [ic], collision.posX (), collision.posY (), collision.posZ (), pTrack, nTrack, posTrackPar, negTrackPar, true , false )){
816+ if (straHelper.buildV0Candidate <false >(v0tableGrouped[iV0].collisionIds [ic], collision.posX (), collision.posY (), collision.posZ (), pTrack, nTrack, posTrackPar, negTrackPar, true , false )) {
817817 // candidate built, check pointing angle
818- if (straHelper.v0 .pointingAngle < bestPointingAngle){
818+ if (straHelper.v0 .pointingAngle < bestPointingAngle) {
819819 bestPointingAngle = straHelper.v0 .pointingAngle ;
820820 bestPointingAngleIndex = ic;
821821 }
822822 } // end build V0
823823 } // end candidate loop
824824
825825 // mark de-duplicated candidates
826- for (size_t ic= 0 ; ic< v0tableGrouped[iV0].collisionIds .size (); ic++){
826+ for (size_t ic = 0 ; ic < v0tableGrouped[iV0].collisionIds .size (); ic++) {
827827 ao2dV0toV0List[v0tableGrouped[iV0].V0Ids [ic]] = -2 ;
828- if (bestPointingAngleIndex == ic){
828+ if (bestPointingAngleIndex == ic) {
829829 ao2dV0toV0List[v0tableGrouped[iV0].V0Ids [ic]] = -1 ; // keep best only
830830 }
831831 }
832- } // end V0 loop
832+ } // end V0 loop
833833 } // end de-duplication process
834834
835835 for (const auto & v0 : v0s) {
836- if (ao2dV0toV0List[v0.globalIndex ()]== -1 ){ // keep only de-duplicated
836+ if (ao2dV0toV0List[v0.globalIndex ()] == -1 ) { // keep only de-duplicated
837837 ao2dV0toV0List[v0.globalIndex ()] = v0List.size (); // maps V0s to the corresponding v0List entry
838838 currentV0Entry.globalId = v0.globalIndex ();
839839 currentV0Entry.collisionId = v0.collisionId ();
@@ -982,14 +982,14 @@ struct StrangenessBuilder {
982982 // N.B.: necessary also before cascade part
983983 sorted_v0.clear ();
984984 sorted_v0 = sort_indices (v0List, (mc_findableMode.value > 0 ));
985-
985+
986986 // Cascade part if cores are requested, skip otherwise
987987 if (mEnabledTables [kStoredCascCores ] || mEnabledTables [kStoredKFCascCores ]) {
988988 if (mc_findableMode.value < 2 ) {
989989 // simple passthrough: copy existing cascades to build list
990990 for (const auto & cascade : cascades) {
991991 auto const & v0 = cascade.v0 ();
992- if (v0.v0Type ()> 1 ){
992+ if (v0.v0Type () > 1 ) {
993993 continue ; // skip any unexpected stuff (FIXME: follow-up)
994994 }
995995 currentCascadeEntry.globalId = cascade.globalIndex ();
@@ -1716,11 +1716,11 @@ struct StrangenessBuilder {
17161716 interlinks.cascadeToCascCores .push_back (-1 );
17171717 continue ; // didn't work out, skip
17181718 }
1719- if (useV0BufferForCascades){
1720- // this processing path uses a buffer of V0s so that no
1721- // additional minimization step is redone. It consumes less
1722- // CPU at the cost of more memory. Since memory is a more
1723- // limited commodity, this isn't the default option.
1719+ if (useV0BufferForCascades) {
1720+ // this processing path uses a buffer of V0s so that no
1721+ // additional minimization step is redone. It consumes less
1722+ // CPU at the cost of more memory. Since memory is a more
1723+ // limited commodity, this isn't the default option.
17241724 if (!straHelper.buildCascadeCandidate (cascade.collisionId , pvX, pvY, pvZ,
17251725 v0sFromCascades[v0Map[cascade.v0Id ]],
17261726 posTrack,
@@ -1733,8 +1733,8 @@ struct StrangenessBuilder {
17331733 interlinks.cascadeToCascCores .push_back (-1 );
17341734 continue ; // didn't work out, skip
17351735 }
1736- }else {
1737- // this processing path generates the entire cascade
1736+ } else {
1737+ // this processing path generates the entire cascade
17381738 // from tracks, without any need to have V0s generated.
17391739 if (!straHelper.buildCascadeCandidate (cascade.collisionId , pvX, pvY, pvZ,
17401740 posTrack,
0 commit comments