Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions PWGCF/DataModel/FemtoDerived.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check failure on line 11 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#ifndef PWGCF_DATAMODEL_FEMTODERIVED_H_
#define PWGCF_DATAMODEL_FEMTODERIVED_H_

Expand Down Expand Up @@ -45,9 +45,9 @@

using BitMaskType = uint32_t; //! Definition of the data type for the collision masks

DECLARE_SOA_COLUMN(BitMaskTrackOne, bitmaskTrackOne, BitMaskType); //! Bit for track one

Check failure on line 48 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(BitMaskTrackTwo, bitmaskTrackTwo, BitMaskType); //! Bit for track two

Check failure on line 49 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(BitMaskTrackThree, bitmaskTrackThree, BitMaskType); //! Bit for track three

Check failure on line 50 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

DECLARE_SOA_COLUMN(Downsample, downsample, bool); //! Flag for downsampling
} // namespace femtodreamcollision
Expand Down Expand Up @@ -81,7 +81,7 @@

namespace mcfdcolllabel
{
DECLARE_SOA_INDEX_COLUMN(FDMCCollision, fdMCCollision); //! MC collision for femtodreamcollision

Check failure on line 84 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
}
DECLARE_SOA_TABLE_STAGED(FDMCCollLabels, "FDMCCollLabel", mcfdcolllabel::FDMCCollisionId);

Expand Down Expand Up @@ -122,13 +122,13 @@

static constexpr std::string_view TrackTypeName[kNTrackTypes] = {"Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types

DECLARE_SOA_INDEX_COLUMN(FDCollision, fdCollision);

Check failure on line 125 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c)
DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi
DECLARE_SOA_COLUMN(PartType, partType, uint8_t); //! Type of the particle, according to femtodreamparticle::ParticleType
DECLARE_SOA_COLUMN(Cut, cut, cutContainerType); //! Bit-wise container for the different selection criteria
DECLARE_SOA_COLUMN(PIDCut, pidcut, cutContainerType); //! Bit-wise container for the different PID selection criteria \todo since bit-masking cannot be done yet with filters we use a second field for the PID

Check failure on line 131 in PWGCF/DataModel/FemtoDerived.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TempFitVar, tempFitVar, float); //! Observable for the template fitting (Track: DCA_xy, V0: CPA)
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Children, children); //! Field for the track indices to remove auto-correlations
DECLARE_SOA_COLUMN(MLambda, mLambda, float); //! The invariant mass of V0 candidate, assuming lambda
Expand Down Expand Up @@ -374,6 +374,9 @@
DECLARE_SOA_TABLE(FDParticlesIndex, "AOD", "FDPARTICLEINDEX", //! Table track index to match associate particle with charm hadron prongs
o2::soa::Index<>,
fdhf::TrackId);
DECLARE_SOA_TABLE(FDTrkTimeStamp, "AOD", "FDHFTRKTIMESTAMP", //! Time Stampe of track associate event
o2::soa::Index<>,
fdhf::TimeStamp);

DECLARE_SOA_TABLE_STAGED(FDParticles, "FDPARTICLE",
o2::soa::Index<>,
Expand Down
5 changes: 4 additions & 1 deletion PWGHF/HFC/TableProducer/femtoDreamProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ struct HfFemtoDreamProducer {
Produces<aod::FDHfCandMC> rowCandMcCharmHad;
Produces<aod::FDHfCandMCGen> rowCandCharmHadGen;
Produces<aod::FDParticlesIndex> outputPartsIndex;
Produces<aod::FDTrkTimeStamp> outputPartsTime;
Produces<aod::FDMCCollisions> outputMcCollision;
Produces<aod::FDMCCollLabels> outputCollsMcLabels;
Produces<aod::FDParticles> outputParts;
Expand Down Expand Up @@ -391,9 +392,11 @@ struct HfFemtoDreamProducer {
trackCuts.fillQA<aod::femtodreamparticle::ParticleType::kTrack, aod::femtodreamparticle::TrackType::kNoChild, true>(track);
// the bit-wise container of the systematic variations is obtained
auto cutContainer = trackCuts.getCutContainer<false, aod::femtodreamparticle::cutContainerType>(track, track.pt(), track.eta(), sqrtf(powf(track.dcaXY(), 2.f) + powf(track.dcaZ(), 2.f)));

auto bc = col.template bc_as<aod::BCsWithTimestamps>();
int64_t timeStamp = bc.timestamp();
// track global index
outputPartsIndex(track.globalIndex());
outputPartsTime(timeStamp);
// now the table is filled

outputParts(outputCollision.lastIndex(),
Expand Down
28 changes: 16 additions & 12 deletions PWGHF/HFC/Tasks/taskCharmHadronsFemtoDream.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct HfTaskCharmHadronsFemtoDream {
using FilteredCharmMcCands = soa::Filtered<soa::Join<aod::FDHfCand, aod::FDHfCandMC>>;
using FilteredCharmMcCand = FilteredCharmMcCands::iterator;

using FilteredColisions = soa::Filtered<soa::Join<FDCollisions, FDColMasks, aod::Collisions>>;
using FilteredColisions = soa::Filtered<soa::Join<FDCollisions, FDColMasks>>;
using FilteredColision = FilteredColisions::iterator;

using FilteredMcColisions = soa::Filtered<soa::Join<aod::FDCollisions, FDColMasks, aod::FDMCCollLabels>>;
Expand All @@ -148,7 +148,7 @@ struct HfTaskCharmHadronsFemtoDream {
using FilteredFDMcParts = soa::Filtered<soa::Join<aod::FDParticles, aod::FDParticlesIndex, aod::FDExtParticles, aod::FDMCLabels, aod::FDExtMCLabels>>;
using FilteredFDMcPart = FilteredFDMcParts::iterator;

using FilteredFDParticles = soa::Filtered<soa::Join<aod::FDParticles, aod::FDExtParticles, aod::FDParticlesIndex>>;
using FilteredFDParticles = soa::Filtered<soa::Join<aod::FDParticles, aod::FDExtParticles, aod::FDParticlesIndex, aod::FDTrkTimeStamp>>;
using FilteredFDParticle = FilteredFDParticles::iterator;

Filter eventMultiplicity = aod::femtodreamcollision::multNtr >= eventSel.multMin && aod::femtodreamcollision::multNtr <= eventSel.multMax;
Expand All @@ -160,7 +160,8 @@ struct HfTaskCharmHadronsFemtoDream {
Filter trackPtFilterLow = ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack), aod::femtodreamparticle::pt < ptTrack1Max, true);
Filter trackPtFilterUp = ifnode(aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack), aod::femtodreamparticle::pt > ptTrack1Min, true);

Preslice<aod::FDParticles> perCol = aod::femtodreamparticle::fdCollisionId;
Preslice<FilteredFDParticles> perCol = aod::femtodreamparticle::fdCollisionId;
Preslice<FilteredCharmCands> perHfByCol = aod::femtodreamparticle::fdCollisionId;

/// Partition for particle 1
Partition<FilteredFDParticles> partitionTrk1 = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kTrack)) && (ncheckbit(aod::femtodreamparticle::cut, cutBitTrack1)) && ifnode(aod::femtodreamparticle::pt * coshEta(aod::femtodreamparticle::eta) <= pidThresTrack1, ncheckbit(aod::femtodreamparticle::pidcut, tpcBitTrack1), ncheckbit(aod::femtodreamparticle::pidcut, tpcTofBitTrack1));
Expand Down Expand Up @@ -477,8 +478,7 @@ struct HfTaskCharmHadronsFemtoDream {
eventHisto.fillQA(col);
auto sliceTrk1 = partitionTrk1->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
auto sliceCharmHad = partitionCharmHadron->sliceByCached(aod::femtodreamparticle::fdCollisionId, col.globalIndex(), cache);
auto bc = col.template bc_as<aod::BCsWithTimestamps>();
int64_t timeStamp = bc.timestamp();
int64_t timeStamp = -999;

/// Filling QA histograms of the all tracks and all charm hadrons before pairing
for (auto const& part : sliceTrk1) {
Expand All @@ -491,7 +491,7 @@ struct HfTaskCharmHadronsFemtoDream {
} else {
chargeTrack = NegativeCharge;
}

timeStamp = part.timeStamp();
rowFemtoResultTrk(
col.globalIndex(),
timeStamp,
Expand All @@ -509,6 +509,8 @@ struct HfTaskCharmHadronsFemtoDream {
for (auto const& part : sliceCharmHad) {
float invMass = getCharmHadronMass(part);
registryCharmHadronQa.fill(HIST("CharmHadronQA/hPtVsMass"), part.pt(), invMass);
timeStamp = part.timeStamp();

rowFemtoResultCharm(
col.globalIndex(),
timeStamp,
Expand All @@ -525,15 +527,17 @@ struct HfTaskCharmHadronsFemtoDream {
part.bdtFD());
}

rowFemtoResultColl(
col.globalIndex(),
timeStamp,
col.posZ(),
col.multNtr());
if (sliceCharmHad.size() || sliceTrk1.size()) {

if ((col.bitmaskTrackOne() & bitMask) != bitMask || (col.bitmaskTrackTwo() & bitMask) != bitMask) {
rowFemtoResultColl(
col.globalIndex(),
timeStamp,
col.posZ(),
col.multNtr());
} else {
return;
}

doSameEvent<false>(sliceTrk1, sliceCharmHad, parts, col);
}
PROCESS_SWITCH(HfTaskCharmHadronsFemtoDream, processSameEvent, "Enable processing same event", false);
Expand Down
Loading