Skip to content

Commit 7bf6e8c

Browse files
add mixed event, swap custom functions for recodecay
1 parent 9f9c33d commit 7bf6e8c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎PWGLF/TableProducer/Strangeness/doubleOmegaTreeCreator.cxx‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include <TPDGCode.h>
5050

5151
#include <algorithm>
52+
#include <chrono>
5253
#include <array>
5354
#include <chrono>
5455
#include <cmath>
@@ -106,6 +107,36 @@ struct MixingSeed {
106107
BuiltKaonCandidate kaon;
107108
};
108109

110+
struct BuiltKaonCandidate {
111+
o2::track::TrackParCov track;
112+
int64_t trackId = -1;
113+
int8_t sign = 0;
114+
float tpcNSigma = -999.f; // -999 when TPC is unavailable.
115+
float tofNSigma = -999.f; // -999 when TOF is unavailable.
116+
uint32_t detectorMap = 0;
117+
};
118+
119+
// Omega, Lambda and kaon candidates of one collision, built once and paired afterwards.
120+
// Lambdas and kaons are stored per charge of the Omega they can be paired with (see chargeIndex).
121+
struct CollisionCandidates {
122+
std::array<float, 3> primaryVertex{};
123+
std::vector<BuiltOmegaCandidate> omegas;
124+
std::array<std::vector<BuiltLambdaCandidate>, 2> lambdas;
125+
std::array<std::vector<BuiltKaonCandidate>, 2> kaons;
126+
};
127+
128+
// Same-event double-Omega candidate used as a seed of the candidate-level event mixing. Seeds are
129+
// kept in a pool across dataframes, so they store copies of their daughters, with the collision and
130+
// track indices made unique across dataframes (see uniqueIndex).
131+
struct MixingSeed {
132+
int64_t collisionId = -1;
133+
std::array<float, 3> primaryVertex{};
134+
float bz = 0.f;
135+
BuiltOmegaCandidate omega;
136+
BuiltLambdaCandidate lambda;
137+
BuiltKaonCandidate kaon;
138+
};
139+
109140
struct doubleOmegaTreeCreator {
110141
Produces<aod::DoubleOmegaTable> doubleOmegaTable;
111142
Produces<aod::DoubleOmegaTableMC> doubleOmegaTableMC;
@@ -135,6 +166,7 @@ struct doubleOmegaTreeCreator {
135166
std::vector<int64_t> reconstructedDoubleOmegaIds;
136167

137168
Preslice<TracksFullMC> tracksPerCollision = aod::track::collisionId;
169+
Preslice<TracksFull> tracksPerCollisionData = aod::track::collisionId;
138170
Preslice<aod::Cascades> rawCascadesPerCollision = aod::cascade::collisionId;
139171
Preslice<aod::V0s> rawV0sPerCollision = aod::v0::collisionId;
140172
Preslice<aod::DOmegaTracks> derivedTracksPerCollision = aod::domega::dOmegaCollId;

0 commit comments

Comments
 (0)