Endcap MC simulation: StEvent --> TTree
  1. login to one of the Linux RCAS machines (rcas60XX) at BNL
  2. get actual Endcap related code
    stardev
    mkdir aaa
    cd aaa
    cvs co offline/EEpromis/g2st
    mkdir StRoot
    mv offline/EEpromis/g2st/StRoot/EE* StRoot
    mv offline/EEpromis/g2st/StRoot/Ste* StRoot
    mv offline/EEpromis/g2st/macros .
    cons +EE +Ste  
    
  3. Allow connection to the DB server you want to use, by editing your ~/dbServers.xml . Below is my example:
    < StDbServer>
    < server> onlsun1 < /server>
    < host> onlsun1.star.bnl.gov < /host>
    < port> 3310 < /port>
    < socket> /tmp/mysql.3310.sock < /socket>
    < databases>  TestScheme_emc, StarDb < /databases>
    < /StDbServer>
    
    Two valid BD servers are: duvall:3306 (more stable) or onlsun1:3310 (development)
  4. Choose the data base version you want to use (e.g. VerC) by means of system variable:
    setenv TestScheme_emc VerC
    
  5. M-C events stored in StEvent will be converted to raw data blocks similar to the output of the FEEs and stored in TTree. Note, the time stamp recorded in StEvent is ignored, you need to set it by hand.
    Every event in TTree has two time signatures:
      time_t mTimeStamp;  //unix time, GMT
      time_t mProcessingTime; 
    
    The same time stamp of 2002-12-15 is assigned to each M-C event and used to request the FEE mapping from STAR-DB. The inverse mapping is calculated.
    The ProcessingTime records just the time when event was processed .
  6. To produce TTree execute:
    root4star -b macros/DoFeeTTreeSimu.C
    
    Edit this script to change the range of sectors you want and the DB time stamp
     SteemcDbMaker  *myMk1=new SteemcDbMaker("eemcDBio");
     myMk1->setSectors(5,8);
     myMk1->setTimeStampDay(20021215);  // format: yyyymmdd
    
    An example of input file with 100 minb events is at /star/data22/MC/balewski/pp4run3/example/minb200-100.event.root
    An example of output file with 100 events is at /star/data22/MC/balewski/pp4run3/example/myFeeMC-minb200-100.root
  7. To test consistency of the Fee-like TTree under ROOT (root4star not needed) execute
    root -b macros/rdFeeTTree.C
    

Any comments or upgrades of the code are welcome. Sent us feedback: zolnie AT iucf.indiana.edu , balewski AT iucf.indiana.edu ,