Skip to content

Commit 1ad5e46

Browse files
committed
fixing bug in the omega selection and clang format
1 parent d44ae08 commit 1ad5e46

File tree

8 files changed

+118
-120
lines changed

8 files changed

+118
-120
lines changed

PWGCF/FemtoDream/Core/femtoDreamCascadeSelection.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,21 @@
2222
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMCASCADESELECTION_H_
2323
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMCASCADESELECTION_H_
2424

25-
#include <iostream>
26-
#include <string>
27-
#include <vector>
28-
29-
#include <TDatabasePDG.h> // FIXME
30-
3125
#include "PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h"
3226
#include "PWGCF/FemtoDream/Core/femtoDreamSelection.h"
3327
#include "PWGCF/FemtoDream/Core/femtoDreamTrackSelection.h"
3428

3529
#include "Common/Core/RecoDecay.h"
30+
3631
#include "Framework/HistogramRegistry.h"
3732
#include "ReconstructionDataFormats/PID.h"
3833

34+
#include <TDatabasePDG.h> // FIXME
35+
36+
#include <iostream>
37+
#include <string>
38+
#include <vector>
39+
3940
using namespace o2::framework;
4041
using namespace o2::analysis::femtoDream::femtoDreamSelection;
4142

@@ -347,8 +348,8 @@ class FemtoDreamCascadeSelection
347348
}; ///< Helper information for the
348349
///< different selections
349350

350-
//static constexpr int kNcutStages = 2;
351-
//static constexpr std::string_view mCutStage[kNcutStages] = {"BeforeSel", "AfterSel"};
351+
// static constexpr int kNcutStages = 2;
352+
// static constexpr std::string_view mCutStage[kNcutStages] = {"BeforeSel", "AfterSel"};
352353
}; // namespace femtoDream
353354

354355
template <o2::aod::femtodreamparticle::ParticleType part, o2::aod::femtodreamparticle::ParticleType daugh, o2::aod::femtodreamparticle::ParticleType bach, typename cutContainerType>
@@ -664,6 +665,8 @@ void FemtoDreamCascadeSelection::fillQA(Col const& col, Casc const& casc, Track
664665
const float cpaCasc = casc.casccosPA(col.posX(), col.posY(), col.posZ());
665666
const float cpav0 = casc.v0cosPA(col.posX(), col.posY(), col.posZ());
666667
const float v0dcatopv = casc.dcav0topv(col.posX(), col.posY(), col.posZ());
668+
const float invMass = isCascOmega ? casc.mOmega() : casc.mXi();
669+
667670
if (mQAHistogramRegistry) {
668671
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hSign"), casc.sign());
669672
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hPt"), casc.pt());
@@ -675,7 +678,7 @@ void FemtoDreamCascadeSelection::fillQA(Col const& col, Casc const& casc, Track
675678
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hDecVtxX"), decVtx.at(0));
676679
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hDecVtxY"), decVtx.at(1));
677680
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hDecVtxZ"), decVtx.at(2));
678-
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hInvMass"), casc.mXi());
681+
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hInvMass"), invMass);
679682
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hV0DCADaugh"), casc.dcaV0daughters());
680683
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hV0CPA"), cpav0);
681684
mQAHistogramRegistry->fill(HIST(o2::aod::femtodreamparticle::ParticleTypeName[part]) + HIST("/") + HIST(mCutStage[cutstage]) + HIST("/hV0TranRad"), casc.v0radius());

PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMPARTICLEHISTO_H_
1919
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMPARTICLEHISTO_H_
2020

21-
#include <TMath.h>
22-
#include <string>
2321
#include "PWGCF/DataModel/FemtoDerived.h"
24-
#include "Framework/HistogramRegistry.h"
22+
2523
#include "CommonConstants/PhysicsConstants.h"
24+
#include "Framework/HistogramRegistry.h"
25+
26+
#include <TMath.h>
27+
28+
#include <string>
2629

2730
using namespace o2::framework;
2831

@@ -690,13 +693,13 @@ class FemtoDreamParticleHisto
690693
}
691694

692695
private:
693-
HistogramRegistry* mHistogramRegistry; ///< For QA output
694-
static constexpr o2::aod::femtodreamparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis
695-
static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below
696+
HistogramRegistry* mHistogramRegistry; ///< For QA output
697+
static constexpr o2::aod::femtodreamparticle::ParticleType mParticleType = particleType; ///< Type of the particle under analysis
698+
static constexpr int mFolderSuffixType = suffixType; ///< Counter for the folder suffix specified below
696699
static constexpr std::string_view mFolderSuffix[12] = {"", "_one", "_two", "_pos", "_neg",
697-
"_allSelected", "_allSelected_pos", "_allSelected_neg", "_bach",
698-
"_two_pos", "_two_neg", "_two_bach"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C)
699-
int mPDG = 0; ///< PDG code of the selected particle
700+
"_allSelected", "_allSelected_pos", "_allSelected_neg", "_bach",
701+
"_two_pos", "_two_neg", "_two_bach"}; ///< Suffix for the folder name in case of analyses of pairs of the same kind (T-T, V-V, C-C)
702+
int mPDG = 0; ///< PDG code of the selected particle
700703
};
701704
} // namespace o2::analysis::femtoDream
702705

PWGCF/FemtoDream/Core/femtoDreamSelection.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMSELECTION_H_
1717
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMSELECTION_H_
1818

19-
#include <cmath>
20-
#include "Framework/HistogramRegistry.h"
2119
#include "PWGCF/DataModel/FemtoDerived.h"
2220

21+
#include "Framework/HistogramRegistry.h"
22+
23+
#include <cmath>
24+
2325
using namespace o2;
2426
using namespace o2::framework;
2527

@@ -35,7 +37,7 @@ enum SelectionType { kUpperLimit, ///< simple upper limit for the value, e.g.
3537
kAbsLowerLimit, ///< lower limit of the absolute value, e.g. |DCA_xyz| > 0.05 cm
3638
kEqual ///< values need to be equal, e.g. sign = 1
3739
};
38-
40+
3941
static constexpr int kNcutStages = 2;
4042
static constexpr std::string_view mCutStage[kNcutStages] = {"BeforeSel", "AfterSel"};
4143

PWGCF/FemtoDream/Core/femtoDreamTrackSelection.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@
1717
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMTRACKSELECTION_H_
1818
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMTRACKSELECTION_H_
1919

20-
#include <string>
21-
#include <vector>
22-
#include <cmath>
23-
#include <iostream>
24-
2520
#include "PWGCF/DataModel/FemtoDerived.h"
26-
#include "Common/DataModel/TrackSelectionTables.h"
27-
#include "Common/DataModel/PIDResponse.h"
28-
#include "Common/DataModel/PIDResponseITS.h"
21+
#include "PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h"
22+
2923
#include "Common/Core/TrackSelection.h"
3024
#include "Common/Core/TrackSelectionDefaults.h"
31-
#include "PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h"
32-
#include "ReconstructionDataFormats/PID.h"
25+
#include "Common/DataModel/PIDResponse.h"
26+
#include "Common/DataModel/PIDResponseITS.h"
27+
#include "Common/DataModel/TrackSelectionTables.h"
28+
3329
#include "Framework/HistogramRegistry.h"
30+
#include "ReconstructionDataFormats/PID.h"
31+
32+
#include <cmath>
33+
#include <iostream>
34+
#include <string>
35+
#include <vector>
3436

3537
using namespace o2::framework;
3638
using namespace o2::analysis::femtoDream::femtoDreamSelection;

PWGCF/FemtoDream/Core/femtoDreamUtils.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMUTILS_H_
1717
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMUTILS_H_
1818

19-
#include <vector>
20-
#include <string>
21-
#include "CommonConstants/PhysicsConstants.h"
2219
#include "PWGCF/DataModel/FemtoDerived.h"
2320

21+
#include "CommonConstants/PhysicsConstants.h"
22+
23+
#include <string>
24+
#include <vector>
25+
2426
namespace o2::analysis::femtoDream
2527
{
2628

@@ -67,7 +69,7 @@ inline float getMass(int pdgCode)
6769
case o2::constants::physics::Pdg::kHelium3:
6870
mass = o2::constants::physics::MassHelium3;
6971
break;
70-
//case o2::constants::physics::Pdg::kOmegaMinus:
72+
// case o2::constants::physics::Pdg::kOmegaMinus:
7173
case kOmegaMinus:
7274
mass = o2::constants::physics::MassOmegaMinus;
7375
break;

PWGCF/FemtoDream/Core/femtoDreamV0Selection.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@
1818
#ifndef PWGCF_FEMTODREAM_CORE_FEMTODREAMV0SELECTION_H_
1919
#define PWGCF_FEMTODREAM_CORE_FEMTODREAMV0SELECTION_H_
2020

21-
#include <iostream>
22-
#include <string>
23-
#include <vector>
24-
2521
#include "PWGCF/FemtoDream/Core/femtoDreamObjectSelection.h"
2622
#include "PWGCF/FemtoDream/Core/femtoDreamSelection.h"
2723
#include "PWGCF/FemtoDream/Core/femtoDreamTrackSelection.h"
2824

2925
#include "Common/Core/RecoDecay.h"
26+
3027
#include "Framework/HistogramRegistry.h"
3128
#include "ReconstructionDataFormats/PID.h"
3229

30+
#include <iostream>
31+
#include <string>
32+
#include <vector>
33+
3334
using namespace o2::framework;
3435
using namespace o2::analysis::femtoDream::femtoDreamSelection;
3536

@@ -298,10 +299,10 @@ void FemtoDreamV0Selection::init(HistogramRegistry* QAregistry, HistogramRegistr
298299
LOG(fatal) << "FemtoDreamV0Cuts: Number of selections to large for your "
299300
"container - quitting!";
300301
}
301-
for (int istage = 0; istage < kNcutStages; istage++){
302+
for (int istage = 0; istage < kNcutStages; istage++) {
302303
std::string folderName =
303-
static_cast<std::string>(o2::aod::femtodreamparticle::ParticleTypeName[part]) + "/" +
304-
static_cast<std::string>(mCutStage[istage]);
304+
static_cast<std::string>(o2::aod::femtodreamparticle::ParticleTypeName[part]) + "/" +
305+
static_cast<std::string>(mCutStage[istage]);
305306
/// \todo initialize histograms for children tracks of v0s
306307
mQAHistogramRegistry->add((folderName + "/hPt").c_str(),
307308
"; #it{p}_{T} (GeV/#it{c}); Entries", kTH1F,

PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ struct femtoDreamProducerTask {
245245
Configurable<std::vector<float>> ConfDaughterPIDnSigmaMax{"ConfDaughterPIDnSigmaMax", std::vector<float>{3.00, 3.00}, "Reso Daughter sel: Max. PID nSigma TPC"}; // 3.0
246246
Configurable<std::vector<int>> ConfDaughterPIDspecies{"ConfDaughterPIDspecies", std::vector<int>{o2::track::PID::Kaon, o2::track::PID::Kaon}, "Reso Daughter sel: Particles species for PID"};
247247
Configurable<std::vector<float>> ConfDaug1Daugh2ResoMass{"ConfDaug1Daugh2ResoMass", std::vector<float>{o2::constants::physics::MassKPlus, o2::constants::physics::MassKMinus, o2::constants::physics::MassPhi}, "Masses: Daughter1 - Daughter2 - Resonance"};
248-
}ConfResoSel;
248+
} ConfResoSel;
249249

250250
/// \todo should we add filter on min value pT/eta of V0 and daughters?
251251
/*Filter v0Filter = (nabs(aod::v0data::x) < V0DecVtxMax.value) &&
@@ -713,7 +713,7 @@ struct femtoDreamProducerTask {
713713
if (!colCuts.isSelectedCollision(col)) {
714714
return;
715715
}
716-
//bool emptyCollision = false;
716+
// bool emptyCollision = false;
717717
if (ConfIsActivateCascade.value) {
718718
if (colCuts.isEmptyCollision(col, tracks, trackCuts) && colCuts.isCollisionWithoutTrkCasc(col, fullCascades, cascadeCuts, tracks)) {
719719
return;
@@ -825,7 +825,7 @@ struct femtoDreamProducerTask {
825825
// const auto dcaXYpos = postrack.dcaXY();
826826
// const auto dcaZpos = postrack.dcaZ();
827827
// const auto dcapos = std::sqrt(pow(dcaXYpos, 2.) + pow(dcaZpos, 2.));
828-
828+
829829
v0Cuts.fillQA<0, aod::femtodreamparticle::ParticleType::kV0, aod::femtodreamparticle::ParticleType::kV0Child>(col, v0, postrack, negtrack);
830830
v0Cuts.fillLambdaQA(col, v0, postrack, negtrack);
831831

@@ -987,6 +987,7 @@ struct femtoDreamProducerTask {
987987
//------
988988

989989
// Fill cascades
990+
float invMassCasc = ConfCascIsSelectedOmega.value() ? casc.mOmega() : casc.mXi();
990991
std::vector<int> indexCascadeChildID = {rowOfPosCascadeTrack, rowOfNegCascadeTrack, rowOfBachelorCascadeTrack};
991992
outputParts(outputCollision.lastIndex(),
992993
casc.pt(),
@@ -997,7 +998,7 @@ struct femtoDreamProducerTask {
997998
0,
998999
casc.casccosPA(col.posX(), col.posY(), col.posZ()),
9991000
indexCascadeChildID,
1000-
casc.mXi(),
1001+
invMassCasc,
10011002
casc.mLambda());
10021003
// TODO: include here MC filling
10031004
//------

0 commit comments

Comments
 (0)