00001
00002 class StChain;
00003 StChain *chain=0;
00004
00005 void StHbtExampleQQ(const Int_t nevents, const Char_t **fileList, const Char_t*, const Char_t* );
00006
00007
00008
00009
00010 void StMuDstMaker(const Int_t nevents=1000,
00011 const Char_t *path="-",
00012
00013 const Char_t *file="/star/data48/reco/ppProduction2008/ReversedFullField/P08ic/2008/054/9054010/st_toftpx_9054010_raw_2400010.event.root",
00014 const Char_t* outDir="./",
00015 const Char_t* outFile="dummy",
00016 const Char_t* appendix="test.microDst")
00017 {
00018
00019
00020 const char *fileListQQ[]={0,0};
00021 if (path[0]=='-') {
00022 fileListQQ[0]=file;
00023 } else {
00024 fileListQQ[0] = gSystem->ConcatFileName(path,file);
00025 }
00026 StHbtExampleQQ(nevents,fileListQQ,outDir,outFile);
00027 }
00028
00029
00030
00031 void StHbtExampleQQ(const Int_t nevents, const Char_t **fileList, const Char_t* dirName, const Char_t* fileName)
00032 {
00033 gROOT->Macro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
00034
00035
00036
00037
00038 cout << " loading done " << endl;
00039 chain = new StChain("StChain");
00040 chain->SetDebug();
00041
00042
00043 StFile *setFiles= new StFile();
00044 for (int ifil=0; fileList[ifil]; ifil++)
00045 setFiles->AddFile(fileList[ifil]);
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 StIOMaker* ioMaker = new StIOMaker("IOMaker","r",setFiles,"bfcTree");
00056 ioMaker->SetDebug();
00057
00058 ioMaker->SetIOMode("r");
00059 ioMaker->SetDebug();
00060 ioMaker->SetBranch("*",0,"0");
00061 ioMaker->SetBranch("eventBranch",0,"r");
00062 ioMaker->SetBranch("emcBranch",0,"r");
00063 ioMaker->SetBranch("runcoBranch",0,"r");
00064
00065
00066
00067
00068
00069 StStrangeMuDstMaker* v0dst = new StStrangeMuDstMaker("strangeMuDst");
00070 v0dst->DoV0();
00071 v0dst->DoXi();
00072 v0dst->DoKink();
00073 v0dst->SetNoKeep();
00074
00075
00076
00077
00078
00079
00080
00081
00082 StMuDstMaker* maker = new StMuDstMaker(1,1,dirName);
00083
00084
00085
00086
00087
00088 maker->setProbabilityPidFile();
00089
00090 StMuL3Filter* l3Filter = new StMuL3Filter(); maker->setL3TrackFilter(l3Filter);
00091 StMuFilter* filter = new StMuFilter(); maker->setTrackFilter(filter);
00092
00093
00094 StMuDebug::setLevel(0);
00095
00096 chain->Init();
00097 chain->PrintInfo();
00098 for (Int_t iev=0;iev<nevents; iev++) {
00099 cout << "StExample -- Working on eventNumber " << iev << endl;
00100 chain->Clear();
00101 int iret = chain->Make(iev);
00102 if (iret) {
00103 cout << "Bad return code!" << endl;
00104 break;
00105 }
00106 }
00107 chain->Finish();
00108
00109 cout << " End of Analysis " << endl;
00110 }
00111
00112
00113