some warnings fixed according Federico's request
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 May 2008 12:40:39 +0000 (12:40 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 May 2008 12:40:39 +0000 (12:40 +0000)
T0/AliT0.cxx
T0/AliT0CalibTimeEq.cxx
T0/AliT0CalibWalk.cxx
T0/AliT0Digitizer.cxx
T0/AliT0Parameters.cxx
T0/AliT0QAChecker.cxx
T0/AliT0RecPoint.cxx
T0/AliT0Trigger.cxx

index bc7d6ad..fdb413b 100644 (file)
@@ -383,7 +383,7 @@ void AliT0::Raw2Digits(AliRawReader *rawReader,TTree* digitsTree)
    }
 
 
-   AliT0digit* fDigits = new AliT0digit();
+   fDigits = new AliT0digit();
    digitsTree->Branch("T0","AliT0digit",&fDigits,405,1);
    
    
index e37a82a..295ce7c 100644 (file)
@@ -101,28 +101,30 @@ void  AliT0CalibTimeEq::Print(Option_t*) const
 void AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
 {
   // compute online equalized time
-//  Int_t npeaks = 20;
-//  Double_t sigma = 4.;
-
-  TFile *gFile = TFile::Open(filePhys);
-//  Bool_t down=false;
-//  Int_t index[20];
-  Char_t buf1[15];
-//  Char_t temp[10];
-//  Float_t p[24][3]={0.,0.,0.};
+  // Int_t npeaks = 20;
+  // Double_t sigma = 4.;
+  //  Bool_t down=false;
+  // Int_t index[20];
+
+  gFile = TFile::Open(filePhys);
+  gFile->ls();
+  Char_t buf1[30];
   for (Int_t i=0; i<24; i++)
   {
-    sprintf(buf1,"CFD1-CFD%d",i+1);
+    //    if(i<12) sprintf(buf1,"CFD1minCFD%d",i+1);
+    // if(i>11) sprintf(buf1,"CFD13minCFD%d",i+1);
+    if(i<12) sprintf(buf1,"T0_C_%i_CFD",i+1);
+    if(i>11) sprintf(buf1,"T0_A_%i_CFD",i+1-12);
+    printf(" i = %d buf1 = %s\n", i, buf1);
     TH1F *cfd = (TH1F*) gFile->Get(buf1);
+    
     //    printf(" i = %d buf1 = %s\n", i, buf1);
     Double_t mean=cfd->GetMean();
-    SetTimeEq(i,mean);
-    delete cfd;
-  }
-    /*
+    printf(" ipmt %i mean = %f \n", i,mean) ;
 
+    /*    
     TSpectrum *s = new TSpectrum(2*npeaks,1.);
-    printf(" buf1 = %s cfd = %x\n", buf1, cfd);
+    // printf(" buf1 = %s cfd = %x\n", buf1, cfd);
     Int_t nfound = s->Search(cfd,sigma,"goff",0.2);
     printf(" nfound = %d\n", nfound);
     if(nfound!=0)
@@ -132,33 +134,17 @@ void AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
       Float_t xp = xpeak[index[0]];
       Float_t hmax = xp+3*sigma;
       Float_t hmin = xp-3*sigma;
-      cfd->GetXaxis()->SetRange((Int_t)hmin-20,(Int_t)hmax+20);
+      cfd->GetXaxis()->SetRangeUser(hmin-10,hmax+10);
       TF1 *g1 = new TF1("g1", "gaus", hmin, hmax);
       cfd->Fit("g1","IRQN");
-      for(Int_t j =0; j<3; j++)
-      {
-        p[i][j] = g1->GetParameter(j);
-       //      SetCFDvalue(i, j, p[i][j]);
-      }
-        SetTimeEq(i,(p[i][2]));
-       cout<<" mean "<<p[i][2]<<endl;
+     printf(" ipmt %i fit mean = %f \n", i, g1->GetParameter(1)) ;
+     
+    }
     */
-      /*
-      SetCFDvalue(i, 3, hmin);
-      SetCFDvalue(i, 4, hmax);
-
-      if (i<12)
-      {
-        SetTimeEq(i,(p[i][2]-p[0][2]));
-      }
-      else
-      {
-       SetTimeEq(i,(p[i][2]-p[12][2]));
-      }        
-      
-    } 
+      SetTimeEq(i,Int_t(mean));
   }
-      */  
+  // delete cfd;
+  
    gFile->Close();
    delete gFile;
    printf("\n\n");
@@ -166,6 +152,7 @@ void AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
    {
                 printf("fTimeEq[%d]=%f\n",j,fTimeEq[j]);
    }
+
 }
 
 
index 22935bb..8bf9a98 100644 (file)
@@ -195,9 +195,7 @@ void AliT0CalibWalk::MakeWalkCorrGraph(const char *laserFile)
 {
   //make walk corerction for preprocessor
   
-      Double_t *grY ; //= new grY[2500] ;
-      Double_t *grX ;
-  TFile *gFile = TFile::Open(laserFile);
+  gFile = TFile::Open(laserFile);
   //  gFile->ls();
   Float_t x1[10], y1[10]; 
   Float_t x2[10], y2[10];
@@ -222,15 +220,11 @@ void AliT0CalibWalk::MakeWalkCorrGraph(const char *laserFile)
          x2[im] = hCFDvsLED[i][im]->GetMean(1);
          y2[im] = hCFDvsLED[i][im]->GetMean(2);
          xx[im]=im+1;
-         //cout<<" qtc "<< x1[im]<<" "<< y1[im]<<endl;
        }
       for (Int_t imi=0; imi<10; imi++)
        {
          yy1[imi] = Float_t (10-imi);
          xx1[imi]=x2[10-imi-1]; 
-      
-         //      cout<<i<<" "<<imi<<" "<<" qtc " <<x1[imi]<<" "<<xx[imi]<<
-         //    " led "<<x2[imi]<<" "<<y2[imi]<<" led2d "<<yy1[imi]<<" "<<xx1[imi]<<endl;
        }
        if(i==0){       
         cout<<"Making graphs..."<<endl;
@@ -244,17 +238,6 @@ void AliT0CalibWalk::MakeWalkCorrGraph(const char *laserFile)
  
       TGraph *gr4 = new TGraph (10,xx1,yy1);
       TGraph *gr3 = new TGraph (10,x1,xx);
-      /*    
-     if(gr4) {
-         Int_t np=gr4->GetN();
-         if(np>0) {
-           grY = gr4->GetY();
-           grX = gr4->GetX();
-           for (Int_t ig=0; ig<np; ig++)
-             cout<<i<<" "<<ig<<" "<<grX[ig]<<" "<<grY[ig]<<" eval "<<gr4->Eval(grX[ig])<<endl;  
-         }
-         }
-      */
       fQTC.AddAtAndExpand(gr3,i);       
       fAmpLED.AddAtAndExpand(gr4,i);
       //      for (Int_t im=0; im<10; im++) { x2[im]=0;  y2[im]=0;  xx1[im]=0; xx[im]=0;}
index 3fef861..db45a34 100644 (file)
@@ -213,7 +213,7 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
     AliRunLoader * inRL = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile));
     AliLoader * pInStartLoader = inRL->GetLoader("T0Loader");
     if (!inRL->GetAliRun()) inRL->LoadgAlice();
-    AliT0 *fT0  = (AliT0*)inRL ->GetAliRun()->GetDetector("T0");
+    fT0  = (AliT0*)inRL ->GetAliRun()->GetDetector("T0");
 
        //read Hits 
     pInStartLoader->LoadHits("READ");//probably it is necessary to load them before
index 05262c9..bda64a7 100644 (file)
@@ -73,6 +73,8 @@ AliT0Parameters::AliT0Parameters()
    fAmpLEDRec(0), 
    fPMTeff(),
    fWalk(0),
+   fQTC(0),
+   fAmpLED(0),
    fTimeDelayCFD(0), 
  //  fTimeV0(0), 
    fTimeDelayTVD(0),
index 7aa20cb..5459493 100644 (file)
@@ -66,9 +66,10 @@ const Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
   Double_t nent[100];
   memset(nent,0,100*sizeof(Double_t));
   Double_t w[100];
-  memset(w,1.,100*sizeof(Double_t));
+  memset(w,1,100*sizeof(Double_t));
   TH1 *fhRecLEDAmp[24];  TH1 * fhRecQTC[24];
-  TH1 *fhOnlineMean;  TH1 * fhRecMean;
+  TH1 *fhOnlineMean = 0x0;  
+  TH1 * fhRecMean = 0x0;
   TString dataType = AliQA::GetAliTaskName(index);
 
   if (list->GetEntries() == 0){
@@ -88,8 +89,8 @@ const Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
        if(index==2){
          if(count>23 && count<48)fhRecLEDAmp[count-24] = hdata;
          if(count>47 && count<72)fhRecQTC[count-48] = hdata;
-         if(count == 72) fhOnlineMean = hdata; 
-         if(count == 73) fhRecMean = hdata; 
+         if(count == 72)  fhOnlineMean = hdata; 
+         if(count == 73)  fhRecMean = hdata; 
        }
        count++ ;
         Double_t rv = 0.;
index f1d2076..f7b4bd6 100644 (file)
@@ -35,16 +35,17 @@ ClassImp(AliT0RecPoint)
 
 //------------------------------------
   AliT0RecPoint::AliT0RecPoint() : TObject(),
-                                  fTimeAverage(0),
-                                  fVertexPosition(0),
+                                  fTimeAverage(99999),
+                                  fTimeOnlineMean(99999),
+                                  fVertexPosition(999999),
                                   fTimeBestA(0),fTimeBestC(0),
                                   fMultC(0),fMultA(0)
 {
   //ctor
-  fTimeAverage=99999;
+  // fTimeAverage=99999;
   fTimeBestA=99999;
   fTimeBestC=99999;
-  fVertexPosition=99999;
+  //  fVertexPosition=99999;
   fMultA=0;
   fMultC=0;
   for (Int_t i=0; i<24; i++) { fTime[i]=0; fADC[i]=0; fADCLED[i]=0;}
@@ -52,11 +53,11 @@ ClassImp(AliT0RecPoint)
 //_____________________________________________________________________________
 
 AliT0RecPoint::AliT0RecPoint(const AliT0RecPoint &r):TObject(),
-
-                                  fTimeAverage(0),
-                                  fVertexPosition(0),
-                                  fTimeBestA(0),fTimeBestC(0),
-                                  fMultC(0),fMultA(0)
+                                                    fTimeAverage(999999),
+                                                    fTimeOnlineMean(999999),
+                                                    fVertexPosition(999999),
+                                                    fTimeBestA(0),fTimeBestC(0),
+                                                    fMultC(0),fMultA(0)
 {
   //
   // AliT0RecPoint copy constructor
index c87b504..49e808f 100644 (file)
@@ -77,7 +77,7 @@ void AliT0Trigger::Trigger()
     AliError("no digits tree");
     return;
   }
-  AliT0digit *fDigits = new AliT0digit();
+  fDigits = new AliT0digit();
 
   TBranch *brDigits = treeD->GetBranch("T0");
   if (brDigits) {