23int main(
int argc,
char* argv[])
34 JParser<> zap(
"Example program to histogram longitudinal shower profile.");
43 catch(
const exception &error) {
44 FATAL(error.what() << endl);
52 TH1D h1(
"Probability", NULL, 1000, 0.0, 25.0);
53 TH1D h2(
"Integral", NULL, 1000, 0.0, 25.0);
54 TH1D h3(
"MC", NULL, 100, 0.0, 25.0);
56 for(
int i = 1; i <= h1.GetNbinsX(); ++i) {
58 const double x = h1.GetBinCenter(i);
60 h1.SetBinContent(i, geanz.getProbability(E_GeV, x));
61 h2.SetBinContent(i, geanz.getIntegral (E_GeV, x));
64 if (numberOfEvents != 0) {
66 for (
int i = 0; i != numberOfEvents; ++i) {
68 const double x = gRandom->Rndm();
70 h3.Fill(geanz.getLength(E_GeV, x));
73 convertToPDF(h3,
"NW");
76 const Double_t x = geanz.getMaximum(E_GeV);
77 const Double_t y = geanz.getProbability(E_GeV, x);
81 g1.SetName(
"Maximum");