00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013
00014
00015 class StChain;
00016 class StBFChain;
00017 StChain *chain=0;
00018 class StMaker;
00019 StMaker *treeMk=0;
00020 StBFChain *chain1, *chain2, *chain3;
00021 class StEvent;
00022 StEvent *Event;
00023 class St_geant_Maker;
00024 class StIOMaker;
00025 class StEventDisplayMaker; StEventDisplayMaker *dsMk = 0;
00026 class StMixerMaker;
00027
00028 class StEvtHddr;
00029
00030 void Load(){
00031 gSystem->Load("St_base");
00032 gSystem->Load("StChain");
00033 gSystem->Load("StUtilities");
00034 gSystem->Load("StBFChain");
00035
00036 gSystem->Load("StarClassLibrary");
00037 gSystem->Load("StAnalysisUtilities");
00038 #if 0
00039 gSystem->Load("StV0AccMaker.so");
00040 #endif
00041 if (chain) delete chain;
00042 }
00043
00044 void bfcMixer_v5(const Int_t Nevents=10,
00045 const Char_t *file1="/star/institutions/uky/rfatemi/AuAu62/st_physics_5086073_raw_3020008.daq",
00046 const Char_t *file2="/star/institutions/uky/gorbunov/evgen.1.nt"
00047 #if 0
00048 const Char_t *file2="/star/institutions/uky/rfatemi/AuAu62/simulation_62/starlightrpii_1.fz",
00049 const Char_t *file3="/home/starofl/embedding/GSTAR/st_physics_2270008_raw_0030.vertices.dat",
00050 const Float_t zvertex_low=-175.0,
00051 const Float_t zvertex_high=175.0,
00052 const Char_t *mode="strange",
00053 const Char_t *acc_mode="off"
00054 #endif
00055 )
00056 {
00057
00058 if (gClassTable->GetID("StBFChain") < 0) Load();
00059
00060
00061 chain = new StChain("Embedding");
00062
00063 StMaker *saveMk = 0;
00064
00065
00066 chain1 = new StBFChain("One");
00067 saveMk = chain1->cd();
00068
00069
00070
00071 chain1->SetFlags("in Physics DbV20050515 NoDefault");
00072 chain1->Set_IO_Files(file1);
00073 chain1->Load();
00074 chain1->Instantiate();
00075
00076 saveMk->cd();
00077
00078
00079 chain2 = new StBFChain("Two");
00080 saveMk = chain2->cd();
00081 chain2->SetFlags("ntin DbV20050515 gen_T geomT sim_T ftpcT tpc trs fss -tcl -tpt -PreVtx -tpc_daq");
00082 chain2->Set_IO_Files(file2);
00083 chain2->Load();
00084 chain2->Instantiate();
00085 St_geant_Maker *geantMk = chain2->GetMaker("geant");
00086 if (geantMk) geantMk->SetMode(1);
00087
00088 if (chain2->GetOption("TRS")){
00089 StTrsMaker *trsMk = (StTrsMaker *) chain2->GetMaker("Trs");
00090 trsMk->setNormalFactor(1.22);
00091 }
00092 #if 0
00093
00094 if (!strcmp(mode,"strange")){
00095 if (!strcmp(acc_mode,"on")){
00096
00097 Char_t *extraMaker = "StV0AccMaker";
00098 if (gClassTable->GetID(extraMaker) < 0) gSystem->Load(extraMaker);
00099 StMaker *extraMk = (StMaker *)chain1->GetMaker(extraMaker);
00100 if(extraMk) delete extraMk;
00101 extraMk = chain->New(extraMaker,"before");
00102 if (extraMk) {
00103 Char_t *before = "Trs";
00104 StMaker *trsmk = chain1->GetMaker(before);
00105 if (trsmk) chain1->AddBefore(before,extraMk);
00106 StV0AccCuts *cuts = ((StV0AccMaker *)extraMk)->GetCutsPtr();
00107 cuts->SetFilter();
00108 cuts->SetV0MinDecayLen(0.);
00109 cuts->SetV0DaughterMinImpact(0);
00110 cuts->SetV0DaughterMinHit(10.);
00111 cuts->SetXiV0MaxImpact(5);
00112 cuts->SetXiMinDecayLen(2.);
00113 cuts->SetXiV0PiMinImpact(0.);
00114 cuts->SetXiDaughterMinHit(10.);
00115 cuts->SetKinkMinDecayRad(128.);
00116 cuts->SetKinkMaxDecayRad(184.);
00117 }
00118 }
00119 }
00120
00121 #endif
00122 saveMk->cd();
00123
00124
00125 gSystem->Load("StMixerMaker");
00126 StMixerMaker *mixer = new StMixerMaker("Mixer","daq","trs");
00127 chain1->SetInput("Input1","StDAQReader");
00128 chain2->SetInput("Input2","Event");
00129
00130
00131 gSystem->Load("StFtpcMixerMaker");
00132 StFtpcMixerMaker *ftpcmixer = new StFtpcMixerMaker("FtpcMixer","daq","fss");
00133 ftpcmixer->SetInput("Input1","StDAQReader");
00134 ftpcmixer->SetInput("Input2","Event");
00135
00136
00137 chain3 = new StBFChain("Three");
00138 saveMk = chain3->cd();
00139
00140
00141
00142
00143
00144
00145
00146 chain3->SetFlags("Simu NoDefault NoInput onlraw -onlcl DbV20050515 ry2005d tpc_daq tpc ftpc event cdst Kalman Tree evout useCDV Xi2 V02 Kink2 CMuDst analysis MiniMcMk");
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 TString OutputFileName(gSystem->BaseName(file1));
00157 OutputFileName.ReplaceAll("*","");
00158 OutputFileName.ReplaceAll(".daq","");
00159 OutputFileName.Append(".root");
00160 chain3->Set_IO_Files(0,OutputFileName.Data());
00161 chain3->Load();
00162 chain3->Instantiate();
00163 St_geant_Maker *geantMk = (St_geant_Maker *) chain->GetMaker("geant");
00164 geantMk->SetActive(kTRUE);
00165 StMaker *tpcdaqMk = chain3->GetMaker("tpc_raw");
00166 tpcdaqMk->SetMode(1);
00167 tpcdaqMk->SetInput("Event","MixerEvent");
00168
00169
00170
00171
00172 saveMk->cd();
00173 {
00174 TDatime t;
00175 printf ("QAInfo:Run is started at Date/Time%i/%i\n",t.GetDate(),t.GetTime());
00176 }
00177 printf ("QAInfo:Run on %s in %s\n",
00178 gSystem->HostName(),
00179 gSystem->WorkingDirectory());
00180 printf ("QAInfo: with %s\n", chain->GetCVS());
00181
00182
00183 if (Nevents >= 0) {
00184 Int_t iInit = chain->Init();
00185 }
00186
00187
00188 geantMk->Do("VSIG 0. 26.");
00189
00190 geantMk->Do("VXYZ -0.13 0.08 0.0");
00191
00192
00193 treeMk = chain->GetMaker("tree");
00194 TBenchmark evnt;
00195 Int_t iMake = 0, i = 1, iBad = 0;
00196
00197 StIOMaker *inpMk = (StIOMaker *)chain1->GetMaker("inputStream");
00198 #if 0
00199
00200
00201 Float_t x = -0.13;
00202 Float_t y = 0.08;
00203 Float_t z = 0.0;
00204 Int_t ncols, eventnumber, mult, skip=0, oldskip = 0, skiptest=0;
00205 printf("zvertex_low = %f zvertex_high = %f\n",zvertex_low, zvertex_high);
00206
00207
00208 #endif
00209
00210 chain->SetAttr(".Privilege",0,"*" );
00211 chain->SetAttr(".Privilege",1,"StIOInterFace::*" );
00212 chain->SetAttr(".Privilege",1,"St_geant_Maker::*");
00213
00214
00215 inpMk->SetActive(kFALSE);
00216 while(iMake == kStOk) {
00217 inpMk->Clear();
00218 chain->Clear();
00219 int iretDaq = inpMk->Make();
00220
00221 if ( (iretDaq!=kStOk) && (iretDaq!= kStEOF) ) {
00222 inpMk->Close();
00223 inpMk->Open();
00224 iretDaq = inpMk->Make();
00225 }
00226 if (iretDaq) break;
00227 iMake = chain->Make();
00228 }
00229
00230
00231 gMessMgr->QAInfo() << "Run completed " << endm;
00232 gSystem->Exec("date");
00233 fflush(stdout);
00234 }
00235