1 #ifndef __JAANET__JVOLUME__
2 #define __JAANET__JVOLUME__
20 namespace JPP {
using namespace JAANET; }
37 const bool Elog10 =
false) :
43 const JHead buffer(head);
115 inline Double_t
getX(
const Double_t
E,
double constrain =
false)
const
117 double x = (
elog ? log10(E) :
E);
138 inline Double_t
getE(
const Double_t
x,
double constrain =
false)
const
140 const double Ex = (
elog ?
pow(10.0, x) :
x);
156 inline Double_t
getW(TAxis* axis,
const Double_t
E)
const
158 const Int_t index = axis->FindBin(
getX(E));
160 const Double_t xmin = axis->GetBinLowEdge(index);
161 const Double_t xmax = axis->GetBinUpEdge (index);
163 const Double_t Wmin =
getW(
getE(xmin));
164 const Double_t Wmax =
getW(
getE(xmax));
166 return Wall / (Wmax - Wmin);
176 inline double getW(
const double E)
const
Double_t getXmin() const
Get minimal abscissa value.
double volume
Volume [m^3].
double alpha
Energy spectrum: .
double numberOfEvents
Number of events.
Double_t getXmax() const
Get maximal abscissa value.
Double_t getX(const Double_t E, double constrain=false) const
Get abscissa value.
JRange_t E
Energy range [GeV].
double Wall
generation volume
double getWall() const
Get generation dependent weight.
double getAlpha() const
Get spectral index of energy distribution.
Auxiliary class for histogramming of effective volume.
JTOOLS::JRange< double > E
Energy range [GeV].
JVolume(const Head &head, const bool Elog10=false)
Constructor.
JAANET::livetime livetime
JVolume & div(const double factor)
Divide weight.
Double_t getW(TAxis *axis, const Double_t E) const
Get bin width corrected energy spectrum dependent weight.
Double_t getE(const Double_t x, double constrain=false) const
Get energy.
T pow(const T &x, const double y)
Power .
JAANET::spectrum spectrum
double alpha
spectral index
JVolume & mul(const double factor)
Multiply weight.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
double getW(const double E) const
Get generation dependent integral value of given energy.
Auxiliary class to define a range between two values.
bool elog
histogram option
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
double numberOfSeconds
Live time [s].