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,Trigger] Beauty 2nd Vertex in triggers #8895

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

apalasciano
Copy link
Collaborator

Hi @fgrosa , @zhangbiao-phy ,
This is the first draft for reconstructing secondary vertices in triggers.
This PR is for testing the B+(->D0).
Selections (CPA, DecLength, ImpactParameterProduct) are implemented for beauty candidates.

@apalasciano apalasciano marked this pull request as draft December 10, 2024 10:19
@github-actions github-actions bot changed the title [Trigger][PWGHF] Beauty 2nd Vertex in triggers [PWGHF,Trigger] [Trigger][PWGHF] Beauty 2nd Vertex in triggers Dec 10, 2024
@apalasciano apalasciano changed the title [PWGHF,Trigger] [Trigger][PWGHF] Beauty 2nd Vertex in triggers [PWGHF,Trigger] Beauty 2nd Vertex in triggers Dec 10, 2024
@zhangbiao-phy
Copy link
Collaborator

zhangbiao-phy commented Dec 10, 2024

Hi @fgrosa , @zhangbiao-phy , This is the first draft for reconstructing secondary vertices in triggers. This PR is for testing the B+(->D0). Selections (CPA, DecLength, ImpactParameterProduct) are implemented for beauty candidates.

Hi @apalasciano, Thanks a lot for the very important implementation! All looks good to me! let's see if fabrizio has comments or suggestions on this.

Copy link
Collaborator

@fgrosa fgrosa left a comment

Choose a reason for hiding this comment

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

Ciao @apalasciano many thanks!
The main features are there, but I would suggest a few changes (see comments below)


if (activateSecVtx) {
helper.setVtxConfiguration(df2, propagateToPCA, useAbsDCA, useWeightedFinalPCA, maxR, maxDZIni, minParamChange, minRelChi2Change);
helper.setVtxConfiguration(dfB, propagateToPCA, useAbsDCA, useWeightedFinalPCA, maxR, maxDZIni, minParamChange, minRelChi2Change);
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the B vertex we should use useAbsDCA==True always to avoid errors due to the vertex between a pseudotrack (the D) and a track. In general, I would consider to put all the configurations hard-coded (it is very unlikely that we will change them).

Suggested change
helper.setVtxConfiguration(dfB, propagateToPCA, useAbsDCA, useWeightedFinalPCA, maxR, maxDZIni, minParamChange, minRelChi2Change);
helper.setVtxConfiguration(dfB, propagateToPCA, true, useWeightedFinalPCA, maxR, maxDZIni, minParamChange, minRelChi2Change);

@@ -231,6 +260,20 @@ struct HfFilter { // Main struct for HF triggers
for (int iBeautyPart{0}; iBeautyPart < kNBeautyParticles; ++iBeautyPart) {
hMassVsPtB[iBeautyPart] = registry.add<TH2>(Form("fMassVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("#it{M} vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2F, {ptAxis, massAxisB[iBeautyPart]});
}
constexpr int kNBinsHfVtxStages = kNHfVtxStage;
std::string labels[kNBinsHfVtxStages];
labels[HfVtxStage::Skimmed] = "Skimm CharmHad";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
labels[HfVtxStage::Skimmed] = "Skimm CharmHad";
labels[HfVtxStage::Skimmed] = "Skimm CharmHad-Pi pairs";

Comment on lines 176 to 178
std::shared_ptr<TH2> hCpaVsPtB;
std::shared_ptr<TH2> hDecayLengthVsPtB;
std::shared_ptr<TH2> hImpactParamProductVsPtB;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would define these as arrays, as hMassVsPtB to easy the extension to the 3 prongs

Comment on lines 273 to 275
hCpaVsPtB = registry.add<TH2>(Form("fCpaVsPt%s", beautyParticleNames[0].data()), Form("#it{M} vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[0].data()), HistType::kTH2F, {ptAxis, {100, -1, 1}});
hDecayLengthVsPtB = registry.add<TH2>(Form("fDecayLengthVsPt%s", beautyParticleNames[0].data()), Form("#it{M} vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[0].data()), HistType::kTH2F, {ptAxis, {100, 0, 20}});
hImpactParamProductVsPtB = registry.add<TH2>(Form("fImpactParamProductVsPt%s", beautyParticleNames[0].data()), Form("#it{M} vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[0].data()), HistType::kTH2F, {ptAxis, {100, -2.5, +2.5}});
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is convenient to have them as arrays to simplify the extension to charm 3 prongs (see above)

Comment on lines 73 to 79
Configurable<bool> propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"};
Configurable<bool> useAbsDCA{"useAbsDCA", true, "Minimise abs. distance rather than chi2"};
Configurable<bool> useWeightedFinalPCA{"useWeightedFinalPCA", false, "Recalculate vertex position using track covariances, effective only if useAbsDCA is true"};
Configurable<double> maxR{"maxR", 200., "reject PCA's above this radius"};
Configurable<double> maxDZIni{"maxDZIni", 4., "reject (if>0) PCA candidate if tracks DZ exceeds threshold"};
Configurable<double> minParamChange{"minParamChange", 1.e-3, "stop iterations if largest change of any B+ is smaller than this"};
Configurable<double> minRelChi2Change{"minRelChi2Change", 0.9, "stop iterations is chi2/chi2old > this"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would consider to have these hard-coded (unlikely that we will change them)

@@ -76,6 +94,7 @@ struct HfFilter { // Main struct for HF triggers
Configurable<LabeledArray<double>> cutsTrackBeauty4Prong{"cutsTrackBeauty4Prong", {hf_cuts_single_track::cutsTrack[0], hf_cuts_single_track::nBinsPtTrack, hf_cuts_single_track::nCutVarsTrack, hf_cuts_single_track::labelsPtTrack, hf_cuts_single_track::labelsCutVarTrack}, "Single-track selections per pT bin for 4-prong beauty candidates"};
Configurable<std::string> paramCharmMassShape{"paramCharmMassShape", "2023_pass3", "Parametrisation of charm-hadron mass shape (options: 2023_pass3)"};
Configurable<float> numSigmaDeltaMassCharmHad{"numSigmaDeltaMassCharmHad", 2.5, "Number of sigma for charm-hadron delta mass cut in B and D resonance triggers"};
Configurable<LabeledArray<float>> topolCutsBeautyHadron{"topolCutsBeautyHadron", {cutsTopolBeautyHadron[0], 3, kNBeautyParticles, labelsRowsTopolBeauty, labelsColumnsDeltaMassB}, "Cuts on CosPa, DecayLength and ImpactParameterProduct for beauty species"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would make them pT dependent, with very few bins, e.g. 2-3 should be enough (I know that it adds the complication of an extra dimension that we have to handle). A possibility is to add one LabeledArray per variable (2 dimensions, pT and species) or one LabeledArray per species (2 dimensions, pT and variables).
I would then also add the invariant-mass window here (instead of having a pT independent value as it is now, to have the flexibility to enlarge it at high pT)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I implemented something similar to what is done in the standard selectors (your second option).
For every beauty species (for the moment only the B+), a set of cuts will be needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants