How To - Reskim job
Kenji Hamano
Last modified : Dec17, 2004
Back to How To
Back to Home
A. Set up your test release and check out your user package.
1. See How to run analysis jobs on mercury to setup environment and test releases on mercury.
2. You need extra tags for reskim. On Nov 30, 2004, these are the extra tags for analysis-21.
EmcDataK V01-00-05
BetaMiniUser V00-01-55
BetaMiniSequences V00-11-03
UsrTools V00-04-08-04
3. There is a simple example in BToDlnuMiniUsre V00-01-02. You may want to check out this package and take a look at it. Details are in its README file.
B. In your user package, supposing you have your own programs MyOwnFilter.cc and MyOwnFilter.hh to select the events you want,
1. You need a file something like BetaMiniUserProduction.tcl. This tcl file sets up the common part of reskim. You can just copy this file and do not have to modify it.
2. Add these lines to AppUserBuild.cc:
// Sequences and modules for reskimming
#include "BetaMiniSequences/BetaMiniWriteSequence.hh"
#include "UsrTools/UsrCandRefCheck.hh"
// MyOwnFilter module
#include "YourUserPackage/MyOwnFilter.hh"
and these lines, too:
// Reskimming sequences and modules
BetaMiniWriteSequence(this);
add( new UsrCandRefCheck( "UsrCandRefCheck", "Enforce consistency between cnd and usr" ) );
// MyOwnFilter Module
add( new MyOwnFilter( "MyOwnFilter", "MyOwnFilter module"));
3. In your workdir, you need a tcl file something like myReskimJob.tcl to run reskim jobs.
Above tcl file set "streams" of your reskim job and souce BetaMiniUserProduction.tcl.
If you set streams to MyStream, then BetaMiniUserProduction.tcl requires two files MyStreamConfig.tcl and MyStreamPhysics.tcl corresponding to the name of the stream.
4. In MyStreamConfig.tcl, you can set
The output list of Composite BtaCandidates to store in the output collection
The output User Data to store in the output collection
For example, the contesnts of MyStreamConfig.tcl file can be
lappend outputBtaCandidates "BToDlnuSkimmedList"
Note that, simple candidate lists like
Default
ChargedTracks
CalorNeutral
CalorClusterNeutral
NeutralHad
are automatically written out, so do not append them. If you append these, you will get errors. Composite candidate lists like
BToDlnuSkimmedList
JPsiDefaultMass
are not automatically written out, so you need to lappend them in your MyStreamConfig.tcl.
Also note that, usual user data is automatically written out, so you do not have to lappend it.
5. In MyStreamPhysics.tcl, you can set your physics sequences and your analysis modules.
For example, the contents of MyStreamPhysics.tcl file can be something like
module disable MyOwnAnalysis
path append ${stream}Path MyOwnFilterModule
C. Run composition sequences.
To get composite lists in your output, you may have to run some composition sequences. The easiest way to do is to use BetaMiniPhysicsSequence.tcl.
1. In your MyStreamPhysics.tcl, add these lines
set fullMiniPhysSequence yes
sourceFoundFile BetaMiniSequences/BetaMiniPhysicsSequence.tcl
path append ${stream}Path BetaMiniPhysicsSequence
2. If you need only basic lists, comment out the first line. "set fullMiniPhysSequence yes". Changing yes to no does not work.
In this case these are going to be sourced:
SimpleComposition/SmpCompositionSequence.tcl
CompositionSequences/CompV0Sequence.tcl
CompositionSequences/CompKsProdSequence.tcl
3. If you do not comment out the first line, in addition to those sequences, this sequence will be sourced:
CompositionSequences/CompProdCreateSequence.tcl
This will run all the compotition sequences, so your job will significantly slow down. You may want to modify CompProdCreateSequence.tcl to remove unwanted sequences.
1-1. Check out CompositionSequences package.
1-2. Modify CompProdCreateSequence.tcl