Testing Shower Filter Code - July 11
Re-wrote code that throws simulated showers: simShowers2.cc.This code works as follows:
- Generates a shower (using Brant's shower generator) at a given energy.
- Assumes that each shmoo has approximately a 1/250 chance of being hit
with an accidental during +/- 10 microseconds of t=0. (This corresponds to
a noise rate of 200/sec/shmoo.)
- If a shmoo has an accidental during the shower, the time of the accidental
is randomly selected. (This method of assigning accidentals is faster than
looping through ~10000 intervals of 12.5 ns and randomly assigning accidentals
to them.)
- If the time of the accidental hit is too close to another hit in the
shower, a new time is selected and tested until one is found. (In reality
such coincidences should add to make one large hit, but this should be very
rare.) A veto time of 100 ns/MIP is assumed.
- The shower is printed to the shower file, regardless of whether there
were any hits. (The number of showers thrown is needed to calculate the
aperture.)
- The shower is tested to see if it would pass the Trms cut. (Note: an
error is generated when a shower site only has hits that are above the
charge cutoff. I believe such sites are being ignored in the Trms fit...
this is something to check.) The Trms check is done so that the code can
be set to generate a certain number of "good" showers in every energy bin.
(The number of showers which pass ranges from ~1/100 at the low end to
~1/1 at the high end.) The last aperture was calculated from 1000 "good"
showers in each bin. This would translate to a ~40MB shower file when all
the junk showers are included.
Output is a shower file. This sample has ~10 showers
which pass the Trms cut in each bin, from 10^16.5 to 10^19.3 eV. This shower
file is ready to be run through analysiscut2.
To do: need a formula to describe the energy distribution of the noise hits.
Currently being randomly selected between 0 and 2 MIP.
CTShower Code