Skip to content

Commit d035fb3

Browse files
ariedel-cernAntonRiedelvictor-gonzalez
authored
PWGCF: bug fixes in femtodream (#2735)
* Feat: add |eta| cut to V0s * Feat: add automatice systematic variations to cutculator * Fix: fix debug tasks * Fix: fix naming of femtodream tables For the o2-aod-merger to work on merging derived data generated by the femtodream-producer task the naming of table have to follow the naming conventions of the O2 framework. * Fix: fix order of includes * Fix: fix copyright headers * Revert "Fix: fix copyright headers" This reverts commit 09a0db6. * Fix: fix copyright headers * Fix: use consistent headers * Update FemtoDerived.h Removed data model commented code --------- Co-authored-by: Anton Riedel <anton.riedel@tum.de> Co-authored-by: Victor Gonzalez <victor.gonzalez.sebastian@gmail.com>
1 parent 45de2fa commit d035fb3

24 files changed

Lines changed: 434 additions & 315 deletions

EventFiltering/PWGCF/CFFilterQA.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
1+
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.
22
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
33
// All rights not expressly granted are reserved.
44
//
@@ -151,8 +151,8 @@ using FemtoFullTracks =
151151

152152
struct CFFilterQA {
153153

154-
Produces<aod::FemtoDreamCollisions> outputCollision;
155-
Produces<aod::FemtoDreamParticles> outputParts;
154+
Produces<aod::FDCollisions> outputCollision;
155+
Produces<aod::FDParticles> outputParts;
156156

157157
Service<o2::ccdb::BasicCCDBManager> ccdb;
158158
o2::ccdb::CcdbApi ccdbApi;

PWGCF/DataModel/FemtoDerived.h

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
1+
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.
22
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
33
// All rights not expressly granted are reserved.
44
//
@@ -34,14 +34,14 @@ DECLARE_SOA_COLUMN(MagField, magField, float); //! Magnetic field of the eve
3434

3535
} // namespace femtodreamcollision
3636

37-
DECLARE_SOA_TABLE(FemtoDreamCollisions, "AOD", "FEMTODREAMCOLS",
37+
DECLARE_SOA_TABLE(FDCollisions, "AOD", "FDCOLLISION",
3838
o2::soa::Index<>,
3939
o2::aod::collision::PosZ,
4040
femtodreamcollision::MultV0M,
4141
femtodreamcollision::MultNtr,
4242
femtodreamcollision::Sphericity,
4343
femtodreamcollision::MagField);
44-
using FemtoDreamCollision = FemtoDreamCollisions::iterator;
44+
using FDCollision = FDCollisions::iterator;
4545

4646
/// FemtoDreamTrack
4747
namespace femtodreamparticle
@@ -70,7 +70,7 @@ enum TrackType {
7070

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

73-
DECLARE_SOA_INDEX_COLUMN(FemtoDreamCollision, femtoDreamCollision);
73+
DECLARE_SOA_INDEX_COLUMN(FDCollision, fdCollision);
7474
DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c)
7575
DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta
7676
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi
@@ -120,9 +120,9 @@ DECLARE_SOA_COLUMN(DecayVtxZ, decayVtxZ, float); //! Z position of the decay
120120
DECLARE_SOA_COLUMN(MKaon, mKaon, float); //! The invariant mass of V0 candidate, assuming kaon
121121

122122
} // namespace femtodreamparticle
123-
DECLARE_SOA_TABLE(FemtoDreamParticles, "AOD", "FEMTODREAMPARTS",
123+
DECLARE_SOA_TABLE(FDParticles, "AOD", "FDPARTICLE",
124124
o2::soa::Index<>,
125-
femtodreamparticle::FemtoDreamCollisionId,
125+
femtodreamparticle::FDCollisionId,
126126
femtodreamparticle::Pt,
127127
femtodreamparticle::Eta,
128128
femtodreamparticle::Phi,
@@ -138,9 +138,9 @@ DECLARE_SOA_TABLE(FemtoDreamParticles, "AOD", "FEMTODREAMPARTS",
138138
femtodreamparticle::Py<femtodreamparticle::Pt, femtodreamparticle::Phi>,
139139
femtodreamparticle::Pz<femtodreamparticle::Pt, femtodreamparticle::Eta>,
140140
femtodreamparticle::P<femtodreamparticle::Pt, femtodreamparticle::Eta>);
141-
using FemtoDreamParticle = FemtoDreamParticles::iterator;
141+
using FDParticle = FDParticles::iterator;
142142

143-
DECLARE_SOA_TABLE(FemtoDreamDebugParticles, "AOD", "FEMTODEBUGPARTS",
143+
DECLARE_SOA_TABLE(FDExtParticles, "AOD", "FDEXTPARTICLE",
144144
femtodreamparticle::Sign,
145145
femtodreamparticle::TPCNClsFound,
146146
track::TPCNClsFindable,
@@ -179,7 +179,7 @@ DECLARE_SOA_TABLE(FemtoDreamDebugParticles, "AOD", "FEMTODEBUGPARTS",
179179
pidtof_tiny::TOFNSigmaKa<pidtof_tiny::TOFNSigmaStoreKa>,
180180
pidtof_tiny::TOFNSigmaPr<pidtof_tiny::TOFNSigmaStorePr>,
181181
pidtof_tiny::TOFNSigmaDe<pidtof_tiny::TOFNSigmaStoreDe>);
182-
using FemtoDreamDebugParticle = FemtoDreamDebugParticles::iterator;
182+
using FDFullParticle = FDExtParticles::iterator;
183183

184184
/// FemtoDreamTrackMC
185185
namespace femtodreamMCparticle
@@ -215,34 +215,32 @@ enum MCType {
215215

216216
static constexpr std::string_view MCTypeName[kNMCTypes] = {"", "_MC"};
217217

218-
DECLARE_SOA_INDEX_COLUMN(FemtoDreamCollision, femtoDreamCollision);
219218
DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, uint8_t); //! Origin of the particle, according to femtodreamparticle::ParticleOriginMCTruth
220219
DECLARE_SOA_COLUMN(PDGMCTruth, pdgMCTruth, int); //! Particle PDG
221220

222221
// debug variables
223222
DECLARE_SOA_COLUMN(MotherPDG, motherPDG, int); //! Checks mother PDG, where mother is the primary particle for that decay chain
224223
} // namespace femtodreamMCparticle
225224

226-
DECLARE_SOA_TABLE(FemtoDreamMCParticles, "AOD", "FEMTODREAMMCPS",
225+
DECLARE_SOA_TABLE(FDMCParticles, "AOD", "FDMCPARTICLE",
227226
o2::soa::Index<>,
228227
femtodreamMCparticle::PartOriginMCTruth,
229228
femtodreamMCparticle::PDGMCTruth,
230229
femtodreamparticle::Pt,
231230
femtodreamparticle::Eta,
232231
femtodreamparticle::Phi);
233-
using FemtoDreamMCParticle = FemtoDreamMCParticles::iterator;
232+
using FDMCParticle = FDMCParticles::iterator;
234233

235-
DECLARE_SOA_TABLE(FemtoDreamDebugMCParticles, "AOD", "FEMTODEBUGMCP",
234+
DECLARE_SOA_TABLE(FDExtMCParticles, "AOD", "FDEXTMCPARTICLE",
236235
femtodreamMCparticle::MotherPDG);
237-
using FemtoDreamDebugMCParticle = FemtoDreamDebugMCParticles::iterator;
236+
using FDExtMCParticle = FDExtMCParticles::iterator;
238237

239238
namespace mcfdlabel
240239
{
241-
DECLARE_SOA_INDEX_COLUMN(FemtoDreamMCParticle, femtoDreamMCParticle); //! MC particle for femtodreamparticle
240+
DECLARE_SOA_INDEX_COLUMN(FDMCParticle, fdMCParticle); //! MC particle for femtodreamparticle
242241
} // namespace mcfdlabel
243-
DECLARE_SOA_TABLE(FemtoDreamMCLabels, "AOD", "FEMTOMCLABELS", //! Table joinable to FemtoDreamParticle containing the MC labels
244-
mcfdlabel::FemtoDreamMCParticleId);
245-
using FemtoDreamMCLabel = FemtoDreamMCLabels::iterator;
242+
DECLARE_SOA_TABLE(FDMCLabels, "AOD", "FDMCLabel", //! Table joinable to FemtoDreamParticle containing the MC labels
243+
mcfdlabel::FDMCParticleId);
246244

247245
/// Hash
248246
namespace hash

PWGCF/FemtoDream/FemtoDreamCollisionSelection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
1+
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.
22
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
33
// All rights not expressly granted are reserved.
44
//

PWGCF/FemtoDream/FemtoDreamContainer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
1+
// Copyright 2019-2022 CERN and copyright holders of ALICE O2.
22
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
33
// All rights not expressly granted are reserved.
44
//
@@ -217,15 +217,15 @@ class FemtoDreamContainer
217217
setPair_base<o2::aod::femtodreamMCparticle::MCType::kRecon>(femtoObs, mT, part1, part2, mult, use3dplots);
218218

219219
if constexpr (isMC) {
220-
if (part1.has_femtoDreamMCParticle() && part2.has_femtoDreamMCParticle()) {
220+
if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) {
221221
// calculate the femto observable and the mT with MC truth information
222222
if constexpr (mFemtoObs == femtoDreamContainer::Observable::kstar) {
223-
femtoObsMC = FemtoDreamMath::getkstar(part1.femtoDreamMCParticle(), mMassOne, part2.femtoDreamMCParticle(), mMassTwo);
223+
femtoObsMC = FemtoDreamMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
224224
}
225-
const float mTMC = FemtoDreamMath::getmT(part1.femtoDreamMCParticle(), mMassOne, part2.femtoDreamMCParticle(), mMassTwo);
225+
const float mTMC = FemtoDreamMath::getmT(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
226226

227-
if (abs(part1.femtoDreamMCParticle().pdgMCTruth()) == mPDGOne && abs(part2.femtoDreamMCParticle().pdgMCTruth()) == mPDGTwo) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates
228-
setPair_base<o2::aod::femtodreamMCparticle::MCType::kTruth>(femtoObsMC, mTMC, part1.femtoDreamMCParticle(), part2.femtoDreamMCParticle(), mult, use3dplots);
227+
if (abs(part1.fdMCParticle().pdgMCTruth()) == mPDGOne && abs(part2.fdMCParticle().pdgMCTruth()) == mPDGTwo) { // Note: all pair-histogramms are filled with MC truth information ONLY in case of non-fake candidates
228+
setPair_base<o2::aod::femtodreamMCparticle::MCType::kTruth>(femtoObsMC, mTMC, part1.fdMCParticle(), part2.fdMCParticle(), mult, use3dplots);
229229
setPair_MC(femtoObsMC, femtoObs, mT, mult);
230230
} else {
231231
mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtodreamMCparticle::MCTypeName[o2::aod::femtodreamMCparticle::MCType::kTruth]) + HIST("/hFakePairsCounter"), 0);

0 commit comments

Comments
 (0)