Notes on pp2006 pi0 production for conversion rate estimation

Identified Pi0 Sample to Determine Background Conversion Rates

Abstract: We wish to utilize identified pi0 decays to measure the conversion rates of the jet backgrounds within R<0.3 of a photon candidate.  For a summary of the technique, see the following link and references therein:

http://drupal.star.bnl.gov/STAR/blog-entry/jwebb/2008/may/07/background-conversion-probability-using-identified-pi0-sample

Code was originally run at PDSF.  Need to

[x] Copy code from pdsf to RCF
[x] Compile it / make sure it runs
[x] Modify code to store the 1-tower 'corrected' ET for the
[x] Debug it (aaiiiiieeeeeeeeeeeeee!)
[x] Fire for effect (one fill)

Generate pi0 trees for pp2006 (approx 50 GB storage space)
Generate pi0 trees for pp2008

___________________________________________________________
                                                                                  05/25/2009

Copy relevant code from PDSF to RCF and setup to run on data sample

Code was originally run on or about 05/07/2008.  Copy code from

corresponding directory and setup to run at RCF.

Updated all links in submit scripts to point to RCF rather than PDSF

directories.  Submit via condor... takes a long time to execute, then returns
nothing...

lots of debug...

1. use xrootd
2. make sure that I'm compiling AND running code in stardev

___________________________________________________________
                                                                                  05/27/2009

It appears there's a library conflict which is causing my headaches w/r to condor. 

Specifically, StEEmcA2EMaker had to be updated to take care of Oleksandr's
changes to the database maker.  Probably can run with an 08 tagged library? 
Or better just to check in changes to A2EMaker which are relevant.

Relevant differences:

• addition of StEEmcTower::direction()
• several changes in pi0 mixer library, library stored in non standard directory, etc...

likely do not need to check in the pi0 mixer changes

After checkin of StEEmcTower, can compile both pi0 mixer and adc to energy maker. 

loadLibs() runs interactively.  Next try in batch.

hmm... just get an "abort" when I run the code

___________________________________________________________
                                                                                  05/28/2009

Code (in dev) runs fine on the 2008 data interactively.  Will try batch next. 

I may need to link to a previous library to run over the 2006 data.

Still w/ the 2008 data... code runs on condor.  Some jobs result in empty

root files.  Note that mEEmcDatabase->exportAscii()
appears no longer to be defined.  Commenting this out fixes the
issue.  Results in a perfectly acceptable pi0 spectrum.

Code runs on both 2006 and 2008 data

___________________________________________________________
                                                                                  05/29/2009

Verified that the code produces a pi0 spectrum in the 2006 data.  Everything

looks like its working.  Now, I need to add the new isolation cut to the pi0 tree.

• checkout and compile StGammaMaker
• add loadGammaLibs to libraries
• add StGammaEEmcLeakage to pi0 maker
• use the leading point to define gamma direction, e.g. StEEmcPoint::position()

Storing corrected 1-tower ET in the StEEmcPair.  But, we are frequently getting

zero for pairs with nonzero energy. Why?

Seems to work fine on 2008 data sample.  Odd that 2006 has issues?

Direct printout shows that ~1 events have et=0 for the tower w/
the leading gamma candidate... but readPi0 is showing many
oddballs...  something's screwy in the state of Denmark... looks like the mixevent

isn't tracking the correct nPairs?

___________________________________________________________
                                                                                  05/30/2009

Looks like its the copy constructor which has been biting me in the nether-regions? 

First try at a fix results in a seg fault.  Jeesh.  Had accidentally deleted eemc-shape.root

Code looks like it's running fine now.

Next step, run off data sample for 2006 and 2008, and for pythia MC.

First a test fill - fill 7863.  Setup macro to copy/link files in a subdirectory then

do the submission from the subdirectory.

___________________________________________________________
                                                                                  05/31/2009

Results of test fill... readPi0.C crashes not clear why.

___________________________________________________________
                                                                                  05/31/2009

Reset.  Remove local lib, recompile.  Produce a single run, 7136022.  Tests

whether this was a library incompatability introduced somewhere.

Hmmm... didn't work. 

Warning message about streamer info related to the StGammaEEmcLeakage

class.  Comment out of tree generation and see if this fixes the issue.

Hmm... not clear from log files that the local library is being copied.

___________________________________________________________
                                                                                  06/02/2009

It wasn't.  In the XML file, need to specifiy ".sl44_gcc346/" not ".sl44_gcc346"

(note the /).

Test run... 1 tower isolation distribution looks reasonable.  Fire for effect. 

(Create trees for 1 fill).

___________________________________________________________
                                                                                  06/03/2009

Code is running, and a quick readback on fills 7718 (transverse) and 7863

(longitudinal) both look reasonable.

Fill 7863: 385MB ~30-50 MB/run
Fill 7718: 164MB ~10-30 MB/run

880 runs (or so)

Estimate 50 GB disk space to store trees.