@@ -47,12 +47,6 @@ struct HfTaskCharmHadronsFemtoDream {
4747 NegativeCharge = -1
4848 };
4949
50- enum PairSign {
51- PairNotDefined = 0 ,
52- LikeSignPair = 1 ,
53- UnLikeSignPair = 2
54- };
55-
5650 // / Binning configurables
5751 ConfigurableAxis bin4Dkstar{" bin4Dkstar" , {1500 , 0 ., 6 .}, " binning kstar for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)" };
5852 ConfigurableAxis bin4DMult{" bin4Dmult" , {VARIABLE_WIDTH, 0 .0f , 4 .0f , 8 .0f , 12 .0f , 16 .0f , 20 .0f , 24 .0f , 28 .0f , 32 .0f , 36 .0f , 40 .0f , 44 .0f , 48 .0f , 52 .0f , 56 .0f , 60 .0f , 64 .0f , 68 .0f , 72 .0f , 76 .0f , 80 .0f , 84 .0f , 88 .0f , 92 .0f , 96 .0f , 100 .0f , 200 .0f }, " multiplicity Binning for the 4Dimensional plot: k* vs multiplicity vs multiplicity percentile vs mT (set <<Confuse4D>> to true in order to use)" };
@@ -195,8 +189,9 @@ struct HfTaskCharmHadronsFemtoDream {
195189
196190 SliceCache cache;
197191 Preslice<aod::FDParticles> perCol = aod::femtodreamparticle::fdCollisionId;
198- Produces<o2::aod::FDResultsHF> fillFemtoResult;
199- Produces<o2::aod::FDResultsHFTrkInfo> fillFemtoResultTrkInfo;
192+ Produces<o2::aod::FDHfCharm> rowFemtoResultCharm;
193+ Produces<o2::aod::FDHfTrk> rowFemtoResultTrk;
194+ Produces<o2::aod::FDHfColl> rowFemtoResultColl;
200195
201196 void init (InitContext& /* context*/ )
202197 {
@@ -243,25 +238,12 @@ struct HfTaskCharmHadronsFemtoDream {
243238 registryMixQa.fill (HIST (" MixingQA/hSECollisionPool" ), col.posZ (), col.multNtr ());
244239 }
245240
246- template <typename Part1>
247- void fillTableTrkInfo (Part1 const & p1)
248- {
249- fillFemtoResultTrkInfo (
250- p1.tpcNClsFound (),
251- p1.tpcNClsFindable (),
252- p1.tpcNClsCrossedRows (),
253- p1.tpcNSigmaPr (),
254- p1.tofNSigmaPr ());
255- }
256-
257241 // / This function processes the same event and takes care of all the histogramming
258242 template <bool isMc, typename PartitionType, typename CandType, typename TableTracks, typename Collision>
259243 void doSameEvent (PartitionType& sliceTrk1, CandType& sliceCharmHad, TableTracks const & parts, Collision const & col)
260244 {
261245 fillCollision (col);
262246
263- processType = 1 ; // for same event
264-
265247 for (auto const & [p1, p2] : combinations (CombinationsFullIndexPolicy (sliceTrk1, sliceCharmHad))) {
266248
267249 if (p1.trackId () == p2.prong0Id () || p1.trackId () == p2.prong1Id () || p1.trackId () == p2.prong2Id ())
@@ -285,24 +267,11 @@ struct HfTaskCharmHadronsFemtoDream {
285267 chargeTrack = NegativeCharge;
286268 }
287269
288- int pairSign = 0 ;
289- if (chargeTrack == p2.charge ()) {
290- pairSign = LikeSignPair;
291- } else {
292- pairSign = UnLikeSignPair;
293- }
294-
295270 float kstar = FemtoDreamMath::getkstar (p1, massOne, p2, massTwo);
296271 if (kstar > highkstarCut) {
297272 continue ;
298273 }
299274
300- // if (chargeTrack == 1) {
301- // partSign = 1;
302- // } else {
303- // partSign = 1 << 1;
304- // }
305-
306275 float invMass;
307276 if (p2.candidateSelFlag () == 1 ) {
308277 invMass = p2.m (std::array{o2::constants::physics::MassProton, o2::constants::physics::MassKPlus, o2::constants::physics::MassPiPlus});
@@ -326,24 +295,39 @@ struct HfTaskCharmHadronsFemtoDream {
326295 charmHadMc = p2.flagMc ();
327296 originType = p2.originMcRec ();
328297 }
329- fillFemtoResult (
298+
299+ rowFemtoResultCharm (
300+ col.globalIndex (),
301+ p2.timeStamp (),
330302 invMass,
331303 p2.pt (),
332- p1.pt (),
304+ p2.eta (),
305+ p2.phi (),
306+ p2.charge (),
333307 p2.bdtBkg (),
334308 p2.bdtPrompt (),
335309 p2.bdtFD (),
336- kstar,
337- FemtoDreamMath::getkT (p1, massOne, p2, massTwo),
338- FemtoDreamMath::getmT (p1, massOne, p2, massTwo),
339- col.multNtr (),
340- col.multV0M (),
341- p2.charge (),
342- pairSign,
343- processType,
344310 charmHadMc,
345311 originType);
346- fillTableTrkInfo (p1);
312+
313+ rowFemtoResultTrk (
314+ col.globalIndex (),
315+ p2.timeStamp (),
316+ p1.pt (),
317+ p1.eta (),
318+ p1.phi (),
319+ chargeTrack,
320+ p1.tpcNClsFound (),
321+ p1.tpcNClsFindable (),
322+ p1.tpcNClsCrossedRows (),
323+ p1.tpcNSigmaPr (),
324+ p1.tofNSigmaPr ());
325+
326+ rowFemtoResultColl (
327+ col.globalIndex (),
328+ p2.timeStamp (),
329+ col.posZ (),
330+ col.multNtr ());
347331
348332 sameEventCont.setPair <isMc, true >(p1, p2, col.multNtr (), col.multV0M (), use4D, extendedPlots, smearingByOrigin);
349333 }
@@ -354,8 +338,6 @@ struct HfTaskCharmHadronsFemtoDream {
354338 {
355339
356340 // Mixed events that contain the pair of interest
357- processType = 2 ; // for mixed event
358-
359341 Partition<CollisionType> PartitionMaskedCol1 = (aod::femtodreamcollision::bitmaskTrackOne & BitMask) == BitMask;
360342 PartitionMaskedCol1.bindTable (cols);
361343
@@ -384,20 +366,6 @@ struct HfTaskCharmHadronsFemtoDream {
384366 continue ;
385367 }
386368
387- float chargeTrack = 0 .;
388- if ((p1.cut () & 2 ) == 2 ) {
389- chargeTrack = PositiveCharge;
390- } else {
391- chargeTrack = NegativeCharge;
392- }
393-
394- int pairSign = 0 ;
395- if (chargeTrack == p2.charge ()) {
396- pairSign = LikeSignPair;
397- } else {
398- pairSign = UnLikeSignPair;
399- }
400-
401369 float kstar = FemtoDreamMath::getkstar (p1, massOne, p2, massTwo);
402370 if (kstar > highkstarCut) {
403371 continue ;
@@ -417,31 +385,6 @@ struct HfTaskCharmHadronsFemtoDream {
417385 continue ;
418386 }
419387
420- int charmHadMc = 0 ;
421- int originType = 0 ;
422- if constexpr (isMc) {
423- charmHadMc = p2.flagMc ();
424- originType = p2.originMcRec ();
425- }
426- fillFemtoResult (
427- invMass,
428- p2.pt (),
429- p1.pt (),
430- p2.bdtBkg (),
431- p2.bdtPrompt (),
432- p2.bdtFD (),
433- kstar,
434- FemtoDreamMath::getkT (p1, massOne, p2, massTwo),
435- FemtoDreamMath::getmT (p1, massOne, p2, massTwo),
436- collision1.multNtr (),
437- collision1.multV0M (),
438- p2.charge (),
439- pairSign,
440- processType,
441- charmHadMc,
442- originType);
443- fillTableTrkInfo (p1);
444-
445388 // if constexpr (!isMc) mixedEventCont.setPair<isMc, true>(p1, p2, collision1.multNtr(), collision1.multV0M(), use4D, extendedPlots, smearingByOrigin);
446389 mixedEventCont.setPair <isMc, true >(p1, p2, collision1.multNtr (), collision1.multV0M (), use4D, extendedPlots, smearingByOrigin);
447390 }
0 commit comments