@@ -336,13 +336,20 @@ struct StrangenessBuilder {
336336
337337 // CCDB options
338338 struct : ConfigurableGroup {
339+ std::string prefix = " ccdb" ;
339340 Configurable<std::string> ccdburl{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
340341 Configurable<std::string> grpPath{" grpPath" , " GLO/GRP/GRP" , " Path of the grp file" };
341342 Configurable<std::string> grpmagPath{" grpmagPath" , " GLO/Config/GRPMagField" , " CCDB path of the GRPMagField object" };
342343 Configurable<std::string> lutPath{" lutPath" , " GLO/Param/MatLUT" , " Path of the Lut parametrization" };
343344 Configurable<std::string> geoPath{" geoPath" , " GLO/Config/GeometryAligned" , " Path of the geometry file" };
344345 } ccdbConfigurations;
345346
347+ // V0 building options
348+ struct : ConfigurableGroup {
349+ std::string prefix = " v0BuilderOpts" ;
350+ Configurable<bool > generatePhotonCandidates{" generatePhotonCandidates" , false , " generate gamma conversion candidates (V0s using TPC-only tracks)" };
351+ } v0BuilderOpts;
352+
346353 o2::ccdb::CcdbApi ccdbApi;
347354 Service<o2::ccdb::BasicCCDBManager> ccdb;
348355
@@ -365,6 +372,7 @@ struct StrangenessBuilder {
365372 int f = enabledTables->get (tableNames[i].c_str (), " enable" );
366373 if (f == 1 ) {
367374 mEnabledTables [i] = 1 ;
375+ LOGF (info, " Enabled table: %s" , tableNames[i].c_str ());
368376 }
369377 }
370378
@@ -456,6 +464,49 @@ struct StrangenessBuilder {
456464 v0Map[v0.globalIndex ()] = v0sFromCascades.size (); // provide actual valid index in buffer
457465 v0sFromCascades.push_back (straHelper.v0 );
458466 }
467+ // fill requested cursors only if type is not 0
468+ if (v0.v0Type () == 1 || (v0.v0Type () == 1 && v0BuilderOpts.generatePhotonCandidates )) {
469+ if (mEnabledTables [kV0Indices ]){
470+ // for referencing (especially - but not only - when using derived data)
471+ v0indices (v0.posTrackId (), v0.negTrackId (),
472+ v0.collisionId (), v0.globalIndex ());
473+ }
474+ if (mEnabledTables [kV0TrackXs ]){
475+ // further decay chains may need this
476+ v0trackXs (straHelper.v0 .positiveTrackX , straHelper.v0 .negativeTrackX );
477+ }
478+ if (mEnabledTables [kV0CoresBase ]){
479+ // standard analysis
480+ v0cores (straHelper.v0 .position [0 ], straHelper.v0 .position [1 ], straHelper.v0 .position [2 ],
481+ straHelper.v0 .positiveMomentum [0 ], straHelper.v0 .positiveMomentum [1 ], straHelper.v0 .positiveMomentum [2 ],
482+ straHelper.v0 .negativeMomentum [0 ], straHelper.v0 .negativeMomentum [1 ], straHelper.v0 .negativeMomentum [2 ],
483+ straHelper.v0 .daughterDCA ,
484+ straHelper.v0 .positiveDCAxy ,
485+ straHelper.v0 .negativeDCAxy ,
486+ TMath::Cos (straHelper.v0 .pointingAngle ),
487+ straHelper.v0 .dcaXY ,
488+ v0.v0Type ());
489+ }
490+ if (mEnabledTables [kV0TraPosAtDCAs ]){
491+ // for tracking studies
492+ v0dauPositions (straHelper.v0 .positivePosition [0 ], straHelper.v0 .positivePosition [1 ], straHelper.v0 .positivePosition [2 ],
493+ straHelper.v0 .negativePosition [0 ], straHelper.v0 .negativePosition [1 ], straHelper.v0 .negativePosition [2 ]);
494+
495+ }
496+ if (mEnabledTables [kV0TraPosAtIUs ]){
497+ // for tracking studies
498+ std::array<float , 3 > positivePositionIU;
499+ std::array<float , 3 > negativePositionIU;
500+ o2::track::TrackPar positiveTrackParam = getTrackPar (posTrack);
501+ o2::track::TrackPar negativeTrackParam = getTrackPar (negTrack);
502+ positiveTrackParam.getXYZGlo (positivePositionIU);
503+ negativeTrackParam.getXYZGlo (negativePositionIU);
504+ v0dauPositionsIU (positivePositionIU[0 ], positivePositionIU[1 ], positivePositionIU[2 ],
505+ negativePositionIU[0 ], negativePositionIU[1 ], negativePositionIU[2 ]);
506+ }
507+ }
508+
509+
459510 }
460511 LOGF (info, " V0s in DF: %i, V0s built: %i, V0s built and buffered for cascades: %i." , v0s.size (), nV0s, v0sFromCascades.size ());
461512 }
0 commit comments