email from sylvie.braibant@cern.ch
Dear Clement,
I would like to ask you some advice.
Please be patient and indulgent with me !
I thought about a solution to make a requirement
on the charge of a resonance. I would like to
submit it to you to see if it is the best way to do it.
We are using the
FCCAnalyses/examples/FCCee/higgs/mH-recoil/mumu
I would like to introduce some selection requiring that the 2 muons
reconstructing the Z resonance be of opposite charge.
I saw in that the resonanceBuilder builds resonances from 2 particles from
an arbitrary list of input ReconstructedPartilces, keeping the mass the closest possible
to the mass given as input.
In our case, the list is the “selected muons” with pt > 10 GeV and the input mass
is 91.
In the resonanceBuilder I do not see any requirement on the charge.
The resonance charge is the sum of the charge of the 2 input particles.
reso.charge += legs[i].charge;
I thought that I could add in analysis.py
# write branch with zed charge
.Define("zed_leptonic_charge", "ReconstructedParticle::get_charge(zed_leptonic)”)
and add the branch
“zed_leptonic_charge”
in the branchlist
Then add in finalSel.py
…. && zed_leptonic_charge[0] == 0
Would that work ?
Thanks a lot in advance.
Sylvie
Dear Sylvie,
ReconstructedParticle::resonanceBuilder::resonanceBuilder
returns a
ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>
with only 1 element (the closest in mass)
so yes, what you suggest will return the charge of the resonance.
If you want to keep all the candidates in the vector, we could possibly change the function with adding a flag that returns only the closest to mass if true. You could maybe suggest the change in a Pull Request?
Cheers,
Clement
1 Like
Dear Clement,
I did try to implement the charge selection for the zed.
I first defined it in analysis.py
.Define(“zed_leptonic_charge”, “ReconstructedParticle::get_charge(zed_leptonic)”)
Then I tried to used it in my selction:
But zed_leptonic_charge[0]) seems to contain some strange numebers.
I am wondering what I am overlooking.
Can you help me with this ?
Thank you in advance.
Sylvie
Dear @braibant ,
how crazy? could you please paste some values?
the code seems ok thought.
Clement
Can I share the root file ?
S.
sure! if too large put in on lxplus.
alight, I see. I think you will only see those values when there is no Z candidate reconstructed.
The root file is on lxplus:
/afs/cern.ch/user/s/sylvieb/public/p8_ee_ZH_ecm240.root
Thanks again.
But if you look at the zed_leptonic_m, I find that there is at least one Z:
“sel2”:"zed_leptonic_m.size() == 1 && zed_leptonic_m[0] > 80 && zed_leptonic_m[0] < 100 && zed_leptonic_charge[0]) == 0 "
It is just that no event have zed_leptonic_charge[0]) == 0
yes, I see now, I’m scanning the file and indeed this is not ok.
I’ll need to run some test, sorry for that
root [4] events->Scan("zed_leptonic_m:zed_leptonic_charge")
***********************************************
* Row * Instance * zed_lepto * zed_lepto *
***********************************************
* 0 * 0 * * *
* 1 * 0 * * *
* 2 * 0 * * *
* 3 * 0 * * *
* 4 * 0 * * *
* 5 * 0 * * *
* 6 * 0 * 90.099395 * -1.62e+16 *
* 7 * 0 * * *
* 8 * 0 * * *
* 9 * 0 * * *
* 10 * 0 * * *
* 11 * 0 * * *
* 12 * 0 * * *
* 13 * 0 * * *
* 14 * 0 * * *
* 15 * 0 * * *
* 16 * 0 * 93.081085 * -1.62e+16 *
* 17 * 0 * * *
* 18 * 0 * * *
* 19 * 0 * * *
* 20 * 0 * * *
* 21 * 0 * * *
* 22 * 0 * * *
* 23 * 0 * * *
* 24 * 0 * * *
Thanks Clement.
No problem. It might be that I am not implementing the think correctly.
I will copy the python analysis and Finalselection on lxplus.
I am happy to help in testing the software.
I have tried it myself, and I can not see the issue, values are all sensible.
Command I ran:
python examples/FCCee/higgs/mH-recoil/mumu/analysis.py /eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_ZH_ecm240/events_103680377.root
Please the output file and the analysis.py
here
/afs/cern.ch/user/h/helsens/public/4Sylvie
Please tell me if you can spot a difference with what you are doing
One more thing: I did it last week and it worked.
So something changed in the meantime.
I got these errors:
==> Error: acts@5.0.0 arch=linux-centos7-x86_64 matches multiple packages.
Matching packages:
qitzkoq acts@5.00.0%gcc@8.3.0 arch=linux-centos7-x86_64
2kkxcgk acts@5.00.0%gcc@8.3.0 arch=linux-centos7-x86_64
qbk32kd acts@5.0.0%gcc@8.3.0 arch=linux-centos7-x86_64
Use a more specific spec.
==> Error: py-pyyaml matches multiple packages.
Matching packages:
apzu43i py-pyyaml@5.3.1%gcc@8.3.0 arch=linux-centos7-broadwell
tlppmrp py-pyyaml@5.3.1%gcc@8.3.0 arch=linux-centos7-broadwell
z5d3xbw py-pyyaml@5.3.1%gcc@8.3.0 arch=linux-centos7-x
But I understood from the forum that they could be ignored.
I did a diff between the 2 python and there is basically no difference between the 2 analysis.py
I will check better tomorrow.
Sylvie
I know what I did wrong.
I am very absent-minded and I probably did
source ./init.sh
instead of
soource ./setup.sh
(which I only did after the creation of the ntuple).
The effect was strange but I just did a test on 10000 events and it works again.
Sorry about that.
Sylvie.