1 #ifndef __JGIZMO__JVOLUME__
2 #define __JGIZMO__JVOLUME__
17 namespace JPP {
using namespace JGIZMO; }
34 const bool Elog10 =
false) :
41 using namespace JAANET;
43 const JHead buffer(head);
115 inline Double_t
getX(
const Double_t E,
double constrain =
false)
const
117 const double x = (
elog ? log10(E) : E);
138 inline Double_t
getE(
const Double_t x,
double constrain =
false)
const
140 const double E = (
elog ? pow(10.0, x) : x);
145 }
else if (E >
Emax) {
161 inline Double_t
getW(TAxis* axis,
const Double_t E)
const
163 const Int_t index = axis->FindBin(
getX(E));
165 const Double_t xmin = axis->GetBinLowEdge(index);
166 const Double_t xmax = axis->GetBinUpEdge (index);
168 const Double_t Wmin =
getW(
getE(xmin));
169 const Double_t Wmax =
getW(
getE(xmax));
171 return Wall / (Wmax - Wmin);
181 inline double getW(
const double E)
const
double getW(const double E) const
Get generation dependent integral value of given energy.
double volume
Volume [m^3].
JVolume & div(const double factor)
Divide weight.
double alpha
Energy spectrum: .
double numberOfEvents
Number of events.
double Emax
Maximal energy [GeV].
Double_t getX(const Double_t E, double constrain=false) const
Get abscissa value.
double alpha
spectral index
Double_t getXmin() const
Get minimal abscissa value.
double getAlpha() const
Get spectral index of energy distribution.
JAANET::livetime livetime
JVolume(const Head &head, const bool Elog10=false)
Constructor.
JAANET::spectrum spectrum
double Emin
minimal energy
double Emax
maximal energy
Double_t getW(TAxis *axis, const Double_t E) const
Get bin width corrected energy spectrum dependent weight.
double Wall
generation volume
bool elog
histogram option
Double_t getE(const Double_t x, double constrain=false) const
Get energy.
double Emin
Minimal energy [GeV].
double numberOfSeconds
Live time [s].
Double_t getXmax() const
Get maximal abscissa value.
bool is_valid(const T &value)
Check validity of given value.
Auxiliary class for histogramming of effective volume.
JVolume & mul(const double factor)
Multiply weight.
double getWall() const
Get generation dependent weight.