Using selMC_leg and Error loading Attribute

Hello,

I am interested in using a code snippet from the FCCAnalysis github, the pathway being:

“”"
FCCAnalysis/examples/FCCee/flavour/Bc2TauNu/analysis_B2TauNu_truth.py
“”"

The function I am trying to use utilizes a function called selMC_leg. Trying to run the first stage of analysis with this added gives me an error:

“”"
input_line_119:2:109: error: use of undeclared identifier ‘selMC_leg’
“”"

I have found on other analysis code provided on github that the analyzer required in the header of the file to declare ‘selMC_leg’ is as follows:

“”"
_HNL = ROOT.dummyLoaderFlavour #### Needed to fix undeclared selMC_leg()
“”"

But when I include this to declare selMC_leg I am still getting a message stating that the code ‘failed to get attribute dummyLoaderFlavour from ROOT’. Is there any known fix for this?

Thanks,
Hayden Shaddix

Hello Hayden,

The function you are looking for is here:

look into Bs2JPsiPhi.cc.

The original idea was that the code that is of common usage would go into FCCAnalysis, while code that is more analysis specific would go into FCCeePhysicsPerformance (under “flavour”, in that case).
Instructions to compile FCCeePhysicsPerformance against FCCAnalyses were given in

although I do not know if they still work. Once you have compiled and have your “flavour” library, you should be able to load it as you indicated:

“”"
_HNL = ROOT.dummyLoaderFlavour #### Needed to fix undeclared selMC_leg()
“”"

In case that does not work, you can still pick up the code and dump it in your FCCAnalysis area…

Cheers,
E.

E,

I decided to use your schema for calculating deltaR that you described in a prior post. If I wanted to do the same thing and find the deltaR in the reconstructed case rather than gen level particles, is there a similar way to find the deltaR of the reconstructed muons that pass the resonanceBuilder argument?

Cheers,
Hayden Shaddix

If I wanted to do the same thing and find the deltaR in the reconstructed case rather than gen level particles, is there a similar way to find the deltaR of the reconstructed muons that pass the resonanceBuilder argument?

So, this refers actually to another post that is one year old.
You should be able to use similar commands for RecoParticles. Make use of ReconstructedParticle::sel_charge to select mu+ and mu- from your initial collection of muons, and of ReconstructedParticle::get_tlv to retrieve the 4-vectors. But as in the case of MC particles, to deal with the potential combinatorics, you better do it in some C++ code.

E.