Range Stack Cable trimming Procedure

Procedure for Trimming the Bulk Range Stack Counters

History of the document

Procedure modifications

In Sept 2001 we use the kbeam trigger, not kmu2(2), and many steps in the original file were skipped.

People and contacts

If you want to know details, contact the following people.

Procedure

Goals

The bulk RS is timed in at the Range Card Inputs. Defining the time that the Mean Timed 2 signals arrive at the Range Cards as zero, the goal is to make the (single end) T signals arrive at -1 nsec, and the (single end) bulk range stack arrive at the RC's at +7 nsec. After the MT2 signals have been timed in with respect to the IC mult sum

Software

Currently all the software is located in ~e949/tr2/rstime/kofia3/rs_trim
(Directory tree can be viewed from any bnlkuXX machines only)

Step A: Establish the basic setup

  1. Unplug the 6 cables from the BV TDC in slot 12, and plug in the 6 trigger test cables.
  2. Use the SSP namelist with TDC (cs1) and RSTDC (cs2), without TDs (cs3,cs4) and without CCDs (in cs1). The current one is cs1_2_noCCD.cfg
  3. We keep D3 on, B=10kG.

Step B: Calibrate the TDC

  1. Use the pulser trigger with the beam off.
  2. Connect a chaben cable to a free pre-scaler output of the pulser trigger to use as a test pulser.
  3. Taking data to disk, run the pulser output sequentially in each test cable input (1-2 seconds is fine).

    Hint: Remember the rule white-to-the-right So when cable you testing is facing you, red cable is on top then the white wire of probe cable should be to the right.

  4. Process the data

Step C: Measure the MT2 arrival time at the Range Cards

  1. Disconnect all the MT2 inputs from the RC's, and plug them into the first two test cables:
          MT2 Sectors  1-12  =>  Cable 1(1:12)
          MT2 Sectors 13-24  =>  Cable 2(1:12)
     
  2. Set trigger to kbeam
  3. Take 30K kbeam events to file
  4. Process the data:
  5. Mean value from new_trim.result plus 7 ns should be used as a Center of no-trim zone in StepD .

Step X: T and 2 time measurements on inputs of MT2A board

  1. Disconnect the MT2A board signal cables to the test cables, following the record in Trigger Logbook #4, page 50:
    J1/ T:  1- 8 ---> test cable #1
    J7/L2:  1- 8 ---> test cable #2
    J2/ T:  9-16 ---> test cable #3
    J8/L2:  9-16 ---> test cable #4
    J3/ T: 17-24 ---> test cable #5
    J9/L2: 17-24 ---> test cable #6
    
  2. Set trigger to kbeam
  3. Take 30K kbeam events to file
  4. Process the data:

Step D: Measure the layer T, 3-21 arrival times at the Range Cards.

For each pair of sectors ( 1&2, 3&4, ..., 23&24) do (1)-(9)
  1. Unplug discriminator cables from Range Cards and plug them into BV TDC cables.
    CABLE 1:   Odd Sector  3-10
    CABLE 2:   Odd Sector 11-18
    CABLE 3:   Odd Sector 19-T
    CABLE 4:  Even Sector  3-10
    CABLE 5:  Even Sector 11-18
    CABLE 6:  Even Sector 19-T

    Hints:

  2. Take >=30K kbeam events to disk file kbeam_xx_yy.run, where
    xx = 01, 03, ..., 23
    yy = 02, 04, ..., 24
    run = run number

    If the name convension can not be followed then create symbolic links.

  3. Repeat steps 1-2 for sectors 01-02, 03-04, ... 23-24.
  4. Process the data:

Step E: Generate trims

  1. Goto StepE directory
    % cd StepE
  2. Create directory and get there
    % mkdir new_trim
    % cd new_trim
  3. Edit command script make_trims.sh . You can use the following script as an example.
  4. Run the script. As a result you will get:
    rc_diffs.txt File with deviations from common mean
    rc_trims.txt File with suggested trims
  5. Copy the file rc_trims.txt to something like suggested_trims_date.txt Edit this file to incorporate T-layer trims from Step X . Watch out for possible unreasonable trims.
  6. Printout the file. Following command is useful (65 lines with 105 chars):
    a2ps -1 -L65 -l 105 -o - suggessted_trims_date.txt | lpr -Pe787lp2r
  7. Make a graphic representation of trims.

    If this is the first time you do this procedure

    If this is the second time you do this procedure
    Now you have measuremnets before and after the trim, and you can compare how the things improve because of the trim.

    Edit command script trim_status.sh .
    You can use the following script as an example.

  8. Start PAW
    % paw
    PAW> exec ../source/trim_status

    You will get a set of pictures and histogram file trim_status.hbk with Ntuple that describe arrival times before trim, after trim and suggested trims.

    On the plot check if Red solid triangles are inside black box

    Black solid circles connected with solid line represent arrival times measured before trim with BV TDC.
    Blue open circles connected with dotted line represent expected arrival times after trim . They are calculated as arrival time before trim measured with BV TDC + trim from file.
    Red solid triangles connected with dashed line represent measured arrival times after trim with BV TDC.
    Purple open triangles connected with dotted line represent measured arrival times after trim with RS TDC. This is calculated as BV time before trim + observed difference between after trim and before trim as measured by RS TDC.
    Black box represent area where arrival times supposed to end up. So the goal is to put Red triangles in black box.


Step F: Check trims using RS TDC information

This measurement compares RS TDC arrival times. So there are 2 measurements involved: first is the RS TDC arrival time when RS trimming was performed, and the second is some time along the run.

  1. Goto StepF directory
    % cd StepF
  2. Create directory indicating run number and get there
    % mkdir check_46380
    % cd check_46380
  3. Edit command script check_46380.sh . You can use the following script as an example.
    Pay attention to which tables you are using
    use rd tof "/e949/etc/caldb/rd_tof.00001"
    use rd twk "/e949/etc/caldb/rd_twk.notwk"

    The rd_tof should be the same as used to get reference set of RS TDC arrival times in Step D
    The rd_twk should be rd_twk.notwk in all cases.
  4. Run the script. As a result you will get:
    check_46380_secXX.hbk Files with RS TDC arrival time histograms
    check_46380.dat Average arrival times for reference. We are going to get better values after histogram fitting. But you could see dead channels and anomalities.
  5. Fit the histograms (see StepD for more details it is the same kumac)


    % cd .. - go to upper direcotry
    % paw
    PAW> exec ../StepD/source/trim#fit check_46380
    PAW> exec ../StepD/source/trim#getfit check_46380

    As a result you will get:
    check_46380.fit Fit results
    check_46380_secXX.hbk files will contain now fitted histograms.
    check_46380.hbk Fit results in Ntuple for easy analysis

  6. Go back to working directory ./check_46380 and edit command script trim_status.sh . You can use the following script as an example. Run the script. As a result you will get trim_status.dat file that contains comparisons of 2 sets.
  7. Start PAW
    % paw
    PAW> for/file 66 check_46380_status.ps; meta 66 -111
    PAW> exec ../../StepE/source/trim_status 1 24 1001
    PAW> close 66

    You will get a set of pictures and histogram file trim_status.hbk with Ntuple that describe arrival times before trim, after trim and suggested trims.

    On the plot check if Purple open triangles are inside black box

    Black solid circles connected with solid line represent arrival times measured measured with BV TDC. for the first set of data. So those are result of lengthy procedure of StepC..StepE.
    Purple open triangles connected with dotted line represent measured arrival times measured with RS TDC. This is calculated as BV time of the first set + observed difference between first set and second set as measured by RS TDC.
    Black box represent area where arrival times supposed to end up. So the goal is to put Purple open triangles in black box.

  8. There might be suspicious channels. To view arrival times for those channels go to upper directory and start PAW .
    % paw
    PAW> for/file 66 check_46380_suspicious.ps; meta 66 -111
    PAW> exec ../StepD/trim#view check_46380 [sec#] [lay#] [end#]
    PAW> close 66

Sasha Kushnirneko
Last modified: Fri Oct 5 05:39:32 EDT 2001