[BLAST_ANAWARE] dst_filter.C checked into BlastLib2

From: zhangchi (zhangchi@general.lns.mit.edu)
Date: Tue Dec 23 2003 - 00:13:08 EST


Hi all,

I checked in a script dst_filter.C to BlastLib2. it has <=200 lines, and
does the following things:

open a dst file (thanks to Chris who made a dst.C which in turn runs
init.C on dst file). dump to screen some information about run and fills:

run 4133 : 3 fiils, 615 events target=ABS gas=H
        inhibcharge on +hel 56.0699 -hel 75.496
 
 fill 7315 ave_bg_rate 4433.47/C
        inhibcharge on +hel 23.5621 -hel 28.3246
 fill 7316 ave_bg_rate 4899.63/C
        inhibcharge on +hel 21.602 -hel 22.0545
 fill 7317 ave_bg_rate 5708.7/C
        inhibcharge on +hel 10.9058 -hel 25.1168

read through the dst physics event tree and read the correspondent epics
and scaler events. So it shows some of the functions available to read
things out of DST trees

create and fill an short ntuple based on a meaningless cut that left has a
positive track.

if WC high voltages changed, it dumps the epics event number, epics time
and wire chamber box number and high voltages value to screen. for this
run, it is the change at the very beginning of the run when all epics are
read, epics record of WCHV changed from 0 to 3800,
Epics : 12
 Time : 20-Dec-2003 19:26:00.108689
0 3800 1 3800 2 3800 3 3800 4 3800 5 3800 6 3800
7 3800 8 3800 9 3800 10 3800 11 3800 12 3800
13 3800 14 3800 15 3800 16 3800 17 3800 18 3800
....

if one lowers the DV of certain WC boxes, it will show.

when applying the cut and fill the ntuple, it pulls the scaler charge
recorded in dst, cut away intervals that do not contain events passing the
cut and recalculate the "after cut" charge.

this is done by following the rule illustrated in the figure below:

****************************_____________******************************__
| | | | | | | | | | | | | | | | | | | | | | | |
1 2 3 4
\___________ _____________/ \______________ ____________/
            \/ \/
           good good
where * presents physics events passing the cut
      _ presents time when no physics events passing the cut
      | presents scaler events coming at constant interval
I marked 1,2,3,4 four scaler events, total charge after cut is then Q2-Q1
+ Q4-Q3. where Qi is the charge integrated from the very 1st scaler event
to the ith. this charge information is recorded in each scaler event.

below is a history of this operation, two colums are the "after cut"
charge on hel+ and -. each line presents an incident that during the
time braketed by two scaler events, no physics events passed the cut(like
between 2 and 3). program will do Q2-Q1 here and then move on.

last line is the total "after cut". not it is smaller than total for the
run.

0.000000 9.996968
0.000000 23.828308
0.969561 25.627445
3.254935 25.627445
5.262906 25.627445
13.002054 25.627445
13.330736 25.627445
17.857899 25.627445
31.688847 25.627445
33.607407 25.627445
39.633335 25.627445
43.368561 32.192177
43.368561 34.762081
43.368561 36.302872
43.368561 44.123089
43.368561 44.985050
43.368561 45.174797
43.368561 48.355824
43.368561 67.077011

it ofcourse does not make much sense to reintegrate charge under this cut.
but it certainly does if the cut is: bgbeam>40mA.

I copied a file into ~blast:$ANALDIR: dst-4133.root. but it is not a full
crunch but rather reconstructs only 1 out of each 100 events. (it is not a
bug, I changed my lrn.cc to do so in order to debug per run/per fill
features quickly)

this is how to run it: root dst_filter.C 4133

it only works with the head version of BlastLib2, make sure you update to
the head bofore using it.

enjoy

Chi



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:30 EST