6 void bitcheck(
int run=16043074,
int file=1,
int nEvents=10000,
int useDSM=1,
int plt=0){
7 char name[200]; sprintf(name,
"trg/run%d.%d.dat",run,file);
8 cout <<
"Reading up to "<<nEvents<<
" events from "<<name<<endl;
18 fmstrg->forceRunNumber(run);
19 if(useDSM==0) fmstrg->useQTSim();
20 if(useDSM==1) fmstrg->useDsmData();
22 bitcheck->setRun(run);
23 bitcheck->setPrint(20);
30 c1=
new TCanvas(
"FMS",
"FMS",700,800);
31 gStyle->SetOptStat(111110);
32 gStyle->SetStatW(0.4); gStyle->SetStatH(0.4);
33 for(
int i=0; i<=NX*2; i++){
36 sprintf(tt,
"FMS xing=%d",x);
37 HF[i]=
new TH1F(tt,tt,50,0,5000); HF[i]->SetFillColor(kRed);
38 sprintf(tt,
"BBC xing=%d",x);
39 HB[i]=
new TH1F(tt,tt,50,0,5000); HB[i]->SetFillColor(kRed);
43 unsigned long long bxkeep=0;
44 for(
int iev=0; iev<nEvents; iev++){
45 if(iev%100==0) cout <<
"****event="<<iev<<endl;
47 int ierr=chain->
Make();
52 int npre=td->numberOfPreXing();
53 int npost=td->numberOfPostXing();
54 for(
int i=0; i<=2*NX; i++){
56 if(-x>npre || x>npost)
continue;
58 for(
int crt=1; crt<=4; crt++){
59 for(
int adr=0; adr<16; adr++){
60 for(
int ch=0; ch<32; ch++){
61 sumF+=td->fmsADC(crt,adr,ch,x);
65 for(
int ch=0; ch<16; ch++){
66 sumB+=td->bbcADC(0,ch,x);
67 sumB+=td->bbcADC(1,ch,x);
78 for(
int i=0; i<=2*NX; i++){
79 TVirtualPad *pad1 = c1->cd(i*2+1); pad1->SetLogy(); HF[i]->Draw();
80 TVirtualPad *pad2 = c1->cd(i*2+2); pad2->SetLogy(); HB[i]->Draw();
84 sprintf(fname,
"fms_%d.png",run);
92 gROOT->Macro(
"loadMuDst.C");
93 gSystem->Load(
"libPhysics");
94 gSystem->Load(
"St_base");
95 gSystem->Load(
"StChain");
96 gSystem->Load(
"StUtilities");
97 gSystem->Load(
"StEvent");
98 gSystem->Load(
"libStDb_Tables.so");
99 gSystem->Load(
"StDbLib.so");
100 gSystem->Load(
"St_db_Maker");
101 gSystem->Load(
"StDbBroker");
103 gSystem->Load(
"StFmsTriggerMaker");
virtual void Clear(Option_t *option="")
User defined functions.
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)