13 int rdMu2spinTest(
char* Rrun =
"R6172038",
15 char* inDir =
"./lis/",
20 char *outPath=
"iterX/";
23 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
24 loadSharedLibraries();
25 cout <<
" loading done " << endl;
27 TString fileL=Rrun; fileL+=
".lis";
28 int runNo=atoi(Rrun+1);
31 inDir =
"/star/data05/scratch/balewski/2006-prod-muDst/7097090/";
32 fileL=
"st_physics_7097090_raw_1010001.MuDst.root";
42 gSystem->Load(
"StDbLib");
43 gSystem->Load(
"StDbBroker");
44 gSystem->Load(
"St_db_Maker");
45 gSystem->Load(
"StSpinDbMaker");
53 printf(
"adding muDst from '%s' ....\n",fileL.Data());
55 muMk =
new StMuDstMaker(0,0,inDir,fileL,
"MuDst.root",nFiles);
56 TChain* tree=muMk->chain(); assert(tree);
57 int nEntries=(int)tree->GetEntries();
58 printf(
"total eve in chain =%d\n",nEntries);
64 gMessMgr->SwitchOff(
"D");
65 gMessMgr->SwitchOn(
"I");
66 hbxI=
new TH1F(
"bXI",
"Intended fill pattern vs. STAR bXing; bXing at STAR IP",120,-0.5,119.5);
69 hbx48=
new TH1F(
"bX48",
"Rate vs. raw bx48; bXing= raw bx48",120,-0.5,119.5);
70 hbx7=
new TH1F(
"bX7",
"Rate vs. raw bx7; bXing= raw bx7",120,-0.5,119.5);
71 hbx748=
new TH2F(
"bX748",
"BX ID correlation ; raw bx7; raw bx48",120,-0.5,119.5,120,-0.5,119.5);
73 hbx48c=
new TH1F(
"bX48c",
"Rate vs. yellBX using bx48 ; bXing= bx48+offset",120,-0.5,119.5);
74 hbx7c=
new TH1F(
"bX7c",
"Rate vs. yellBX using bx7; bXing= bx7+offset",120,-0.5,119.5);
76 hbx48cm=
new TH1F(
"bX48cm",
"Masking ON, Rate vs. STAR IP bXing(bx48) ; bXing= bx48+offset",120,-0.5,119.5);
81 printf(
"%d seconds used to Init() the chain\n",t2-t1);
91 if(eventCounter>=nEve)
break;
100 StMuEvent* muEve = muMk->muDst()->event();
101 int nPrim = muMk->muDst()->primaryTracks()->GetEntries();
105 int bx48=trig->bunchCrossingId();
106 int bx7=trig->bunchCrossingId7bit(muEve->runId());
109 hbx748->Fill(bx7,bx48);
113 int bxStar48=spDb->BXyellowUsingBX48(bx48);
114 int bxStar7=spDb->BXyellowUsingBX7(bx7);
117 assert(spDb->offsetBX48minusBX7(bx48,bx7)==0);
118 hbx48c->Fill(bxStar48);
119 hbx7c->Fill(bxStar7);
120 if(!spDb->isMaskedUsingBX48(bx48) ) hbx48cm->Fill(bxStar48);
123 if(eventCounter%500==0) printf(
"\n\n ====================%d processing eventID %d nPrim=%d ==============\n", eventCounter++,info.id(),nPrim);
127 if(eventCounter>0) printf(
"sorting done, nEve=%d of :%d :%d :is missing\n",eventCounter, nEntries,-eventCounter+nEntries);
130 float rate=1.*eventCounter/(t2-t1);
131 float nMnts=(t2-t1)/60.; printf(
"sorting done %d of nEve=%d, CPU rate=%.1f Hz tot %.1f minutes\n",eventCounter,nEntries,rate,nMnts);
133 TString fileH=outPath; fileH+=Rrun; fileH+=
".hist.root";
134 printf(
" saving -->%s\n",fileH.Data());
135 new TFile(fileH,
"recreate");
146 const int * spin8bits=spDb->getSpin8bits();
147 for(
int bx=0;bx<120;bx++){
148 bool isFilled=(spin8bits[bx] & 0x11)==0x11;
149 if(isFilled) hbxI->Fill(bx);
150 assert(isFilled==spDb->isBXfilledUsingBXyellow(bx));
virtual void Clear(Option_t *option="")
User defined functions.
virtual void ls(Option_t *option="") const