Recent Changes - Search:

BookCrystal

Analysis

NOT UPDATED to bookCRY

Analyzing data with book95 & PAW

   1. Introduction
   2. Cuts
   3. Calculations, new variables
   4. Special Topics
         1. Multiple hits in Drift Chambers
         2. Multiple hits in Drift Chamber 3
         3. Electron Momentum
         4. Bad DC 4 ('95)
         5. Pair Spectrometer

Introduction

Switching from Dumle to the new analysis programs changes also the procedures used. Things are still being created, so consider (almost) everything of what i will say as subject to change (expecially if you complain :-).

Analysis with Book95 and PAW is basically a two step process. The DumleCollect files are processed by book95 and trasformed into an ntuple, stored into an .hbook file.

Installation of PAW

To ease the analysis work, is it necessary to fine-tune the installation of PAW. (...)

Procedure

  • run book95 on a few files (10000 events is more than enough) creating a file ( say aname.hbook)
  • start PAW
  • exec calib.kumac aname.hbook
    the macro will create aname.auto.ini and aname.kumac
  • f/close 1
  • exit PAW or use another window or use shell in PAW
  • rm aname.hbook (not necessary, but suggested)
  • run book95 on the full set
  • restart PAW if you closed it
  • exec aname.kumac (not necessary, but suggested)
  • now you can start your work in PAW

If you make a different n-tuple from the same data, for example using a different cut in book95, you shouldn't need to go again trough the same procedure; that means you shouldn't need to make a new aname.ini

making cuts (selections)

Using PAW

plots can include a selection function:

NTUPLE/PLOT IDN [ UWFUNC NEVENT IFIRST NUPD OPTION IDH ]

   IDN        C 'Ntuple Identifier'
   UWFUNC     C 'Selection function' D='1.'
   NEVENT     I 'Number of events' D=99999999
   IFIRST     I 'First event' D=1
   NUPD       I 'Frequency to update histogram' D=100000000
   OPTION     C 'Options' D=' '
   IDH        I 'Identifier of histogram to fill' D=1000000

    IDN may be given as IDN
                        IDN.X
                        IDN.Y%X
                        IDN.1
                        IDN.2%1
                        IDN.expression1
                        IDN.expression1%expression2

    UWFUNC may have the following forms:
    1- UWFUNC='0' or missing (only IDN given). No selection is applied.
    2- UWFUNC is a CUT or combination of valid CUTS created by the
       command NTUPLE/CUTS. Ex:
              UWFUNC=$1            means use cut $1
              UWFUNC=$1.AND.$2
              UWFUNC=.NOT.($1.AND.$2)
              UWFUNC=($1.OR.$2).AND.$3
    3- UWFUNC is a FORTRAN expression
       Ex:    X&gt3.14.AND.(Y&ltZ+3.15)
    4- UWFUNC is a variable name or an arithmetic expression
       Ex:   NT/PLOT 30.X Y  weight of each event is variable Y
             NT/PLOT 30.X X**2+Y**2
    5- UWFUNC is the name of a selection function in a text file with
       the name UWFUNC.FTN, UWFUNC.FOR, UWFUNC FORTRAN (Apollo, VAX, IBM).

Selection functions are easily saved with the ntuple/cuts that also provides means to define graphically the cuts; this is expecially useful for selecting areas on 2-Dim plots. Selections can also be stored in "MASK" files. See help ntuple/mask for details. The mechanism is a bit complicated and so it only results useful for time expensive cuts that are going to be reused.

Using book95

Calculations, adding new variables

The algebraic calculations on pre-existing variables can easily be done directly on the command line of PAW, simply specifying an expression instead of a variable, like in

ntuple/plot 1.(dc2x-dc3x)/130

Some more complicated things can require the creation of a PAW macro (kumac), like for the power spectrum (see power.kumac), or the axis search (see axis.kumac). In this way you can pack together (adding some flexibilty trough the use of parameters and of PAW's internal constants that contain informations about the histograms) , the operations on histograms and on vectors that you can use on the command line.

If the calculation is non-algebraic, and it cannot be performed by means post-processing by means of matrix-like operations on histograms and/or vectors, there are two possible ways; each has advantages and disadvantages. My opinion is that calculations that are definitive and debugged, and are not too specific, should be incorporated into book95.

Using PAW

You can use PAW's NTUPLE/UWFUNC command to create the skeleton of a fortran function for calculating a new variable (in PAW see help uwfunc). Remember that the skeleton created is specific to that ntuple format: if you change the inclusion, or you run on files that had a different setup, you cannot relay on the correctness of the names of the variables. In this case, it is necessary to re-create the UWFUNC and paste in there the preexisting code, that should not need any modification.

Since the PAW uses a fortran interpreter, not a compiler, an excessive use of this kind of variables can lead to a consistent slow down of the analysis. For this, remember that apparently, at least up to CERNLIB v.95b, PAW calls the function once for each time it appears on the command line, not only once per event.

Using book95

This requires more work, but will speed up analysis and is not dependent on ntuple or camac setup.

Special Topics

Electron momentum calculation

included by default

The impact positions in DC 3x and DC 4x, and the angle in the horizontal plane, are used to calculate the electron momentum. This is extremely sensitive to the beam centering and to the correctness of the angle, so it reqires that a proper hit is detected in each of DC 2,3 and 4 on the x axis. For a proposal about this, look into the news A number of constants is involved, and calib.kumac can be very helpful in determining them, with a sort of "recentering" of the beam.

Constants

  • bend8_T
    magnetic field [Tesla]. 
  • bend8_L
    lenght of the magnet [cm]. 
  • bend8_c2
    distance of DC 4 from the magnet [cm]. 

Correction for bad Drift Chamber 4 ( early 1995 data )

option --baddc4_95 or [Variables] baddc5_95=1

It has happened, in the first part of the 1995 run (precisely from the beginning until the 31st of August) that cells 3 and 4 in DC4 had a serious cross talk problem, so that almost to every hit in cell 4 corresponds a hit in cell 3, and viceversa. Since this problem affects the momentum identification of the electron after gamma emission in a very interesting range, the following strategy is adopted to recover the correct hit:

if there is a hit in cell 4, then

  calculate the impact position in absolute space for it
  if there's no hit in cell 3, then
    use hit from cell 4 like it is in cell 3,
    calculate the impact position in absolute space for it
  endif

endif same for cell 3 calculate the electron momentum for each of the

   two positions in DC4. (call them pe4 and pe3)

compare ( 200-pe ) - calo*calo_corr

   and select the hit for which the difference is smaller 

Anyway, this seems not to be enough, for a bias in the calo readout is introduced by the shower extension. I'm still in doubt whether to give up or try to consider that too.

Constants

  • calo_corr
    is the ratio between calculated photon momentum ( beam energy - Pe ) and the energy deposit in calorimeter.
    It is calculated by calib.kumac for energy deposit in the calorimeter above 40 GeV, with a gaussian fit to the distribution of the ratio.

Gamma energy reconstruction with pair spectrometer

option --pairspect or [Variables] pairspect=1

I have integrated Kim's code for this task into book95, and adapted it to run on both '95 and '96 data, but it still has to be checked. (Kim, could you please write a few lines about it ?)

Constants

  • Trim6_T
    magnetic field [Tesla]. 
  • Trim6_L
    lenght of the magnet [cm]. 
  • Trim6_c1
    distance of DC 5 from the magnet [cm]. 
  • Trim6_c2
    distance of DC 6 from the magnet [cm]. 

Multiple hits in drift chambers 4, 5 and 6, x only

disabled by option --no_multihit or [Variables] no_multihit=1

This flag controls the creation of set of arrays in the ntuple and the storage in them of the complete sequence of the acceped hits, for each drift chamber. The hits are stored in the x4, x5 and x6 arrays in the ntuple, and the amounts of hits are stored in nhit4, nhit5, nhit6.

No dedicated constants

Multiple hits in drift chamber 3, x and y

option --multihit3 or [Variables] multihit3=1

Like the multiple hit option, but affecting only DC 3, and regarding both x and y positions. The hits are stored in the x3 and y3 arrays in the ntuple, and the amounts of hits are stored in nhit3x and nhit3y. It is only effective if the multiple hit option for the other DCs is NOT disabled.

No dedicated constants

Edit - History - Print - Recent Changes - Search
Page last modified on January 16, 2007, at 02:55 pm