Diana Software
diana_tutorial_averagepulse.cfg
Go to the documentation of this file.
1 # /** @example diana_tutorial_averagepulse.cfg
2 # @brief Tutorial 2.
3 # @author Marco Vignati */
4 #
5 # Sequence to compute the average signal pulse of each channel.
6 # It includes the filter MTutorialAmplitudeFilter and the module MTutorialAveragePulse.
7 # Create the directory "avg" if it does not exist then execute as:
8 #
9 # shell> diana -C cfg/tutorial/diana_tutorial_averagepulse.cfg
10 #
11 # Average pulses are saved as global quantities in the file
12 # produced by MTutorialAveragePulse. To look at this output,
13 # open a TBrowser whitin root, open the file, go into
14 # the "Global" directory, right click on an average pulse
15 # and then "Draw".
16 
17 
18 sequence TutorialAveragePulseSequence
19 
20 # Reads a root file containing events. The file being read
21 # is produced by diana_tutorial.cfg
22 reader RootFileReader
23 verbosity = info
24 enable = true
25 InputFile = data/Analyzed.list
26 EventNumberPrintStep = 10000
27 endmod
28 
29 # Load QRunData and QDetChannelCollection from the file read by the reader,
30 # and save it to the output file written by the writer.
31 module RunDataLoader
32 verbosity = info
33 enable = true
34 Input = CurrentReader
35 Output = CurrentWriter
36 endmod
37 
38 # Filter events using raw event information. In this case
39 # events marked as "signal" by the DAQ are selected
40 # The Logic=CASE options tells to ignore the result of previous
41 # filters. Since there are no filters before this filter,
42 # the Logic option is useless in this case.
43 # Since RawDataFilter information is already present in the
44 # event from the diana_tutorial.cfg sequence, we specify
45 # an ExtraLabel. The label of the bool variable in the QEvent will be
46 # RawDataFilter_AveragePulse@Passed instead of RawDataFilter@Passed.
47 filter RawDataFilter
48 enable = true
49 verbosity = info
50 Logic = CASE
51 KeepSignal = true
52 KeepHeater = false
53 KeepNoise = false
54 KeepThermometers = false
55 ExtraLabel = AveragePulse
56 endmod
57 
58 # select waveforms with only 1 identified peak and
59 # with small baseline slope (removes pileups).
60 filter BadPulse
61 enable = true
62 verbosity = info
63 Logic = AND
64 NumberOfPeaks = 1
65 MaxBaselineSlope = 0.02
66 endmod
67 
68 # Select events with amplitude in the range
69 # 50-1000. The amplitude variable can be chosen by
70 # the user. In this case we use PulseBasicParameters@MaxBaseline,
71 # the Maximum-Baseline value in mV computed by module PulseBasicParameters.
72 # The Logic is set to AND, i.e. the output of this filter is
73 # combined with the output of previouse filters.
74 # As result only events which are marked as Signal (selcted by
75 # RawDataFilter above) with amplitude in the 50-1000 mV range
76 # will be available for MTutorialAveragePulse
77 filter TutorialAmplitudeFilter
78 enable = true
79 verbosity = info
80 Logic = AND
81 AmplitudeMinimum = 50
82 AmplitudeMaximum = 3000
83 AmplitudeLabel = PulseBasicParameters@MaxBaseline
84 endmod
85 
86 # Average pulses. The average is performed on each
87 # channel separately.
88 module TutorialAveragePulse
89 enable = true
90 verbosity = info
91 Output = avg/averagepulses.root
92 endmod
93 
94 # Write events to file with file prefix "AveragePulses"
95 writer RootFileWriter
96 verbosity = info
97 enable = true
98 Description = data with amplitude
99 WriteFilesList = true
100 OutputFilesList = AveragePulses.list
101 OutputFilePrefix = AveragePulses
102 OutputDir = data
103 AliasFileName = ${DIANA_INSTALL}/cfg/aliases.txt
104 endmod
105 
106 endseq