PC reduction step 2-4
Back to all README files

  For info on how to run PC reduction look in MC generation (PC reduction)
        (assuming you already have a complied binary otherwise stay on this page!)


Table of contents:

Current work on PC reduction
Tools
Disk space and time to run PC2-4
Inside the directory log/event
Running PC 2-4 (including compiling patcomb)
Problems and solutions




Current Work on PC reduction


Updated (April 25th, 2006) event rate plots for each PC steps:

back to top


Tools:


1) Creating the event rate plots:

Those scripts use the information contained in the log/event files (see here for more info)

To run following scripts , I just do:

script.pl > name.out

and usually the name.out is an input for the next program. Just look at the scrpit it is easy to figure it out.
Also to run those script, I need the goodrun list which is usually given by the FC people.
For example here I used "usedrun_805days.out"

To count event in a run:

 as a function of livetime
or as a function of run:

To count event in a subrun:
No kumac ready yet, usually I just scan the file by eye, grepping around the run number that I am interesetd in.


back to top


Inside the directory log/event:

This is not a complete explanation.. just a beginning related to whether an event pass a given PC reudction or not:


If I look at

       266   25734       4  525953     105      10
 4      23       7      25       0**************** |
      0       1       1       0       0       0 |
 0       0 |        1       1       0       1       0
      0       0       0       1       0       1 |
 1       1 |        1       0       0       0       1 |
         0       0       0       0       0       0
 0       0       0       0       0       0       0
   0       0       0       0       0       0       0

Then:

266        = event number within subrun
25734    = run number
4            = subrun number
525953  = event number 


 The first 6 numbers after  0****************  (ie    0       1       1       0       0       0 | in my example)
 correspond to passing or failing PC 1,2,3,4,5,6 respectively.

 If number=1 then the event passed  PCx (here the event passed pc2 and 3)
 and if number =0 then either PCx was not applied or the event didn't pass.



The 5 sections after corresponds to each PC step: each number corresponds to one cut, and you can find the mapping in:
loginfo.h




back to top


Time and Disk Space:

Here is an estimate of how much CPU time and how much disk space you need to run PC2-4:


Disk Space:

Looking at runs 25000-25735 (= 155 days of data) the disk space splits in the following way:

pat2nd 72 GB
pat3rd 3 GB
pat4th 1 GB
patmue 32 GB
log 4 GB
total 112 GB

So for 1000 days of data we need around 800 GB of disk space.

Time:

On 1 CPU, running 6 days of data takes about 14 hours
so running 1000 days takes ~ 2340 hours.

Usually I process data on about 60 CPU's and I split my jobs into 10-20 runs jobs, so that it takes about 1 day to process 150 days of data.



back to top


Running PC2-4:

cvs get patcomb
imake_boot
gmake all
gmake patall

It will probably bug, go read the solution of some problems in the next section (especially
060927)

Then modify patall.sh
so that it point towards the right binary, work directory, and file list.

To make the file list just do a
ls * >  name.list

Make the right directory structure according to what's there

And then you are ready to run your program on condor, knowing that patall.sh takes 2 arguments, the first run number and the last run number.
If the input files are named: patrd2.run030749.001 (or 002,003 etc) then the command is
patall.sh 30749 30760 (for example)

The list can contain all the files, but then you split the jobs in different batch yourself.
10 files in one batch is a good number.




Problems that we encoutered and their solutions

1) (0604??) Some of the runs had not enough event (when looking and the event rate plot), the problem was due to a bad TQA map.
    In order to solove it (i.e use a another tqa map) we had to use "option 17" in patall.F

         call skoptn('31,30,29,26,25,23,19,18,17')

    and change the tqa version corresponding to the runs with missing events in the file tqa_version.

2) (060927) When doing a "gmake patall" I am missing the following libraries:
   
ld: fatal: library -lpclib: not found
ld: fatal: library -l1strd_pc: not found

    This is because 1strd_pc is not in the standard path. So you have to get a copy of the directory 1strd_pc
    (ie in /home/atmpd/skrep/06b/atmpd/src/reduc for example) copy it to you own area,
    compile it (doing gmake all is enough) and then link it manually in your Imakfile.

    For the pclib problem, I found that doing a gmake all of patcomb and linking directly ti the .a file in the Imakefile works, but I
    don't know if this is the best solution.

Here is an example of Imakefile which works.

    NB1: I had to remove -lpclib and -l1strd_pc from the APLIB list, and then create MY_LIB and MY_PCLIB pointing to
    the library I created myself.

    NB2: in the Imakfile, in the line which start by
    FortranProgramTarget(patall,patall.o,,$(MY_PCLIB) $(APLIBS) $(LIBS) $(MY_LIB) 
    The order of the $(  ) files matter a lot!
back to top


Last updated Mon April 24, 2006