An Event Display for ATLAS H8 Pixel Test Beam Data George Gollin Centre de Physique des Partiules de Marseille and University of Illinois April 17, 1999 g-gollin@uiu.edu An event display program is now available for use with H8 test beam pixel data. The program is intended more as a data viewer than anything else, and is meant to allow physiists on shift to notie sudden hanges in the data oming from the silion strip telesope and pixel detetors. The event display an be launhed by the data aquisition program, and is then ontrolled separately by users on shift through a mouse-driven interfae. There is a pdf version of this doument available. You an jump diretly to desriptions of: the user interfae the display program's interation with the data aquisition program the routines whih omprise the event display software. User Interfae Here is how a typial 1998 test beam event looks. 1 of 8 4/18/99 12:11
Figure 1. A typial event, from run 4275 (September, 1998). The display sreen an be resized in the usual way by dragging its boundaries, but you may need to lik on the sreen to refresh the window. The sreen is divided into four prinipal areas: x-view and y-view representations of the telesope are drawn above a row of ontrol buttons; a message area is drawn below. Hits in the strip and pixel detetors are drawn as blue lines whose length is proportional to the ADC signal from eah strip, or time-over-threshold from struk pixels. Strips (or pixels) whih have been identified as noisy will have their tik marks drawn in red. To zoom in on part of the telesope, left-lik on the Zoom ontrol button, then left-lik twie on one of the telesope drawings as 2 of 8 4/18/99 12:11
shown in Figure 2. Figure 2. Defining a zoom area. If the zoom area is small enough, strip hits are labeled strip-number:adc-value, while struk pixels are labeled olumn,row:time-over-threshold, as shown in Figure 3. Figure 3. After zooming. Right-lik on the zoom button to reset the zoom area. The phi, psi, theta angles indiated in some of the buttons may be hanged by liking on the buttons. These are not Euler angles: phi orresponds to rotations around the lab frame y axis, psi around the lab frame x axis, and theta around the z axis. You an use these to reorient the pixel planes in order to better view the hit information. The angles are reset eah time a new event is loaded. The area in whih detetor and hit details will be drawn are indiated by marks near the orners of the x and y plots. The H8 frame (z,x) and (z,y) oordinate values of the marks are shown in millimeters. Cliking one in the x-view (or y-view plot) auses the program to write the H8 oordinates of the 3 of 8 4/18/99 12:11
lik (also in millimeters) in the message area....bak to the beginning Interation with the Data Aquisition Program The event display program is launhed by the data aquisition software after a request by a user. The program may be launhed with a string of (optional) arguments whih speify the IP address of the display, whether the job is running at CERN or not, and the x, y alignment onstants of the last three strip planes and the pixel detetors. A positive value for an alignment onstant indiates that the enter of the detetor is displaed in the positive diretion with respet to the enter of the first strip plane. Sine the first strip plane is used to define the oordinate system, its alignment onstants are zero, by definition, and ARE NOT entered as arguments to the program. As with PAW, an exlamation point (!) informs the program that it should use the default value of an argument. The job generates no "printer output" when it runs normally, but will try to write a small amount of diagnosti information to standard output if it runs into problems. It probably makes sense to rediret standard output to a file. The Unix ommand nohup event_display.exe_ern marrant.in2p3.fr:0.0 CERN 2.626 -.645 \ 1.630 3.196! 3.774.710 1.970 > event_display.log & will launh the program with the following arguments: DISPLAY IP address Loation/diretory struture CERN Strip plane 2 x offset (mm) 2.626 Strip plane 2 y offset (mm) -.645 Strip plane 3 x offset (mm) 1.630 Strip plane 3 y offset (mm) 3.196 Strip plane 4 x offset (mm) Strip plane 4 y offset (mm) 3.774 Pixel demo 1 x offset (mm).710 Pixel demo 1 y offset (mm) 1.970 marrant.in2p3.fr:0.0! (use default value of zero) Pixel demo 2 xoffset (mm) (not speified; use default of zero). Pixel demo 2 y offset (mm) (not speified; use default of zero). Marebo xoffset (mm) Marebo y offset (mm) (not speified; use default of zero). (not speified; use default of zero). Any diagnosti information written to standard output by the program will be redireted to the file event_display.log. 4 of 8 4/18/99 12:11
Handshaking between the DAQ and event display routines is simple: upon launh, the event display reates a ontrol file named /PixData/event_display, and then looks for data from a single event in the file /PixData/event_dump. If /PixData/event_dump doesn t exist, the event display waits for it to be reated, repeatedly heking for the file roughly one per seond. After reading the event s data, the display program deletes the file. When the user liks the "Next event" button the display program opens (or waits for) another event_dump file. The DAQ an signal the event display to stop by deleting the ontrol file. Beause of some fine points onerning the queuing of mouse events, this is the only graeful way to stop the event display while it is waiting for event data. At other times, the event display an also be stopped by double-liking on its STOP button. The DAQ reates /PixData/event_dump if it detets the existene of the ontrol file /PixData/event_display and sees that the event_dump file does not exist. The first line in the ontrol file /PixData/event_display ontains a number used by the DAQ to determine how many events to skip before reating a new event_dump file. A value of 1 indiates that the DAQ should reate the file using the next available event. When asked to stop, the event display program deletes /PixData/event_display and (if it exists) /PixData/event_dump....bak to the beginning Program Contents The event display program is written in Fortran. Here is a list of the routines, along with the desriptive omments at the start of eah routine. Links to the "inlude files" for ommon bloks and the Makefiles follow the routine desriptions. event_display this is an event display routine for CERN h8 testbeam data for the pixel detetor tests. The purpose of this routine is to allow people on shift to see whether or not most events are "sensible": strip detetors show hits that lie roughly on a line, and pixel detetors show ativity in the expeted regions. It is NOT the purpose of this to generate online alibration and alignment information while writing data. program takes arguments; first is whih display to draw on. See omments in event_display_get_args for a more omplete desription. There are several different oordinate systems whih ome into play: the "telesope frame" or "lab frame" has its z axis parallel to the beam, and its x,y axes parallel to the oordinates determined by the first strip plane. The origin of the lab frame is at the (xstrip, ystrip) = (0,0) orner of the first strip plane. units: mm "raw oordinates" from a detetor, also in millimeters, have 5 of 8 4/18/99 12:11
(xraw, yraw, zraw) alulated from the number of the strip, olumn, or row that's struk, and the appropriate pith. zraw=0. "sreen pixels," "xpixels," "ypixels" refer to dots on the X11 display. The X11 origin puts (0,0) at the upper left orner of the sreen. x inreases as one moves to the right, while y inreases as one moves DOWN the sreen. This an ause a ertain amount of onfusion, sine the telesope frame is displayed with its z axis moving to the right on the sreen (positive X11 x), and with the positive x (or y) diretion moving towards the top of the sreen (negative X11 y diretion). see http://marpix1.in2p3.fr/gollin/event_display/ event_display_doumentation.html for WWW doumentation of the event display. George Gollin, CPPM (Marseille) and University of Illinois (Urbana-Champaign) g-gollin@uiu.edu, 1999 event_display_apply_align this routine takes raw oordinates (e.g., x = strip number * pith) and transforms them into the telesope oordinate system. zraw_loal is zero on the detetor. More generally, zraw_loal is the distane from the point in question to the detetor plane, taken perpendiular to the detetor surfae. event_display_button_query figure out if a mouse lik just reeived was in one of my display ontrol buttons. return 0 if not, and button number if yes. Input arguments are x and y of pixel, and mouse button if mouse was liked. event_display_ontrol_exists look to see if the ontrol file exists. event_display_draw_detetor draw an empty set of detetors for the h8 telesope. event_display_draw_hits draw hits in the already-drawn detetor piture of the h8 telesope. event_display_get_args parse arguments for the event_display program event_display_get_event This routine fethes the next event from the event data file. The file is opened, read, and then deleted so that the DAQ will reognize that it's time to reate a new file. event_display_handle_mouse_event figure out what to do in response to a mouse lik. 6 of 8 4/18/99 12:11
event_display_initialize_geometry initialize geometry for the event display event_display_lab_to_xpixels This routine takes lab oordinates in millimeters and returns the oordinates of the orresponding sreen pixel in the x view. Keep in mind that X11 uses inreasing x to move to the right, inreasing y to move down on the sreen. As a result, inreasing lab x (or y) orresponds to dereasing X11 y; inreasing lab z orresponds to X11 inreasing x. event_display_lab_to_ypixels This routine takes lab oordinates in millimeters and returns the oordinates of the orresponding sreen pixel in the y view. Keep in mind that X11 uses inreasing x to move to the right, inreasing y to move down on the sreen. As a result, inreasing lab y (or x) orresponds to dereasing X11 y; inreasing lab z orresponds to X11 inreasing x. event_display_mouse_request request a user lik on the graphis window inside one of the buttons. return whih button (.ge. 1), or zero if it wasn't in a button. event_display_open_window open an event display graphis window event_display_rotate This routine takes raw oordinates (e.g., x = strip number * pith, and rotates them into a frame with origin at the detetor enter, but axes parallel to the telesope (lab) oordinate system. event_display_rowol_to_raw to This routine takes row and olumn for a pixel detetor and returns the "raw" oordinates. Sine inreasing row orresponds to inreasing x, but inreasing olumn might orrespond to dereasing y, use this routine handle the possible y-reversal. It works for strip planes too... event_display_write_ontrol_file This routine writes a short ontrol file indiating the frequeny with whih events should be written to disk for onsumption by the display routine. 7 of 8 4/18/99 12:11
event_display_write_message This routine writes a line of text into the message are in the display window. event_display_xpixels_to_lab This routine takes x,y for a display pixel and returns telesope oordinates for the x view. Keep in mind that X11 uses inreasing x to move to the right, inreasing y to move down on the sreen. event_display_ypixels_to_lab This routine takes x,y for a display pixel and returns telesope oordinates for the y view. Keep in mind that X11 uses inreasing x to move to the right, inreasing y to move down on the sreen. event_display_zippy Provide wisdom for the user, to be written to the message area, if the user figures out where to lik to obtain enlightenment. ommon /event_display/ ommon /event_display_data/ Makefile for ompiling fortran and linking objet modules on Mardigra (a CPPM mahine), and then to reate an exeutable to be run on Mardigra. Makefile for ompiling fortran on Mardigra, but to reate obet modules whih will be used on Mardaq2 (whih does not have a fortran ompiler) Makefile for linking objet modules on Mardaq2 whih had been reated on Mardigra....bak to the beginning Email: g-gollin@uiu.edu CPPM phone: +33 (0)4 91 82 72 72 CPPM fax: +33 (0)4 91 82 72 99 Illinois phone: +1 (217) 333-4451 Illinois fax: +1 (217) 333-4990 8 of 8 4/18/99 12:11