+---------+---------+---+-----+----------------+-----------------------+
|         |         |   |     |                |                       |
| !       |         |   |     |                |                       |
| [](medi |         |   |     |                |                       |
| a/image |         |   |     |                |                       |
| 1.wmf){ |         |   |     |                |                       |
| width=" |         |   |     |                |                       |
| 1.08472 |         |   |     |                |                       |
| 2222222 |         |   |     |                |                       |
| 2221in" |         |   |     |                |                       |
| he      |         |   |     |                |                       |
| ight="1 |         |   |     |                |                       |
| .088194 |         |   |     |                |                       |
| 4444444 |         |   |     |                |                       |
| 445in"} |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| Fun     |         |   |     |                |                       |
| ctional |         |   |     |                |                       |
| Requi   |         |   |     |                |                       |
| rements |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| The     |         |   |     |                |                       |
| Wire    |         |   |     |                |                       |
| Scanner |         |   |     |                |                       |
| Appl    |         |   |     |                |                       |
| ication |         |   |     |                |                       |
| REqui   |         |   |     |                |                       |
| rements |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| A       |         |   |     |                |                       |
| bstract |         |   |     |                |                       |
|         |         |   |     |                |                       |
| The     |         |   |     |                |                       |
| r       |         |   |     |                |                       |
| equired |         |   |     |                |                       |
| e       |         |   |     |                |                       |
| lements |         |   |     |                |                       |
| for the |         |   |     |                |                       |
| Wire    |         |   |     |                |                       |
| Scanner |         |   |     |                |                       |
| S       |         |   |     |                |                       |
| oftware |         |   |     |                |                       |
| Appl    |         |   |     |                |                       |
| ication |         |   |     |                |                       |
| are     |         |   |     |                |                       |
| listed, |         |   |     |                |                       |
| de      |         |   |     |                |                       |
| scribed |         |   |     |                |                       |
| and     |         |   |     |                |                       |
| ex      |         |   |     |                |                       |
| plained |         |   |     |                |                       |
| here.   |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| P       |         |   | C   |                | Approved by:          |
| repared |         |   | hec |                |                       |
| by :    |         |   | ked |                | R. Bailey, AB/OP      |
|         |         |   | by  |                |                       |
| E.      |         |   | :   |                | R. Jones, AB/BI       |
| M       |         |   |     |                |                       |
| cCrory, |         |   | R.  |                | H. Schmickler, AB/CO  |
| F       |         |   | Al  |                |                       |
| ermilab |         |   | ema |                |                       |
|         |         |   | ny, |                |                       |
| D.      |         |   | AB  |                |                       |
| Ni      |         |   | /CO |                |                       |
| cklaus, |         |   |     |                |                       |
| F       |         |   | G.  |                |                       |
| ermilab |         |   | Ar  |                |                       |
|         |         |   | dui |                |                       |
| M.      |         |   | ni, |                |                       |
| Lamont  |         |   | AB/ |                |                       |
| AB/OP   |         |   | ABP |                |                       |
|         |         |   |     |                |                       |
|         |         |   | G.  |                |                       |
|         |         |   | C   |                |                       |
|         |         |   | roc |                |                       |
|         |         |   | kfo |                |                       |
|         |         |   | rd, |                |                       |
|         |         |   | AB  |                |                       |
|         |         |   | /OP |                |                       |
|         |         |   |     |                |                       |
|         |         |   | J   |                |                       |
|         |         |   | -J. |                |                       |
|         |         |   | Gr  |                |                       |
|         |         |   | as, |                |                       |
|         |         |   | AB  |                |                       |
|         |         |   | /BI |                |                       |
|         |         |   |     |                |                       |
|         |         |   | M.  |                |                       |
|         |         |   | Gia |                |                       |
|         |         |   | van |                |                       |
|         |         |   | noz |                |                       |
|         |         |   | zi, |                |                       |
|         |         |   | AB/ |                |                       |
|         |         |   | ABP |                |                       |
|         |         |   |     |                |                       |
|         |         |   | S.  |                |                       |
|         |         |   | G   |                |                       |
|         |         |   | ila |                |                       |
|         |         |   | rdo |                |                       |
|         |         |   | ni, |                |                       |
|         |         |   | AB/ |                |                       |
|         |         |   | ABP |                |                       |
|         |         |   |     |                |                       |
|         |         |   | H.  |                |                       |
|         |         |   | Sc  |                |                       |
|         |         |   | hmi |                |                       |
|         |         |   | ckl |                |                       |
|         |         |   | er, |                |                       |
|         |         |   | AB  |                |                       |
|         |         |   | /CO |                |                       |
|         |         |   |     |                |                       |
|         |         |   | J.  |                |                       |
|         |         |   | W   |                |                       |
|         |         |   | enn |                |                       |
|         |         |   | ing |                |                       |
|         |         |   | er, |                |                       |
|         |         |   | AB  |                |                       |
|         |         |   | /OP |                |                       |
|         |         |   |     |                |                       |
|         |         |   | T.  |                |                       |
|         |         |   | B   |                |                       |
|         |         |   | ols |                |                       |
|         |         |   | hak |                |                       |
|         |         |   | ov, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
|         |         |   |     |                |                       |
|         |         |   | S.  |                |                       |
|         |         |   | Gys |                |                       |
|         |         |   | in, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
|         |         |   |     |                |                       |
|         |         |   | D.  |                |                       |
|         |         |   | McG |                |                       |
|         |         |   | inn |                |                       |
|         |         |   | is, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
|         |         |   |     |                |                       |
|         |         |   | J.  |                |                       |
|         |         |   | Pa  |                |                       |
|         |         |   | tri |                |                       |
|         |         |   | ck, |                |                       |
|         |         |   | Fe  |                |                       |
|         |         |   | rmi |                |                       |
|         |         |   | lab |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
|         |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| History |         |   |     |                |                       |
| of      |         |   |     |                |                       |
| Changes |         |   |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| Rev.    | Date    | P |     | Description of |                       |
| No.     |         | a |     | Changes        |                       |
|         |         | g |     |                |                       |
|         |         | e |     |                |                       |
|         |         | s |     |                |                       |
+---------+---------+---+-----+----------------+-----------------------+
| 0.1     | 200     | 9 |     | First draft    |                       |
|         | 7-04-17 |   |     |                |                       |
|         |         | 1 |     | Second draft   |                       |
|         | 200     | 0 |     |                |                       |
|         | 7-04-24 |   |     | Third draft,   |                       |
|         |         | 1 |     | with comments  |                       |
|         | 200     | 0 |     | from M.L.      |                       |
|         | 7-05-09 |   |     |                |                       |
|         |         | A |     | Submission for |                       |
|         | 200     | l |     | engineering    |                       |
|         | 7-06-05 | l |     | check          |                       |
+---------+---------+---+-----+----------------+-----------------------+

Table of Contents

1\. Introduction [4](#introduction)

1.1 About this document [5](#about-this-document)

2\. Application Overview [5](#application-overview)

2.1 Objectives [5](#objectives)

2.2 Roles and Responsibilities [6](#roles-and-responsibilities)

3\. Functional Requirements [6](#functional-requirements)

3.1 Functionality [6](#functionality)

3.1.1 Basic Considerations [6](#basic-considerations)

3.1.2 Basic Measurement and Display Capabilities
[7](#basic-measurement-and-display-capabilities)

3.1.2.1 Key Parameters [8](#key-parameters)

3.1.2.2 Emittances and Bunch Selection
[9](#emittances-and-bunch-selection)

3.1.3 Fits [10](#fits)

3.1.4 Data Archiving and Retrieval [10](#data-archiving-and-retrieval)

3.2 Scope, Performance and Concurrency
[11](#scope-performance-and-concurrency)

4\. Observations and Open Questions
[12](#observations-and-open-questions)

5\. § Discussion of Version 0 of WSA
[12](#discussion-of-version-0-of-wsa)

6\. References [14](#references)

# Introduction

Wire scanners are one of the fundamental beam diagnostic devices that
will be used in the Large Hadron Collider (LHC). The LHC wire scanners
operate in a conventional manner. First, a thin, robust wire passes very
quickly though the particle beam. As the beam hits the wire, prompt
particle radiation is produced that is proportional to the intensity of
the beam. High-speed scintillators are positioned downstream of the wire
so that the intensity of the resulting radiation can be measured. The
position of the wire and the intensity of the radiation are recorded.
The intensity at the scintillators, as a function of the precise wire
position, yields the transverse profile of the beam. One wire is
horizontal and travels vertically through the beam, producing a vertical
profile. The vertical wire that travels horizontally through the beam
produces the horizontal beam profile.

This device is capable of measuring the profile of each individual bunch
in the LHC. This wire scanner simplifies the measurement of the wire
position over a rotating wire (as in the Fermilab Tevatron) by moving
the wire on a linear path through the beam. Each scan of the wire is
actually two scans: a scan in, followed quickly by a return scan.

The LHC will have four wire scanners, one for each plane (horizontal and
vertical) and for each beam. These devices are identified as:

  ---------------------------- ----------- ------------ -------------------
  **Device Name**[^1]          **Plane**   **Beam**     **Position**

  LHC.BWS.US45.BH1             H           1            LHC1 Point 4

  LHC.BWS.US45.BV1             V           1            LHC1 Point 4

  LHC.BWS.US45.BH2             H           2            LHC2 Point 4

  LHC.BWS.US45.BV2             V           2            LHC2 Point 4
  ---------------------------- ----------- ------------ -------------------

The hardware interface is through the wire scanner front end. This front
end also sorts the data and it does analysis of the beam profile[^2].
The software interface to the front end is through the FESA class
BWSLHC.

The wires can be scanned only if the LHC beam power is low enough to
avoid damaging the wires or the LHC itself---a certainty at the full
design power of the LHC. There will be checks in the front end to
prevent an inadvertent scan during intense beam conditions.

§The WSA will also check these beam conditions. At this time, there is
not a safety system installed to prevent an inadvertent wire scan.

The functional requirements for all profile-measuring beam diagnostics
devices are found in the References[^3].

The wire scanner application will allow the operator to view the wire
scanner data, and to manipulate, analyze and store the data, in
accordance with the requirements set forth in this document.

This software will be written in collaboration with the LAFS[^4] team at
Fermilab. Several Fermilab people will be present at CERN as needed
during the writing, commissioning and operation of this application. The
interface to the wire scanner hardware is provided by the AB/BI/SW
group.

It is anticipated that the Wire Scanner Application will be a Java
application program used by AB/OP and others in the CERN Control Centre
and elsewhere during the commissioning and the operation of the LHC at
CERN.

## About this document

First, we present an overview of the application; the objectives, the
roles and the responsibilities. Then we present the formal requirements.

The priorities of the requirements are listed as either "Critical" or
"Expected." The former means that the application absolutely must have
this feature. The latter means that the application should have it, but
it will not be necessary in the initial version(s) of the application.

In the requirements, we use the abbreviation "WSA" for "Wire Scanner
Application."

§ The release of Version 0 ("alpha") of WSA was on 9-Oct-2007. Since
then, comments and changes to these requirements have been made. This
document has been updated with these new comments and requirements, and
they are denoted as is this paragraph, with the "§" symbol. These
comments are from AB/CO, AB/OP and AB/ABP. This document will continue
to be the "contract" between LAFS and CERN-AB on WSA.

# Application Overview

## Objectives

The wire scanners will be the most reliable way to obtain the transverse
profiles of the LHC beams during the initial phases of the commissioning
of the LHC. As the operational experience with the other transverse
profile measurement devices grows (for example, the Synchrotron Light
Monitors and the Ionisation Gas Monitors), the wire scanners will be
utilized to calibrate these monitors.

The wire scanner application is responsible for initiating wire scans,
for collecting the data from these scans, and from other scans that may
be initiated elsewhere, for making fits of the returned beam profiles,
and for calculating the implied emittances based on the results of the
fits and using the machine model obtained from the physics database.
Furthermore, the wire scanner application needs to archive beam profile
information and to retrieve these archived beam profile data. These
archives should be machine and human readable.

It is anticipated that the wire scanner application will deal with one
wire scanner (on one beam) at a time.

## Roles and Responsibilities

There are no special roles in the wire scanner application, just the
user and the wire scanner device itself. The interaction with the wire
scanner device is through LSA and JAPC software components and through
the FESA front end class(es) provided for that purpose.

It is understood that the responsibility for the safety of the wire
scanner hardware rests with that hardware. The Wire Scanner Application
has no responsibility for the safe operation of the wire scanners.

The RBAC mechanism will ensure that the wires are manipulated only by
approved and authenticated users.

# Functional Requirements

The functionality and the scope, performance and concurrency of the wire
scanner application are discussed and presented in this section.

## Functionality

The functionality of the wire scanner application is listed here. It is
divided into 5 sections, based on the general capabilities required.

### Basic Considerations

The wire scanner application will be written in the normal way,
utilizing the LSA and JAPC architecture. No unique interface techniques
shall be employed. Moreover, the application should use the high-level
components like the JDataViewer.

We state these ideas as these basic requirements.

  --------- ----------- -------------------------------------- -------------- ------------
  **Num**   **Title**   **Description**                        **Priority**   **Source**

  1.10      Common      The WSA shall be written using LSA and Critical       EH, 1-Apr-07
                        JAPC components.                                      

  1.20      Look & Feel The WSA shall have the standard LSA    Critical       EH, 1-Apr-07
                        look and feel.                                        

  1.30      Bunch       The WSA shall number the bunches in    Critical       \*
            Numbering   the same way as the front end.                        

  1.40      Bunch       The WSA shall know the distribution of Critical       \*
            structure   the beam in the bunches.                              

  1.50      RBAC        The WSA shall be protected against     Critical       SG, 1-Apr-07
                        unauthorized use by Role-Based Access                 
                        Control (RBAC).                                       
  --------- ----------- -------------------------------------- -------------- ------------

*Table 3‑, General requirements.*

### Basic Measurement and Display Capabilities

The wire scanner application is responsible for getting the beam profile
information from the wire scanner front end, and for calculating and
reporting beam sizes and the beam emittances (based on the lattice
values at the wires, as taken from the LSA optics package). The way that
the profiles translate into a single number that represents the size of
the beam needs sufficient flexibility to satisfy the needs of the beam
commissioners and the operations staff.

The beam intensity is expected to change substantially from the days of
initial injections, to the pilot bunches, to the full-intensity LHC
beam. This requires that the application is able to affect the gain on
the photomultipliers that readout the wire scanners. Since the gain
adjustment is protected within the hardware against self-inflicted harm,
it is not anticipated that extraordinary safety measures to set the gain
properly are necessary.

The adjustment of the gain on the photomultiplier tubes is necessary not
only to accommodate for the different intensities but also for the
different energy. Due to the adiabatic reduction of the physical
emittance with energy the beam size will become smaller and therefore
the peak signal will increase and for that reason the gain will have to
be decreased. It might be worth having a function in LSA defining the
gain as a function of energy.

The design of the LHC is for each ring to contain 2808 particle bunches
in 3564 slots that are separated by 25 nanoseconds. It is understood
that the wire scanner front end returns two types of 1-dimensional
profile data: transverse profile information for each bunch and for each
(possibly empty) slot, and integrated profile data over all bunches.
These modes are mutually exclusive. The wire scanner application will be
able to show these basic data, both textually and graphically. These
data can be stored in a way that can be retrieved later by the wire
scanner application, by an individual or by another program.

We state these ideas in these requirements.

§ We have reformatted this table into three smaller tables for better
readability.

  --------- ------------- ------------------------------------ -------------- ------------
  **Num**   **Title**     **Description**                      **Priority**   **Source**

  2.05      Data 1        The WSA shall collect profile data   Critical       GC,
                          from the wire scanner hardware when                 26-Mar-07
                          it initiates a scan.                                

  §2.06     Beam          The WSA shall present to the user    Critical       JJG,
            Conditions    the current beam conditions in the                  9-Oct-07
                          LHC                                                 

  §2.07     Disallow Scan The WSA shall inhibit the ability to Critical       JJG,
                          scan the wires if the beam                          9-Oct-07
                          conditions are inappropriate for                    
                          scanning the wires.                                 

  §2.08     Show Beam     WSA shall display the beam           Critical       GA,
            Conditions    conditions that were present during                 26-Oct-07
                          the scan that is being displayed.                   

  2.10      Data 2        The WSA shall collect profile data   Expected       GC,
                          from the wire scanner hardware when                 26-Mar-07
                          a scan is initiated by another                      
                          agent.                                              

  2.15      Measure       The user shall be able to initiate a Critical       GC,
            Profiles      measurement of the profiles from the                26-Mar-07
                          LHC wire scanners.                                  

  2.20      Consecutive   The number of consecutive scans      Critical       GC,
            Scans         shall be specified to the WSA by the                26-Mar-07
                          user, not to exceed the capabilities                
                          of the hardware.                                    

  2.25      Adjust gains  The WSA shall adjust the gains on    Critical       GC,
                          the wire scanner readout in order to                26-Mar-07
                          accommodate the different                           
                          intensities and the different energy                
                          levels in the LHC.                                  
  --------- ------------- ------------------------------------ -------------- ------------

§ Comment on 2.06-2.08: The term "Beam Conditions" needs a precise
definition. The Front End is also looking at the present beam
conditions, and will not allow a scan if the conditions are unsafe for a
wire scan. However, this protection is not 100% fool proof since the
conditions presented to the Front End are not part of the safety system
and, thus (by definition) are not guarnatted to be reliable. Therefore,
it has been decided to put a similar protection into the WSA to enhance
the protection on the wire hardware. It should be noted that this, too,
is not a safety system, and it cannot be relied upon. Judgment on the
part of the user is warranted. Moreover, the authors encourage there to
be a more reliable way to disallow a wire scan.

§ Comment on 2.07: "Inappropriate" beam conditions make it unsafe to
scan the wires. At high enough power levels, magnets will quench from a
wire scan. At this time, having the WSA and the BWSLHC front end be
aware of when it is appropriate to scan the wires is the only recourse
to keep the LHC from quenching.

#### Key Parameters

The *key parameters* returned by the wire scanner front end are
understood to be:

-   Beam Centroid

-   Beam size/RMS

-   Sigma of Gaussian fit to the profile

-   Non-gaussian content of the beam

-   The *^2^* and/or the "goodness of fit"

-   Emittances

Note that these *key parameters* are for both the X and the Y measuring
scanners.

  ----------- ------------ ------------------------------------ -------------- ------------
  **Num**     **Title**    **Description**                      **Priority**   **Source**

  2.30        Bunch Data   The WSA shall plot each of the *key  Critical       GA,
                           parameters* for all possible bunches                28-Mar-07
                           in the LHC.                                         

  2.35        Text Output  The WSA shall provide a textual      Critical       GA,
                           table of the *key parameters* for                   28-Mar-07
                           all possible bunches in the LHC                     

  2.40        Histogram    The WSA shall histogram ("frequency  Critical       GA,
                           distribution", *dX/*dn) each of the                 28-Mar-07
                           *key parameters* for all possible                   
                           bunches in the LHC.                                 

  §2.41       Time Plots   The WSA shall show the evolution of  Critical       ML, 9-Oct-07
                           the *Key Parameters* with time.                     

  §~~2.45~~                *This entry was not a requirement                   
                           and has been moved up into the text                 
                           of the document*                                    

  §2.47       Local Key    WSA shall display the                Critical       GA,
              Parameters   locally-calculated *key parameters*                 25-Oct-07
                           in the same way as the ones read                    
                           from the front end                                  

  2.50        Emittances   The WSA shall calculate emittances   Critical       GC,
                           at the wire scanners based on the                   26-Mar-07
                           fits that have been performed on the                
                           data returned directly from the                     
                           front end.                                          
  ----------- ------------ ------------------------------------ -------------- ------------

§ Comment on 2.41: While it is expected that the wires will fly only
occasionally, it was still deemed necessary to show the evolution of the
Key Parameters with time. This is particularly important for the
Synchrotron Light Monitor Application (SRMA). Since SRMA and WSA share
GUI classes, WSA has this feature, too.

#### Emittances and Bunch Selection

  --------- ------------ ------------------------------------ -------------- ------------
  **Num**   **Title**    **Description**                      **Priority**   **Source**

  §2.51     Emittances 2 The momentum spread used in the      Critical       GA,
                         emittance calculation shall be                      26-Oct-07
                         selectable as (a) the expected                      
                         momentum spread from the machine                    
                         optics, (b) the measured momentum                   
                         spread, or (c) a user-defined value.                

  2.52      Lattices 1   The WSA shall know the transverse    Critical       GA, 1-Jul-07
                         lattice parameters at the wire                      
                         scanner devices and the energy at                   
                         the time of the scan. This is                       
                         crucial for calculating the                         
                         emittances                                          

  2.53      Lattices 2   The WSA shall know the longitudinal  Critical       GA, 1-Jul-07
                         parameters of the beam to provide an                
                         appropriate correction for the                      
                         contribution of the dispersion and                  
                         momentum spread to the beam size.                   
                         This is needed to calculate the                     
                         emittance.                                          

  2.55      Show Fits    The WSA shall overlay the profile    Critical       GC,
                         data and the fit result.                            26-Mar-07

  2.60      Show Many    The WSA shall plot the profiles and  Expected       GC,
                         fits from several profiles on one                   26-Mar-07
                         screen                                              

  2.65      Select Bunch The WSA shall display the bunches    Expected       GC,
                         that the user selects when several                  26-Mar-07
                         profiles are display simultaneously.                

  §2.66     User Bunch   The user shall be able to select a   Critical       HS, 9-Oct-07
            Selection    group of up to 72 bunches,                          

  §2.67     Save Bunch   The user shall be able to save       Desired        HS, 9-Oct-07
            Selection    his/her selection of bunches to be                  
                         recalled later.                                     

  2.70      Many on One  The WSA shall be able to overlay all Expected       GA, 1-Jul-07
                         the selected profiles from a single                 
                         axis on a single plot.                              
  --------- ------------ ------------------------------------ -------------- ------------

*Table 3‑, Data acquisition and display requirements.*

§ Comment on 2.66: 72 bunches is chosen because (a) it is the number of
profiles that the BWSLHC front end can report at once and (b) it is the
number of bunches in an SPS batch that is injected into the LHC.

### Fits

The front end will calculate the RMS, the centroid, the gaussian fit and
the non-gaussian "residuals" and return these numbers to the
application. But it will be necessary to do other fits within the
application both (a) to verify the accuracy of the fits in the front end
and (b) to determine if other functional forms better represent the
character of the profile data.

In addition to replicating the fits that are performed by the front end,
it will be necessary for the WSA to perform fits using other functional
forms. It is not clear as of this writing what these functional forms
will need to be, so the WSA should be able to allow the user to specify
these functional forms. It is not important to be able to specify these
functions dynamically---it should be sufficient to create these new
functions in the Java code and redeploy the application. The number of
different functional forms that should be available to the user is
thought to be small (less than a dozen).

These requirements represent these ideas.

  --------- -------------- ------------------------------------- -------------- ------------
  **Num**   **Title**      **Description**                       **Priority**   **Source**

  3.10      Make Fits      The WSA shall make fits to the        Critical       GC,
                           measured profiles identical to the                   26-Mar-07
                           fits performed in the front end.                     

  3.20      Various Fits   The WSA shall make fits to the        Expected       GC,
                           measured profiles that are                           26-Mar-07
                           functionally different from the fits                 
                           performed in the front end.                          

  3.30      Adding Fits    The WSA shall allow the user to       Expected       GC,
                           specify new functional forms for the                 26-Mar-07
                           profile fits.                                        

  §3.40     Non-gaussian   WSA shall calculate and display the   Critical       GA,
            content        non-gaussian content of the beam.                    26-Oct-07
  --------- -------------- ------------------------------------- -------------- ------------

*Table 3‑, Fitting requirements*

### Data Archiving and Retrieval

It will be necessary to store and retrieve wire scanner data. This forms
the following simple requirements.

  --------- -------------- ------------------------------------- -------------- ------------
  **Num**   **Title**      **Description**                       **Priority**   **Source**

  4.10      Data Storage   The WSA shall archive profile data    Critical       GA,
                           using SDDS and the fit results on                    28-Mar-07
                           these profiles.                                      

  4.20      History        The WSA shall access archived profile Critical       GA,
                           data. These profiles can be the ones                 28-Mar-07
                           stored by the WSA itself, or other                   
                           profiles that are stored by another                  
                           agent, but that are in an identical                  
                           format as the WSA stored profile                     
                           data.                                                

  §4.21     Save Beam      WSA shall save the beam conditions in Critical       GA,
            Conditions     the archive files                                    25-Oct-07

  §4.22     Save Trigger   WSA shall save information about how  Critical       MG,
                           the wire scan was triggered                          25-Oct-07

  4.30      Browse         The user shall be able to browse      Expected       \*
                           archived profile data.                               

  4.40      Archive        The WSA shall perform the same fits   Expected       \*
            Calculations   and data displays on archived data as                
                           it does for live data                                

  §4.41     Auto Save      The user of WSA shall have the option Expected       GA,
                           to have each new measurement archived                26-Oct-07
                           automatically.                                       

  §4.42     Standard       WSA shall save archived data in the   Critical       GA,
            Location       standard location                                    26-Oct-07
  --------- -------------- ------------------------------------- -------------- ------------

*Table 3‑, Data archiving requirements.*

## Scope, Performance and Concurrency

The wire scanner application does not need to have any interaction with
the Post Mortem or the logging systems.

The wire scanner application is not expected to run all the time.

It is understood that the interaction with the logging database will be
handled by another agent. Furthermore, it is understood that this
external agent will push only simple numbers into this DB, that is, no
profile data will be put into the logging database. Therefore, there is
no need for the WSA to be able to read from the logging database,
either.

  --------- ------------- ------------------------------------- -------------- ------------
  **Num**   **Title**     **Description**                       **Priority**   **Source**

  5.10      Scope         The scope of the wire scanner         Expected       \*
                          application shall be limited to the                  
                          wire scanners, the data produced by                  
                          the wire scanners and the interaction                
                          with the user to manipulate these                    
                          items. The wire scanner application                  
                          shall not be required to interact                    
                          directly with other beam hardware or                 
                          application software.                                

  5.15      No Data Log   The WSA shall not be required to      Expected       \*
                          interact with the logging database.                  

  5.20      Performance   The WSA shall display the data that   Expected       GA,
                          are produced by the front end in real                28-Mar-07
                          time. The complexity of the display                  
                          shall be limited so that this                        
                          requirement is satisfied.                            

  5.30      Concurrency   More than one instance of the WSA     Expected       \*
                          shall run simultaneously. But it is                  
                          acceptable for one of these instances                
                          to initiate a "lock" on the control                  
                          of the wire scanner hardware. The                    
                          limit on the number of concurrent                    
                          instances of the WSA shall be                        
                          determined by the impact on the wire                 
                          scanner front end.                                   

  5.40      Lattice       The data for the lattice shall be     Critical       GA, 1-Jul-07
            Values        obtained from the LSA optics package.                
  --------- ------------- ------------------------------------- -------------- ------------

*Table 3‑, Scope, performance and concurrency.*

§ Comment on 5.15: While it is agreed that WSA will not push data into
the logging database, it may be necessary to retrieve data from it. This
requirement may change.

# Observations and Open Questions

Since the WSA is not going to run all the time, and since the emittances
from the wires are calculated only within the WSA, it should be noted
that there is not a defined mechanism for the emittances to be put into
the logging database. Discussions on how to push emittances into the
logging database are pending.

As for the data archiving, it is not clear how much archiving is
required, nor is it clear at what frequency it may need to be stored.

# § Discussion of Version 0 of WSA

§ These comments are from G. Crockford. *Author's comments in italics.*

> The device selection is fine, but takes up more space than it
> requires, as there are only 4 devices.
>
> Inward and outward scans are not \"axis\". You should just write \"In
> Scan\", \"Out Scan\". Normally we display the in and out scan data
> together. Not sure if that's still valid for the LHC.
>
> Is a user/event selection required for LHC? Or will it always be the
> same user? To be seen with Mike *(Lamont)* how the context selection
> should be done. *Yes, this will need to change.*
>
> For the lattice selection, better to use a \"combo box\" so the other
> non-selected items are hidden until selected.
>
> Maybe \"optics\" is a better work to use than \"lattice\". The optics
> names mean nothing. Should see with Mike to add a meaningful name as
> an extra column in the optics table, for display in applications.
>
> On the left side of the application there should be some means to
> setup which bunches are to be measured, or a whole batch of 72
> bunches, or integral of the whole beam. I don't think ticking boxes is
> the best way. Maybe better use scroll bar, or simply typing in bunch
> numbers. This needs more discussion to clarify, maybe with Gianluigi
> Arduini.
>
> I guess the instrument will be used over a wide range of intensities,
> from pilot beam to nominal intensity. So there should be some control
> of settings such as gain, PM voltage, optical filters? Also on left
> hand side of application.
>
> The default dataviewer display should show the profile for the first
> selected bunch, batch or beam, with the calculated parameters such as
> emittance clearly visible. The number of profiles that can be
> displayed together should be limited to something reasonable (maybe 6
> profiles?). The other more detailed variations of the display can be
> hidden behind other window tabs. The FESA data fields are really for
> expert debugging, and should be hidden behind an \"expert\" or
> \"debug\" window tab.
>
> The \"initiate scan\" button should stand out more. It\'s not clear to
> me if making an asynchronous scan is useful. A button to save data (or
> switch data saving on) should be added near the acquire button.

§ Here are my interpretations of the observations and comments of
Gianluigi Arduini during a demo session of WSA on October 25, 2007:

-   Use the local fits for the KeyParameter graphs (right now, only the
    front end results are plotted)

-   Allow a calculation of the non-gaussian content of the profile. This
    could be the \"Roncarolo\" fit method, but there should also be a
    more simplistic way (for example, the user can specify manually
    where the gaussian content is with some sort of offset, or
    something\--we need to specify this more precisely).

```{=html}
<!-- -->
```
-   Put the \"beam conditions\" into the SDDS save file

-   Use the expected momentum spread from LSA for the emittance
    calculation, but allow the user to modify this value. Someday, we
    may have a direct measurement of the momentum spread read directly
    by WSA.

-   Provide a way to \"kick\" the front end if it is not responding. For
    example, a \"warm reset\" function is available on other front ends.
    If a warm reset doesn\'t work, could also allow a full reboot. *This
    is not a reasonable thing to do, in the opinion of all three
    authors. Resets of the front ends should be done through the
    standard FESA tools provided for that purpose, not in the operations
    applications.*

-   Provide an option to save (SDDS) all the measurements automatically.

-   Give an option to initiate a scan at a fixed frequency (e.g., once
    every 15 seconds up the ramp). *The Trigger Tables are being
    constructed for exactly this sort of operation. If it is required to
    manipulate the Trigger Tables from the WSA, that requirement will be
    added later.*

-   Create and write to a dedicated \"WSA\" folder for all the SDDS
    files. The structure should mimic other implementations, which look
    something like this:

> \$HOME/data/2007/OP_DATA/WSA/device.name@structure.name/device.name@time.stamp.SDDS
> *(or something like this)*

§ From Massimo Giovannozzi, October 28, 2007, writing in response to the
comments from GA, above:

> I think all the options listed in your mail are valuable and should be
> added to the WSA.
>
> I think that the information about the way the wire scanners were
> triggered (the timing and/or event used to trigger the measurement)
> should be displayed/recorded somewhere.
>
> Finally, I confirm that the optics at the location of the wire scanner
> does not change as a function of energy (apart, maybe, some fancy
> operations such as TOTEM, for which IR4 might be used to trim the tune
> of the machine at top energy).

# References

\* These requirements have been added by the authors, based on
conversations with the experts, and/or logical considerations.

The experts quoted here in the "source" column are Guy Crockford (GC),
Gianluigi Arduini (GA), Suzanne Gysin (SG) and Eugenia Hatziageli (EH).

§ Text that has been added after the Version 0 release of WSA. The
people who contributed to these additions are Hermann Schmickler (HS),
Mike Lamont (ML), Gianluigi Arduni (GA), Jean-Jacques Gras (JJG), Guy
Crockford (GC), Massimo Giovannozzi (MG) and Simone Gilardoni (SG).

[^1]: These device names are for the test devices currently (Oct, 2007)
    installed at CERN. These names may change.

[^2]: F. Roncarolo, "Accuracy of the Transverse Emittance Measurements
    of the CERN Large Hadron Collider", PhD Thesis, Ecole Polytechnique
    Fédérale de Lausanne & Politechico di Milano, Italie, 2005.

[^3]: LHC-B-ES-0006 (EDMS 328147), "Functional Specification/Measurement
    of the Transverse Beam Distribution in the LHC Rings."

[^4]: LAFS stands for "LHC At Fermilab Software". The MOU between CERN
    and Fermilab on LAFS can be found at CERN as "K1344/AB/LHC".