Project

General

Profile

How to decode MWPC data » History » Version 2

Jixie Zhang, 01/21/2021 04:27 AM

1 1 Jixie Zhang
h1. How to decode MWPC data
2
3
The decoder of MWPC can finally create root tree.
4
5
The decoder is located at  /home/a-compton/MWPC/analysis/track/anatka.C
6
7
MWPC calibration is stored at /home/a-compton/MWPC/analysis/track/anatk.inp
8
It includes the reference positions of each chamber, also the pedestal of each TDC module.  
9
Most importantly, it tells the time cut value which will be used to determine if a hit is out of time.
10
11
Here is how is looks:
12
----------------------------------------------------------------------------------------------------------------------------
13
[a-compton@soliddaq track]> cat anatk.inp
14
/home/nfs/ftbf_user/experiments/EDIT2018/MWPC/data/exp_20180312155107.dat              ifile
15
1
16
    5000000
17
    198.8     475.0    758.8     1534.5                  zz
18
     6.362    6.498     6.45       6.48                  xi
19
     6.44      6.49     6.41       6.42                  yi
20
     0.45 
21
   59 58  59  60  50  51  51  52
22
   50 50  53  54  50  50  49  48
23
   18                                                    | itwin (time window)
24
25
========================================================================
26
 line 1   file name of data to process
27
 line 2   file flag.  if 1  use the file selection, if 2 use the name from liine 1
28
 line 3   event limit
29
 line 4   Z locations of chambers.  0 is upstream face of hall.   units  cm
30
 line 5   x0  location of first wire  in x
31
 line 6   y0
32
 line 7   Allowable window for finding possible hits on a track
33
 line 8   Center of time distributatioin TCDs 0 - 7
34
 line 8                                       8 - 15
35
 line 9   Require time in the tdcs be within +/- this value
36
----------------------------------------------------------------------------------------------------------------------------
37
38
39
How to run the decoder:  
40
step 1):  synchronize the raw data file    /home/a-compton/MWPC/cpdata.csh
41
step 2) run decoder:   /home/a-compton/MWPC/analysis/track/wctree.csh
42
43
44
A) It will ask you which file you want to decode, you make your choice here, usually
45
the last file is the latest run.
46
B) After you select which file to decode, it will read the first line to tell you what is the 
47
possible run number. Some times this value is wrong. You can type in the correct run 
48
number if you are sure, otherwise just copy the run number.
49
C) What is the output?
50
 root tree will be stored at  /home/a-compton/MWPC/wcnt_xxx.root,  where xxx is the run number.
51
beam position figure will be store at   /home/a-compton/MWPC/log/BeamPosition_xxx.png
52
53
=======================================================
54 2 Jixie Zhang
wire ID definition:  
55
  0-127    chamber0 X plane
56
128-255    chamber0 Y plane
57
 256-383   chamber1 X plane
58
384-511    chamber1 Y plane
59
512-629    chamber2 X plane
60
630-757    chamber2 Y plane
61
758-885    chamber3 X plane
62
886-1023   chamber3 Y plane
63
64 1 Jixie Zhang
The root file includes a lot of monitoring histogram, also the tree named 'M':
65
Here is the tree branches:
66
67
 spill           -->spill number
68
 evn           -->event number
69
 etime        -->event time relative to spill start
70
 nhit_raw    -->number of raw hits
71
 wire_raw   -->wire id of raw hits 
72
 tdc_raw    --> tdc of raw hits 
73
 nhit_tcut   -->number of hits after time cut
74
 wire_tcut  -->wire id of hits after time cut 
75
 tdc_tcut    --> tdc values after subtracted the pedestal and pass time cut
76
77
 nx0           -->number of hits in chamber0 X plane
78
 x0             -->X positions of chamber0 X plane
79
 ny0           -->number of hits in chamber0 Y plane
80
 y0             -->Y positions of chamber0 Y plane
81
82
 nx1           -->number of hits in chamber1 X plane
83
 x1             -->X positions of chamber1 X plane
84
 ny1           -->number of hits in chamber1 Y plane
85
 y1             -->Y positions of chamber1 Y plane
86
87
 nx2           -->number of hits in chamber2 X plane
88
 x2             -->X positions of chamber2 X plane
89
 ny2           -->number of hits in chamber2 Y plane
90
 y2             -->Y positions of chamber2 Y plane
91
 
92
 nx3           -->number of hits in chamber3 X plane
93
 x3             -->X positions of chamber3 X plane
94
 ny3           -->number of hits in chamber3 Y plane
95
 y3             -->Y positions of chamber3 Y plane
96
97
98
=======================================================
99
The description of monitoring histogram is here:
100
 OBJ: TH1F     h100    All Wire Hits : 0 at: 0x1ed4740
101
  OBJ: TH1F     h200     M TDC 0 : 0 at: 0x1f7e800
102
  KEY: TH1F     h301;1  X Dev 2  1234
103
  KEY: TH1F     h302;1  X Dev 3  1234
104
  KEY: TH1F     h311;1  Y Dev 2  1234
105
  KEY: TH1F     h312;1  Y Dev 3  1234
106
  KEY: TH1F     h305;1  X Dev 2  123
107
  KEY: TH1F     h306;1  X Dev 2  124
108
  KEY: TH1F     h307;1  X Dev 3  134
109
  KEY: TH1F     h308;1  X Dev 3  234
110
  KEY: TH1F     h315;1  Y Dev 2  123
111
  KEY: TH1F     h316;1  Y Dev 2  124
112
  KEY: TH1F     h317;1  Y Dev 3  134
113
  KEY: TH1F     h318;1  Y Dev 3  234
114
  KEY: TH1F     h380;1   Raw Hit/Event
115
  KEY: TH1F     h381;1   Hits/Event after Tcut
116
  KEY: TH1F     h390;1   Times after Tcut
117
  KEY: TH1F     h391;1   Times before Tcut
118
  KEY: TH1F     h392;1   Offset Times before Tcut
119
  KEY: TH1F     h100;1  All Wire Hits
120
  KEY: TH1F     h120;1  Event Time
121
  KEY: TH1F     h121;1  Time bet. Ev
122
  KEY: TH1F     h130;1  Events per Spill
123
  KEY: TH1F     h150;1  h150 Wire Chamber 1 X
124
  KEY: TH1F     h151;1  h151 Wire Chamber 1 Y
125
  KEY: TH1F     h152;1  h152 Wire Chamber 2 X
126
  KEY: TH1F     h153;1  h153 Wire Chamber 2 Y
127
  KEY: TH1F     h154;1  h154 Wire Chamber 3 X
128
  KEY: TH1F     h155;1  h155 Wire Chamber 3 Y
129
  KEY: TH1F     h156;1  h156 Wire Chamber 4 X
130
  KEY: TH1F     h157;1  h157 Wire Chamber 4 Y
131
  KEY: TH1F     h160;1   Hits 1X
132
  KEY: TH1F     h161;1   Hits 1Y
133
  KEY: TH1F     h162;1   Hits 2X
134
  KEY: TH1F     h163;1   Hits 2Y
135
  KEY: TH1F     h164;1   Hits 3X
136
  KEY: TH1F     h165;1   Hits 3Y
137
  KEY: TH1F     h166;1   Hits 4X
138
  KEY: TH1F     h167;1   Hits 4Y
139
  KEY: TH1F     h110;1  All Time Hits
140
  KEY: TH2F     h181;1   Chamber 1
141
  KEY: TH2F     h182;1   Chamber 2
142
  KEY: TH2F     h183;1   Chamber 3
143
  KEY: TH2F     h184;1   Chamber 4
144
  KEY: TH1F     h200;1   M TDC 0
145
  KEY: TH1F     h201;1   M TDC 1
146
  KEY: TH1F     h202;1   M TDC 2
147
  KEY: TH1F     h203;1   M TDC 3
148
  KEY: TH1F     h204;1   M TDC 4
149
  KEY: TH1F     h205;1   M TDC 5
150
  KEY: TH1F     h206;1   M TDC 6
151
  KEY: TH1F     h207;1   M TDC 7
152
  KEY: TH1F     h208;1   M TDC 8
153
  KEY: TH1F     h209;1   M TDC 9
154
  KEY: TH1F     h210;1   M TDC 10
155
  KEY: TH1F     h211;1   M TDC 11
156
  KEY: TH1F     h212;1   M TDC 12
157
  KEY: TH1F     h213;1   M TDC 13
158
  KEY: TH1F     h214;1   M TDC 14
159
  KEY: TH1F     h215;1   M TDC 15
160
  KEY: TH2F     h320;1   X(6) Y(5) Tracks
161
  KEY: TH1F     h321;1   X Tracks
162
  KEY: TH1F     h322;1   Y Tracks
163
  KEY: TH1F     h341;1   X Track Slope
164
  KEY: TH1F     h342;1   X Track Intercept
165
  KEY: TH1F     h343;1   Y Track Slope
166
  KEY: TH1F     h344;1   Y Track Intercept
167
  KEY: TNtuple  trk;1   StLine
168
=======================================================
169
170