1 #ifndef __JAANET__JVOLUME__
2 #define __JAANET__JVOLUME__
17 namespace JPP {
using namespace JAANET; }
34 const bool Elog10 =
false) :
41 const JHead buffer(head);
113 inline Double_t
getX(
const Double_t
E,
double constrain =
false)
const
115 const double x = (
elog ? log10(E) :
E);
136 inline Double_t
getE(
const Double_t
x,
double constrain =
false)
const
138 const double E = (
elog ?
pow(10.0, x) :
x);
143 }
else if (E >
Emax) {
159 inline Double_t
getW(TAxis* axis,
const Double_t
E)
const
161 const Int_t index = axis->FindBin(
getX(E));
163 const Double_t xmin = axis->GetBinLowEdge(index);
164 const Double_t xmax = axis->GetBinUpEdge (index);
166 const Double_t Wmin =
getW(
getE(xmin));
167 const Double_t Wmax =
getW(
getE(xmax));
169 return Wall / (Wmax - Wmin);
179 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 Emax
Maximal energy [GeV].
Double_t getX(const Double_t E, double constrain=false) const
Get abscissa value.
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.
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.
bool elog
histogram option
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
double Emin
Minimal energy [GeV].
double numberOfSeconds
Live time [s].
double Emin
minimal energy
double Emax
maximal energy