improved DA
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2008 15:36:42 +0000 (15:36 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2008 15:36:42 +0000 (15:36 +0000)
T0/T0Laserda.cxx
T0/T0Physda.cxx

index 51881daaade48ac414b6b7bf90f2c73774662430..18e2fb4f52568160861df8b638f0c52f8e83bfbe 100644 (file)
@@ -127,12 +127,12 @@ int main(int argc, char **argv) {
 
   // Allocation of histograms - start
   TH1F *hCFD[24];
-  TH2F *hCFD_QTC[24];
-  TH2F *hCFD_LED[24]; 
+  TH2F *hCFDvsQTC[24];
+  TH2F *hCFDvsLED[24]; 
 
    for(Int_t ic=0; ic<24; ic++) {
-      hCFD_QTC[ic] = new TH2F(Form("CFD_QTC%d",ic+1),"CFD_QTC",cqbx,cqlx,cqmx,cqby,cqly,cqmy);
-      hCFD_LED[ic] = new TH2F(Form("CFD_LED%d",ic+1),"CFD_LED",clbx,cllx,clmx,clby,clly,clmy);
+      hCFDvsQTC[ic] = new TH2F(Form("CFD_QTC%d",ic+1),"CFD_QTC",cqbx,cqlx,cqmx,cqby,cqly,cqmy);
+      hCFDvsLED[ic] = new TH2F(Form("CFD_LED%d",ic+1),"CFD_LED",clbx,cllx,clmx,clby,clly,clmy);
       if(ic<12){
        hCFD[ic] = new TH1F(Form("T0_C_%d_CFD",ic+1),"CFD", cbx,clx,cmx);       
       }
@@ -227,10 +227,10 @@ int main(int argc, char **argv) {
                 hCFD[cc]->Fill(allData[cc+1][iHt]-allData[0][0]+5000);
                }
                if(allData[ik+25][iHt]!=0 && allData[ik+26][iHt]!=0 && allData[cc+1][iHt]!=0){
-                 hCFD_QTC[cc]->Fill((allData[ik+25][iHt]-allData[ik+26][iHt]) , (allData[cc+1][iHt]-allData[0][0]+5000));
+                 hCFDvsQTC[cc]->Fill((allData[ik+25][iHt]-allData[ik+26][iHt]) , (allData[cc+1][iHt]-allData[0][0]+5000));
                } 
                 if(allData[cc+13][iHt]!=0 && allData[cc+1][iHt]!=0){
-                hCFD_LED[cc]->Fill(allData[cc+13][iHt]-allData[cc+1][iHt],allData[cc+1][iHt]-allData[0][0]+5000);
+                hCFDvsLED[cc]->Fill(allData[cc+13][iHt]-allData[cc+1][iHt],allData[cc+1][iHt]-allData[0][0]+5000);
                }
        }
 
@@ -241,10 +241,10 @@ int main(int argc, char **argv) {
                  hCFD[cc]->Fill(allData[cc+45][iHt]-allData[0][0]+5000);
                 }
                 if(allData[ik+57][iHt]!=0 && allData[ik+58][iHt]!=0 && allData[cc+45][iHt]!=0){
-                 hCFD_QTC[cc]->Fill(allData[ik+57][iHt]-allData[ik+58][iHt],allData[cc+45][iHt]-allData[0][0]+5000);
+                 hCFDvsQTC[cc]->Fill(allData[ik+57][iHt]-allData[ik+58][iHt],allData[cc+45][iHt]-allData[0][0]+5000);
                }
                 if(allData[cc+57][iHt]!=0 && allData[cc+45][iHt]!=0){
-                 hCFD_LED[cc]->Fill(allData[cc+57][iHt]-allData[cc+45][iHt],allData[cc+45][iHt]-allData[0][0]+5000);
+                 hCFDvsLED[cc]->Fill(allData[cc+57][iHt]-allData[cc+45][iHt],allData[cc+45][iHt]-allData[0][0]+5000);
                 }
        }
 
@@ -273,8 +273,8 @@ int main(int argc, char **argv) {
   TFile *hist = new TFile(FILE_OUT,"RECREATE");
 
   for(Int_t j=0;j<24;j++){
-     hCFD_QTC[j]->Write();
-     hCFD_LED[j]->Write();
+     hCFDvsQTC[j]->Write();
+     hCFDvsLED[j]->Write();
      hCFD[j]->Write();
     }
   hist->Close();
index e0d47b18004835d566f59504eaaf172a2319b99b..6f0889c7e8356bed9a13e2a4530066a398e16568 100644 (file)
@@ -118,16 +118,16 @@ int main(int argc, char **argv) {
 
   // Allocation of histograms - start
 
-  TH1F *hCFD1_CFD[24];  
+  TH1F *hCFD1minCFD[24];  
   TH1F *hCFD[24];
    
    for(Int_t ic=0; ic<24; ic++) {
       if(ic<12) {
-        hCFD1_CFD[ic] = new TH1F(Form("CFD1-CFD%d",ic+1),"CFD-CFD",ccbx,cclx,ccmx);
+        hCFD1minCFD[ic] = new TH1F(Form("CFD1-CFD%d",ic+1),"CFD-CFD",ccbx,cclx,ccmx);
         hCFD[ic] = new TH1F(Form("CFD%i",ic+1),"CFD",cbx,clx,cmx);
        }
       if(ic>11){
-        hCFD1_CFD[ic] = new TH1F(Form("CFD13-CFD%i",ic+1),"CFD-CFD",ccbx,cclx,ccmx);
+        hCFD1minCFD[ic] = new TH1F(Form("CFD1-CFD%i",ic+1),"CFD-CFD",ccbx,cclx,ccmx);
         hCFD[ic] = new TH1F(Form("CFD%i",ic+1),"CFD",cbx,clx,cmx);
        }
     }
@@ -174,6 +174,7 @@ int main(int argc, char **argv) {
        break;
 
       case PHYSICS_EVENT:
+//      case CALIBRATION_EVENT:
       iev++;
 
       if(iev==1){
@@ -209,23 +210,20 @@ int main(int argc, char **argv) {
 
       // Fill the histograms
        
-      for (Int_t ik = 0; ik<24; ik+=2)
+      for (Int_t ik = 0; ik<24; ik++)
          for (Int_t iHt=0; iHt<5; iHt++){
-                Int_t cc = ik/2;
-                if(allData[cc+1][iHt]!=0 ){
-                hCFD1_CFD[cc]->Fill(allData[cc+1][iHt]-allData[1][iHt]);
-                hCFD[cc]->Fill(allData[cc+13][iHt]);
+                if(allData[ik+1][iHt]!=0 ){
+                 if(ik<12){
+                        hCFD1minCFD[ik]->Fill(allData[ik+1][iHt]-allData[1][iHt]);
+                        hCFD[ik]->Fill(allData[ik+13][iHt]);
+                 }
+                  if(ik>11){
+                         hCFD1minCFD[ik]->Fill(allData[ik+45][iHt]-allData[57][iHt]);
+                         hCFD[ik]->Fill(allData[ik+45][iHt]);
+                  }
                }
        }
 
-      for (Int_t ik = 24; ik<48; ik+=2)
-         for (Int_t iHt=0; iHt<5; iHt++){
-                Int_t cc = ik/2; 
-                if(allData[cc+45][iHt]!=0 ){
-                 hCFD1_CFD[cc]->Fill(allData[cc+45][iHt]-allData[57][iHt]);
-                hCFD[cc]->Fill(allData[cc+45][iHt]);
-                       }
-       }
 
      delete start;
        start = 0x0;
@@ -251,7 +249,7 @@ int main(int argc, char **argv) {
   TFile *hist = new TFile(FILE_OUT,"RECREATE");
 
   for(Int_t j=0;j<24;j++){
-     hCFD1_CFD[j]->Write();
+     hCFD1minCFD[j]->Write();
      hCFD[j]->Write(); 
     }
   hist->Close();