31int main(
int argc,
char* argv[])
42 JParser<> zap(
"Example program to histogram shower energy.");
50 catch(
const exception &error) {
57 TH2* h0 =
new TH2D(
"total",
NULL, 24, 2.0, 10.0, 20, -5.0, 0.0);
58 TH2* h2 = (
TH2*) h0->Clone(
"h2");
60 NOTICE(
"Setting up radiation tables... " << flush);
68 const JRadiation oxygen (JSeaWater::O .Z, JSeaWater::O .A, 40, 0.01, 0.1, 0.1);
70 const JRadiation sodium (JSeaWater::Na.Z, JSeaWater::Na.A, 40, 0.01, 0.1, 0.1);
94 for (
int i = 1; i <= h0->GetXaxis()->
GetNbins(); ++i) {
96 const double x = h0->GetXaxis()->GetBinCenter(i);
97 const double E = pow(10.0, x);
106 const double li = p->first->getInverseInteractionLength(E);
107 const double Es = p->first->getEnergyOfShower(E);
110 p->second->Fill(x, y, W);
112 h2->Fill(x, y,
li * W);