* The count tracker records all the counts inside a pre-defined box in a 10s window around every GraceDB upload done by Mario
* The box is defined by SNR > 6 and chisq/SNRsq < 0.04
* The FAR threshold for Mario was set to 1/hour (not sure, can someone confirm?)
* Counts can only be stored after burn-in
* Mario has 921 SVD bins
## Procedure
* Started by making a list of all the dist_stats files that had a non-zero count tracker (282 such bins)
* Made background plots for all of them and checked for signal contamination (142 such bins)
* The list of contaminated bins can be found here: /home/prathamesh.joshi/lr_background_estimation/MDC04/try2/contaminated_bins, with the background plots for those bins located [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/check/)
* Most of this contamination was pretty minor, possibly not even caused by signals
* Observed that contamination was very frequently spread across multiple neighboring bins (for example, bins 0808 - 0820 in L1)
* Removed count from 9 events while the analysis was running
* Wait for 4 hours for the next snapshot, and then create the background plots again
* They can be found [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/convert/)
## Results
* All the major contamination was effectively removed
* Examples are [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/convert/L1/0818.png) and [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/convert/L1/0834.png) as well as around 10 bins around them.
* Minor contaminations were mostly not removed
* Example is [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/convert/L1/0215.png)
## Removing all counts
* For each dist_stats file, removed counts from all the times stored in its count tracker. (The Mario files were not changed for this)
* The background plots can be found [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/remove_all/)
* Slightly more effective at removing minor contamination (example [here](https://ldas-jobs.ligo.caltech.edu/~prathamesh.joshi/bg_count_tracker/MDC04/try2/remove_all/L1/0303.png))
* However, apart from contamination removal, no bins were affected by this, so it seems to be a safe thing to do
## Discussion
* Minor contamination was not effectively removed, probably due to a high FAR thresold
* In an analysis with FAR threshold of 1/10min, minor contamination was much more effectively removed