Skip to content

PWGHF: Handle ambiguous tracks in B0 candidate creator and get bz from CCDB#2280

Merged
vkucera merged 5 commits into
AliceO2Group:masterfrom
AlexBigO:myBranch
Mar 30, 2023
Merged

PWGHF: Handle ambiguous tracks in B0 candidate creator and get bz from CCDB#2280
vkucera merged 5 commits into
AliceO2Group:masterfrom
AlexBigO:myBranch

Conversation

@AlexBigO

@AlexBigO AlexBigO commented Mar 27, 2023

Copy link
Copy Markdown
Contributor

Hi @fgrosa ! Here is the new structure of the code:

  • Loop over aod::Collision const& collisions
  • Loop over D candidates associated to this collision
  • Repropagate the daughter(s) to this collision if needed
  • Propagate D daughters to D decay vertex and get pVec of these daughters at this vertex (previsouly, I was getting the impulsion of the track0,1,2 and not the pVec values (modified by getPxPyPz).
    Is it better to call getPxPyPz (from trackUtilities.h) or getPxPyPzGlo (from TrackParametrization) ?
  • Loop over tracks associated to this collision
  • Propagate D and Pion candidates to B0 vertex (to get their impulsion at this vertex)
  • Propagate D and Pion candidates to primary vertex to get their imapct parameter

Also, I had two remarks:

  • I don't initializepVec0,1,2 as I update it via getPxPyPz;
  • I define dca0,1,2 but don't initialize it because it is modified by propagateToDCA (when called) and because I don't use the dca of the D daughters anyway.
    If this is okay, I will remove the comments on these lines.

New modifications applied:

  • choose getPxPyPzGlo
  • modify initialization of o2::dataformat::DCA objects for D daughters
  • get bz value from CCDB

@fgrosa fgrosa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AlexBigO! There is only one thing to change (see comments below), for the rest is good for me

auto covMatrixPV = primaryVertex.getCov();

if (ncol % 10000 == 0) {
LOG(info) << ncol << " collisions parsed";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOG(info) << ncol << " collisions parsed";
LOG(debug) << ncol << " collisions parsed";

Filter filterSelectTracks = (!usePionIsGlobalTrackWoDCA) || ((usePionIsGlobalTrackWoDCA) && requireGlobalTrackWoDCAInFilter());
Filter filterSelectCandidates = (aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagD);

using TracksWithSelFiltered = soa::Filtered<TracksWithSel>;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately we cannot filter them because otherwise the lookup of the track index (see auto trackPion = trackId.track_as<TracksWithSelFiltered>();) might fail if the track has been filtered out

std::array<float, 3> pVec2; // = {track2.px(), track2.py(), track2.pz()};

o2::dataformats::DCA dca0;
// dca0.set(track0.dcaXY(), track0.dcaZ());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the initialisation (it will change only if track.collisionId() != thisCollId, otherwise the default one is the good one)

Comment on lines +179 to +181
std::array<float, 3> pVec0; // = {track0.px(), track0.py(), track0.pz()};
std::array<float, 3> pVec1; // = {track1.px(), track1.py(), track1.pz()};
std::array<float, 3> pVec2; // = {track2.px(), track2.py(), track2.pz()};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the initialisation (it will change only if track.collisionId() != thisCollId, otherwise the default one is the good one)


for (const auto& trackId : trackIdsThisCollision) { // start loop over track indices associated to this collision
auto trackPion = trackId.track_as<TracksWithSelFiltered>();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should add the selections that we cannot have in the filter anymore

@AlexBigO AlexBigO marked this pull request as ready for review March 29, 2023 12:27
@AlexBigO AlexBigO changed the title PWGHF: Handle ambiguous tracks in B0 candidate creator PWGHF: Handle ambiguous tracks in B0 candidate creator and get bz from CCDB Mar 29, 2023
@vkucera vkucera merged commit 8de76aa into AliceO2Group:master Mar 30, 2023
hahassan7 pushed a commit to hahassan7/O2Physics that referenced this pull request Apr 3, 2023
…m CCDB (AliceO2Group#2280)

* Change structure: loop over aod::Collisions, over D candidates attached to this collision and over tracks attached to this collision

* Repropagate 3prong daughters to this collision if needed + Apply fixes

* PR comments

* Modify initialization of dca for D daughters

* Get bz from CCDB

---------

Co-authored-by: Alexandre Bigot <abigot@sbgat402.in2p3.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants