5 #include "St2009WMaker.h"
7 #include "St2009WlumiMaker.h"
21 Int_t St2009WlumiMaker::Init(){
26 return StMaker::Init();
32 Int_t St2009WlumiMaker::InitRun (
int runumber){
33 towerInfoIsCurrent=
false;
35 for (
int i=0;i<16;i++) nBHT3[i]=0;
38 for (
int i=0;i<120;i++)
39 for (
int j=0;j<16;j++)
47 Int_t St2009WlumiMaker::FinishRun (
int runnumber){
49 printf(
"Finishing Run %d (lumi)\n",runnumber);
52 sprintf(runName,
"%d",runnumber);
54 float activeFraction=nActiveTowers*1.0/4800.0;
60 int nAbortGap1, nAbortGap2;
64 getAbortGapCounts(0,&nAbortGap1,&nAbortGap2);
66 hA[19]->Fill(runName,nBHT3_software_L0);
67 hA[20]->Fill(runName,nBHT3_hardware_L0);
68 hA[21]->Fill(runName,nAbortGap1);
69 hA[22]->Fill(runName,nAbortGap2);
70 nBHT3triggers=(nBHT3_software_L0-nAbortGap1*111.0/11.0-nAbortGap2*109.0/9.0)*BHT3prescale;
71 hA[23]->Fill(runName,nBHT3triggers);
73 effective_lumi=nBHT3triggers*1.0/BHT3xs;
74 hA[24]->Fill(runName,effective_lumi);
80 total_lumi=effective_lumi/activeFraction;
81 hA[16]->Fill(runName,total_lumi);
82 hA[17]->Fill(runName,activeFraction);
83 hA[18]->Fill(runName,nAbortGap1*120/11+nAbortGap2*120/9);
84 printf(
"eff_lumi=%f, active=%2.2f, nTowers=%d\n",effective_lumi,activeFraction,nActiveTowers);
86 for (
int i=0;i<16;i++)
89 hA[25]->Fill(i,nBHT3[i]);
90 hA[30+i]->Fill(runName,nBHT3[i]);
91 getAbortGapCounts(i,&nAbortGap1,&nAbortGap2);
92 hA[50+i]->Fill(runName,nAbortGap1);
93 hA[70+i]->Fill(runName,nAbortGap2);
97 temp=(TH1F*)(HList->FindObject(
"muWET"));
98 hA[5]->Add(temp,1.0/activeFraction);
115 if (!towerInfoIsCurrent) getActiveTowers();
127 St2009WlumiMaker::getActiveTowers(){
131 for (
int i=0;i<4800;i++)
132 if (barrel->statTile[0][i]==0)
137 if (nActiveTowers>0) towerInfoIsCurrent=
true;
144 St2009WlumiMaker::sortTrigger(){
169 hA[0]->Fill(
"L2W",1);
170 hA[0]->Fill(
"L2Wnormal",1);
172 if (weve->l2bitRnd) {
174 hA[0]->Fill(
"L2W",1);
175 hA[0]->Fill(
"L2Wrandom",1);
177 if (wMK->passes_L0())
182 for (
int i=0;i<16;i++)
185 hA[90+i]->Fill(weve->trigAwaySum[i]);
188 if (weve->trigAwaySum[i]>=thresh[i])
207 St2009WlumiMaker::getAbortGapCounts(
int angle,
int *n1,
int* n2){
211 for (
int i=32;i<=39;i++)
214 for (
int i=112;i<=119;i++)
gathers all results from W-analysis, Jan's analysis