Chiquita data: iterative fit - March 1

I have added 20 showers formerly classified as chicos to the chiquita data set. I have also used Theresa's temperature-adjusted site information file in the reconstructions. The datafile being used now is chiquita18408.dat. AutoFit4 reported that 18403 showers pass the cut on trms and 3 fail (presumably chicos showers which did now pass when only chiquita sites were considered), and 2 did not qualify as showers because the trigger site was a non-chiquita site.

The method being used here is:
- Call the flux x E^3 at each point C_data = N(logE) E^3/(.46E A(E) T)
- Fit the result to a line: log(C_data) = log(C2)-(gamma-3)log(E)
- This gives an estimated flux J2 = C2 E^-gamma
- J2 can be used to estimate the expected number of data points in each bin: N2 = Int(.46E*A(E0)R(E,E0)J(E0))dE0
- Turn N2 into F*E^3: C'= N2 E^3/(.46E A(E) T)
- Re-estimate J as J_Measured = (C_data/C')C2 E^-gamma

Code used:
- spectrum.C: Reads in Chiquita shower file and makes histograms of data and flux*E^3 for each energy shift.
- iteratefit.C: Turns flux histograms into Log(Flux*E^3) so they can be fit with a line.
- fitfn.C: Takes flux and returns number-per-bin.
- newflux.C: Takes N-per-bin and makes histogram of flux*E^3.
- ratios.C: Gets ratio of C_data to C' and multiplies the points from the best fit line by this ratio.
- getlog2.C: Turns final histograms into Log(Flux*E^3) so they can be fit with a line.
- error.C: Gets the max and min errors.
- drawspec.C: Draws final result on top of other data.

Root files:
- hists.root: Contains R(E,E0) and A(E0)

Chiquita data, and equivalent histograms with the energy shifted by +/- 20%:

The points in the following histogram are C_data(logE):

Fit to the data:

The points above are used to estimate the equivalent number-per-bin:

This histogram is fed back into the same function that was used to estimate the Flux*E^3 from the data. The points on this histogram are C'(E) in the expressions at the top of the page.

The ratio between each pair of points in the above histogram (C_fit=C'):

The estimated flux from the best-fit line (C_2 E^-g) times the ratio of C_data/C'

Chiquita data and error band, with other data:

Aperture from simulations: