Presentation is loading. Please wait.

Presentation is loading. Please wait.

On-Line Analysis What the program does

Similar presentations


Presentation on theme: "On-Line Analysis What the program does"— Presentation transcript:

1 On-Line Analysis What the program does
How to use the program during running Operating Manual Operator responsibilities 1

2 What Does The Program Do
On-Line analysis consists of a GUI providing access to: 1) run-by-run beam monitor ratio data M2/M1 and M3/M1 2) run-by-run beam current 3) run-by-run reconstructed detector signals (wave form, hist., scatter) 4) run-by-run detector difference signals (wave form or hist.) 5) run-by-run detector sum signals (wave form or hist.) 6) run-by-run monitor signals (wave form or hist.) 7) run-by-run spin-flipper signals 8) run-by-run chopper phase 9) run history plots for target, pedestal, and empty runs 10) raw/noise/LR/UD asymmetry calculation for selected series of runs 11) detector noise / gain / pedestal / diagnostics 12) Various utility functions 2

3 What Still Needs To Be Implemented
What else should the GUI provide: 1) ROOT command-line window 3) Any data from auxiliary computers (field, pol, target ...) 4) More ...? 3

4 On-Line Analysis Procedure
This part describes analysis related tasks that are to be performed: 1) at the beginning of each period with a new configuration, including changes to the geometry inside the cave, as well as DAQ changes 2) during infrequent checks that depend on the LANSCE beam schedule 3) at the beginning and end of each shift and 3) for each run Some of these task are automatically performed by the on-line analysis program (as many as possible), but it is the responsibility of the people on shift to verify the program's results and perform additional checks that the program can not do. 4

5 Tasks for each new configuration:
1) Specify the TOF data window (DAQ delay and chopper cut-off) in the analysis software   2) Take runs to establish detector gain and beam collimation such that none of the detector and monitor signals are saturated (adjust TRIUMF modules accordingly and store the values and keep room for beam fluctuations: Use Mike Dabaghian's Script) 3) Take a pedestal run (shutter closed) and generate the detector and monitor pedestal files using the analysis software 4) Take a run with an unpolarized 3He cell and generate the unpolarized monitor run files using the analysis software (subtract the pedestal run)   5) With polarized beam, take background runs without LH2 (shutter open) and generate the detector and monitor background files using the 6) With polarized beam, take a single run that can be designated as a “golden” run (defined later on) after it has been analyzed. 8) Re-initialize the data history 5

6 Tasks during LANSCE beam breaks:
1) Take a pedestal run (shutter closed) and generate the detector and monitor pedestal files using the analysis software   2) Take a run with an unpolarized 3He cell and generate the unpolarized monitor run files using the analysis software (subtract the pedestal run) 3) With polarized beam, take a single run that can be designated as a “golden” run (defined later on) after it has been analyzed. 6

7 Tasks at the beginning of each shift:
1) Verify that the analysis and DAQ software is running on fiver, otherwise start them using the (very big) buttons on the desktop 2) Take a pedestal run (shutter closed, single run mode) and generate the detector and monitor pedestal files using the analysis software 3) Take a run to establish that none of the detector and monitor signals are saturated (adjust TRIUMF modules accordingly and store the values and keep room for beam fluctuations) 4) Start the run sequence for this shift using the DAQ software and start the real-time analysis to process the runs as they come in. 5) With a separate instance of the analysis program, run the analysis for each run taken during the previous shift and compare results with those obtained by the previous crew 7

8 Typical sequence of events for a given run:
1) The DAQ finishes taking a run 2) The DAQ software copies the completed run to disk 3) The DAQ software sends a signal over the network to analysis computer 4) The analysis software (always running) listens for the DAQ signal 5) The analysis software opens the data files that just finished, upon receiving the signal 6) The analysis software computes vital data (spin seq., current, pol, etc..) 7) The analysis software plots first ten pulses in run for det,mon,sf,chop 8) The analysis software calculates the run asymmetry 9) The analysis software adds calculated data to the data history 10) Shift person performs a variety of quick checks 11) Shift person leaves program alone... 12) Analysis software receives next run signal 13) Repeat (endlessly, incessantly) 8

9 Tasks at the end of each shift:
1) With a separate instance of the analysis program, run the analysis for all runs taken during the your current shift 2) For each run, write the calculated asymmetry in the log-book (this could be a printout of the analysis program log file) 3) Write the total asymmetry for the shift (make note of bad runs, including the symptoms) 3) Average the shift asymmetry with the one from the previous end of shift asymmetry to keep a total running asymmetry (the program does this as well, but it should be verified by hand) 4) Allow the new shift crew to re-analyze your shift data while you are present and discuss any unusual behavior run-by-run 9

10 Explicit Operator Responsibilities
The operator needs to: 1) keep the real-time analysis program running while taking data. 2) make an assessment about data quality for each run 3) perform analysis tasks in addition to what the program does (additional analysis on runs other than the current run need to be made with another instance of this program or a different program) (only one real-time version of the program is allowed) 5) make notes in the log book about each run 10

11 List of On-Line Analysis Checks for each Run
Check Condition Automated 1) beam current < 60 micro-amps yes 2) M1 & M2 signal/spectrum consistent with typical run partially 3) beam polarization (history) < 20% yes (but visually inspect the fit) no 5) detector signals (amplitude) consistent with typical run yes (includes sum and difference spectrum changes) 6) detector saturation (also visual) absent partially 7) detector pedestal (chopper cut) changes below some level ? yes (monitoring of history) partially 8) monitor pedestal (chopper cut) changes below some level ? yes 9) Beam asymmetries RMS compared to typical yes 11

12 Check Condition Automated
10) Spin Sequence Cuts correct pattern (RFSF) yes 11) Spin Sequence Cuts monitor pulse fluctuations yes 12) Spin Sequence Check detector pulse fluctuations yes (monitoring only) 13) Physics asymmetry RMS consistent with history partially 14) Physics asymmetry outliers below some cutoff (sigma = ?) no 12

13 Detailed Program Usage
Program Versions: There are two main versions of the program: 1) The real-time version This version is meant to have minimal user interaction, because it waits for signals from the main DAQ interface when new runs are being taken and copied to the data disks. If the program receives a signal, it automatically opens the corresponding run. The run information, such as target type (hydrogen, chlorine, empty, pedestal) and run number are extracted from the daq.log file which is updated by the main DAQ interface program on clover.lanl.gov . 2) The stand-alone version This version can be started from anywhere on a machine that has ROOT installed and on which the program has been properly compiled. Here, the user has to open the runs and specify the target type manually. 13

14 Real-Time Version: The real-time version of the analysis program must be started by double clicking the large desktop icon from the npdg account on the fiver machine. This is done by running the program with the -r switch: ./NPDGData -r In order to have the analysis program monitor and track changes between runs, the program should be started in this way before the DAQ starts taking data, as initiated from the npdg account on the clover machine. A full frontal screen shot of the Real-Time version is shown on the next slide. 14

15 15

16 Stand-Alone Version: This version can be started by running ./NPDGData from the directory where the program is located ( see also : 16

17 17 Stand-Alone Version -- Opening Runs:
In the stand alone version users can open and close runs by either using the menu option, as shown on the right. Or they can simply enter the run number in the entry box below the menu as shown below. In this case, the program looks for the run in a default directory that has been set by the user, via the configuration settings dialog box (See also Data and Window Configuration Settings). 17

18 18 Data Display: The data is displayed in several tab windows:
Within each tab, the data is displayed for the first few macro pulses, or averaged over the run and displayed as one macro pulse time of flight spectrum. The user can double click on each of the plots to open up a separate window and further interact with the data. A variety of other data formats can be viewed by using the Open Data Window or View Row-Column Data File options from the File menu (See previous slide). The analysis results and run information are stored in files located in the Histories/ directory. The file names always include the current target or project name which by default is NPDGAnalysis or otherwise taken from the daq.log file or entered by the user. (See: Analysis Settings) 18

19 The log tab displays information about all runs that have been opened during the current session.
19

20 The detector tab displays data for all 48 detectors numbered left to right and top to bottom.
The detector menu provides further display options as shown below. 20

21 Individual detector plots can be opened in a separate window by double clicking on the
corresponding plot in the detector tab window. From here the user can specify additional display options. Double Click 21

22 The monitor tab displays 1) the first 10 pulses for all 3 monitors (on the left) 2) a single TOF
spectrum for each monitor, obtained by averaging over the run (middle) and 3) the ratio of the averaged spectrum with one that was previously stored from a so called “typical” run (See the slide on: Generating “Typical” Data) The ratio should be 1 for all TOF if the spectrum didn't change. Both the ratio and RMS are monitored in the run history (See slide: History plots and files) 22

23 The spin flipper data includes (left to right, top to bottom): Ramped current signal, current
signal multiplied by TOF, ramped voltage signal, voltage signal multiplied by TOF. If the spin flipper is on, the spin sequence pattern should be clearly visible, as shown below. 23

24 The chopper tab display the plot (top) and histogram (bottom) of the chopper “phase” which is
calculated by integrating two regions of the monitor 1 spectrum for each pulse and then computing the ratio of the integrals. The two regions are before/during and after the chopper closing period as defined by the data and pedestal window settings (See slide on: Data and Pedestal Window Definition) 24

25 Setting the TOF data window (DAQ delay and chopper cut-off) in the
analysis software: The TOF data window and pedestal window are determined by the DAQ delay and chopper phase settings. In order for the program to correctly calculate the data asymmetries and pedestal values, the corresponding time of flight values need to be specified. To do so, select the corresponding menu item, as shown below. The program then brings up a warning which the user must acknowledge and then opens a dialog box, allowing the user to specify the TOF values. 25

26 26 A typical TOF data and pedestal window configuration is shown
on the left. The corresponding values can be entered as shown below. The entered values are stored in a file and used by the program for every run, until new values are entered in this way. 26

27 Taking a pedestal run (shutter closed) and generate the detector and monitor pedestal files:
When a pedestal run is taken and the user determines that it is a good run (i.e. no DAQ problems, no strange noise behavior) the pedestal data can be generated by selecting from the menu as shown in the figure to the right. The generated pedestal data consists of the run data, averaged over the whole run, down to a single TOF spectrum for each detector and monitor. The program subtracts the the pedestal data before an analysis calculation is made. The progress of pedestal generation is indicated in a progress bar and the program automatically closes the run after it finishes 27

28 Generating unpolarized monitor run files (load recent pedestal run):
Unpolarized run monitor data ratios are used by the program to calculate the beam polarization for each run. The data is generated by opening a run that is known to have been taken with an unpolarized 3He cell and selecting the menu option as shown on the right. The program then averages the run data down to a single TOF spectrum for the two monitors in question and then computes the ratio of the two averages. The resulting data is stored in a file and referenced for each opened run. 28

29 29 Setting The Measured Polarizer Thickness:
The polarizer thickness is measured in separate run sequences and then calculated off-line. After the final thickness has been determined it needs to be entered into the program using the configuration settings dialog window, as was done with the data and pedestal TOF window settings (see Generating Pedestal Data). The thickness must be entered in units of atoms per meter squared using sig_o = barns The program uses this information to correctly calculate the beam polarization. 29

30 Taking background runs without LH2 (shutter open) and generating the detector and monitor background files: The process for generating background runs is identical to the process described for generating pedestal files on slide 16, except that the run must be a target empty, shutter open run. 30

31 31 Generate “Golden” or “Typical” run data for subsequent comparison:
For each of the run targets used, as well as empty and pedestal runs, a comparison or “typical” run should be generated after completely analyzing the run (as described later). The real-time version of this program performs the analysis automatically after opening the run. The comparison run can then be generated from the menu selection as shown on the right. Note that this menu option is only active after the run has been analyzed (i.e. an asymmetry has been calculated). When analyzing a run, a unique project name can be assigned to the analysis and the “Typical” run is then stored under a filename that includes the project name (under the typ/ directory). Subsequent runs that have the same project name are then compared to this run, so that changes can be tracked. Note that the comparison check is turned of by default (except in the Real-Time version) but can be turned on from the Settings menu. The Real-Time version will read the target name from the daq.log file and use it as the project name. 31

32 32 History plots and files:
The program keeps a ROOT data history file for each project or target. Here a number of calculated values from each run are stored: Run asymmetry, RMS width and error Beam asymmetry, RMS width and error Monitor 1 spectrum ratio (ratio with stored monitor spectrum from a “typical” run) Monitor 2 spectrum ratio Average beam current Chopper phase Helium polarization and error Neutron polarization and error If there is not already a history in place a new one is started automatically. The corresponding ROOT tree file is stored in the Histories/ subdirectory with the file name equal to: NPDG[Target or Project Name]History.root To reset the history to zero, the files must be removed. The history tab is shown on the next two pages. 32

33

34 To see the history plots in more detail, one can double click on one of the graphs (red arrow)
to open it in a separate window: Double Click 34

35 35 Basic Analysis Procedure
Close All Run Files select File->Close (Run file) From the menu bar, choose Tools->Analysis In the dialog box, select the analysis type (see below) Select the number of runs and TOF range to analyze (see specific options below) Select other options or specify a run list (see below) Select Set The TOF default settings for analysis is determined from the data and pedestal window settings (See slide on: Data and Pedestal Window Definition) Note that this dialog box is disabled when the program runs in real-time mode, since all analysis tasks are automated in that mode. The analysis results are displayed in the log tab and stored in several files named after the project name entered here. The files are stored in the Histories/ directory. For more detail, see: UserGuide/asymmetryAnalysis.html 35


Download ppt "On-Line Analysis What the program does"

Similar presentations


Ads by Google