Simple macro, with a loop and a VECTOR fit

Simple macro, with a loop and a VECTOR fit

ve/create VECT(10,3) 1 VE/READ VECT 'vector.data' * ve/print VECT(1:10,3) vbias vect(1:10,1) 0.5 vect(1:10,1) zon 1 2 * 4 DO IP = 2,3 ve/draw vect(1:10,[ip]) 2 3 ORDER = [IP] - 1 5 VECT/FIT VECT(1:10,1) VECT(1:10,[IP]) ! P[order] WS 4 ENDDO ve/delete VECT

  1. The file vector.data previously created is read again in this example via the command VECT/READ . Note that it is not necessary to specify the format.
  2. This example shows the usage of variables in the macros ( IP ). The content of a variable can be accessed via:
                                                                                                                       
                          [variable]                                                                                        
    
    Note that the name of a variable in not case sensitive.
  3. Simple computations on variables are possible, like i=[i]+1 or a=[b]+2 . However it is not possible to do complex operations on variables. For this kind of computation vectors and SIGMA (or COMIS) must be used.
  4. Some controls statements are available in macros (see the complete list in the next example).
  5. It is possible to fit the vectors with functions . Here the function used for the fit is a polynome. The fitting mechanisms are very complete in PAW and simple to use. All the details useful to use the commands HIST/FIT and VECT/FIT are given in the section Fitting with PAW/HBOOK/MINUIT of the chapter HBOOK in the PAW manual.



Last update: 96/05/24 17.18
Olivier.Couet@Cern.Ch