From tieulent@isn.in2p3.fr Tue Jul 18 09:11:00 2000 Date: Tue, 18 Jul 2000 10:37:03 +0200 From: Raphael Tieulent To: Wolfgang Korsch Cc: Elizabeth J. Beise Subject: Re: develop a "mock data" stream Dear Wolfgang, I am done with this "mock data" generator. The tar file attached contains the code (written in C), and the output in a hbook file and in a binary file which contains the scaler data word. To read back the binary file use : unsigned long temp_buf[16]; fread(temp_buf,sizeof(long),16,fp); I remind you that the Voltage to frequency converter has a pedestal which I measured to be 196.9 +- 0.03254 kHz. The integration time is 1/30 second so the pedestal in the scaler count is : 6563.3 +-1.1 counts In this simulation I put 3 BPMs and 3 BCMs. 1 BPM has 4 output signal 1 BCM has 1 output signal So we need 3*4 + 3*1 = 15 scaler channels Add 1 scaler channel for the helicity. Which gives us a total of 16 channels. So each temp_buf[16] read from the output file correspond to the data from our beam_line for 1/30 second which is an helicity state. temp_buf[0] -> Helicity temp_buf[1] -> BCM 1 temp_buf[2] -> BCM 2 temp_buf[3] -> BCM 3 temp_buf[4] -> BPM 1 X+ temp_buf[5] -> BPM 1 X- temp_buf[6] -> BPM 1 Y+ temp_buf[7] -> BPM 1 Y- temp_buf[8] -> BPM 2 X+ temp_buf[9] -> BPM 2 X- temp_buf[10] -> BPM 2 Y+ temp_buf[11] -> BPM 2 Y- temp_buf[12] -> BPM 3 X+ temp_buf[13] -> BPM 3 X- temp_buf[14] -> BPM 3 Y+ temp_buf[15] -> BPM 3 Y- The file bpm.eps shows you a schematic view of a BPM looking down stream. X+, X-, Y+ and Y- refer to the name of the four antenna. The position along the axis U (passing by the antenna X+ and X-) is given by : U = 18.77*((X+)-(X-))/((X+)+(X-)) The position along the axis V (passing by the antenna Y+ and Y-) is given by : V = 18.77*((Y+)-(Y-))/((Y+)+(Y-)) The factor 18.77 is here to get the position in mm. Please ask me if you have any question or problem. I hope this is what you need to work. Best regards, Raphael. -- ----------------------------------------------------------------- Raphael Tieulent Institut des Sciences Nucleaires Phone: +33 4.76.28.41.98 53, Avenue des Martyrs FAX : +33 4.76.28.40.04 38026 Grenoble, FRANCE Email: tieulent@isn.in2p3.fr ----------------------------------------------------------------- [ Part 2, Application/X-GZIP 1.6MB. ] [ Unable to print this part. ] [ Part 3, Application/POSTSCRIPT 4.3KB. ] [ Unable to print this part. ]