Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGHF] Add centrality information to Xic0 #9128

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
64 changes: 61 additions & 3 deletions PWGHF/TableProducer/treeCreatorToXiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
///
/// \author Federica Zanone <federica.zanone@cern.ch>, Heidelberg University

#include "CommonConstants/PhysicsConstants.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"

#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/Multiplicity.h"

#include "Common/Core/RecoDecay.h"

#include "PWGHF/DataModel/CandidateReconstructionTables.h"
Expand All @@ -31,9 +35,20 @@ namespace o2::aod
namespace full
{
// collision info
DECLARE_SOA_INDEX_COLUMN(Collision, collision);
DECLARE_SOA_INDEX_COLUMN(McCollision, mcCollision);
DECLARE_SOA_COLUMN(IsEventSel8, isEventSel8, bool);
DECLARE_SOA_COLUMN(IsEventSelZ, isEventSelZ, bool);
DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int);
DECLARE_SOA_COLUMN(CentFT0A, centFT0A, float);
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float);
DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float);
DECLARE_SOA_COLUMN(CentFV0A, centFV0A, float);
DECLARE_SOA_COLUMN(CentFDDM, centFDDM, float);
DECLARE_SOA_COLUMN(MultZeqNTracksPV, multZeqNTracksPV, float);
// from creator
DECLARE_SOA_COLUMN(Cent, cent, float);
DECLARE_SOA_COLUMN(XPv, xPv, float);
DECLARE_SOA_COLUMN(YPv, yPv, float);
DECLARE_SOA_COLUMN(ZPv, zPv, float);
Expand Down Expand Up @@ -147,9 +162,24 @@ DECLARE_SOA_COLUMN(TofNSigmaPrFromLambda, tofNSigmaPrFromLambda, float);
} // namespace full

DECLARE_SOA_TABLE(HfToXiPiEvs, "AOD", "HFTOXIPIEV",
full::IsEventSel8, full::IsEventSelZ);
full::IsEventSel8, full::IsEventSelZ,
full::CollisionId,
full::McCollisionId,
collision::NumContrib,
collision::PosX,
collision::PosY,
collision::PosZ,
full::IsEventReject,
full::RunNumber,
full::CentFT0A,
full::CentFT0C,
full::CentFT0M,
full::CentFV0A,
full::CentFDDM,
full::MultZeqNTracksPV);

DECLARE_SOA_TABLE(HfToXiPiFulls, "AOD", "HFTOXIPIFULL",
full::CollisionId,
full::XPv, full::YPv, full::ZPv, collision::NumContrib, collision::Chi2,
full::XDecayVtxCharmBaryon, full::YDecayVtxCharmBaryon, full::ZDecayVtxCharmBaryon,
full::XDecayVtxCascade, full::YDecayVtxCascade, full::ZDecayVtxCascade,
Expand Down Expand Up @@ -219,8 +249,9 @@ struct HfTreeCreatorToXiPi {

Configurable<float> zPvCut{"zPvCut", 10., "Cut on absolute value of primary vertex z coordinate"};

using Cents = soa::Join<aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFDDMs>;
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels, aod::PVMultZeqs, Cents>;
using MyTrackTable = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra>;
using MyEventTable = soa::Join<aod::Collisions, aod::EvSels>;

void init(InitContext const&)
{
Expand All @@ -232,13 +263,40 @@ struct HfTreeCreatorToXiPi {
template <typename T>
void fillEvent(const T& collision, float cutZPv)
{
rowEv(collision.sel8(), std::abs(collision.posZ()) < cutZPv);
float centFT0A = -1.f;
float centFT0C = -1.f;
float centFT0M = -1.f;
float centFV0A = -1.f;
float centFDDM = -1.f;
centFT0A = collision.centFT0A();
centFT0C = collision.centFT0C();
centFT0M = collision.centFT0M();
centFV0A = collision.centFV0A();
centFDDM = collision.centFDDM();

rowEv(
collision.sel8(), std::abs(collision.posZ()) < cutZPv,
collision.globalIndex(),
-1,
collision.numContrib(),
collision.posX(),
collision.posY(),
collision.posZ(),
0,
1,
centFT0A,
centFT0C,
centFT0M,
centFV0A,
centFDDM,
collision.multZeqNTracksPV());
}

template <typename T>
void fillCandidate(const T& candidate, int8_t flagMc, int8_t debugMc, int8_t originMc, bool collisionMatched)
{
rowCandidateFull(
candidate.collisionId(),
candidate.xPv(),
candidate.yPv(),
candidate.zPv(),
Expand Down
Loading