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

Make SetMaterials method from FairRunSim available in FairRunAna as well #1428

Open
mgoncerz opened this issue Jul 12, 2023 · 0 comments
Open
Labels

Comments

@mgoncerz
Copy link

The method FairRunSim::SetMaterials, which allows to set the name of file containing media information, is currently available only if using FairRunSim, but not in FairRunAna. It would be useful to have it there as well, because material information is sometimes necessary even if not running generation step (for example to extract radiation length for multiple scattering correction). This should be coupled with creating an instance of FairGeoLoader (it isn't when using FairRunAna) and doing:

static FairGeoInterface* geoFace = geoLoad->getGeoInterface();
geoFace->setMediaFile(name);
geoFace->readMedia();

somewhere in the code, so that a piece of code like:

media = geoFace->getMedia();
medium = media->getMedium(material name);
medium->getRadiationLength();

can be used directly from a FairTask.

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

No branches or pull requests

2 participants