75 const char* ffile=
"/star/data16/reco/pp200/pythia6_205/0_2gev/cdf_a/y2004y/gheisha_on/p05ih/rcf1273_99_4000evts.geant.root";
76 void StMiniEmbed(Int_t nevents=2,
77 const char* MainFile=ffile,
78 const char* outDir =
"./",
82 cout <<
"Using : " << MainFile << endl;
88 TString outDirName = outDir;
89 TString filename = MainFile;
90 TString embedrun = MainFile;
91 if (filename.Contains(
"Rev"))
92 outDirName.Append(
"RevFullField/");
94 outDirName.Append(
"FullField/");
96 if (filename.Contains(
"Piminus"))
97 outDirName.Append(
"PiMinus/");
98 if (filename.Contains(
"Piplus"))
99 outDirName.Append(
"PiPlus/");
100 if (filename.Contains(
"KMinus"))
101 outDirName.Append(
"KMinus/");
102 if (filename.Contains(
"KPlus"))
103 outDirName.Append(
"KPlus/");
104 if (filename.Contains(
"Pbar"))
105 outDirName.Append(
"Pbar/");
106 if (filename.Contains(
"Proton"))
107 outDirName.Append(
"Proton/");
108 int embedRunIndex = embedrun.Index(
"_",0);
109 embedrun.Remove(0,embedRunIndex+1);
110 embedRunIndex = embedrun.Index(
"_",0);
111 embedrun.Remove(embedRunIndex);
112 int fileBeginIndex = filename.Index(
"st_physics",0);
113 filename.Remove(0,fileBeginIndex);
114 filename.Prepend(embedrun);
115 filename.Prepend(
"emb");
116 cout <<
"outdir : " << outDirName << endl;
117 cout <<
"Output : " << filename << endl;
119 gROOT->LoadMacro(
"bfc.C");
120 TString Chain(
"in,StEvent,gen_T,sim_T,readall,nodefault,minimcmk");
121 bfc(-1,Chain.Data(),MainFile,0,filename);
126 parameterDB->setXCutTpc(.5);
127 parameterDB->setYCutTpc(.5);
128 parameterDB->setZCutTpc(.5);
129 parameterDB->setReqCommonHitsTpc(commonHits);
131 parameterDB->setRCutFtpc(.3);
132 parameterDB->setPhiCutFtpc(5*(3.1415927/180.0));
133 parameterDB->setReqCommonHitsFtpc(3);
135 parameterDB->setXCutSvt(.08);
136 parameterDB->setYCutSvt(.08);
137 parameterDB->setZCutSvt(.08);
138 parameterDB->setReqCommonHitsSvt(1);
144 Int_t initStat = chain->Init();
145 if (initStat) chain->Fatal(initStat,
"during Init()");
148 EventLoop:
if (iev<=nevents && istat!=2) {
150 cout <<
"---------------------- Processing Event : " << iev <<
" ----------------------" << endl;
151 istat = chain->
Make(iev);
152 if (istat == 2) { cout <<
"Last Event Processed. Status = " << istat << endl; }
153 if (istat == 3) { cout <<
"Error Event Processed. Status = " << istat << endl; }
154 iev++;
goto EventLoop;
virtual void Clear(Option_t *option="")
User defined functions.