Project

General

Profile

Actions

How to decode MWPC data

The decoder of MWPC can finally create root tree.

The decoder is located at /home/a-compton/MWPC/analysis/track/anatka.C

MWPC calibration is stored at /home/a-compton/MWPC/analysis/track/anatk.inp
It includes the reference positions of each chamber, also the pedestal of each TDC module.
Most importantly, it tells the time cut value which will be used to determine if a hit is out of time.

Here is how is looks:
----------------------------------------------------------------------------------------------------------------------------
[a-compton@soliddaq track]> cat anatk.inp
/home/nfs/ftbf_user/experiments/EDIT2018/MWPC/data/exp_20180312155107.dat ifile
1
5000000
198.8 475.0 758.8 1534.5 zz
6.362 6.498 6.45 6.48 xi
6.44 6.49 6.41 6.42 yi
0.45
59 58 59 60 50 51 51 52
50 50 53 54 50 50 49 48
18 | itwin (time window)

========================================================================
line 1 file name of data to process
line 2 file flag. if 1 use the file selection, if 2 use the name from liine 1
line 3 event limit
line 4 Z locations of chambers. 0 is upstream face of hall. units cm
line 5 x0 location of first wire in x
line 6 y0
line 7 Allowable window for finding possible hits on a track
line 8 Center of time distributatioin TCDs 0 - 7
line 8 8 - 15
line 9 Require time in the tdcs be within +/- this value
----------------------------------------------------------------------------------------------------------------------------

How to run the decoder:
step 1): synchronize the raw data file /home/a-compton/MWPC/cpdata.csh
step 2) run decoder: /home/a-compton/MWPC/analysis/track/wctree.csh

A) It will ask you which file you want to decode, you make your choice here, usually
the last file is the latest run.
B) After you select which file to decode, it will read the first line to tell you what is the
possible run number. Some times this value is wrong. You can type in the correct run
number if you are sure, otherwise just copy the run number.
C) What is the output?
root tree will be stored at /home/a-compton/MWPC/wcnt_xxx.root, where xxx is the run number.
beam position figure will be store at /home/a-compton/MWPC/log/BeamPosition_xxx.png

=======================================================
wire ID definition:
0-127 chamber0 X plane
128-255 chamber0 Y plane
256-383 chamber1 X plane
384-511 chamber1 Y plane
512-629 chamber2 X plane
630-757 chamber2 Y plane
758-885 chamber3 X plane
886-1023 chamber3 Y plane

The root file includes a lot of monitoring histogram, also the tree named 'M':
Here is the tree branches:

spill           -->spill number
evn -->event number
etime -->event time relative to spill start
nhit_raw -->number of raw hits
wire_raw -->wire id of raw hits
tdc_raw --> tdc of raw hits
nhit_tcut -->number of hits after time cut
wire_tcut -->wire id of hits after time cut
tdc_tcut --> tdc values after subtracted the pedestal and pass time cut
nx0           -->number of hits in chamber0 X plane
x0 -->X positions of chamber0 X plane
ny0 -->number of hits in chamber0 Y plane
y0 -->Y positions of chamber0 Y plane
nx1           -->number of hits in chamber1 X plane
x1 -->X positions of chamber1 X plane
ny1 -->number of hits in chamber1 Y plane
y1 -->Y positions of chamber1 Y plane
nx2           -->number of hits in chamber2 X plane
x2 -->X positions of chamber2 X plane
ny2 -->number of hits in chamber2 Y plane
y2 -->Y positions of chamber2 Y plane
nx3           -->number of hits in chamber3 X plane
x3 -->X positions of chamber3 X plane
ny3 -->number of hits in chamber3 Y plane
y3 -->Y positions of chamber3 Y plane

=======================================================
The description of monitoring histogram is here:
OBJ: TH1F h100 All Wire Hits : 0 at: 0x1ed4740
OBJ: TH1F h200 M TDC 0 : 0 at: 0x1f7e800
KEY: TH1F h301;1 X Dev 2 1234
KEY: TH1F h302;1 X Dev 3 1234
KEY: TH1F h311;1 Y Dev 2 1234
KEY: TH1F h312;1 Y Dev 3 1234
KEY: TH1F h305;1 X Dev 2 123
KEY: TH1F h306;1 X Dev 2 124
KEY: TH1F h307;1 X Dev 3 134
KEY: TH1F h308;1 X Dev 3 234
KEY: TH1F h315;1 Y Dev 2 123
KEY: TH1F h316;1 Y Dev 2 124
KEY: TH1F h317;1 Y Dev 3 134
KEY: TH1F h318;1 Y Dev 3 234
KEY: TH1F h380;1 Raw Hit/Event
KEY: TH1F h381;1 Hits/Event after Tcut
KEY: TH1F h390;1 Times after Tcut
KEY: TH1F h391;1 Times before Tcut
KEY: TH1F h392;1 Offset Times before Tcut
KEY: TH1F h100;1 All Wire Hits
KEY: TH1F h120;1 Event Time
KEY: TH1F h121;1 Time bet. Ev
KEY: TH1F h130;1 Events per Spill
KEY: TH1F h150;1 h150 Wire Chamber 1 X
KEY: TH1F h151;1 h151 Wire Chamber 1 Y
KEY: TH1F h152;1 h152 Wire Chamber 2 X
KEY: TH1F h153;1 h153 Wire Chamber 2 Y
KEY: TH1F h154;1 h154 Wire Chamber 3 X
KEY: TH1F h155;1 h155 Wire Chamber 3 Y
KEY: TH1F h156;1 h156 Wire Chamber 4 X
KEY: TH1F h157;1 h157 Wire Chamber 4 Y
KEY: TH1F h160;1 Hits 1X
KEY: TH1F h161;1 Hits 1Y
KEY: TH1F h162;1 Hits 2X
KEY: TH1F h163;1 Hits 2Y
KEY: TH1F h164;1 Hits 3X
KEY: TH1F h165;1 Hits 3Y
KEY: TH1F h166;1 Hits 4X
KEY: TH1F h167;1 Hits 4Y
KEY: TH1F h110;1 All Time Hits
KEY: TH2F h181;1 Chamber 1
KEY: TH2F h182;1 Chamber 2
KEY: TH2F h183;1 Chamber 3
KEY: TH2F h184;1 Chamber 4
KEY: TH1F h200;1 M TDC 0
KEY: TH1F h201;1 M TDC 1
KEY: TH1F h202;1 M TDC 2
KEY: TH1F h203;1 M TDC 3
KEY: TH1F h204;1 M TDC 4
KEY: TH1F h205;1 M TDC 5
KEY: TH1F h206;1 M TDC 6
KEY: TH1F h207;1 M TDC 7
KEY: TH1F h208;1 M TDC 8
KEY: TH1F h209;1 M TDC 9
KEY: TH1F h210;1 M TDC 10
KEY: TH1F h211;1 M TDC 11
KEY: TH1F h212;1 M TDC 12
KEY: TH1F h213;1 M TDC 13
KEY: TH1F h214;1 M TDC 14
KEY: TH1F h215;1 M TDC 15
KEY: TH2F h320;1 X(6) Y(5) Tracks
KEY: TH1F h321;1 X Tracks
KEY: TH1F h322;1 Y Tracks
KEY: TH1F h341;1 X Track Slope
KEY: TH1F h342;1 X Track Intercept
KEY: TH1F h343;1 Y Track Slope
KEY: TH1F h344;1 Y Track Intercept
KEY: TNtuple trk;1 StLine =======================================================

Updated by Jixie Zhang over 3 years ago · 2 revisions