[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wfd updates



Hi,

Below is a summary of our efforts on the wfd
hardware, wfd data acquisition and wfd data analysis
in May/June 03. Several hardware problems
were found and components were replaced. Necessary
updates to the wfd frontend code were made and
tested. Corresponding updates to the data analysis
code were also made and tested. Note that the same
frontend code and analysis code can be used in
either integrated mode or stand-alone mode.

The gory details are below, Madhu and Tim.

1. Wfd hardware updates.
------------------------

We replaced two daughter cards in wfd modules 0B and 3B.
As of June 10 all wfd channels  were considered working.
Three malfunctioning daughter cards have been
returned to BU for repair.


2. Wfd acquisition updates.
---------------------------

We've updated several aspects of the wfd frontend software.
The new version is located at mulan@mulandaq:~/mulandaq/mulanfe.
The relevant files are

fewfd2.c            // midas frontend
experim2.h          
compress2.c         // data compression routines
compress2.h          
wfd2.odb            // ODB structure

To use in integrated mode add #define PART_OF_MUCAP to
the beginning of fewfd2.c and make fewfd2. To use in
stand-alone mode remove #define PART_OF_MUCAP from
fewfd2.c and make fewfd2.

Updates:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We extended the databank formats written by the wfd
frontend program.

In the previous frontend version there were two formats
for recording wfd data,  raw segments (WF) and fitted
events (FE). In the new frontend version we added an additional
format (RE) raw events. These different formats are
described below

WF) The raw segment databank is an exact copy of the data
segment from the wfd itself, i.e.  phase 0 ADC data,
phase 0 TDC data, phase 1 ADC data, phase 1 TDC data.
No merging of phases and no removal of rollovers
has been performed. Thus these banks may be large.
These banks are named WF0T, WF0B, WF1T, WF1B, etc.w
wThese banks are named WF0T, WF0B, WF1T, WF1B, etc.w

RE) The raw event databank contains a seqeunce of pulse islands
comprising a time stamp, a pulse length, a sequence of
ADC bytes and a sequence of DSC bytes. These pulses have
been both phase-merged and rollover-stripped by the
frontend program. These banks are named RE0T, RE0B, etc.

FE) The fitted event databank contains a series of pulsd
descriptors comprising a raw event i.d. and a
time, area, height, width and pedestal. The algorithm
for generating a fitted event from a raw event
is dicusseed below.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We added a couple of odb parameters in the existing
sub-directory /equipment/Crate 4/Settings/Banks
and added a couple of odb parameters to the new
sub-directory /equipment/Crate 4/Settings/Fit parameters.

The sub-directory /equipment/Crate 4/Settings/Banks
now looks like

RAW Segment bank                0
RAW event bank                  1
FIT event bank                  1
Sampling factor                 100

It contains three switches 0/1 for the three
different databanks. Note though the writing of raw events
to raw databanks is initiated by either
finding >1 fitted pulses in the raw event island
or for a pre-scaled sample of raw event islands
(seeting sample factor = 100 will store every
100'th raw event). To get all raw events set
"Sampling factor 1".

The sub-directory /equipment/Crate 4/Settings/Fit parameters
looks like

Threshold                       10
Left Window                     3
Right Window                    10

A fitted event is generated when an ADC value
exceeds (thresold-pedestal) where threshold is
the parameter in the odb and pedestal is the
first non-zero ADC vxalue in the raw event island.
The lfet window and right window are adjustable
pre pile-up and post pile-up windows. This fitting
procedure is the DefNan algorithm from g-2.

++++++++++++++++++++++++++++++++++++++++++++++++++++

We changed the fitting algorithm. The earlier version
of the wfd frontend program used the g-2 Def2Nan algorithm
The current version of the wfd frontend program
uses the DefNan algorithm. This decision was
made after analyzing the Nov/Dec 2002 mu+ data.

++++++++++++++++++++++++++++++++++++++++++++++++++++

We made the wfd frontend program compatible with both
integrated running and stand-along running  by

a) changing the ODB format of stand-alone acquisition to
store wfd settings in the sun-directory "/equipment/Crate 4"
rather than "/equipment/wfd"

b) adding an additional #ifdef PART_OF_MUCAP in fewfd.c to
select either "BUF4" or "SYSTEM" as the data buffers for
intergrated mode or stand-alone mode.




3. Wfd analysis updates.
------------------------

We have updated the muroot analysis package
to analyze the wfd data banks. The analysis
package is located in the two directories
mucapdaq/newmuroot and mucapdaq/newminimulan
in the mulan account on the mulandaq computer.

++++++++++++++++++++++++++++++++++++++++++++++++++++

Now to look at the pulse islands in the raw event
banks go to mucapdaq/newminimulan and type

./muroot

.L SCOPE.C+
SCOPE(99,1,"0T")


The arguments to the SCOPE() method are
the run number, the number of segments to analyze,
and the wfd identifier (0T, OB, etc).

SCOPE() calls the method ProcessFile in
TSCOPE.cpp - a derived analysis class that
inherits from the TMulanAnalysis base class.
It calls BuildFill() to unpack the midas raw
event data into raw event objects and calls
ProcessFill() to histogram the root
raw event objects. The old-style pre-processing
via midas2root() is unnecessary.

++++++++++++++++++++++++++++++++++++++++++++++++++++

Now to look at the fited pulses in the fitted event
banks go to mucapdaq/newminimulan and type

./muroot

.L QOD.C+
QOD(99,1)


The arguments to the SCOPE() method are
the run number and number of segments to analyze,

QOD() calls the method ProcessFile in
TQOD.cpp - a derived analysis class that
inherits from the TMulanAnalysis base class.
It calls BuildFill() to unpack the midas fitted
event data into raw event objects and calls
ProcessFill() to fill histograms of root
raw event objects. Again the old-style pre-processing
via midas2root() is unnecessary.

++++++++++++++++++++++++++++++++++++++++++++++++++++

Note the relevant routines are for QOD() and SCOPE()
are

DaqFormat/TRawWfdModule.cpp
DaqFormat/TFittedWfdModule.cpp

which unpack their corressponding midas databanks
and fill the corresponding root event objects.

Events/TRawWfdEvent.cpp
Events/TFittedWfdEvent.cpp

which are containers for the event objects and
provide the Set's and Get's for making and retrieving
the objects.

Branches/TRawWfdBranch.cpp
BranchesTFittedWfdBranch.cpp

which are containers for the arrays of the event objects
in each data segment (midas event).

++++++++++++++++++++++++++++++++++++++++++++++++++++

Also note that the analysis of particular data types
are enabled or disabled via a configuration file
.mulanproperties. The file contains the names of
banks to analyze. At the beginning of the analysis
the information in .mulanproperties is read into
a configuration object. The Build() methods that
assemble the arays of objects are called when
branch->IsActiveInConfig(config) is true.
At present the IsActiveInConfig() methods just
check if the databank name is the configuration
object.

++++++++++++++++++++++++++++++++++++++++++++++++++++

(To analyze the raw segments  one still runs midas2root()
for the phase merging and the rollover suppression.


4. Sample data
--------------

Sample cosmic-ray runs,  taken in integrated mode with
updated frontend, are available

Run 674 raw events+fitted events w/o rollover
Run 675 raw events+fitted events w/ rollover
Run 676 raw segments+raw events+fitted events w/ rollover
Run 677 raw segments+raw events+fitted events w/o rollover