00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 class StChain;
00021 StChain *chain=0;
00022 void ProcessQQ(const Int_t, const Int_t, const Char_t **, const Char_t*, const Char_t* );
00023
00024
00025
00026
00027 void StMuDstMaker(const Int_t mode=0,
00028 const Int_t nevents=10,
00029 const Char_t *path="/star/data13/reco/dev/2001/10/",
00030 const Char_t *file="st_physics_2304060_raw_0303.event.root",
00031 const Char_t* outDir="./")
00032 {
00033 cout << "Backward compatibility method. Please, use 6 arguments ... " << endl;
00034 StMuDstMaker(mode,0,nevents,path,file,outDir);
00035 }
00036
00037 void StMuDstMaker(const Int_t mode=0,
00038 const Int_t fsti=0,
00039 const Int_t nevents=10,
00040 const Char_t *path="/star/data13/reco/dev/2001/10/",
00041 const Char_t *file="st_physics_2304060_raw_0303.event.root",
00042 const Char_t* outDir="./")
00043 {
00044
00045 const char *fileListQQ[]={0,0};
00046
00047 if (path[0]=='-') {
00048 fileListQQ[0]=file;
00049 } else {
00050 fileListQQ[0] = gSystem->ConcatFileName(path,file);
00051 }
00052 ProcessQQ(mode,fsti,nevents,fileListQQ,outDir);
00053 }
00054
00055
00056
00057 void ProcessQQ(const Int_t mode, const Int_t fsti, const Int_t nevents,
00058 const Char_t **fileList, const Char_t* dirName)
00059 {
00060 cout << "ProcessQQ::Load : Loading libraries ..." << endl;
00061 gSystem->Load("St_base");
00062 gSystem->Load("StChain");
00063 gSystem->Load("StDaqLib");
00064 gSystem->Load("St_Tables");
00065 gSystem->Load("StMagF");
00066 gSystem->Load("StUtilities");
00067 gSystem->Load("StTreeMaker");
00068 gSystem->Load("StIOMaker");
00069 gSystem->Load("StarClassLibrary");
00070 gSystem->Load("StDetectorDbMaker");
00071 gSystem->Load("StTpcDb");
00072 gSystem->Load("StDbUtilities");
00073 gSystem->Load("StBichsel");
00074 gSystem->Load("StTriggerDataMaker");
00075 gSystem->Load("StEvent");
00076 gSystem->Load("StEventUtilities");
00077 gSystem->Load("StMcEvent");
00078 gSystem->Load("StMcEventMaker");
00079 gSystem->Load("StAssociationMaker");
00080
00081 if (mode & 0x8){
00082 gSystem->Load("StSecondaryVertexMaker");
00083 }
00084
00085
00086
00087 cout << "ProcessQQ::Load : MuDst-EMC mode is ON " << endl;
00088 gSystem->Load("StEmcUtil");
00089 gSystem->Load("StDbLib");
00090 gSystem->Load("StDbBroker");
00091 gSystem->Load("St_db_Maker");
00092
00093
00094 if( mode & 0x4){
00095
00096 cout << "ProcessQQ::Load : RICH mode enabled" << endl;
00097 gSystem->Load("StRrsMaker");
00098 gSystem->Load("StRchMaker");
00099 gSystem->Load("StRichPIDMaker");
00100 gSystem->Load("StRichSpectraMaker");
00101 }
00102
00103 gSystem->Load("StMcAnalysisMaker");
00104 gSystem->Load("StStrangeMuDstMaker");
00105 gSystem->Load("StMuDSTMaker");
00106
00107 if( mode & 0x2 ){
00108
00109 gSystem->Load("StEmcADCtoEMaker");
00110 gSystem->Load("StPreEclMaker");
00111 gSystem->Load("StEpcMaker");
00112 }
00113 cout << "ProcessQQ::Load : done " << endl;
00114
00115
00116 chain = new StChain("StChain");
00117 chain->SetDebug();
00118
00119
00120 StFile *setFiles= new StFile();
00121 for (int ifil=0; fileList[ifil]; ifil++)
00122 setFiles->AddFile(fileList[ifil]);
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 StIOMaker* ioMaker = new StIOMaker("IOMaker","r",setFiles,"bfcTree");
00133 ioMaker->SetDebug();
00134
00135 ioMaker->SetIOMode("r");
00136 ioMaker->SetDebug();
00137 ioMaker->SetBranch("*",0,"0");
00138 ioMaker->SetBranch("eventBranch",0,"r");
00139
00140 ioMaker->SetBranch("runcoBranch",0,"r");
00141
00142 St_db_Maker dbMaker("db","MySQL:StarDb","$STAR/StarDb","StarDb");
00143
00144 if (mode & 0x8){
00145 cout << " V0Finder mode enabled" << endl;
00146 StV0FinderMaker* secondaryFinder = new StV0FinderMaker;
00147 }
00148
00149
00150
00151
00152
00153 StStrangeMuDstMaker* v0dst = new StStrangeMuDstMaker("strangeMuDst");
00154 v0dst->DoV0();
00155 v0dst->DoXi();
00156 v0dst->DoKink();
00157 v0dst->SetNoKeep();
00158
00159
00160
00161
00162
00163
00164
00165 if (mode & 0x8){
00166 if ( fsti == 1){
00167 secondaryFinder->SetTrackerUsage(2);
00168 } else {
00169 secondaryFinder->SetTrackerUsage(0);
00170 }
00171 }
00172
00173
00174 if( mode & 0x4 ){
00175 StRichSpectraMaker* spectraMaker = new StRichSpectraMaker("spectraMaker");
00176 }
00177
00178 StMuDstMaker* maker = new StMuDstMaker(1,1,dirName);
00179
00180
00181 maker->setProbabilityPidFile();
00182
00183 StMuL3Filter* l3Filter = new StMuL3Filter(); maker->setL3TrackFilter(l3Filter);
00184 StMuFilter* filter = new StMuFilter(); maker->setTrackFilter(filter);
00185
00186
00187 if( mode & 0x2){
00188
00189 StEmcADCtoEMaker *adc = new StEmcADCtoEMaker();
00190 StPreEclMaker *pre = new StPreEclMaker();
00191 StEpcMaker *epc = new StEpcMaker();
00192 StEmcMicroDstMaker *write = new StEmcMicroDstMaker();
00193 write->setOutputDir(dirName);
00194 }
00195
00196
00197 if ( fsti == 1){
00198
00199 filter->addEncodedMethod(263);
00200 }
00201
00202
00203
00204
00205 chain->Init();
00206 chain->PrintInfo();
00207
00208
00209 Int_t iev=0;
00210 for ( ; iev < nevents ; iev++) {
00211 cout << "-----> Working on eventNumber " << iev << endl;
00212 chain->Clear();
00213 int iret = chain->Make(iev);
00214 if (iret) {
00215 cout << "Bad return code!" << endl;
00216 break;
00217 }
00218 }
00219 chain->Finish();
00220
00221 iev--;
00222 cout << endl << "******************* Last event processed = " << iev << endl;
00223 }
00224