-
Notifications
You must be signed in to change notification settings - Fork 2
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
Creation of hidden photon flux code #72
Conversation
for more information, see https://pre-commit.ci
class TRestAxionSolarHiddenPhotonFlux : public TRestAxionSolarFlux { | ||
private: | ||
/// The hidden photon mass used for calculation | ||
double HiddenPhotonMass; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not need the mass here? It is the method GetRandomEnergyAndRadius
where we define the mass. There should be something inside that method that gets the probability depending on the mass.
Then, inside the processing chain, TRestAxionGeneratorProcess
will chose a given mass, and it will use that method to get a random particle from the sun, with given energy and position in the sun (for a given mass).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been looking at it and instead of having the mass as an argument to all the functions that need it, could we not have it as a member of the class? So for example when GetRandomEnergyAndRadius
is called with double_t mass
as an argument we can then set HiddenPhotonMass = mass
? So that since the flux depends on the mass we wouldn't have to supply mass as an argument to every function that deals with the flux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is possible.
We just need to make sure then that we have this mass inside TRestAxionSolarFlux
and not within TRestAxionQCDSolarFlux
or TRestAxionHiddenPhotonFlux
.
So, we define a TRestAxionSolarFlux::fMass
.
Then, inside the TRestAxionGeneratorProcess
we can call TRestAxionSolarFlux::SetMass(m)
before calling GetRandomEnergyAndRadius
.
TRestAxionGeneratorProcess
will only have access to those methods available to TRestAxionSolarFlux
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, inside TRestAxionSolarFlux
we should add:
Double_t fMass = 0; //!
Double_t GetMass() { return fMass; }
void SetMass(const Double_t &m ){ fMass = m; }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then would we remove the double_t mass
from the other functions and just have them use fMass
? For example in GetTotalFlux(Double_t mass = 0)
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Created 2 new files TRestAxionSolarHiddenPhotonFlux.h and TRestAxionSolarHiddenPhotonFlux.cxx to go with the TRestAxionSolarFlux code.