In the previous section of this workbook, we discussed External routines and how to call them. Closely related to Externals are another type of routine known as Processors. Processors differ from Externals both in how they are called and in how they function. Where the arguments supplied to an External are some list of variables, the arguments supplied to a Processor are a single "option." The option is either INIT for initialization, DOIT for the actual running, or SUM or END for correlating and writing the output. Where an External usually returns its output as a variable or set of variables, a Processor returns its output as a bank or set of banks. In addition, Processors usually have a control bank associated with them that lets the user set some parameters for how they run.
Perhaps the most obvious example of a processor would be Recsld which takes the raw data and reconstructs the events, putting them into either DST or Mini-DST banks.
The Processor Command and Initialization
Before we look at some processors, there are some general points we should
note. First, all processors have an initialization stage. At this time,
banks that the processors need to run or will later fill are loaded
into memory, histograms are booked, and other start up procedures such
as zeroing out arrays are performed. We previously mentioned that
processors are called with options, the initialization is obviously done
with the option init. We also mentioned that processors are closely
related to externals. With this in mind, if we had a processor called
MYPROC, using what we have learned one would start there IDA session with:
EXTERNAL MYPROC 1 CALL MYPROC (INIT)This in fact would work, but there is a better way! The proper way to declare and initialize a processor is by issuing the PROCESSOR command. So all we would have to say at the IDA prompt is:
PROCESSOR MYPROCand the processor would load and initialize.
Reconstructing events properly is essential for any Detector. At SLD when we reconstruct an event we must reconstruct the tracking, and extrapolate it through the detector. We must reconstruct the Kal system (lac, lum and Wic pads) to get the energy, clusters and attempt electron identification. We must reconstruct crid events for later analysis (attempted particle ID). We also reconstruct the information from the Wic strips for muon identification. Finally we try to associate different quantities together such as tracks and clusters. In the case of Monte Carlo data we must also make the association between reconstructed quantities and the MCPART list.
In order to do a full reconstruction we would need to call 10 different processors each requiring its own preparation processor. Reconstruction would be quite difficult for the user to run if they had to call 20 routines in the correct order. Fortunately the calls have been grouped into one driving processor called RECSLD.
There is one danger that people should keep in mind when reconstructing events. Monte Carlo events reconstruct just fine with RECSLD, however Raw Data Kal events need to be run through an additional processor KALKLU, before one can call RECSLD. The reason for this is the Kal raw data comes up in one form and the monte carlo another. So we must copy the raw data to a form that is acceptable for reconstruction.
In order to better understand how to reconstruct events let's try it.
Finding Jets
There are other useful processors essential to doing High Energy Physics
at SLD. One such processor is the Jetfinder JETFND.PREPMORT. The Jetfinder
has the capability of using any of seven different algorithms to find jets,
the two most notable are YCLUS and Lund's LUCUS. Furthermore the user
has the option of selecting any one of twelve sources for the data used
(charged tracks, calorimetry clusters,etc) in finding jets. Finally the
user may set the maximum value of the Ycut (Invariant jet mass/visible energy
in event) for an individual jet.
It turns out to be relatively easy to use the jetfinder in whatever configuration one chooses as illustrated by the following.
Event Shapes and Thrust Axis
Closely related to the Jetfinder is the Shape finder.
The shape finder calculates event information such as thrust,
thrust axis, sphericity axis and eigenvalues, and oblateness.
It allows the user to specify which of thirteen sources of data to be used
in analyzing the event.
It allows the user to cut on the transverse momentum
and absolute value of costheta for particles to be considered.
The shapefinder is easy to use, but one should be careful of which modes one uses it in (and why). The following will illuminate the situation.
Command Processors
The use of processors enables us to send our data out to other software
packages for manipulation. Alternatively there is a way to bring other
software packages into ida through the use of command processors. Command
processors supply an interface or interpretor between IDA and other
packages allowing us to use them in conjunction with an interactive
IDA session. We have already seen an example of this in the
First Daysection of the workbook where we used
the Event Display Package.
Although we did not state it at the time the Event Displaay Package DSP
is actually a command processor.
SLD employs other command processors as well. The way a user invokes them is to issue the command CMDPROC (name of command processor) from inside an Ida session.
Fitting With Minuit - CMDPROC MFITCMD
Many users are already familiar with the packages available in cernlib.
For those who are not, Minuit is a tool for function minimization and error
analysis. SLD has a command processor that supplies the user with an
interface to Minuit via IDA. This interface allows the user to use Minuit
to fit functions to histograms and data in the active memory of the IDA
session.
Minuit can fit to lines, polynomials, gaussian's, exponentials and user defined functions. Minuit does its minimization using the MIGRAD method by default but can be switched to use SIMPLEX, SCAN, and SEEK. Also one can use the MINIMIZE method which attempts to use the MIGRAD method and switches to SIMPLEX if MIGRAD fails. For more detail consult the MINUIT manual.
For the purpose of this manual we will just play with simple fitting of histograms inside IDA.
More About The Event Display - CMDPROC DSPCMD
You have already learned about the event display.
To start it, just type CMDPROC DSPCMD.
For help on the rest of the package, just type HELP DSP.
Check out the
SLD Event Display Art Gallery for some examples of event display images,
most of which are available as PostScript files on the SLACVX cluster
in DISK$SLD_USR0:[PERL.EVENT_PICS]
.
Special thanks to Tom Junk for his input on Exercises 2 & 3 .