# SCTOfflineMonitor

# Introduction

This package is designed as on offline monitor to demonstrate/verify proper functioning of SCT modules by tracking particles through the detector and comparing the hits found to those predicted.
The hit efficiency is measured on a per module level, for both
the barrel and endcap regions.

The code is designed to be versatile enough to be used for commisioning and long term running of the detector.

Be able to read and write results to database

# Unbiased Efficiency Calculation

For a given module:
Eff = #hits Observed / #Hits Expected

For a given track intersecting a given layer/disk:

- Remove hits (if present) from ith disk and refit track
- Apply any track quality cuts
- Extrapolate refitted track to ith disk and find intersection point(Using TrkExtrapolation)
- Is it an active module?
- Is the intersection point m_distcut from edge/bond gap?
- Was there a hit within m_distcut from intersection point? * if yes : EFFICIENT * if no : INEFFICIENT

This prediction becomes the denominator

## Default input parameters

- Input track collection = "SCT_Cosmic_Tracks"
- m_distcut = 1.5 mm
- Fitter = TrkKalmanFitter
- number of sct hits >=8 (i.e. at least 4 space points)

# Unbiased Residual Calculation

This calculation uses the same refitted track sample as for the efficiency calculation.
Plotted is the difference in the local x-coordinate between the intersection point and the removed hit.

- A double gaussian is fitted to the residuals in each module
- A minimum number of events is required before the fit is made to prevent silly fits

## Results

Default parameters are used unless otherwise mentioned

-- HelenHayward - 04 Jul 2006