5 TH2F *hs8ev=0,*hs8db=0, *hs4db=0, *hdbx=0;
8 void rdSt2spinTest( Int_t nevents=10){
10 char * fname=
"/star/data03/daq/2005/janMisc/st_physics_6156028_raw_2040010.event.root";
14 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
15 loadSharedLibraries();
16 cout <<
" loading done " << endl;
17 gSystem->Load(
"StDbLib");
18 gSystem->Load(
"StDbBroker");
19 gSystem->Load(
"St_db_Maker");
20 gSystem->Load(
"StSpinDbMaker");
27 ioMaker->SetFile(fname);
29 ioMaker->SetBranch(
"*",0,
"0");
30 ioMaker->SetBranch(
"eventBranch",0,
"r");
36 gMessMgr->SwitchOff(
"D");
37 gMessMgr->SwitchOn(
"I");
40 Int_t initStat = chain->Init();
41 if (initStat) chain->Fatal(initStat,
"during Init()");
47 if (iev>=nevents)
break;
49 istat = chain->
Make();
52 cout <<
"---------------------- Processing Event : " << iev <<
" ---------------------- " << istat<<endl;
56 for(
int bx48=0;bx48<120;bx48++){
57 int bxStar=spDb->BXstarUsingBX48(bx48);
58 if(spDb->isBXfilledUsingBX48(bx48)) hfb->Fill(bxStar);
70 int bx48=trgD->bunchId48Bit();
71 int bx7=trgD->bunchId7Bit();
72 int bxStar48=spDb->BXstarUsingBX48(bx48);
73 int bxStar7=spDb->BXstarUsingBX7(bx7);
74 int bxPhase=spDb->offsetBX48minusBX7(bx48,bx7);
75 int spin8ev=trgD->spinBit();
76 int spin8db=spDb->spin8usingBX48(bx48);
77 int spin4db=spDb->spin4usingBX48(bx48);
80 hdbx->Fill(bxStar48,bxStar7);
81 hs8ev->Fill(bxStar48,spin8ev);
82 if(spDb->isBXfilledUsingBX48(bx48)){
83 hs8db->Fill(bxStar48,spin8db);
84 hs4db->Fill(bxStar48,spin4db);
86 int nV=mEvent->numberOfPrimaryVertices();
87 printf(
"eveID=%d nPrimVert=%d ", mEvent->id(),nV);
88 printf(
"bx48=%3d bx7= %3d bxPhase=%3d spin8: ev=0x%02x : 0x%02x=db bxStar48=%3d \n",bx48,bx7,bxPhase,spin8ev,spin8db,bxStar48);
98 hf=
new TFile(
"outx.hist.root",
"recreate");
99 hbx=
new TH1F(
"bx",
"Rate vs. true bXing from bx48; bXing at STAR IP",120,-0.5,119.5);
100 hfb=
new TH1F(
"fb",
"Intended fill pattern; bXing at STAR IP",120,-0.5,119.5);
102 hs8ev=
new TH2F(
"s8ev",
"spin8(eve) vs. true bXing from bx48; bXing at STAR; spin8 from event",120,-0.5,119.5,100,-0.5,99.5);
103 hs8db=
new TH2F(
"s8db",
"spin8(db) vs. true bXing from bx48; bXing at STAR; spin8 from DB",120,-0.5,119.5,100,-0.5,99.5);
105 hs4db=
new TH2F(
"s4db",
"spin4(db) vs. true bXing from bx48; bXing at STAR; spin4 from DB",120,-0.5,119.5,100,-0.5,15.5);
107 hdbx=
new TH2F(
"dbx",
"bx7 vs. true bXing from bx48; bXing at STAR;bx7",120,-0.5,119.5,120,-0.5,119.5);
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
Collection of trigger ids as stored in StEvent.
virtual void ls(Option_t *option="") const