54 #if defined(FZIN) || defined(GTRACK)
72 gSystem->Load(
"St_base");
73 gSystem->Load(
"StChain");
74 gSystem->Load(
"xdf2root");
75 gSystem->Load(
"St_Tables");
76 gSystem->Load(
"libmsg");
77 gSystem->Load(
"libtls");
78 gSystem->Load(
"St_db_Maker");
79 gSystem->Load(
"St_xdfin_Maker");
81 gSystem->Load(
"StMagF");
83 gSystem->Load(
"geometry");
85 gSystem->Load(
"StarClassLibrary");
87 gSystem->Load(
"St_tpc");
88 gSystem->Load(
"St_tcl_Maker");
89 gSystem->Load(
"St_tpt_Maker");
91 gSystem->Load(
"StTrsMaker");
92 gSystem->Load(
"St_tpcdaq_Maker");
95 gSystem->Load(
"St_tss_Maker");
100 gSystem->Load(
"StMinidaqMaker");
103 gSystem->Load(
"St_g2r");
104 gSystem->Load(
"St_geant_Maker");
107 gSystem->Load(
"St_ftpc");
109 gSystem->Load(
"St_fss_Maker");
111 gSystem->Load(
"St_fcl_Maker");
112 gSystem->Load(
"St_fpt_Maker");
115 gSystem->Load(
"St_emc");
116 gSystem->Load(
"St_ems_Maker");
118 gSystem->Load(
"St_emc_Maker");
122 gSystem->Load(
"St_ctf");
123 gSystem->Load(
"St_ctf_Maker");
124 gSystem->Load(
"St_mwc");
125 gSystem->Load(
"St_mwc_Maker");
126 gSystem->Load(
"St_trg");
127 gSystem->Load(
"St_trg_Maker");
130 gSystem->Load(
"St_l3");
131 gSystem->Load(
"St_l3t_Maker");
134 #if defined(SVT) || defined(GLOBAL)
135 gSystem->Load(
"St_svt");
138 gSystem->Load(
"St_srs_Maker");
139 gSystem->Load(
"St_stk_Maker");
142 gSystem->Load(
"St_global");
143 gSystem->Load(
"StRootEvent");
144 gSystem->Load(
"St_dst_Maker");
146 gSystem->Load(
"StRAnalysisMaker");
148 gSystem->Load(
"St_QA_Maker");
149 gSystem->Load(
"StTreeMaker");
153 void tpc (
const Int_t Nevents=1,Char_t *infile=0, Char_t *outfile=0)
155 Int_t NoEvents = Nevents;
160 infile =
"/afs/rhic/star/tpc/data/tpc_s18e_981105_03h_cos_t22_f1.xdf";
165 infile =
"/disk1/star/test/psc0049_08_40evts.fzd";
169 infile =
"/afs/rhic/star/data/samples/hijet-g2t.xdf";
175 if (!outfile) FileOut =
new TString(
"gtrack.root");
176 else FileOut =
new TString(outfile);
177 printf(
"Output root file name %s\n", FileOut.Data());
178 printf(
"==============================================\n");
182 TString InFile =
"$input_file";
183 gSystem->ExpandPathName(InFile);
184 Int_t NoEvents = Nevents;
185 if (!strcmp(
"$input_file",InFile.Data())) {
189 Int_t NoEvents = atoi(strrchr(InFile.Data(),
'_')+1);
190 if (NoEvents <=0) {NoEvents = Nevents;}
191 if (NoEvents > Nevents) {NoEvents = Nevents;}
194 TString InFile(infile);
196 if (gSystem->AccessPathName(InFile.Data())) {
197 printf(
" *** NO FILE: %s, exit!\n", InFile.Data());
200 if (outfile) FileOut =
new TString(outfile);
202 FileOut =
new TString(gSystem->BaseName(InFile.Data()));
203 FileOut->ReplaceAll(
".fzd",
".root");
204 FileOut->ReplaceAll(
".fz",
".root");
205 FileOut->ReplaceAll(
".xdf",
".root");
208 printf(
"==============================================\n");
209 printf(
"Input file name = %s with No. of Events to process = %i\n"
210 ,InFile.Data(),NoEvents);
211 printf(
"Output root file name %s\n", FileOut.Data());
212 printf(
"==============================================\n");
215 if (gClassTable->GetID(
"StChain") < 0) Load();
219 St_XDFFile *xdf_out = 0;
220 TString *XdfFile =
new TString(FileOut->Data());
221 XdfFile->ReplaceAll(
".root",
"_dst.xdf");
222 xdf_out =
new St_XDFFile(XdfFile->Data(),
"wb");
223 printf (
"Open xdf file = %s \n +++++++++++++++++++++++++++++++++++++++++++++++\n",XdfFile->Data());
230 const char *mainDB =
"$STAR/StDb/params";
236 cout<<
"creating DB for TPC test"<<endl;
237 const char *tpcDB =
"/afs/rhic/star/tpc/ctest/StDb";
242 const char *calibDB =
"$STAR_ROOT/calib";
246 St_xdfin_Maker *xdfMk =
new St_xdfin_Maker(
"xdfin",InFile.Data());
249 chain->SetInput(
"BEGIN_RUN",
".make/xdfin/.const/BEGIN_RUN");
250 chain->SetInput(
"TPC_DATA",
".make/xdfin/.data/TPC_DATA");
256 geant->SetNwGEANT(10 000 000);
257 chain->SetInput(
"geant",
".make/geant/.data");
262 geant->
Do(
"subevent 0;");
264 geant->
Do(
"gkine 10 6 1. 1. -1. 1. 0 6.28 0. 0.;");
265 geant->
Do(
"mode g2tm prin 1;");
269 geant->
Do(
"swit 2 3;");
272 geant->SetInputFile(InFile.Data());
277 StMagF *field =
new StMagFC(
"field",
"STAR no field",0.00002);
278 StMinidaqMaker *tpc_raw =
new StMinidaqMaker(
"tpc_raw");
280 cout<<
"initializing input for the tpc DB"<<endl;
281 tpc_raw->SetInput(
"params",
"tpcdb:StDb/params");
286 St_fss_Maker *fssMk =
new St_fss_Maker(
"ftpc_raw");
294 cout<<
"initializing input for the trs DB"<<endl;
295 trs->SetInput(
"params",
"tpcdb:StDb/params");
297 St_tpcdaq_Maker *tpc_raw =
new St_tpcdaq_Maker;
301 St_tss_Maker *tssMk =
new St_tss_Maker(
"tpc_raw");
303 cout<<
"initializing input for the tpc DB"<<endl;
304 tssMk->SetInput(
"params",
"tpcdb:StDb/params");
312 St_ems_Maker *emsMk =
new St_ems_Maker(
"emc_raw" );
322 St_tcl_Maker *tclMk =
new St_tcl_Maker(
"tpc_hits");
324 cout<<
"initializing input for the tpc DB"<<endl;
325 tclMk->SetInput(
"params",
"tpcdb:StDb/params");
329 tclMk->tclPixTransOn();
339 St_srs_Maker *srsMk =
new St_srs_Maker(
"svt_hits");
346 St_fcl_Maker *fclMk =
new St_fcl_Maker(
"ftpc_hits");
352 St_tpt_Maker *tptMk =
new St_tpt_Maker(
"tpc_tracks");
359 tptMk->Set_final(kTRUE);
369 St_l3t_Maker *l3tMk =
new St_l3t_Maker(
"l3Tracks");
375 St_stk_Maker *stkMk =
new St_stk_Maker(
"svt_tracks");
381 St_fpt_Maker *fptMk =
new St_fpt_Maker(
"ftpc_tracks");
386 St_mwc_Maker *mwc =
new St_mwc_Maker(
"mwc");
390 St_l3t_Maker *l3Tracks =
new St_l3t_Maker(
"l3Tracks");
394 St_dst_Maker *dstMk = 0;
395 St_glb_Maker *glbMk =
new St_glb_Maker(
"global");
398 dstMk =
new St_dst_Maker(
"dst");
403 St_QA_Maker *qa =
new St_QA_Maker;
409 treeMk->IntoBranch(
"dstBranch",
"dst/.data/dst");
425 int iInit = chain->Init();
426 if (iInit) chain->Fatal(iInit,
"on init");
429 for (Int_t i =1; i <= NoEvents; i++){
433 printf (
"=========================================== Done with Event no. %d\n",i);
438 printf (
"Run completed ");
439 gSystem->Exec(
"date");
441 else {b =
new TBrowser(
"BFC chain",chain);}
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
A typical Analysis Class.
virtual void Do(const Char_t *option="dcut cave x 0.1 10 10 0.03 0.03")
Executes a KUIP command.
virtual void LoadGeometry(const Char_t *option="detp geometry field_only")
Specifies GEANT3 geometry command.