module windowcalc_mod
        ! Uses
    use Precision_mod
    use Namelist_mod
    use Chambers_mod
    use Det_Geom_mod
    use Tdc_mod
    use Unp_mod
    use Hists_mod
    use Pattern_mod
    use Cluster_mod
    use Pattern_Log_mod
    use Xtalk_mod, ONLY: DC_IsXtalk, PC_IsXtalk
    use windowstat_mod
        ! Subroutines and functions
    public subroutine PrintWindowTypes ()
    public subroutine PrintWinSlideStat ()
    public subroutine CalcWinSlideAvgSig ()
    public subroutine CalcWinStartStop ()
    public subroutine GlobalPlaneMinMaxToCH (restrictplanesmin, restrictplanesmax, minpc, maxpc, mindc, maxdc)
    private subroutine PrintWinCHgaps ()
    public subroutine CalcWinUpDownStat ()
    public subroutine PrintUpDnPCStat ()
    public subroutine PrintWinCHStat ()
end module windowcalc_mod
==============================================================================
 Name: windowcalc_mod
------------------------------------------------------------------------------
 Description:
 [put description here]
==============================================================================
Author: Blair jamieson
Version: 1.1
public subroutine PrintWindowTypes () end subroutine PrintWindowTypes SUBROUTINE PrintWindowTypes ------------------------------------------------------------------ Author: Blair Date: Jan. 2003 Description: This prints the same info that you get about windows when you run photo. (Except I couldn't get the same type of format statement to work -- so its not as pretty?)
public subroutine PrintWinSlideStat () end subroutine PrintWinSlideStat SUBROUTINE PrintWinSlideStat ------------------------------------------------------------------ Author: Blair Date: Jan. 2003 Description: This subroutine prints the per particle track slide statistics. (For both PC and DC planes).
public subroutine CalcWinSlideAvgSig () end subroutine CalcWinSlideAvgSig SUBROUTINE CalcWinSlideAvgSig ------------------------------------------------------------------ Author: Blair Date: Jan. 2003 Description: This subroutine calculates averages and sigmas for the slide statistics type. (Once the slide hit sums and counters have been filled).
public subroutine CalcWinStartStop ()
    ! Calls: GlobalPlaneMinMaxToCH, PrintWinCHgaps
end subroutine CalcWinStartStop
 SUBROUTINE CalcWinStartStop
------------------------------------------------------------------
 Author: Blair
 Date: Jan. 2003
 Description:
 This subroutine uses the plane hits counters to determine start
 and stop plane (global plane numbers).  The results are stored in
 the window stop_type (plane).  Note that this code tries to ignore
 planes that look like they could be cosmics or noise.
public subroutine GlobalPlaneMinMaxToCH (restrictplanesmin, restrictplanesmax, minpc, maxpc, mindc, maxdc)
    integer (kind=i4), INTENT(in) :: restrictplanesmin
    integer (kind=i4), INTENT(in) :: restrictplanesmax
    integer (kind=i4), INTENT(out) :: minpc
    integer (kind=i4), INTENT(out) :: maxpc
    integer (kind=i4), INTENT(out) :: mindc
    integer (kind=i4), INTENT(out) :: maxdc
end subroutine GlobalPlaneMinMaxToCH
private subroutine PrintWinCHgaps () end subroutine PrintWinCHgaps
public subroutine CalcWinUpDownStat () end subroutine CalcWinUpDownStat SUBROUTINE CalcWinUpDownStat ------------------------------------------------------------------ Author: Blair Date: Jan. 2003 Description: This subroutine calculates averages, sigmas and hits per plane for the upstream vs downstream of target statistics. To do this, the per stream counters and sums are used.
public subroutine PrintUpDnPCStat () end subroutine PrintUpDnPCStat
public subroutine PrintWinCHStat () end subroutine PrintWinCHStat SUBROUTINE PrintWinCHStat ------------------------------------------------------------------ Author: Blair Date: Jan. 2003 Description: This subroutine prints the per particle window chamber hit statistics for both PCs and DCs.