-
Notifications
You must be signed in to change notification settings - Fork 529
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
base: master
Are you sure you want to change the base?
Changes from all commits
fcf5cbf
bcb88d4
24b83de
c4b4a37
0421db5
127c897
dfd1f60
1fa7c23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,13 @@ | |
/// | ||
/// \author Federica Zanone <[email protected]>, 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" | ||
|
@@ -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); | ||
|
@@ -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, | ||
|
@@ -184,6 +214,7 @@ DECLARE_SOA_TABLE(HfToXiPiFulls, "AOD", "HFTOXIPIFULL", | |
full::FlagMcMatchRec, full::DebugMcRec, full::OriginRec, full::CollisionMatched); | ||
|
||
DECLARE_SOA_TABLE(HfToXiPiLites, "AOD", "HFTOXIPILITE", | ||
full::CollisionId, | ||
full::XPv, full::YPv, full::ZPv, collision::NumContrib, collision::Chi2, | ||
full::XDecayVtxCharmBaryon, full::YDecayVtxCharmBaryon, full::ZDecayVtxCharmBaryon, | ||
full::XDecayVtxCascade, full::YDecayVtxCascade, full::ZDecayVtxCascade, | ||
|
@@ -218,9 +249,11 @@ struct HfTreeCreatorToXiPi { | |
Produces<o2::aod::HfToXiPiEvs> rowEv; | ||
|
||
Configurable<float> zPvCut{"zPvCut", 10., "Cut on absolute value of primary vertex z coordinate"}; | ||
Configurable<bool> useCentrality{"useCentrality", false, "Decide whether to use centrality information"}; | ||
|
||
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&) | ||
{ | ||
|
@@ -232,13 +265,42 @@ 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; | ||
if (useCentrality) { | ||
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(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need to keep the collision Id? Please note that this doesn't allow you to link it to your event table, since the same collisionId can be found in different original DF, and you loose the info of the original DF in self-contained derived data due to AO2D merging. In fact, the addition of this index implies the error of |
||
candidate.xPv(), | ||
candidate.yPv(), | ||
candidate.zPv(), | ||
|
@@ -356,6 +418,7 @@ struct HfTreeCreatorToXiPi { | |
if (candidate.resultSelections() && candidate.statusPidCharmBaryon() && candidate.statusInvMassLambda() && candidate.statusInvMassCascade() && candidate.statusInvMassCharmBaryon()) { | ||
|
||
rowCandidateLite( | ||
candidate.collisionId(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The addition of this index implies the error of |
||
candidate.xPv(), | ||
candidate.yPv(), | ||
candidate.zPv(), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a configurable, I would templetize the process function in order to have one version that consumes the centrality tables, and another one that doesn't (otherwise regardless the value of this configurable, the user must always add the centrality task since this workflow always consumes the centrality tables)