removed warnings
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Mar 2008 11:22:43 +0000 (11:22 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Mar 2008 11:22:43 +0000 (11:22 +0000)
T0/AliT0Align.cxx
T0/AliT0CalibLaserData.cxx
T0/AliT0Digitizer.h
T0/AliT0RawReader.cxx
T0/AliT0digit.cxx
T0/AliT0v0.cxx

index f1673b8..a5ac69d 100644 (file)
@@ -193,7 +193,7 @@ Double_t AliT0Align::ComputePosition()
 //_______________________________________________________________________
 void AliT0Align::CreateAlignObj(){
   //
-  TClonesArray *array = new TClonesArray("AliAlignObjParams",2);
+  //  TClonesArray *array = new TClonesArray("AliAlignObjParams",2);
   // TClonesArray &alobj = *array;
   
 
index 5988fd0..2bec7be 100644 (file)
@@ -31,7 +31,7 @@
 #include "AliT0RawReader.h"
 #include "TGLabel.h"
 #include "TGFileDialog.h"
-//#include <iostream.h>
+#include <iostream.h>
 
 #include "AliT0CalibLaserData.h"
 
@@ -85,7 +85,7 @@ void AliT0CalibLaserData::ReadHistSize()
 
     
     TGMainFrame* fMain = new TGMainFrame(0,1500,1500);
-    fMain->SetLayoutManager( new TGMatrixLayout(fMain,7,7) );
+    fMain->SetLayoutManager( new TGMatrixLayout(fMain,10,7) );
  
     fMain->AddFrame( new TGLabel(fMain, " Histogram") );
     fMain->AddFrame( new TGLabel(fMain, "X min") );
@@ -101,7 +101,7 @@ void AliT0CalibLaserData::ReadHistSize()
     fMain->AddFrame(fEntries[0]);
     fEntries[1] = new TGNumberEntry(fMain, 10000);
     fMain->AddFrame(fEntries[1]);
-    fEntries[2] = new TGNumberEntry(fMain, 10000);
+    fEntries[2] = new TGNumberEntry(fMain, 2500);
     fMain->AddFrame(fEntries[2]);
     fMain->AddFrame( new TGLabel(fMain, " ") );
     fMain->AddFrame( new TGLabel(fMain, " ") );
@@ -119,41 +119,77 @@ void AliT0CalibLaserData::ReadHistSize()
     fMain->AddFrame( new TGLabel(fMain, " ") );
     fMain->AddFrame( new TGLabel(fMain, "CFD vs QTC " ) );
  // QTC axis X
-    fEntries[6] = new TGNumberEntry(fMain, 1000.);
+    fEntries[6] = new TGNumberEntry(fMain, 0.);
     fMain->AddFrame(fEntries[6]);
-    fEntries[7] = new TGNumberEntry(fMain, 8000.5);
+    fEntries[7] = new TGNumberEntry(fMain, 8000);
     fMain->AddFrame(fEntries[7]);
-    fEntries[8] = new TGNumberEntry(fMain, 700);
+    fEntries[8] = new TGNumberEntry(fMain, 800);
     fMain->AddFrame(fEntries[8]);
 // CFD axis Y 
-   fEntries[9] = new TGNumberEntry(fMain, 2000.5);
+   fEntries[9] = new TGNumberEntry(fMain, 0);
     fMain->AddFrame(fEntries[9]);
-    fEntries[10] = new TGNumberEntry(fMain, 3000.5);
+    fEntries[10] = new TGNumberEntry(fMain, 5000);
     fMain->AddFrame(fEntries[10]);
-    fEntries[11] = new TGNumberEntry(fMain, 1000);
+    fEntries[11] = new TGNumberEntry(fMain, 5000);
     fMain->AddFrame(fEntries[11]);
 //
     fMain->AddFrame( new TGLabel(fMain, "CFD vs LED-CFD " ) );
 //LED-CFD axis X
     fEntries[12] = new TGNumberEntry(fMain, 0);
     fMain->AddFrame(fEntries[12]);
-    fEntries[13] = new TGNumberEntry(fMain, 500);
+    fEntries[13] = new TGNumberEntry(fMain, 1000);
     fMain->AddFrame(fEntries[13]);
-    fEntries[14] = new TGNumberEntry(fMain, 500);
+    fEntries[14] = new TGNumberEntry(fMain, 1000);
     fMain->AddFrame(fEntries[14]);
 // CFD axis Y
-    fEntries[15] = new TGNumberEntry(fMain, 2000);
+    fEntries[15] = new TGNumberEntry(fMain, 1000);
     fMain->AddFrame(fEntries[15]);
-    fEntries[16] = new TGNumberEntry(fMain, 3000);
+    fEntries[16] = new TGNumberEntry(fMain, 5000);
     fMain->AddFrame(fEntries[16]);
-    fEntries[17] = new TGNumberEntry(fMain, 1000);
+    fEntries[17] = new TGNumberEntry(fMain, 4000);
     fMain->AddFrame(fEntries[17]);
  
+   fMain->AddFrame( new TGLabel(fMain, "CFD C " ) );
+//CFD side C
+    fEntries[18] = new TGNumberEntry(fMain, 0);
+    fMain->AddFrame(fEntries[18]);
+    fEntries[19] = new TGNumberEntry(fMain, 5000);
+    fMain->AddFrame(fEntries[19]);
+    fEntries[20] = new TGNumberEntry(fMain, 5000);
+    fMain->AddFrame(fEntries[20]);
+    fMain->AddFrame( new TGLabel(fMain, "") );
+    fMain->AddFrame( new TGLabel(fMain, "") );
+    fMain->AddFrame( new TGLabel(fMain, "") );
+
+    fMain->AddFrame( new TGLabel(fMain, "CFD A " ) );
+//CFD side A
+    fEntries[21] = new TGNumberEntry(fMain,0);
+    fMain->AddFrame(fEntries[21]);
+    fEntries[22] = new TGNumberEntry(fMain, 5000);
+    fMain->AddFrame(fEntries[22]);
+    fEntries[23] = new TGNumberEntry(fMain, 5000);
+    fMain->AddFrame(fEntries[23]);
+
+    fMain->AddFrame( new TGLabel(fMain, "") );
+    fMain->AddFrame( new TGLabel(fMain, "") );
+    fMain->AddFrame( new TGLabel(fMain, "") );
+
+
+    fMain->AddFrame( new TGLabel(fMain, "LED C " ) );
+//LED axis X
+    fEntries[24] = new TGNumberEntry(fMain, 0);
+    fMain->AddFrame(fEntries[24]);
+    fEntries[25] = new TGNumberEntry(fMain, 5000);
+    fMain->AddFrame(fEntries[25]);
+    fEntries[26] = new TGNumberEntry(fMain, 5000);
+    fMain->AddFrame(fEntries[26]);
+
+   
+   for ( int i=0; i<27; i++ ) fEntries[i]->SetWidth(70);
    fMain->AddFrame( new TGLabel(fMain, " File name") );
    fTEntry = new TGTextEntry(fMain,"");
    fMain->AddFrame(fTEntry);
-   
-   for ( int i=0; i<18; i++ ) fEntries[i]->SetWidth(70);
    fTEntry->SetWidth(80);
     //    printf( "Max Length %d\n", fEntries[0]->GetMaxWidth() );
 
@@ -174,7 +210,7 @@ void AliT0CalibLaserData::DoOk()
   fFileName = (fTEntry->GetText());
   //OpenFile();
   printf(" DoOK >>  File %s\n",fFileName);
-  for( int i=0; i<18; i++ ) 
+  for( int i=0; i<27; i++ ) 
     fHistLimits[i] = fEntries[i]->GetNumber();
   
   ReadData();
@@ -187,16 +223,13 @@ void AliT0CalibLaserData::ReadData()
   // fillinf tree
   
   
-  TH1F *hChannel[105];  TH1F *hQTC[24];  
-  TH2F *hCFDvsQTC[24]; TH2F *hCFDvsLED[24]; TH1F *h1CFDminLED[24];
+  TH1I *hChannel[105];  TH1I *hQTC[24];  
+  TH2F *hCFDvsQTC[24]; TH2F *hCFDvsLED[24]; TH1I *h1CFDminLED[24];
 
-  Int_t allData[110][5];
+  Int_t allData[110][50];
   Int_t numberOfHits[105];
   
   Char_t  buf1[20], buf2[20], buf3[20], buf4[20], buf7[20];
-
-  TTree* digitsTree = new TTree("testData","Tree of test data Digits");
-  TBranch *b[106];
   
   Int_t channels[106];
   
@@ -217,15 +250,19 @@ void AliT0CalibLaserData::ReadData()
       if(lookkey){
        Int_t key=lookkey->GetKey();
        names[key]=lookkey->GetChannelName();
-       if(names[key].Contains("QT0"))
-         hChannel[key] = new TH1F(names[key].Data(),names[key].Data(),1000,3000,5000);
-       else
-         hChannel[key] = new TH1F(names[key].Data(),names[key].Data(),1000,2000,3000);
+       //      if(names[key].Contains("QT0"))
+       //  hChannel[key] = new TH1F(names[key].Data(),names[key].Data(),1000,3000,5000);
+       //      else
+         hChannel[key] = new TH1I(names[key].Data(),names[key].Data(),Int_t(fHistLimits[20]),fHistLimits[18],fHistLimits[19]);
+       if(key >0 && key<13)
+         hChannel[key] = new TH1I(names[key].Data(),names[key].Data(),Int_t(fHistLimits[20]),fHistLimits[18],fHistLimits[19]);
+       if(key >13 && key<25)
+         hChannel[key] = new TH1I(names[key].Data(),names[key].Data(),Int_t(fHistLimits[26]),fHistLimits[24],fHistLimits[25]);
        
+       if(key >57 && key<69)
+         hChannel[key] = new TH1I(names[key].Data(),names[key].Data(),Int_t (fHistLimits[23]),fHistLimits[21],fHistLimits[22]);
        //      hitsname="xHits" + names[key];
        //      hNumHits[key] = new TH1F(hitsname.Data(),hitsname.Data(),50,-0.25,24.25);
-       type =names[key] + "/I";
-       b[key]=digitsTree->Branch(names[key].Data(),&channels[key], type);
       }
       else
        {printf(" no such value %i \n", iline);}
@@ -239,8 +276,8 @@ void AliT0CalibLaserData::ReadData()
       sprintf(buf4,"LEDminCFD%i",ic+1);
       sprintf(buf7,"mpd%i",ic+1);
       
-      hQTC[ic] = new TH1F(buf1,"QTC",(Int_t)fHistLimits[2],fHistLimits[0],fHistLimits[1]);
-      h1CFDminLED[ic] = new TH1F(buf4,"LED - CFD",(Int_t)fHistLimits[5],fHistLimits[3],fHistLimits[4]);
+      hQTC[ic] = new TH1I(buf1,"QTC",(Int_t)fHistLimits[2],fHistLimits[0],fHistLimits[1]);
+      h1CFDminLED[ic] = new TH1I(buf4,"LED - CFD",(Int_t)fHistLimits[5],fHistLimits[3],fHistLimits[4]);
       
       hCFDvsQTC[ic] = new TH2F(buf2,"CFD vs    QTC",
                               (Int_t)fHistLimits[8],fHistLimits[6],fHistLimits[7],
@@ -271,7 +308,7 @@ void AliT0CalibLaserData::ReadData()
   //  start->SetNumberOfTRM(1);
   for (Int_t i0=0; i0<105; i0++)
     {
-      for (Int_t j0=0; j0<5; j0++) allData[i0][j0]=0;  
+      for (Int_t j0=0; j0<50; j0++) allData[i0][j0]=0;         
       numberOfHits[i0]=0;
     }
   Int_t event=0;
@@ -279,50 +316,59 @@ void AliT0CalibLaserData::ReadData()
   while (reader->NextEvent()) {
     start->Next();
     for (Int_t i=0; i<105; i++) {
-      for (Int_t iHit=0; iHit<5; iHit++) 
+      for (Int_t iHit=0; iHit<50; iHit++) 
        {
          allData[i][iHit]= start->GetData(i,iHit);
+         //      if( allData[i][iHit]>0)         cout<<i<<" "<<iHit<<" "<<allData[i][iHit]<<endl;
        }
     }
     
-    // if(event%1000 == 0) 
+     if(event%1000 == 0) 
     printf("Event:%d\n",event);
     
-    //          if(event > 200000) break;
+     //   if(event > 100000) break;
     
     for (Int_t it = 0; it<24; it=it+2)
       {
+       Int_t cc=it/2;
        for (Int_t iHit=0; iHit<5; iHit++)
          {
            if(allData[it+25][iHit] != 0 && allData[it+26][iHit] !=0)
              {
-               Int_t cc=it/2;
                hQTC[cc]->Fill(allData[it+25][iHit]-allData[it+26][iHit]);
-               if(allData[cc+1][iHit] != 0 ) hCFDvsQTC[cc]->Fill(allData[it+25][iHit]-allData[it+26][iHit],allData[cc+1][iHit]-allData[0][0]);
-               if(allData[cc+1][iHit] != 0 && allData[cc+13][iHit]!=0 ) 
-                 {
-                   hCFDvsLED[cc]->Fill(allData[cc+13][iHit]-allData[cc+1][iHit],allData[cc+1][iHit]-allData[0][0]);  
-                   h1CFDminLED[cc]->Fill(allData[cc+13][iHit]-allData[cc+1][iHit]);
-                 }
+               if(allData[cc+1][iHit] != 0 ) 
+                 hCFDvsQTC[cc]->Fill(allData[it+25][iHit]-allData[it+26][iHit],
+                                     allData[cc+1][iHit]-allData[0][0]+5000.);
+             }
+           if(allData[cc+1][iHit] != 0 && allData[cc+13][iHit]!=0 ) 
+             {
+               hCFDvsLED[cc]->Fill(allData[cc+13][iHit]-allData[cc+1][iHit],
+                                   allData[cc+1][iHit]-allData[0][0]+5000.);  
+               h1CFDminLED[cc]->Fill(allData[cc+13][iHit]-allData[cc+1][iHit]);
              }
+           
          }
       }
     for (Int_t it = 24; it<48; it=it+2)
       {
+       Int_t cc=(Int_t)(it/2);
        for (Int_t iHit=0; iHit<5; iHit++)
          {
            if(allData[it+57][iHit] != 0 && allData[it+58][iHit] !=0)
              {
-               Int_t cc=(Int_t)(it/2.0);
                hQTC[cc]->Fill(allData[it+57][iHit]-allData[it+58][iHit]);
                //                  hmpd[cc]->Fill(allData[it+26][iHit]-allData[it+25][iHit]);
-             if(allData[cc+1][iHit] != 0 ) hCFDvsQTC[cc]->Fill(allData[it+25][iHit]-allData[it+26][iHit],allData[cc+45][iHit]-allData[0][0]);
-             if(allData[cc+57][iHit] != 0 && allData[cc+45][iHit]!=0 ) 
-               {
-                 hCFDvsLED[cc]->Fill(allData[cc+57][iHit]-allData[cc+45][iHit],allData[cc+1][iHit]-allData[0][0]);  
-                 h1CFDminLED[cc]->Fill(allData[cc+57][iHit]-allData[cc+45][iHit]);
-               }
+               if(allData[cc+1][iHit] != 0 ) 
+                 hCFDvsQTC[cc]->Fill(allData[it+57][iHit]-allData[it+58][iHit],
+                                     allData[cc+45][iHit]-allData[0][0]+5000);
+             }
+           if(allData[cc+57][iHit] != 0 && allData[cc+45][iHit]!=0 ) 
+             {
+               hCFDvsLED[cc]->Fill(allData[cc+57][iHit]-allData[cc+45][iHit],
+                                   allData[cc+1][iHit]-allData[0][0]+5000);  
+               h1CFDminLED[cc]->Fill(allData[cc+57][iHit]-allData[cc+45][iHit]);
              }
+             
        }
       }
     
@@ -333,14 +379,19 @@ void AliT0CalibLaserData::ReadData()
        for(Int_t ik=1; ik<105; ik++)
          { 
            channels[ik] = -100;
-           if((allData[ik][iHit] - allData[0][0]) > 0 ) 
-             {
+           if((allData[ik][iHit] - allData[0][0] +5000) != 0 &&   //!!!!! Uncomment it !!!!! and comment next line
+              //      if((allData[ik][iHit] - allData[1][0] ) != 0 &&     
+                allData[ik][iHit] >0 ) 
+             {  
                numberOfHits[ik]++;
-               hChannel[ik] -> Fill(allData[ik][iHit] - allData[0][0]);
-               channels[ik] = allData[ik][iHit] - allData[0][0];
+               //              hChannel[ik] -> Fill(allData[ik][iHit] - allData[1][0]);            //Comment this line !!!
+               hChannel[ik] -> Fill(allData[ik][iHit] - allData[0][0]+5000);
+               //      cout<<" zpis'>> "<<iHit<<" "<<ik<<" "<<allData[ik][iHit] - allData[0][0]<<endl;
+               //      hChannel[ik] -> Fill(allData[0][0]-allData[ik][iHit] );
+               //              channels[ik] = allData[ik][iHit] - allData[0][0];
              }
          }
-             digitsTree->Fill();   
+       //            digitsTree->Fill();   
       }
 
     event++;
@@ -353,18 +404,18 @@ void AliT0CalibLaserData::ReadData()
       printf("efficiency for %i events \n",event);
       for (Int_t i0=1; i0<13;  i0++)
        {
-         printf("%s  %f  %s  %f %s  %f  %s  %f \n",
+         printf("%s  %f  %s  %f %s  %f  %s  %f \n ",
                 names[i0].Data(), Float_t(numberOfHits[i0])/Float_t(event),
-                names[i0+13].Data(),Float_t(numberOfHits[i0+13])/Float_t(event),
-                names[i0+57].Data(),Float_t(numberOfHits[i0+57])/Float_t(event),
-                names[i0+69].Data(),Float_t(numberOfHits[i0+69])/Float_t(event));
+                names[i0+12].Data(),Float_t(numberOfHits[i0+12])/Float_t(event),
+                names[i0+56].Data(),Float_t(numberOfHits[i0+56])/Float_t(event),
+                names[i0+68].Data(),Float_t(numberOfHits[i0+68])/Float_t(event));
          
          hEffCFD->Fill(i0,Float_t(numberOfHits[i0])  / Float_t(event));
-         hEffLED->Fill(i0,Float_t(numberOfHits[i0+13]) / Float_t(event));
-         hEffCFD->Fill(i0+12,Float_t(numberOfHits[i0+57]) /Float_t(event));
-         hEffLED->Fill(i0+12,Float_t(numberOfHits[i0+69]) /Float_t(event));
+         hEffLED->Fill(i0,Float_t(numberOfHits[i0+12]) / Float_t(event));
+         hEffCFD->Fill(i0+12,Float_t(numberOfHits[i0+56]) /Float_t(event));
+         hEffLED->Fill(i0+12,Float_t(numberOfHits[i0+68]) /Float_t(event));
        }
-      
+      printf("\n");      
       for (Int_t i0=0; i0<24;  i0=i0+2)
        {
          hEffQT1->Fill(i0, Float_t (numberOfHits[i0+25]) / Float_t(event));
@@ -381,9 +432,10 @@ void AliT0CalibLaserData::ReadData()
     }        
   
 
-  Char_t filehist[40]; 
-  sprintf(filehist,"t0tree%s",fFileName);
-  //  sprintf(filehist,"test.root",runNumber);
+  Char_t filehist[50]; 
+  // sprintf(filehist,"t0treeDA%s",fFileName);
+   sprintf(filehist,"t0tree%s",fFileName);
+  printf("\n Wrote data in %s !!\n",filehist);
      TFile *hist = new TFile(filehist,"RECREATE");
      hist->cd();
      //  digitsTree->Write("",TObject::kOverwrite);
index d8984c6..624367e 100644 (file)
@@ -43,7 +43,7 @@ private:
   TArrayI *fADC;         //! array of QTC signals (main amplitude)
   TArrayI *fADC0;        //! array of QTC signals (main amplitude)
   Int_t fSumMult;        // multiplicity
-  TObjArray fAmpLED;     //pmt registration effeicincy
+  TObjArray fAmpLED;     // amplitude time (CFD-LED) dependence
 
   AliT0Parameters  *fParam;           //pointer to T0 parameters class     
 
@@ -52,7 +52,7 @@ private:
   AliT0Digitizer& operator=(const AliT0Digitizer);
 
   
-    ClassDef(AliT0Digitizer,2)
+    ClassDef(AliT0Digitizer,3)
 };    
 
 typedef AliT0Digitizer AliSTARTDigitizer; // for backward compatibility
index 25328a8..3496641 100644 (file)
@@ -106,7 +106,7 @@ Bool_t  AliT0RawReader::Next()
   Int_t trm_chain_header =  0x00000000;
   Int_t  trm_chain_trailer =  0x10000000;
   
-  Int_t  filler =  0x70000000;
+  UInt_t  filler =  0x70000000;
   Bool_t correct=kTRUE;
   Int_t header;
 
index 9fbed3e..a8eb9a3 100644 (file)
@@ -40,7 +40,8 @@ ClassImp(AliT0digit)
                            fTimeDiff(99999),
                            fBestTimeA(99999),
                            fBestTimeC (99999),
-                           fSumMult(0)
+                           fSumMult(0),
+                           fRefPoint(0)
 
 {
   //
index 6c42855..f92e46f 100644 (file)
@@ -49,12 +49,13 @@ ClassImp(AliT0v0)
 
 //--------------------------------------------------------------------
 AliT0v0::AliT0v0(const char *name, const char *title):
- AliT0(name,title)
+  AliT0(name,title),
+  fIdSens1(0)
 {
   //
   // Standart constructor for T0 Detector version 0
   //
-  fIdSens1=0;
+  //  fIdSens1=0;
 //  setBufferSize(128000);
 }
 //-------------------------------------------------------------------------