added check plots and modified binning #1059
Conversation
mfaggin
left a comment
There was a problem hiding this comment.
Thank you Rosario, just a few comments to be sure I understood your changes. Thank you.
| // non uniform pt binning | ||
| std::vector<double> ptBinning = {0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0}; | ||
| // | ||
| AxisSpec axisPDG{pdgBins, 0, pdgBins + 1.000, "pdgclass"}; |
There was a problem hiding this comment.
is there a reason for a double here? Can't it be an integer like pdgBins + 1?
| itr_pdg = std::find(pdgChoice.begin(), pdgChoice.end(), tpPDGCode); | ||
| if (itr_pdg != pdgChoice.cend()) | ||
| // index from zero, so increase by 1 to put in the right bin (and 0.5 not needed but just not to sit in the edge) | ||
| pdg_fill = (float)std::distance(pdgChoice.begin(), itr_pdg) + 1.5; |
There was a problem hiding this comment.
confirm me if I get properly: here the logic is that you want to keep 0 for unmatched tracks (i.e. fakes) and then above 1 a species per bin, depenging on how many of the pdgChoice one you decide to keep at runtime with pdgBins. Am I right?
| } // end pions only | ||
| // | ||
| // no primary/sec-d pions | ||
| if (!((tpPDGCode == 211) && (mcpart.isPhysicalPrimary()))) { |
There was a problem hiding this comment.
here you are requiring that the particle is a Physical Primary, but not a pion. Is it the combination you want?
| // index from zero, so increase by 1 to put in the right bin (and 0.5 not needed but just not to sit in the edge) | ||
| pdg_fill = (float)std::distance(pdgChoice.begin(), itr_pdg) + 1.5; | ||
| else | ||
| pdg_fill = -10.0; |
There was a problem hiding this comment.
This -10.0 goes in the underflow, so if I understand properly:
- with 0 you keep flag fake tracks
- with -10 those with a MC particle that is not in the bunch of those you decided to check.
Is it correct?
|
On 7/26/2022 10:06 PM, Mattia Faggin wrote:
***@***.**** commented on this pull request.
Thank you Rosario, just a few comments to be sure I understood your
changes. Thank you.
------------------------------------------------------------------------
In DPG/Tasks/qaMatchEff.cxx
<#1059 (comment)>:
> // histo axes
//
// non uniform pt binning
std::vector<double> ptBinning = {0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0};
+ //
+ AxisSpec axisPDG{pdgBins, 0, pdgBins + 1.000, "pdgclass"};
is there a reason for a |double| here? Can't it be an integer like
|pdgBins + 1|?
right, copy-pasted, not caring that much about space for the moment
------------------------------------------------------------------------
In DPG/Tasks/qaMatchEff.cxx
<#1059 (comment)>:
> @@ -420,8 +478,32 @@ struct qaMatchEff {
//
} // end pions only
//
+ // no primary/sec-d pions
+ if (!((tpPDGCode == 211) && (mcpart.isPhysicalPrimary()))) {
+ // gets the pdg code and finds its index in our vector
+ itr_pdg = std::find(pdgChoice.begin(), pdgChoice.end(), tpPDGCode);
+ if (itr_pdg != pdgChoice.cend())
+ // index from zero, so increase by 1 to put in the right bin (and 0.5 not needed but just not to sit in the edge)
+ pdg_fill = (float)std::distance(pdgChoice.begin(), itr_pdg) + 1.5;
confirm me if I get properly: here the logic is that you want to keep
|0| for unmatched tracks (i.e. fakes) and then above 1 a species per
bin, depenging on how many of the |pdgChoice| one you decide to keep
at runtime with pdgBins. Am I right?
here I get the pdgcode of all what is not primary pions, the
''complication'' is to assign sequential integers to the pdg codes in
order to easily fill the histogram,
what has not code is thrown in the underflow.
------------------------------------------------------------------------
In DPG/Tasks/qaMatchEff.cxx
<#1059 (comment)>:
> @@ -420,8 +478,32 @@ struct qaMatchEff {
//
} // end pions only
//
+ // no primary/sec-d pions
+ if (!((tpPDGCode == 211) && (mcpart.isPhysicalPrimary()))) {
here you are requiring that the particle is a Physical Primary, but
not a pion. Is it the combination you want?
no, I put ! in front of (is a pion AND is a primary) so all the tracks
which are not primary pions are considered...I hope...
so pions which are not primary and tracks which are not pions are taken,
because I think there is a strange behaviour in this category...
Better choices can be done, but I prefer to do it after I (hopefully)
learn something from this plot.
And the comment is wrong, I'll change at next commit.
------------------------------------------------------------------------
In DPG/Tasks/qaMatchEff.cxx
<#1059 (comment)>:
> @@ -420,8 +478,32 @@ struct qaMatchEff {
//
} // end pions only
//
+ // no primary/sec-d pions
+ if (!((tpPDGCode == 211) && (mcpart.isPhysicalPrimary()))) {
+ // gets the pdg code and finds its index in our vector
+ itr_pdg = std::find(pdgChoice.begin(), pdgChoice.end(), tpPDGCode);
+ if (itr_pdg != pdgChoice.cend())
+ // index from zero, so increase by 1 to put in the right bin (and 0.5 not needed but just not to sit in the edge)
+ pdg_fill = (float)std::distance(pdgChoice.begin(), itr_pdg) + 1.5;
+ else
+ pdg_fill = -10.0;
This |-10.0| goes in the underflow, so if I understand properly:
* with 0 you keep flag fake tracks
* with -10 those with a MC particle that is not in the bunch of
those you decided to check.
Is it correct?
if the search does not hit the end of the vector, you get back the index
corresponding to the pdg code, otherwise goes in the underflow. High numbers
are not considered yet because it is unlike statistics is significant
Cheers!
—
Reply to this email directly, view it on GitHub
<#1059 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASLN4P5MXIU6V7KN6VHVCTLVWBAMRANCNFSM54W5WLAQ>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Rosario Turrisi
*** INFN - Padova ***
*** ALICE & EIC Experiment ***
Tel.: +390499677373
Fax: +390498275961
"Il faut décider si on veut être César à Rome
ou un rêveur au milieu du désert"
Marguerite Yourcenar
|
|
thanks @rosarioturrisi for the clarifications |
|
@TimoWilken I do not know if you are the right person to solve the issue we have here, but in case can you have a look or redirect it to the right person? Thank you. |
tagging also @jgrosseo for completeness |
Pull request was closed
|
changes addressed in PR #1063 |
No description provided.