@@ -54,7 +54,7 @@ struct FemtoPairV0V0 {
5454 using FilteredFemtoCollisionsWithLabel = o2::soa::Filtered<FemtoCollisionsWithLabel>;
5555 using FilteredFemtoCollisionWithLabel = FilteredFemtoCollisionsWithLabel::iterator;
5656
57- using FemtoTracks = o2::soa::Join<o2:: aod::FTracks, o2::aod::FTrackMasks> ;
57+ using FemtoTracks = o2::aod::FTracks;
5858 using FemtoLambdas = o2::soa::Join<o2::aod::FLambdas, o2::aod::FLambdaMasks>;
5959 using FemtoK0shorts = o2::soa::Join<o2::aod::FK0shorts, o2::aod::FK0shortMasks>;
6060
@@ -135,6 +135,23 @@ struct FemtoPairV0V0 {
135135 modes::V0 ::kK0short >
136136 pairK0shortK0shortBuilder;
137137
138+ pairbuilder::PairV0V0Builder<
139+ v0histmanager::PrefixLambda1,
140+ trackhistmanager::PrefixV01PosDaughter,
141+ trackhistmanager::PrefixV01NegDaughter,
142+ v0histmanager::PrefixK0short2,
143+ trackhistmanager::PrefixV02PosDaughter,
144+ trackhistmanager::PrefixV02NegDaughter,
145+ pairhistmanager::PrefixV0V0Se,
146+ pairhistmanager::PrefixV0V0Me,
147+ closepairrejection::PrefixV0V0PosSe,
148+ closepairrejection::PrefixV0V0NegSe,
149+ closepairrejection::PrefixV0V0PosMe,
150+ closepairrejection::PrefixV0V0NegMe,
151+ modes::V0 ::kLambda ,
152+ modes::V0 ::kK0short >
153+ pairLambdaK0shortBuilder;
154+
138155 // setup mixing
139156 std::vector<double > defaultVtxBins{10 , -10 , 10 };
140157 std::vector<double > defaultMultBins{50 , 0 , 200 };
@@ -152,19 +169,19 @@ struct FemtoPairV0V0 {
152169
153170 void init (o2::framework::InitContext&)
154171 {
155- // TODO: implement lambda-k0short
156- bool processData = doprocessLambdaLambdaSameEvent || doprocessLambdaLambdaMixedEvent || doprocessK0shortK0shortSameEvent || doprocessK0shortK0shortMixedEvent;
157- bool processMc = doprocessLambdaLambdaSameEventMc || doprocessLambdaLambdaMixedEventMc || doprocessK0shortK0shortSameEventMc || doprocessK0shortK0shortMixedEventMc;
172+ bool processData = doprocessLambdaLambdaSameEvent || doprocessLambdaLambdaMixedEvent || doprocessK0shortK0shortSameEvent || doprocessK0shortK0shortMixedEvent || doprocessLambdaK0shortSameEvent || doprocessLambdaK0shortMixedEvent;
173+ bool processMc = doprocessLambdaLambdaSameEventMc || doprocessLambdaLambdaMixedEventMc || doprocessK0shortK0shortSameEventMc || doprocessK0shortK0shortMixedEventMc || doprocessLambdaK0shortSameEventMc || doprocessLambdaK0shortMixedEventMc;
158174
159175 if (processData && processMc) {
160176 LOG (fatal) << " Both data and mc processing is enabled. Breaking..." ;
161177 }
162178
163179 bool processLambdaLambda = doprocessLambdaLambdaSameEvent || doprocessLambdaLambdaMixedEvent || doprocessLambdaLambdaSameEventMc || doprocessLambdaLambdaMixedEventMc;
164180 bool processK0shortK0short = doprocessK0shortK0shortSameEvent || doprocessK0shortK0shortMixedEvent || doprocessK0shortK0shortSameEventMc || doprocessK0shortK0shortMixedEventMc;
181+ bool processLambdaK0short = doprocessLambdaK0shortSameEvent || doprocessLambdaK0shortMixedEvent || doprocessLambdaK0shortSameEventMc || doprocessLambdaK0shortMixedEventMc;
165182
166- if (processLambdaLambda && processK0shortK0short) {
167- LOG (fatal) << " Both lambda-lambda and k0short-k0short processing is enabled. Breaking..." ;
183+ if (static_cast < int >( processLambdaLambda) + static_cast < int >( processK0shortK0short) + static_cast < int >(processLambdaK0short) > 1 ) {
184+ LOG (fatal) << " Only one of lambda-lambda, k0short-k0short or lambda-k0short processing can be enabled. Breaking..." ;
168185 }
169186
170187 // setup columnpolicy for binning
@@ -197,7 +214,15 @@ struct FemtoPairV0V0 {
197214 if (doprocessK0shortK0shortSameEvent || doprocessK0shortK0shortMixedEvent) {
198215 k0shortHistSpec = v0histmanager::makeV0HistSpecMap (confK0shortBinning);
199216 pairV0V0HistSpec = pairhistmanager::makePairHistSpecMap (confPairBinning, confMixing);
200- pairK0shortK0shortBuilder.init <modes::Mode::kReco , modes::Mode::kMe_Reco >(&hRegistry, confCollisionBinning, confK0shortSelection, confK0shortSelection, confK0shortCleaner, confK0shortCleaner, confCprPos, confCprNeg, confMixing, confPairBinning, confPairCuts, colHistSpec, k0shortHistSpec, k0shortHistSpec, posDauSpec, negDauSpec, pairV0V0HistSpec, cprHistSpecPos, cprHistSpecNeg);
217+ pairK0shortK0shortBuilder.init <modes::Mode::kSe_Reco , modes::Mode::kMe_Reco >(&hRegistry, confCollisionBinning, confK0shortSelection, confK0shortSelection, confK0shortCleaner, confK0shortCleaner, confCprPos, confCprNeg, confMixing, confPairBinning, confPairCuts, colHistSpec, k0shortHistSpec, k0shortHistSpec, posDauSpec, negDauSpec, pairV0V0HistSpec, cprHistSpecPos, cprHistSpecNeg);
218+ }
219+
220+ // setup for lambda-k0short
221+ if (doprocessLambdaK0shortSameEvent || doprocessLambdaK0shortMixedEvent) {
222+ lambdaHistSpec = v0histmanager::makeV0HistSpecMap (confLambdaBinning);
223+ k0shortHistSpec = v0histmanager::makeV0HistSpecMap (confK0shortBinning);
224+ pairV0V0HistSpec = pairhistmanager::makePairHistSpecMap (confPairBinning, confMixing);
225+ pairLambdaK0shortBuilder.init <modes::Mode::kSe_Reco , modes::Mode::kMe_Reco >(&hRegistry, confCollisionBinning, confLambdaSelection, confK0shortSelection, confLambdaCleaner, confK0shortCleaner, confCprPos, confCprNeg, confMixing, confPairBinning, confPairCuts, colHistSpec, lambdaHistSpec, k0shortHistSpec, posDauSpec, negDauSpec, pairV0V0HistSpec, cprHistSpecPos, cprHistSpecNeg);
201226 }
202227 } else {
203228 colHistSpec = colhistmanager::makeColMcHistSpecMap (confCollisionBinning);
@@ -215,6 +240,14 @@ struct FemtoPairV0V0 {
215240 pairV0V0HistSpec = pairhistmanager::makePairMcHistSpecMap (confPairBinning, confMixing);
216241 pairK0shortK0shortBuilder.init <modes::Mode::kSe_Reco_Mc , modes::Mode::kMe_Reco_Mc >(&hRegistry, confCollisionBinning, confK0shortSelection, confK0shortSelection, confK0shortCleaner, confK0shortCleaner, confCprPos, confCprNeg, confMixing, confPairBinning, confPairCuts, colHistSpec, k0shortHistSpec, k0shortHistSpec, posDauSpec, negDauSpec, pairV0V0HistSpec, cprHistSpecPos, cprHistSpecNeg);
217242 }
243+
244+ // setup for lambda-k0short
245+ if (doprocessLambdaK0shortSameEvent || doprocessLambdaK0shortMixedEvent) {
246+ lambdaHistSpec = v0histmanager::makeV0McHistSpecMap (confLambdaBinning);
247+ k0shortHistSpec = v0histmanager::makeV0McHistSpecMap (confK0shortBinning);
248+ pairV0V0HistSpec = pairhistmanager::makePairMcHistSpecMap (confPairBinning, confMixing);
249+ pairLambdaK0shortBuilder.init <modes::Mode::kSe_Reco_Mc , modes::Mode::kMe_Reco_Mc >(&hRegistry, confCollisionBinning, confLambdaSelection, confK0shortSelection, confLambdaCleaner, confK0shortCleaner, confCprPos, confCprNeg, confMixing, confPairBinning, confPairCuts, colHistSpec, lambdaHistSpec, k0shortHistSpec, posDauSpec, negDauSpec, pairV0V0HistSpec, cprHistSpecPos, cprHistSpecNeg);
250+ }
218251 }
219252 };
220253
@@ -256,15 +289,39 @@ struct FemtoPairV0V0 {
256289
257290 void processK0shortK0shortMixedEvent (FilteredFemtoCollisions const & cols, FemtoTracks const & tracks, FemtoK0shorts const & k0shorts)
258291 {
259- pairK0shortK0shortBuilder.processMixedEvent <modes::Mode::kReco >(cols, tracks, k0shorts, k0shortPartition, k0shortPartition, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent);
292+ pairK0shortK0shortBuilder.processMixedEvent <modes::Mode::kMe_Reco >(cols, tracks, k0shorts, k0shortPartition, k0shortPartition, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent);
260293 }
261294 PROCESS_SWITCH (FemtoPairV0V0, processK0shortK0shortMixedEvent, " Enable processing mixed event processing for k0short-k0short" , false );
262295
263296 void processK0shortK0shortMixedEventMc (FilteredFemtoCollisionsWithLabel const & cols, o2::aod::FMcCols const & mcCols, FemtoTracksWithLabel const & tracks, FemtoK0shortsWithLabel const & /* k0shorts*/ , FemtoMcParticlesWithLabel const & mcParticles, o2::aod::FMcMothers const & mcMothers, o2::aod::FMcPartMoths const & mcPartonicMothers)
264297 {
265- pairK0shortK0shortBuilder.processMixedEvent <modes::Mode::kMe_Reco >(cols, mcCols, tracks, k0shortWithLabelPartition, k0shortWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent);
298+ pairK0shortK0shortBuilder.processMixedEvent <modes::Mode::kMe_Reco_Mc >(cols, mcCols, tracks, k0shortWithLabelPartition, k0shortWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent);
266299 }
267300 PROCESS_SWITCH (FemtoPairV0V0, processK0shortK0shortMixedEventMc, " Enable processing mixed event processing for k0short-k0short with mc information" , false );
301+
302+ void processLambdaK0shortSameEvent (FilteredFemtoCollision const & col, FemtoTracks const & tracks, FemtoLambdas const & lambdas, FemtoK0shorts const & /* k0shorts*/ )
303+ {
304+ pairLambdaK0shortBuilder.processSameEvent <modes::Mode::kSe_Reco >(col, tracks, lambdas, lambdaPartition, k0shortPartition, cache);
305+ }
306+ PROCESS_SWITCH (FemtoPairV0V0, processLambdaK0shortSameEvent, " Enable processing same event processing for lambda-k0short" , false );
307+
308+ void processLambdaK0shortSameEventMc (FilteredFemtoCollisionWithLabel const & col, o2::aod::FMcCols const & mcCols, FemtoTracksWithLabel const & tracks, FemtoLambdasWithLabel const & lambdas, FemtoK0shortsWithLabel const & /* k0shorts*/ , FemtoMcParticlesWithLabel const & mcParticles, o2::aod::FMcMothers const & mcMothers, o2::aod::FMcPartMoths const & mcPartonicMothers)
309+ {
310+ pairLambdaK0shortBuilder.processSameEvent <modes::Mode::kSe_Reco_Mc >(col, mcCols, tracks, lambdas, lambdaWithLabelPartition, k0shortWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache);
311+ }
312+ PROCESS_SWITCH (FemtoPairV0V0, processLambdaK0shortSameEventMc, " Enable processing same event processing for lambda-k0short with mc information" , false );
313+
314+ void processLambdaK0shortMixedEvent (FilteredFemtoCollisions const & cols, FemtoTracks const & tracks, FemtoLambdas const & lambdas, FemtoK0shorts const & /* k0shorts*/ )
315+ {
316+ pairLambdaK0shortBuilder.processMixedEvent <modes::Mode::kMe_Reco >(cols, tracks, lambdas, lambdaPartition, k0shortPartition, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent);
317+ }
318+ PROCESS_SWITCH (FemtoPairV0V0, processLambdaK0shortMixedEvent, " Enable processing mixed event processing for lambda-k0short" , false );
319+
320+ void processLambdaK0shortMixedEventMc (FilteredFemtoCollisionsWithLabel const & cols, o2::aod::FMcCols const & mcCols, FemtoTracksWithLabel const & tracks, FemtoLambdasWithLabel const & /* lambdas*/ , FemtoK0shortsWithLabel const & /* k0shorts*/ , FemtoMcParticlesWithLabel const & mcParticles, o2::aod::FMcMothers const & mcMothers, o2::aod::FMcPartMoths const & mcPartonicMothers)
321+ {
322+ pairLambdaK0shortBuilder.processMixedEvent <modes::Mode::kMe_Reco_Mc >(cols, mcCols, tracks, lambdaWithLabelPartition, k0shortWithLabelPartition, mcParticles, mcMothers, mcPartonicMothers, cache, mixBinsVtxMult, mixBinsVtxCent, mixBinsVtxMultCent);
323+ }
324+ PROCESS_SWITCH (FemtoPairV0V0, processLambdaK0shortMixedEventMc, " Enable processing mixed event processing for lambda-k0short with mc information" , false );
268325};
269326
270327o2::framework::WorkflowSpec defineDataProcessing (o2::framework::ConfigContext const & context)
0 commit comments