00001
00002
00003 class StChain;
00004 StChain *chain=0;
00005 class St_particle ;
00006 class particle_st;
00007
00008
00009
00010 int rdMuDstAndGeant2Lcp( int maxEve=2, int subSet=2721, char * wrkDir="./wrkLcpX/"){
00011 float maxEta=1.0;
00012
00013 char * evePath="/star/data26/reco/pp200/pythia_6.203/default/minbias/year2003/hadronic_on/trs_ic/";
00014 TString coreFile="rcf1200_";
00015 coreFile+=subSet;
00016 coreFile+="_2000evts";
00017 printf("Working on subSet '%s'\n",coreFile.Data());
00018
00019 TString muDstFile=evePath+coreFile+".MuDst.root";
00020 TString geantFile =evePath+coreFile+".geant.root";
00021
00022
00023 gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
00024 loadSharedLibraries();
00025 cout << " loading done " << endl;
00026
00027
00028 assert(gSystem->Load("StEEmcPoolLCP")==0 );
00029
00030
00031 chain = new StChain("StChain");
00032
00033
00034
00035
00036 StIOMaker* IOMk = new StIOMaker("IO","r",geantFile,"bfcTree");
00037 IOMk->SetDebug();
00038 IOMk->SetIOMode("r");
00039 IOMk->SetBranch("*",0,"0");
00040 IOMk->SetBranch("geantBranch",0,"r");
00041
00042
00043 int maxList=1;
00044 muMk = new StMuDstMaker(0,0,"/",muDstFile,"MuDst.root",maxList);
00045
00046
00047 StGeant2LcpTreeMaker *myMk2 = new StGeant2LcpTreeMaker("jasGG","MuDst");
00048 myMk2->SetOutDir(wrkDir);
00049 myMk2->InitRunFromMake(888999);
00050
00051
00052 StMuLcp2TreeMaker *myMk = new StMuLcp2TreeMaker("jasEE","MuDst");
00053 myMk->SetOutDir(wrkDir);
00054 myMk->SetMaxEta(maxEta);
00055 myMk->InitRunFromMake(888999);
00056
00057 chain->Init();
00058 chain->ls(3);
00059
00060
00061
00062 int eventCounter=0;
00063
00064 printf(" requested maxEve=%d\n",maxEve);
00065
00066 while ( 1) {
00067 eventCounter++;;
00068 if(eventCounter >maxEve) break;
00069 chain->Clear();
00070 int stat = chain->Make();
00071 if(stat) break;
00072
00073
00074 StMuEvent* muEve = muMk->muDst()->event();
00075 int n = muMk->muDst()->primaryTracks()->GetEntries();
00076 StEventInfo &info=muEve->eventInfo();
00077
00078 printf("eve=%d Nprim=%d ID=%d runID=%d\n",eventCounter,n,info.id(),info.runId());
00079
00080 }
00081 return;
00082 }
00083
00084
00085
00086
00087
00088