Skip to content

Commit 8b99c96

Browse files
authored
Femtoworld (#1186)
* Fixing couts and printfs and filling phi candidates tables * fixing clang, small progress with phi producer * Changes to the producer * Phi continuation * Changes to the producer * Phi candidates' histograms filling up properly (but without PID cuts for now) * adding changes requested by victor-gonzalez * Getting rid of the comments * Getting rid of the comments part 2 * Fixing trailing spaces at the end of the line * Added cuts for protons * Invariant mass cuts
1 parent 314844e commit 8b99c96

11 files changed

Lines changed: 238 additions & 384 deletions

PWGCF/FemtoWorld/Core/FemtoWorldCollisionSelection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class FemtoWorldCollisionSelection
6868
/// Print some debug information
6969
void printCuts()
7070
{
71-
std::cout << "Debug information for FemtoWorldCollisionSelection \n Max. z-vertex: " << mZvtxMax << "\n Check trigger: " << mCheckTrigger << "\n Trigger: " << mTrigger << "\n Check offline: " << mCheckOffline << "\n";
71+
LOGF(info, "Debug information for FemtoWorldCollisionSelection \n Max. z-vertex: %f \n Check trigger: %B \n Trigger: %i \n Check offline: %B ", mZvtxMax, mCheckTrigger, mTrigger, mCheckOffline);
7272
}
7373

7474
/// Check whether the collisions fulfills the specified selections

PWGCF/FemtoWorld/Core/FemtoWorldDetaDphiStar.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class FemtoWorldDetaDphiStar
6868
}
6969
}
7070
}
71+
if constexpr (mPartOneType == o2::aod::femtoworldparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtoworldparticle::ParticleType::kPhi) {
72+
}
7173
}
7274
/// Check if pair is close or not
7375
template <typename Part, typename Parts>
@@ -114,6 +116,9 @@ class FemtoWorldDetaDphiStar
114116
}
115117
}
116118
return pass;
119+
} else if constexpr (mPartOneType == o2::aod::femtoworldparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtoworldparticle::ParticleType::kPhi) {
120+
/// Track-Phi combination
121+
return true;
117122
} else {
118123
LOG(fatal) << "FemtoWorldPairCleaner: Combination of objects not defined - quitting!";
119124
return false;

PWGCF/FemtoWorld/Core/FemtoWorldPairCleaner.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ class FemtoWorldPairCleaner
7777
return true;
7878
}
7979
return false;
80-
} else {
80+
} else if constexpr (mPartOneType == o2::aod::femtoworldparticle::ParticleType::kTrack && mPartTwoType == o2::aod::femtoworldparticle::ParticleType::kPhi) {
81+
return true;
82+
}
83+
84+
else {
8185
LOG(fatal) << "FemtoWorldPairCleaner: Combination of objects not defined - quitting!";
8286
return false;
8387
}

PWGCF/FemtoWorld/Core/FemtoWorldParticleHisto.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class FemtoWorldParticleHisto
6464
mHistogramRegistry->add((folderName + "/hCPA").c_str(), "; #it{p}_{T} (GeV/#it{c}); cos#alpha", kTH2F, {{8, 0.3, 4.3}, {1000, 0.9, 1}});
6565
} else if constexpr (mParticleType == o2::aod::femtoworldparticle::ParticleType::kCascade) {
6666
/// Cascade histograms
67+
} else if constexpr (mParticleType == o2::aod::femtoworldparticle::ParticleType::kPhi) {
68+
/// Phi histograms
6769
} else {
6870
LOG(fatal) << "FemtoWorldParticleHisto: Histogramming for requested object not defined - quitting!";
6971
}
@@ -95,6 +97,8 @@ class FemtoWorldParticleHisto
9597
part.pt(), part.tempFitVar());
9698
} else if constexpr (mParticleType == o2::aod::femtoworldparticle::ParticleType::kCascade) {
9799
/// Cascade histograms
100+
} else if constexpr (mParticleType == o2::aod::femtoworldparticle::ParticleType::kPhi) {
101+
/// Phi histograms
98102
} else {
99103
LOG(fatal) << "FemtoWorldParticleHisto: Histogramming for requested object not defined - quitting!";
100104
}

PWGCF/FemtoWorld/Core/FemtoWorldPhiSelection.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include "Framework/HistogramRegistry.h"
2929
#include "TLorentzVector.h"
3030

31-
#include <iostream>
32-
3331
using namespace o2::framework;
3432

3533
namespace o2::analysis::femtoWorld
@@ -387,8 +385,8 @@ bool FemtoWorldPhiSelection::isSelectedMinimal(C const& col, V const& v0, T cons
387385
const auto signPos = posTrack.sign();
388386
const auto signNeg = negTrack.sign();
389387
if (signPos < 0 || signNeg > 0) {
390-
printf("-Something wrong in isSelectedMinimal--\n");
391-
printf("ERROR - Wrong sign for Phi daughters\n");
388+
LOGF(error, "-Something wrong in isSelectedMinimal--\n");
389+
LOGF(error, "ERROR - Wrong sign for Phi daughters\n");
392390
}
393391
const float pT = v0.pt();
394392
const std::vector<float> decVtx = {v0.x(), v0.y(), v0.z()};
@@ -459,8 +457,8 @@ void FemtoWorldPhiSelection::fillPhiQA(C const& col, V const& v0, T const& posTr
459457
const auto signPos = posTrack.sign();
460458
const auto signNeg = negTrack.sign();
461459
if (signPos < 0 || signNeg > 0) {
462-
printf("-Something wrong in isSelectedMinimal--\n");
463-
printf("ERROR - Wrong sign for Phi daughters\n");
460+
LOGF(error, "-Something wrong in isSelectedMinimal--\n");
461+
LOGF(error, "ERROR - Wrong sign for Phi daughters\n");
464462
}
465463
const float pT = v0.pt();
466464
const std::vector<float> decVtx = {v0.x(), v0.y(), v0.z()};
@@ -613,9 +611,6 @@ void FemtoWorldPhiSelection::fillQA(C const& col, V const& v0, T const& posTrack
613611
TLorentzVector sumVec(part1Vec);
614612
sumVec += part2Vec;
615613

616-
//float phiPx = posTrack.px() + negTrack.px();
617-
//float phiPy = posTrack.py() + negTrack.py();
618-
//float phiPz = posTrack.pz() + negTrack.pz();
619614
float phiEta = sumVec.Eta();
620615
float phiPhi = sumVec.Phi();
621616
float phiPt = sumVec.Pt();

PWGCF/FemtoWorld/Core/FemtoWorldV0Selection.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#include "Common/Core/RecoDecay.h"
2828
#include "Framework/HistogramRegistry.h"
2929

30-
#include <iostream>
31-
3230
using namespace o2::framework;
3331

3432
namespace o2::analysis::femtoWorld
@@ -323,8 +321,8 @@ bool FemtoWorldV0Selection::isSelectedMinimal(C const& col, V const& v0, T const
323321
const auto signPos = posTrack.sign();
324322
const auto signNeg = negTrack.sign();
325323
if (signPos < 0 || signNeg > 0) {
326-
printf("-Something wrong in isSelectedMinimal--\n");
327-
printf("ERROR - Wrong sign for V0 daughters\n");
324+
LOGF(error, "-Something wrong in isSelectedMinimal--\n");
325+
LOGF(error, "ERROR - Wrong sign for V0 daughters\n");
328326
}
329327
const float pT = v0.pt();
330328
const std::vector<float> decVtx = {v0.x(), v0.y(), v0.z()};
@@ -395,8 +393,8 @@ void FemtoWorldV0Selection::fillLambdaQA(C const& col, V const& v0, T const& pos
395393
const auto signPos = posTrack.sign();
396394
const auto signNeg = negTrack.sign();
397395
if (signPos < 0 || signNeg > 0) {
398-
printf("-Something wrong in isSelectedMinimal--\n");
399-
printf("ERROR - Wrong sign for V0 daughters\n");
396+
LOGF(error, "-Something wrong in isSelectedMinimal--\n");
397+
LOGF(error, "ERROR - Wrong sign for V0 daughters\n");
400398
}
401399
const float pT = v0.pt();
402400
const std::vector<float> decVtx = {v0.x(), v0.y(), v0.z()};

PWGCF/FemtoWorld/DataModel/FemtoWorldDerived.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ DECLARE_SOA_INDEX_COLUMN(FemtoWorldCollision, femtoWorldCollision);
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
77+
DECLARE_SOA_COLUMN(Mass, mass, int8_t); //! Mass of the particle
7778
DECLARE_SOA_COLUMN(PartType, partType, uint8_t); //! Type of the particle, according to femtoworldparticle::ParticleType
7879
DECLARE_SOA_COLUMN(Cut, cut, cutContainerType); //! Bit-wise container for the different selection criteria
7980
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
@@ -98,11 +99,6 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //! Compute the momentum in z in GeV/c
9899
[](float pt, float eta) -> float {
99100
return pt * std::sinh(eta);
100101
});
101-
DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Compute the overall momentum in GeV/c
102-
[](float pt, float eta) -> float {
103-
return pt * std::cosh(eta);
104-
});
105-
// debug variables
106102
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge
107103
DECLARE_SOA_COLUMN(Beta, beta, float); //! TOF Beta signal
108104
DECLARE_SOA_COLUMN(ITSChi2NCl, itsChi2NCl, float); //! Chi2 / cluster for the ITS track segment
@@ -133,6 +129,8 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS",
133129
femtoworldparticle::Pt,
134130
femtoworldparticle::Eta,
135131
femtoworldparticle::Phi,
132+
track::P,
133+
femtoworldparticle::Mass,
136134
femtoworldparticle::PartType,
137135
femtoworldparticle::Cut,
138136
femtoworldparticle::PIDCut,
@@ -144,7 +142,6 @@ DECLARE_SOA_TABLE(FemtoWorldParticles, "AOD", "FEMTOWORLDPARTS",
144142
femtoworldparticle::Px<femtoworldparticle::Pt, femtoworldparticle::Phi>,
145143
femtoworldparticle::Py<femtoworldparticle::Pt, femtoworldparticle::Phi>,
146144
femtoworldparticle::Pz<femtoworldparticle::Pt, femtoworldparticle::Eta>,
147-
femtoworldparticle::P<femtoworldparticle::Pt, femtoworldparticle::Eta>, // tu koniec poprzedniej wersji
148145
femtoworldparticle::Sign,
149146
pidtofbeta::Beta,
150147
femtoworldparticle::ITSChi2NCl,

0 commit comments

Comments
 (0)