3 void runMudst(
char* file=
"/star/u/akio/pwg/fms2015/mudst/st_fms_16077027_raw_4000001.MuDst.root",
4 int ifile=-1, Int_t nevt=-1,
char* outdir=
"hist",
int opt=4,
int readMuDst=1,
int print=0){
5 gROOT->Macro(
"load.C");
6 gSystem->Load(
"StEventMaker");
10 int n=muDstMaker->
tree()->GetEntries();
11 printf(
"Found %d entries in Mudst\n",n);
15 int stop=(ifile+1)*nevt-1;
16 if(n<start) {printf(
" No event left. Exiting\n");
return;}
17 if(n<stop) {printf(
" Overwriting end event# stop=%d\n",n); stop=n;}
18 }
else if(nevt>=0 && nevt<n){
23 printf(
"Doing Event=%d to %d\n",start,stop);
28 filterMaker->printTriggerId();
29 const int TIDBASE=480800;
31 const int MAXVERSION=3;
33 filterMaker->addTrigger(42);
34 filterMaker->addTrigger(50);
35 for(
int k=0; k<NBEAM; k++){
36 for(
int j=0; j<MAXVERSION; j++){
37 for(
int i=1; i<=NTRG; i++){
38 int id=TIDBASE + 10000*k + 20*j + i;
39 printf(
"Adding TriggerId=%d to the filter\n",
id);
40 filterMaker->addTrigger(
id);
42 int id=TIDBASE + 10000*k + 20*j + 13;
43 printf(
"Adding TriggerId=%d to VETO\n",
id);
44 filterMaker->addVetoTrigger(
id);
47 printf(
"Adding TriggerId=%d to VETO\n",54);
48 filterMaker->addVetoTrigger(54);
62 if(opt==0) {pointMaker->setMergeSmallToLarge(0);}
63 else {pointMaker->setMergeSmallToLarge(1);}
64 if(opt>=2) {pointMaker->setCategorizationAlgo(1);}
65 else {pointMaker->setCategorizationAlgo(0);}
66 if(opt>=3) {pointMaker->setTry1PhotonFit(1);}
67 else {pointMaker->setTry1PhotonFit(0);}
68 if(opt>=4) {pointMaker->setScaleShowerShape(1);}
69 else {pointMaker->setScaleShowerShape(0);}
76 fmsfps->setReadMuDST();
79 fmsqa->setPrint(print);
80 TString filename(file);
81 filename.ReplaceAll(
"mudst",outdir);
82 filename.ReplaceAll(
".list",
".MuDst.root");
84 filename.ReplaceAll(
".MuDst.root",
".fmsqa.root");
86 filename.ReplaceAll(
".MuDst.root",Form(
".%d.fmsqa.root",ifile));
88 cout <<
"StFmsQaMaker Output File Name = " << filename.Data()<<endl;
89 fmsqa->setFileName(filename.Data());
92 gSystem->Load(
"StFmsEventDisplay");
94 fmsed->setMaxEvents(100);
95 TString filenameED(file);
96 filenameED.ReplaceAll(
"mudst",outdir);
97 filenameED.ReplaceAll(
".MuDst.root",
".eventDisplay.png");
98 filenameED.ReplaceAll(
".list",
".eventDisplay.root");
99 fmsed->setFileName(filenameED.Data());
100 if(print==11) fmsed->setFilter(1);
101 if(print==12) fmsed->setFilter(2);
104 gSystem->Load(
"StFmsDiPi0");
106 TString filenameDiPi0(file);
107 filenameDiPi0.ReplaceAll(
"mudst",outdir);
108 filenameDiPi0.ReplaceAll(
".list",
".MuDst.root");
110 filenameDiPi0.ReplaceAll(
".MuDst.root",
".dipi0.root");
112 filenameDiPi0.ReplaceAll(
".MuDst.root",Form(
".%d.dipi0.root",ifile));
114 cout <<
"DiPi0 outfile name = " << filenameDiPi0.Data()<<endl;
115 dipi0->setFileName(filenameDiPi0.Data());
116 TString filenameTree(filenameDiPi0);
117 filenameTree.ReplaceAll(
".dipi0.root",
".tree.root");
118 dipi0->setTreeFileName(filenameTree.Data());
119 dipi0->setWriteTree();
122 chain->EventLoop(start,stop);
TTree * tree()
Returns pointer to the current TTree, the top level io structure that holds the event, track, v0, etc. information in branches of that tree.
void setDebug(Int_t debug)
debug mode, 0 for minimal message, >0 for more debug messages
void SetReadMuDst(int v=1)
void SetReadMuDst(int v=1)