Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OltCounter.cxx

Go to the documentation of this file.
00001 
00002 // $Id: OltCounter.cxx,v 1.16 2006/05/22 19:31:16 rhatcher Exp $
00003 //
00004 // OltCounter.cxx
00005 //
00006 // The Offline Trigger: Counter object for trigger stats etc.
00007 //
00008 // Author: Phil Adamson 6/2002
00010 
00011 #include "OfflineTrigger/OltCounter.h"
00012 #include <iostream>
00013 #include <fstream>
00014 #include <cassert>
00015 #include "TSystem.h"
00016 
00017 using std::cout;
00018 using std::endl;
00019 using std::ofstream;
00020 
00021 #include "MessageService/MsgService.h"
00022 CVSID("$Id: OltCounter.cxx,v 1.16 2006/05/22 19:31:16 rhatcher Exp $");
00023 
00024 OltCounter::OltCounter(int runnum, int subrun, const char  *outdir,string sumdir)
00025 {
00026   fRun = runnum;
00027   fSubrun = subrun;
00028   fSumDir = sumdir;
00029   fNumBadToFTFs = 0;
00030   fNumBadToFHits = 0;
00031   fBadTofTF = -10;
00032   char filename[1000];
00033   sprintf(filename,"%s/triggers%d_%d.root",outdir,runnum,subrun);
00034   fFile = new TFile(filename,"RECREATE");
00035   Init();
00036 }
00037 
00038 OltCounter::OltCounter(int runnum, int subrun)
00039 {
00040   char filename[1000];
00041   const char *dir = gSystem->Getenv("OLT_SUMMARY_DIR");
00042   if (!dir) {
00043     sprintf(filename,"%s/triggers%d_%d.root",fOutdir,runnum,subrun);
00044   } 
00045   else {
00046     sprintf(filename,"%s/triggers%d_%d.root",dir,runnum,subrun);
00047   }
00048   fFile = new TFile(filename,"RECREATE");
00049   Init();
00050 }
00051 
00052 void OltCounter::Init()
00053 {
00054   fPassTree = new TTree("passtree","Trigger pass rate");
00055   fPassTree->Branch("timeframe",&fTrigTimeframe,"timeframe/I");
00056   fPassTree->Branch("rawn0",&fRawn0,"rawn0/I");
00057   fPassTree->Branch("rawn1",&fRawn1,"rawn1/I");
00058   fPassTree->Branch("passn0",&fPassn0,"passn0/I");
00059   fPassTree->Branch("passn1",&fPassn1,"passn1/I");
00060 
00061 
00062   fTree = new TTree("tree","Trigger info");
00063   fTree->Branch("timeframe",&fTrigTimeframe,"timeframe/I");
00064   fTree->Branch("timestamp",&fTrigTimestamp,"timestamp/I");
00065   fTree->Branch("n0",&fTrigN0,"n0/I");
00066   fTree->Branch("n1",&fTrigN1,"n1/I");
00067   fTree->Branch("planes",&fTrigPlanes,"planes/I");
00068   fTree->Branch("tof",&fTrigTof,"tof/I");
00069   fTree->Branch("cer1",&fTrigCer1,"cer1/I");
00070   fTree->Branch("cer2",&fTrigCer2,"cer2/I");
00071   fTree->Branch("ndead",&fTrigNdead,"ndead/I");
00072   fTree->Branch("v0",&fTrigV0,"v0/I");
00073   fTree->Branch("v1",&fTrigV1,"v1/I");
00074 
00075   fDeadTime = new TH1F("deadtime","deadtime",10000,0,10000);
00076   fCer1 = new TH1F("cer1","cer1",1600,0,16000);
00077   fCer2 = new TH1F("cer2","cer2",1600,0,16000);
00078   fCer3 = new TH1F("cer3","cer3",1600,0,16000);
00079   fCer1x = new TH1F("cer1x","cer1x",1600,0,16000);
00080   fCer2x = new TH1F("cer2x","cer2x",1600,0,16000);
00081   fTC1f = new TH1F("TC1f","Time, Cerenkov 1 to following event",1000,0,10000);
00082   fTC2f = new TH1F("TC2f","Time, Cerenkov 2 to following event",1000,0,10000);
00083   fTC1b = new TH1F("TC1b","Time, Cerenkov 1 to prev event",1000,0,10000);
00084   fTC2b = new TH1F("TC2b","Time, Cerenkov 2 to prev event",1000,0,10000);
00085   fTToff = new TH1F("TToff","Time, Tof to following event",1000,0,10000);
00086   fTTofb = new TH1F("TTofb","Time, Tof to prev event",1000,0,10000);
00087 
00088   fC1C2 = new TH2F("C1C2","Cer 1 vs Cer 2",400,0,16000,400,0,16000);
00089 
00090 
00091   fHistNDeadTrig = new TH1F("NDeadTrig","# Dead chips, 4/5 events",200,0,200);
00092   fHistNDeadAll = new TH1F("NDeadAll","# Dead chips, all events",200,0,200);
00093   fHistList.Add(fHistNDeadTrig);
00094   fHistList.Add(fCer3);
00095   fHistList.Add(fHistNDeadAll);
00096   fHistNTofTrig = new TH1F("NTofTrig","# Tof chips, 4/5 events",200,0,200);
00097   fHistNTofAll = new TH1F("NTofAll","# Tof chips, all events",200,0,200);
00098   fHistList.Add(fHistNTofTrig);
00099   fHistList.Add(fHistNTofAll);
00100   fHistNCer1Trig = new TH1F("NCer1Trig","# Cer1 chips, 4/5 events",200,0,200);
00101   fHistNCer1All = new TH1F("NCer1All","# Cer1 chips, all events",200,0,200);
00102   fHistList.Add(fHistNCer1Trig);
00103   fHistList.Add(fHistNCer1All);
00104   fHistNCer2Trig = new TH1F("NCer2Trig","# Cer2 chips, 4/5 events",200,0,200);
00105   fHistNCer2All = new TH1F("NCer2All","# Cer2 chips, all events",200,0,200);
00106   fHistList.Add(fHistNCer2Trig);
00107   fHistList.Add(fHistNCer2All);
00108   fHistTimeframeTrig = new TH1F("TimeframeTrig","Timeframes, 4/5 events",5000,0,5000);
00109   fHistTimeframeAll = new TH1F("TimeframeAll","Timeframes, all events",5000,0,5000);
00110   fHistTimeframeSpill = new TH1F("TimeframeSpill","Timeframes, in spill",5000,0,5000);
00111   fHistList.Add(fHistTimeframeTrig);
00112   fHistList.Add(fHistTimeframeAll);
00113   fHistList.Add(fHistTimeframeSpill);
00114   fHistCer1All = new TH1F("Cer1All","Cer1, all events",1600,0,16000);
00115   fHistList.Add(fHistCer1All);
00116   fHistCer2All = new TH1F("Cer2All","Cer2, all events",1600,0,16000);
00117   fHistList.Add(fHistCer2All);
00118   fHistCer3All = new TH1F("Cer3All","Cer3, all events",1600,0,16000);
00119   fHistList.Add(fHistCer3All);
00120   fHistDeadChipMap = new TH2F("DeadChipMap","Dead Chip HitMap",3,0,3,
00121                               256,0,256);
00122   fHistList.Add(fHistDeadChipMap);
00123   fHistDeadChipMapTrig = new TH2F("DeadChipMapTrig",
00124                                   "Dead Chip HitMap, 4/5 events",3,0,3,
00125                                   256,0,256);
00126   fHistList.Add(fHistDeadChipMapTrig);
00127   fHistNumTOF = new TH1F("NumTOF","TOF hits",5000,0,5000);
00128   fHistNumTDC = new TH1F("NumTDC","TDC readouts",5000,0,5000);
00129   fHistList.Add(fHistNumTDC);
00130   fHistList.Add(fHistNumTOF);
00131   fHistSummary = new TH1F("Summary","Trigger Summary",20,0,20);
00132   fHistSummaryTrig = new TH1F("SummaryTrig","Trigger Summary, 4/5",20,0,20);
00133   fHistSummaryLive = new TH1F("SummaryLive","Trigger Summary, no dead chips",20,0,20);
00134   fHistSummaryLiveTrig = new TH1F("SummaryLiveTrig","Trigger Summary, no dead chips, 4/5",20,0,20);
00135   fHistList.Add(fHistSummary);
00136   fHistList.Add(fHistSummaryLive);
00137   fHistList.Add(fHistSummaryTrig);
00138   fHistList.Add(fHistSummaryLiveTrig);
00139   fHistSummary->GetXaxis()->SetBinLabel(1,"All");
00140   fHistSummary->GetXaxis()->SetBinLabel(3,"2/3");
00141   fHistSummary->GetXaxis()->SetBinLabel(4,"3/4");
00142   fHistSummary->GetXaxis()->SetBinLabel(5,"4/5");
00143   fHistSummary->GetXaxis()->SetBinLabel(6,"5/6");
00144   fHistSummary->GetXaxis()->SetBinLabel(7,"6/7");
00145   fHistSummary->GetXaxis()->SetBinLabel(11,"ToF");
00146   fHistSummary->GetXaxis()->SetBinLabel(12,"Cer 1");
00147   fHistSummary->GetXaxis()->SetBinLabel(13,"Cer 2");
00148   fHistSummary->GetXaxis()->SetBinLabel(14,"Cer 3");
00149   fHistSummary->GetXaxis()->SetBinLabel(15,"LI");
00150   fHistSummary->GetXaxis()->SetBinLabel(16,"All Cer");
00151   fHistSummary->GetXaxis()->SetBinLabel(17,"C2 && C3");
00152   fHistSummaryLive->GetXaxis()->SetBinLabel(1,"All");
00153   fHistSummaryLive->GetXaxis()->SetBinLabel(3,"2/3");
00154   fHistSummaryLive->GetXaxis()->SetBinLabel(4,"3/4");
00155   fHistSummaryLive->GetXaxis()->SetBinLabel(5,"4/5");
00156   fHistSummaryLive->GetXaxis()->SetBinLabel(6,"5/6");
00157   fHistSummaryLive->GetXaxis()->SetBinLabel(7,"6/7");
00158   fHistSummaryLive->GetXaxis()->SetBinLabel(11,"ToF");
00159   fHistSummaryLive->GetXaxis()->SetBinLabel(12,"Cer 1");
00160   fHistSummaryLive->GetXaxis()->SetBinLabel(13,"Cer 2");
00161   fHistSummaryLive->GetXaxis()->SetBinLabel(14,"Cer 3");
00162   fHistSummaryLive->GetXaxis()->SetBinLabel(15,"LI");
00163   fHistSummaryLive->GetXaxis()->SetBinLabel(16,"All Cer");
00164   fHistSummaryLive->GetXaxis()->SetBinLabel(17,"C2 && C3");
00165   fHistSummaryTrig->GetXaxis()->SetBinLabel(1,"All");
00166   fHistSummaryTrig->GetXaxis()->SetBinLabel(3,"2/3");
00167   fHistSummaryTrig->GetXaxis()->SetBinLabel(4,"3/4");
00168   fHistSummaryTrig->GetXaxis()->SetBinLabel(5,"4/5");
00169   fHistSummaryTrig->GetXaxis()->SetBinLabel(6,"5/6");
00170   fHistSummaryTrig->GetXaxis()->SetBinLabel(7,"6/7");
00171   fHistSummaryTrig->GetXaxis()->SetBinLabel(11,"ToF");
00172   fHistSummaryTrig->GetXaxis()->SetBinLabel(12,"Cer 1");
00173   fHistSummaryTrig->GetXaxis()->SetBinLabel(13,"Cer 2");
00174   fHistSummaryTrig->GetXaxis()->SetBinLabel(14,"Cer 3");
00175   fHistSummaryTrig->GetXaxis()->SetBinLabel(15,"LI");
00176   fHistSummaryTrig->GetXaxis()->SetBinLabel(16,"All Cer");
00177   fHistSummaryTrig->GetXaxis()->SetBinLabel(17,"C2 && C3");
00178   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(1,"All");
00179   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(3,"2/3");
00180   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(4,"3/4");
00181   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(5,"4/5");
00182   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(6,"5/6");
00183   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(7,"6/7");
00184   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(11,"ToF");
00185   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(12,"Cer 1");
00186   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(13,"Cer 2");
00187   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(14,"Cer 3");
00188   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(15,"LI");
00189   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(16,"All Cer");
00190   fHistSummaryLiveTrig->GetXaxis()->SetBinLabel(17,"C2 && C3");
00191 }
00192 
00193 
00194 OltCounter::~OltCounter()
00195 {
00196   Write();
00197   fFile->Close();
00198 }
00199 
00200 void OltCounter::Event(int tf,int timestart, int n0, int n1,
00201                        int planes, int tof, int cer1, int cer2, 
00202                        int v0, int v1, int ndead)
00203 {
00204   // No longer implemeted - old trigger code
00205 
00206   // use all parameters to avoid warning msg
00207   MSG("Olt",Msg::kError)
00208     << "OltCounter::Event is no longer implemented - called with"
00209     << " tf=" << tf << " timestart=" << timestart << " n0=" << n0
00210     << " n1=" << n1 << " planes=" << planes << " tof=" << tof
00211     << " cer1=" << cer1 << " cer2=" << cer2 << " v0=" << v0
00212     << " v1=" << v1 << " ndead=" << ndead << endl;
00213   assert(0);
00214 
00215 }
00216 
00217 void OltCounter::RawHits(int tf, int crate, int num) 
00218 {
00219   //cout<<"Raw Hits "<<tf<<" "<<crate<<" "<<num<<endl;
00220   if (tf>1&&crate==0) {
00221     fPassTree->Fill();
00222   }
00223   fPassn0 = 0;
00224   fPassn1 = 0;
00225 
00226   fTrigTimeframe = tf;
00227   switch(crate) {
00228   case 0:
00229     fRawn0 = num;
00230     break;
00231   case 1:
00232     fRawn1 = num;
00233     break;
00234   case 2:
00235     fRawn2 = num;
00236     break;
00237   default:
00238     cout<<"Too many crates!"<<endl;
00239   }
00240 }
00241 
00242 void OltCounter::Event(int tf,int timestart, int n0, int n1,
00243                        int planes, int tof, int cer1, int cer2, int cer3, 
00244                        int v0, int v1, int ndead, int li)
00245 {
00246   if (planes>3) {
00247     fPassn0 +=n0;
00248     fPassn1 +=n1;
00249   }
00250   //  if (tof||cer1||cer2||cer3||li)
00251   //  cout<<timestart<<" "<<tof<<" "<<cer1<<" "<<cer2<<" "<<cer3<<" "<<ndead<<" "
00252   //      <<li<<endl;
00253   fTrigNdead = ndead;
00254   fTrigCer2 = cer2;
00255   fTrigCer1 = cer1;
00256   fTrigTof = tof;
00257   fTrigPlanes = planes;
00258   fTrigTimeframe = tf;
00259   fTrigV0 = v0;
00260   fTrigV1 = v1;
00261   fTrigTimestamp = timestart;
00262   fTrigN0 = n0;
00263   fTrigN1 = n1;
00264   // fTree->Fill();
00265   fHistNDeadAll->Fill(ndead);
00266   fHistNTofAll->Fill(tof);
00267   fHistNCer1All->Fill(cer1);  
00268   fHistNCer2All->Fill(cer2);
00269   fHistTimeframeAll->Fill(tf);
00270 
00271   if (!li) fHistSummary->Fill(planes); // Number of planes in trigger
00272   if(tof) fHistSummary->Fill(10); // TOF
00273   if(cer1) fHistSummary->Fill(11); // Cer1
00274   if(cer2) fHistSummary->Fill(12); // Cer2
00275   if(cer3) fHistSummary->Fill(13); // Cer3
00276   if(li) fHistSummary->Fill(14); // Cer3
00277   if (cer1 && cer2 && cer3) fHistSummary->Fill(15);  
00278   if (cer2 && cer3) fHistSummary->Fill(16);  
00279   if (ndead==0) {
00280     if (!li) fHistSummaryLive->Fill(planes); // Number of planes in trigger
00281     if(tof) fHistSummaryLive->Fill(10); // TOF
00282     if(cer1) fHistSummaryLive->Fill(11); // Cer1
00283     if(cer2) fHistSummaryLive->Fill(12); // Cer2
00284     if(cer3) fHistSummaryLive->Fill(13); // Cer3
00285     if(li) fHistSummaryLive->Fill(14); // Cer3
00286     if (cer1 && cer2 && cer3) fHistSummaryLive->Fill(15);  
00287   if (cer2 && cer3) fHistSummaryLive->Fill(16);  
00288   }
00289   if (planes>3) {
00290     if (ndead==0) { 
00291       if (!li) fHistSummaryLiveTrig->Fill(planes); // Number of planes in trigger
00292       if(tof) fHistSummaryLiveTrig->Fill(10); // TOF
00293       if(cer1) fHistSummaryLiveTrig->Fill(11); // Cer1
00294       if(cer2) fHistSummaryLiveTrig->Fill(12); // Cer2
00295       if(cer3) fHistSummaryLiveTrig->Fill(13); // Cer3
00296       if(li) fHistSummaryLiveTrig->Fill(14); // Cer3  
00297       if (cer1 && cer2 && cer3) fHistSummaryLiveTrig->Fill(15);  
00298       if (cer2 && cer3) fHistSummaryLiveTrig->Fill(16);  
00299     }
00300    fHistSummaryTrig->Fill(planes); // Number of planes in trigger
00301     if(tof) fHistSummaryTrig->Fill(10); // TOF
00302     if(cer1) fHistSummaryTrig->Fill(11); // Cer1
00303     if(cer2) fHistSummaryTrig->Fill(12); // Cer2
00304     if(cer3) fHistSummaryTrig->Fill(13); // Cer3
00305     if(li) fHistSummaryTrig->Fill(14); // Cer3  
00306     if (cer1 && cer2 && cer3) fHistSummaryTrig->Fill(15);  
00307     if (cer2 && cer3) fHistSummaryTrig->Fill(16);  
00308 
00309     fHistNDeadTrig->Fill(ndead);
00310     fHistNTofTrig->Fill(tof);
00311     fHistNCer1Trig->Fill(cer1);  
00312     fHistNCer2Trig->Fill(cer2);
00313     fHistTimeframeTrig->Fill(tf);
00314     fTC1f->Fill(timestart-fTC1);
00315     fTC2f->Fill(timestart-fTC2);
00316     fTToff->Fill(timestart-fTTof);
00317     fPlaneTime = timestart;
00318   }
00319   if (v1) {
00320     fHistTimeframeSpill->Fill(tf);
00321   }
00322 }
00323 
00324 void OltCounter::DeadTime(int time)
00325 {
00326   fDeadTime->Fill(time);
00327 }
00328 
00329 void OltCounter::Write()
00330 {
00331   fFile->cd();
00332   fTToff->Write(0,TObject::kOverwrite);
00333   fTTofb->Write(0,TObject::kOverwrite);
00334   fTC1b->Write(0,TObject::kOverwrite);
00335   fTC1f->Write(0,TObject::kOverwrite);
00336   fTC2b->Write(0,TObject::kOverwrite);
00337   fTC2f->Write(0,TObject::kOverwrite);
00338   fDeadTime->Write(0,TObject::kOverwrite);
00339   fCer1->Write(0,TObject::kOverwrite);
00340   fCer2->Write(0,TObject::kOverwrite);
00341   fCer1x->Write(0,TObject::kOverwrite);
00342   fCer2x->Write(0,TObject::kOverwrite);
00343   fC1C2->Write(0,TObject::kOverwrite);
00344 
00345   TIter it(&fHistList);
00346   while (TObject *obj = it()) obj->Write(0,TObject::kOverwrite);
00347     fPassTree->Write(0,TObject::kOverwrite);
00348 
00349 }
00350 
00351 void OltCounter::Cerenkov(int i, long long data)
00352 {
00353   int adc = (data & 0x7fffLL);
00354   int timestamp = ((data & 0x1fffffff00000000LL)>>32);
00355   //cout<<"Cernekov "<<i<<" "<<adc<<endl;
00356   switch(i) {
00357   case 1:
00358     fAdc1 = adc;
00359     fTC1 = timestamp;
00360     fTC1b->Fill(timestamp-fPlaneTime);
00361     fHistCer1All->Fill(adc);
00362     break;
00363   case 2:
00364     fTC2 = timestamp;
00365     fAdc2 = adc;
00366     fTC2b->Fill(timestamp-fPlaneTime);
00367     fHistCer2All->Fill(adc);
00368     break;
00369   case 3:
00370     fHistCer2All->Fill(adc);
00371    break;
00372   };
00373   
00374 }
00375 
00376 void OltCounter::Cerenkov(int i, int adc, int timestamp)
00377 {
00378   switch(i) {
00379   case 1:
00380     fAdc1 = adc;
00381     fTC1 = timestamp;
00382     fTC1b->Fill(timestamp-fPlaneTime);
00383     fHistCer1All->Fill(adc);
00384     break;
00385   case 2:
00386     fTC2 = timestamp;
00387     fAdc2 = adc;
00388     fTC2b->Fill(timestamp-fPlaneTime);
00389     fHistCer2All->Fill(adc);
00390     break;
00391   case 3:
00392     fAdc3 = adc;
00393     fHistCer3All->Fill(adc);
00394    break;
00395   };
00396   
00397 }
00398 
00399 void OltCounter::Trigger(int t, int plane)
00400 {
00401   //  cout<<"Trigger "<<t<<endl;
00402   if (t>0) {
00403     //cout<<"Trig: "<<fAdc1<<" "<<fAdc2<<endl;
00404    if (fAdc1) fCer1->Fill(fAdc1);
00405    if (fAdc2) fCer2->Fill(fAdc2);
00406    if (fAdc3) fCer3->Fill(fAdc3);
00407    if (plane<10) {
00408      if (fAdc1) fCer1x->Fill(fAdc1);
00409      if (fAdc2) fCer2x->Fill(fAdc2);
00410    }
00411    if (fAdc1 || fAdc2) fC1C2->Fill(fAdc1,fAdc2);
00412   }
00413   fAdc1=0;
00414   fAdc2=0;
00415   fAdc3=0;
00416 }
00417 
00418 void OltCounter::Tof(int timestamp)
00419 {
00420   fTTofb->Fill(timestamp-fPlaneTime);
00421   fTTof = timestamp;
00422 }
00423 
00424 void OltCounter::DeadChip(int crate, int chad)
00425 {
00426   int chip = (chad>>5);
00427   fHistDeadChipMap->Fill(crate,chip);
00428 }
00429 
00430 void OltCounter::DeadChipTrig(int crate, int chad)
00431 {
00432   int chip = (chad>>5);
00433   fHistDeadChipMapTrig->Fill(crate,chip);
00434 }
00435 
00436 void OltCounter::NumTDC(int tf, int n)
00437 {
00438   fHistNumTDC->SetBinContent(tf,n);
00439 }
00440 
00441 void OltCounter::NumTOF(int tf, int n)
00442 {
00443   fHistNumTOF->SetBinContent(tf,n);
00444 }
00445 
00446 void OltCounter::WriteSummary()
00447 {
00448   cout<<"Writing Summary!\n";
00449   char fname[50];
00450   sprintf(fname,"summary-%d-%d.html",fRun,fSubrun);
00451   fSumDir = fSumDir + "/" + fname;
00452   ofstream out(fSumDir.c_str());
00453   out<<"<H4> Summary for run "<<fRun<<" with "<<fTrigTimeframe<<" timeframes </H4> "<<endl;
00454   out<<"<DIV CLASS=\"left\">"<<endl;
00455   out<<"All new version with added whiteners, now fixed\n";
00456   if ((!fHistNDeadTrig)||fHistNDeadTrig->GetEntries()<1) {
00457     out<<"No events here\n";
00458   }
00459   else {
00460     out<<"<P> Fraction of 4/5 events with no dead chips: "<<fHistNDeadTrig->GetBinContent(1)/float(fHistNDeadTrig->GetEntries())<<"</P>"<<endl;
00461     out<<"<TABLE BORDER=1 CELLPADDING=1> ";
00462     out<<"<TR> <TH COLSPAN=2> In non-LI events with no dead chips: </TH> </TR>\n";
00463     out<<"<TR> <TD> Number 4/5 </TD><TD>"<<fHistSummaryLive->GetBinContent(5)<<"</TD></TR>"<<endl;
00464     out<<"<TR> <TD> Number 5/6 </TD><TD>"<<fHistSummaryLive->GetBinContent(6)<<"</TD></TR>"<<endl;
00465     out<<"<TR> <TD> Number 6/7 </TD><TD>"<<fHistSummaryLive->GetBinContent(7)<<"</TD></TR>"<<endl;
00466     out<<"</TABLE></DIV>"<<endl;
00467     out<<"<DIV CLASS=\"right\">"<<endl;
00468     out<<"<TABLE BORDER=1 CELLPADDING=1> <TR> <TH COLSPAN=2> ";
00469     out<<"In events with no dead chips that pass 4/5 trigger: </TH> <TH> All events</TH></TR>\n";
00470     
00471     out<<"<TR> <TD> TOF hits</TD><TD>    "<<fHistSummaryLiveTrig->GetBinContent(11)  <<"</TD><TD>"<<fHistSummaryLive->GetBinContent(11)<<"</TD></TR>"<<endl;
00472     out<<"<TR> <TD> Cerenkov 1</TD><TD>  "<<fHistSummaryLiveTrig->GetBinContent(12)  <<"</TD><TD>"<<fHistSummaryLive->GetBinContent(12)<<"</TD></TR>"<<endl;
00473     out<<"<TR> <TD> Cerenkov 2</TD><TD>  "<<fHistSummaryLiveTrig->GetBinContent(13)  <<"</TD><TD>"<<fHistSummaryLive->GetBinContent(13)<<"</TD></TR>"<<endl;
00474     out<<"<TR> <TD> Cerenkov 3</TD><TD>  "<<fHistSummaryLiveTrig->GetBinContent(14)  <<"</TD><TD>"<<fHistSummaryLive->GetBinContent(14)<<"</TD></TR>"<<endl;
00475     out<<"<TR> <TD> All Three</TD><TD>   "<<fHistSummaryLiveTrig->GetBinContent(16)  <<"</TD><TD>"<<fHistSummaryLive->GetBinContent(16)<<"</TD></TR>"<<endl;
00476     out<<"<TR> <TD> C2 && C3</TD><TD>   "<<fHistSummaryLiveTrig->GetBinContent(17)  <<"</TD><TD>"<<fHistSummaryLive->GetBinContent(17)<<"</TD></TR>"<<endl;
00477     out<<"</TABLE></DIV>"<<endl;
00478     
00479     out<<"This run actually contains "<<fNumBadToFTFs<<" timeframes with ToF mismatches, affecting "<<fNumBadToFHits<<" hits.\n";
00480   }
00481   out.close();
00482 }
00483 
00484 void OltCounter::ToFMismatch(int timeframe, int /* num */)
00485 {
00486   if (fBadTofTF!=timeframe) { 
00487     ++fNumBadToFTFs;
00488     fBadTofTF = timeframe;
00489   }
00490   ++fNumBadToFHits; //+=num;
00491 }

Generated on Mon Feb 15 11:07:17 2010 for loon by  doxygen 1.3.9.1