]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
more realistic calibration
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Mar 2007 16:04:02 +0000 (16:04 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Mar 2007 16:04:02 +0000 (16:04 +0000)
27 files changed:
T0/AliT0.cxx
T0/AliT0CalibData.cxx
T0/AliT0CalibData.h
T0/AliT0Digitizer.cxx
T0/AliT0Digitizer.h
T0/AliT0Parameters.cxx
T0/AliT0Parameters.h
T0/AliT0RawData.cxx
T0/AliT0RawData.h
T0/AliT0RawReader.cxx
T0/AliT0RawReader.h
T0/AliT0RecPoint.cxx
T0/AliT0RecPoint.h
T0/AliT0Reconstructor.cxx
T0/AliT0Reconstructor.h
T0/AliT0SetCDB.C
T0/AliT0Trigger.cxx
T0/AliT0digit.cxx
T0/AliT0digit.h
T0/AliT0hit.cxx
T0/AliT0hit.h
T0/T0baseLinkDef.h
T0/T0recLinkDef.h
T0/T0simLinkDef.h
T0/libT0base.pkg
T0/libT0rec.pkg
T0/libT0sim.pkg

index 3f1330c0706af4d0ab8beae793ce3da7d64f475f..0fb1afa0100a999ef62bfc3793d0d4929e30d2df 100644 (file)
@@ -137,7 +137,7 @@ void AliT0::AddHit(Int_t track, Int_t *vol, Float_t *hits)
 
 void AliT0::AddDigit(Int_t besttimeright, Int_t besttimeleft, Int_t meantime, 
                        Int_t timediff, Int_t sumMult,
-                       TArrayI *time, TArrayI *adc, TArrayI *timeAmp, TArrayI *adcAmp)
+                       TArrayI *timeCFD, TArrayI *qt0, TArrayI *timeLED, TArrayI *qt1)
 {
   
   //  Add a T0 digit to the list.
@@ -146,15 +146,15 @@ void AliT0::AddDigit(Int_t besttimeright, Int_t besttimeleft, Int_t meantime,
   if (!fDigits) {
     fDigits = new AliT0digit();
   }
-  fDigits-> SetTimeBestRight(besttimeright);
-  fDigits->SetTimeBestLeft(besttimeleft);
+  fDigits-> SetTimeBestA(besttimeright);
+  fDigits->SetTimeBestC(besttimeleft);
   fDigits-> SetMeanTime(meantime);
   fDigits-> SetDiffTime(timediff);
   fDigits-> SetSumMult(sumMult);
-  fDigits->SetTime(*time);
-  fDigits->SetTimeAmp(*timeAmp);
-  fDigits->SetADC(*adc);
-  fDigits->SetADCAmp(*adcAmp);
+  fDigits->SetTimeCFD(*timeCFD);
+  fDigits->SetTimeLED(*timeLED);
+  fDigits->SetQT0(*qt0);
+  fDigits->SetQT1(*qt1);
 }
 
 
@@ -397,16 +397,16 @@ void AliT0::Raw2Digits(AliRawReader *rawReader,TTree* digitsTree)
        AliDebug(2, Form(" readed Raw %i %i %i %i %i", in, timeLED->At(in),timeCFD->At(in),chargeQT0->At(in),chargeQT1->At(in)));
      }
   
-   fDigits->SetTime(*timeCFD);
-   fDigits->SetADC(*chargeQT1);
+   fDigits->SetTimeCFD(*timeCFD);
+   fDigits->SetQT0(*chargeQT1);
 
-   fDigits->SetTimeAmp(*timeLED);
-   fDigits->SetADCAmp(*chargeQT1);
+   fDigits->SetTimeLED(*timeLED);
+   fDigits->SetQT1(*chargeQT1);
 
    fDigits->SetMeanTime(allData[49][0]);
    fDigits->SetDiffTime(allData[50][0]);
-   fDigits->SetTimeBestRight(allData[51][0]);
-   fDigits->SetTimeBestLeft(allData[52][0]);
+   fDigits->SetTimeBestA(allData[51][0]);
+   fDigits->SetTimeBestC(allData[52][0]);
    digitsTree->Fill();
    fDigits->Write();
  
index 82086467ed904afe0e90fe3619bbb2094da53a66..e7ad6355d08c115d2a1b77cbee2bcf937d107d76 100644 (file)
@@ -90,7 +90,6 @@ void AliT0CalibData::Reset()
 {
     memset(fTimeDelayCFD,1,24*sizeof(Float_t));
     memset(fTimeDelayLED,1,24*sizeof(Float_t));
-    memset(fGain,1,24*sizeof(Float_t));
 }
 
 
@@ -101,58 +100,44 @@ void  AliT0CalibData::Print(Option_t*) const
   printf("\n   ----    PM Arrays       ----\n\n");
   printf(" Time delay CFD \n");
   for (Int_t i=0; i<24; i++) printf("  %f",fTimeDelayCFD[i]);
-  printf(" \n LED \n");
-  for (Int_t i=0; i<24; i++) printf("  %f",fTimeDelayLED[i]);
-  printf(" \n Gain \n");
-  for (Int_t i=0; i<24; i++) printf("  %f",fGain[i]);
-  printf(" \n");
 } 
 
 //________________________________________________________________
 void  AliT0CalibData::PrintLookup(Option_t*, Int_t iTRM, Int_t iTDC, Int_t iChannel) const
 {
-
-   AliT0LookUpKey* lookkey= new AliT0LookUpKey();
-   AliT0LookUpValue*  lookvalue= new AliT0LookUpValue();
-     lookvalue->SetTRM(iTRM);
-     lookvalue->SetTDC(iTDC);
-     lookvalue->SetChain(0);
-     lookvalue->SetChannel(iChannel);
-
-     printf(" AliT0CalibData::PrintLookup ::start GetValue %i %i %i \n",iTRM, iTDC, iChannel);
-     lookkey = (AliT0LookUpKey*) fLookup.GetValue((TObject*)lookvalue);
-     
-     cout<<"  AliT0CalibData::PrintLookup :: lookkey "<< lookkey<<endl;
-     if (lookkey)
-       {
-        cout<<" lookup KEY!!! "<<lookkey->GetKey()<<" VALUE "<<lookvalue->GetTRM()<<" "
-            <<lookvalue->GetTDC()<<" "
-            << lookvalue->GetChain()<<" "
-            <<lookvalue->GetChannel()<<endl;
-       }
-     
-
+  
+  AliT0LookUpKey* lookkey= new AliT0LookUpKey();
+  AliT0LookUpValue*  lookvalue= new AliT0LookUpValue();
+  
+  lookvalue->SetTRM(iTRM);
+  lookvalue->SetTDC(iTDC);
+  lookvalue->SetChain(0);
+  lookvalue->SetChannel(iChannel);
+  
+  printf(" AliT0CalibData::PrintLookup ::start GetValue %i %i %i \n",iTRM, iTDC, iChannel);
+  lookkey = (AliT0LookUpKey*) fLookup.GetValue((TObject*)lookvalue);
+  
+  cout<<"  AliT0CalibData::PrintLookup :: lookkey "<< lookkey<<endl;
+  if (lookkey)
+    {
+      cout<<" lookup KEY!!! "<<lookkey->GetKey()<<" VALUE "<<lookvalue->GetTRM()<<" "
+         <<lookvalue->GetTDC()<<" "
+         << lookvalue->GetChain()<<" "
+         <<lookvalue->GetChannel()<<endl;
+    }
+  
+  
 }
 
 //________________________________________________________________
 void AliT0CalibData::SetTimeDelayCFD(Float_t* TimeDelay)
 {
   if(TimeDelay) for(int t=0; t<24; t++) fTimeDelayCFD[t] = TimeDelay[t];
-  //  else for(int t=0; t<24; t++) fTimeDelay[t] = 0.;
-}
-//________________________________________________________________
-void AliT0CalibData::SetTimeDelayLED(Float_t* TimeDelay)
+}  
+  //________________________________________________________________
+  void AliT0CalibData::SetTimeDelayLED(Float_t* TimeDelay)
 {
   if(TimeDelay) for(int t=0; t<24; t++) fTimeDelayLED[t] = TimeDelay[t];
-  //  else for(int t=0; t<24; t++) fTimeDelay[t] = 0.;
-}
-
-//________________________________________________________________
-void AliT0CalibData::SetGain(Float_t* Gain)
-{
-  if(Gain) for(int t=0; t<24; t++) fGain[t] = Gain[t];
-  // else for(int t=0; t<24; t++) fGain[t] = 0.;
 }
 
 
@@ -160,12 +145,55 @@ void AliT0CalibData::SetGain(Float_t* Gain)
 void AliT0CalibData::SetWalk(Int_t ipmt, const Char_t *filename)
 {
 
-  TFile *file = new TFile(filename);
-  char funcname[256];
-  sprintf(funcname,"CFD%i",ipmt+1);
-  TF1* gr = (TF1*)file->Get(funcname);
+  Int_t mv, ps; 
+  Int_t x[70000], y[70000], index[70000];
+  Float_t time[10000],amplitude[10000];
+  string buffer;
+  Bool_t down=false;
+  
+  ifstream inFile("data/CFD-Amp.txt");
+  if(!inFile) AliError(Form("Cannot open file %s !",filename));
+  
+  Int_t i=0, i1=0, i2=0;
+  while(getline(inFile,buffer)){
+    inFile >> ps >> mv;
+
+    x[i]=ps; y[i]=mv;
+    i++;
+  }
+  inFile.close();
+  TMath::Sort(i, y, index,down);
+  Int_t amp=0, iin=0, isum=0, sum=0;
+  Int_t ind=0;
+  for (Int_t ii=0; ii<70000; ii++)
+    {
+      ind=index[ii];
+      if(y[ind] == amp)
+       {
+         sum +=x[ind];
+         iin++;
+         //      cout<<ii<<" "<<ind<<" "<<y[ind]<<" "<<x[ind]<<" "<<sum<<endl;
+       }
+      else
+       {
+         if(iin>0)
+           time[isum] = Float_t (sum/(iin));
+         else
+           time[isum] =Float_t (x[ind]);
+         amplitude[isum] = Float_t (amp);
+         amp=y[ind];
+         cout<<ii<<" "<<ind<<" "<<y[ind]<<" "<<x[ind]<<" iin "<<iin<<" mean "<<time[isum]<<" amp "<< amplitude[isum]<<" "<<isum<<endl;
+         iin=0;
+         isum++;
+         sum=0;
+       }
+    }
+
+  inFile.close();
+
+  TGraph* gr = new TGraph(isum, amplitude, time);
   fWalk.AddAtAndExpand(gr,ipmt);
-  file->Close();
 }
 
 
@@ -225,6 +253,7 @@ void AliT0CalibData::SetSlewingRec(Int_t ipmt,const Char_t *filename)
 
 void AliT0CalibData::ReadAsciiLookup(const Char_t *filename)
 {
+  Int_t key, trm, tdc, chain, channel;
 
   if(filename == 0){
     AliError(Form("Please, specify file with database")) ;
@@ -232,17 +261,34 @@ void AliT0CalibData::ReadAsciiLookup(const Char_t *filename)
   }
 
   //  AliT0LookUpKey * lookkey= new AliT0LookUpKey();
-  //AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
+  //  AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
 
   ifstream lookup;
   lookup.open(filename);
-  if(!lookup) {AliError(Form("Cannot open file %s !",filename));}
+  if(!lookup)
+    {
+      //  AliLog(Form("Cannot open file %s ! Getting hardcoded value",filename));
+
+    trm=0; tdc=0; chain=0; channel=0; key=0;
+    for (Int_t ik=0; ik<108; ik++)
+      {
+       AliT0LookUpKey * lookkey= new AliT0LookUpKey();
+       AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
+       
+      lookvalue->SetTRM(trm);
+      lookvalue->SetTDC(tdc);
+      lookvalue->SetChain(chain);
+      lookvalue->SetChannel(channel);
+      lookkey->SetKey(ik);
+      if(ik>53) { trm=1; tdc=0; channel=0;}
+      if (channel<7) channel +=2;
+      else {channel = 0; tdc++;}
+      }
+    }
   Char_t varname[11];
-  Int_t key, trm, tdc, chain, channel;
   // while(lookup.eof())
 
  for (Int_t i=0; i<108; i++)
-//    for (Int_t i=0;i<3;i++)
     {
        AliT0LookUpKey * lookkey= new AliT0LookUpKey();
        AliT0LookUpValue * lookvalue= new AliT0LookUpValue();
index 9025e5cb2ac6e956d92e9b0da18286425f8a7143..7891cc6288888f724ebf7dd935210cbf58ff6122 100644 (file)
@@ -34,13 +34,10 @@ class AliT0CalibData: public TNamed {
   Float_t  GetTimeDelayLED(Int_t channel) const {return fTimeDelayLED[channel];}
   Float_t* GetTimeDelayLED()  const  {return(float*) fTimeDelayLED;}
 
-  Float_t   GetGain(Int_t channel) const {return fGain[channel];}
-  Float_t*  GetGain()  const {return (float*)fGain;}
-  void     SetGain(Float_t val, Int_t channel)  {fGain[channel]=val;}
-  void     SetGain(Float_t* Gain);
   
-  Float_t  GetWalk(Int_t ipmt, Float_t mv )  const {return ((TF1*)fWalk.At(ipmt))->Eval(mv);}
-  void SetWalk(Int_t ipmt, const Char_t *filename="calibr/re.root") ;
+  TGraph *GetWalk(Int_t ipmt )  const {return ((TGraph*)fWalk.At(ipmt));}
+  Float_t  GetWalkVal(Int_t ipmt, Float_t mv )  const {return ((TGraph*)fWalk.At(ipmt))->Eval(mv);}
+  void SetWalk(Int_t ipmt, const Char_t *filename="data/CFD-Amp.root") ;
 
    TGraph *  GetSlew(Int_t ipmt) const   {return (TGraph*)fSlewingLED.At(ipmt);}
   Float_t  GetSlewingLED(Int_t ipmt, Float_t mv)  const 
@@ -49,8 +46,8 @@ class AliT0CalibData: public TNamed {
   Float_t  GetSlewingRec(Int_t ipmt, Float_t mv)  const 
       {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);}
 
-  void SetSlewingLED(Int_t ipmt, const Char_t *filename) ;
-  void SetSlewingRec(Int_t ipmt, const Char_t *filename) ;
+  void SetSlewingLED(Int_t ipmt, const Char_t *filename="data/CFD-LED.txt") ;
+  void SetSlewingRec(Int_t ipmt, const Char_t *filename="data/re.root") ;
 
   void     SetTimeDelayCFD(Float_t val, Int_t channel) {fTimeDelayCFD[channel]=val;}
   void     SetTimeDelayCFD(Float_t* TimeDelay);
@@ -72,7 +69,6 @@ class AliT0CalibData: public TNamed {
 
   Float_t  fTimeDelayCFD[24]; // Coeff. for time delay (24 different cables & CFD )
   Float_t  fTimeDelayLED[24]; // Coeff. for time delay (24 different cables & CFD )
-  Float_t  fGain[24]; // Coeff. for gain (24 different cables & CFD )
   Float_t fTimeDelayTVD; //time delay for TVD (vertex trigger channel)
   TObjArray fWalk;  //time - amp. walk
   TObjArray fSlewingLED;  //time - amp.LED slew
@@ -81,7 +77,7 @@ class AliT0CalibData: public TNamed {
   //Int_t fa;
 
   //
-  ClassDef(AliT0CalibData,2)    // T0 Sensor Calibration data
+  ClassDef(AliT0CalibData,3)    // T0 Sensor Calibration data
 };
 
 typedef AliT0CalibData AliSTARTCalibData; // for backward compatibility
index 3f6c3e7566407fc0310046d31ca44688c76191e8..f45ff5336d3ea36c93eb8ffdd28fa3f847e89726 100644 (file)
 ClassImp(AliT0Digitizer)
 
 //___________________________________________
-  AliT0Digitizer::AliT0Digitizer()  :AliDigitizer()
+  AliT0Digitizer::AliT0Digitizer()  :AliDigitizer(),
+                                    fT0(0),
+                                    fHits(0),
+                                    fdigits(0),
+                                    ftimeCFD(new TArrayI(24)), 
+                                    ftimeLED (new TArrayI(24)), 
+                                    fADC(new TArrayI(24)), 
+                                    fADC0 (new TArrayI(24)),
+                                    fSumMult(0),
+                                    fEffPMT(0)
+
+
+
 {
 // Default ctor - don't use it
   ;
@@ -60,24 +72,17 @@ AliT0Digitizer::AliT0Digitizer(AliRunDigitizer* manager)
    fT0(0),
    fHits(0),
    fdigits(0),
-   ftimeCFD(0),
-   ftimeLED(0),
-   fADC(0),
-   fADC0(0)
+   ftimeCFD(new TArrayI(24)), 
+   ftimeLED (new TArrayI(24)), 
+   fADC(new TArrayI(24)), 
+   fADC0 (new TArrayI(24)),
+   fSumMult(0),
+   fEffPMT(0)
 {
 // ctor which should be used
 
   AliDebug(1,"processed");
 
-  fT0 = 0;
-  fHits = 0;
-  fdigits = 0;
-
-  ftimeCFD = new TArrayI(24); 
-  fADC = new TArrayI(24); 
-  ftimeLED = new TArrayI(24); 
-  fADC0 = new TArrayI(24); 
-  
 
 }
 
@@ -111,9 +116,9 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
   /*
     Produde digits from hits
         digits is TObject and includes
-       We are writing array if left & right  TDC
-       left & right  ADC (will need for slow simulation)
-       TOF first particle left & right
+       We are writing array if C & A  TDC
+       C & A  ADC (will need for slow simulation)
+       TOF first particle C & A
        mean time and time difference (vertex position)
        
   */
@@ -131,15 +136,17 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
   Int_t countE[24];
   Int_t volume, pmt, trCFD, trLED; 
   Float_t sl, qt;
-  Int_t  bestRightTDC, bestLeftTDC, qtCh;
+  Int_t  bestATDC, bestCTDC, qtCh;
   Float_t time[24], besttime[24], timeGaus[24] ;
     //Q->T-> coefficients !!!! should be asked!!!
-  Float_t gain[24],timeDelayCFD[24], timeDelayLED[24];
+  Float_t timeDelayCFD[24], timeDelayLED[24];
   Int_t threshold =50; //photoelectrons
   Float_t zdetA, zdetC;
    Int_t sumMultCoeff = 100;
   TObjArray slewingLED;
-  TObjArray slewingRec;
+  TObjArray walk;
+  TH1F *hr ;
+
   AliT0Parameters* param = AliT0Parameters::Instance();
   param->Init();
 
@@ -148,17 +155,17 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
   Float_t delayVertex = param->GetTimeDelayTVD();
   for (Int_t i=0; i<24; i++){
     timeDelayCFD[i] = param->GetTimeDelayCFD(i);
-    timeDelayLED[i] = param->GetTimeDelayLED(i);
-    gain[i] = param->GetGain(i);
+   timeDelayLED[i] = param->GetTimeDelayLED(i);
     TGraph* gr = param ->GetSlew(i);
     slewingLED.AddAtAndExpand(gr,i);
 
-    TGraph* gr1 = param ->GetSlewRec(i);
-    slewingRec.AddAtAndExpand(gr1,i);
+    TGraph* fu = param ->GetWalk(i);
+    walk.AddAtAndExpand(fu,i);
 
     TGraph* grEff = param ->GetPMTeff(i);
     fEffPMT.AddAtAndExpand(grEff,i);
   }
+  
   zdetC = param->GetZposition(0);
   zdetA = param->GetZposition(1);
   
@@ -173,14 +180,15 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
        
     }
     
-    Float_t besttimeright=99999.;
-    Float_t besttimeleft=99999.;
-    Int_t pmtBestRight=9999;
-    Int_t pmtBestLeft=9999;
+    Float_t besttimeC=99999.;
+    Float_t besttimeA=99999.;
+    Int_t pmtBestC=9999;
+    Int_t pmtBestA=9999;
     Int_t timeDiff=999, meanTime=0;
     Int_t sumMult =0;   fSumMult=0;
-    bestRightTDC = 99999;  bestLeftTDC = 99999;
+    bestATDC = 99999;  bestCTDC = 99999;
  
+
     ftimeCFD -> Reset();
     fADC -> Reset();
     fADC0 -> Reset();
@@ -236,44 +244,44 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
        } //hits loop
     } //track loop
     
-    //spread time right&left by 25ps   && besttime
+    //spread time A&C by 25ps   && besttime
     Float_t c = 0.0299792; // cm/ps
     
     Float_t koef=(zdetA-zdetC)/c; //correction position difference by cable
     for (Int_t ipmt=0; ipmt<12; ipmt++){
       if(countE[ipmt] > threshold) {
        timeGaus[ipmt]=gRandom->Gaus(time[ipmt],25)+koef;
-       if(timeGaus[ipmt]<besttimeleft){
-         besttimeleft=timeGaus[ipmt]; //timeleft
-         pmtBestLeft=ipmt;}
+       if(timeGaus[ipmt]<besttimeC){
+         besttimeC=timeGaus[ipmt]; //timeC
+         pmtBestC=ipmt;}
      }
     }
      for ( Int_t ipmt=12; ipmt<24; ipmt++){
       if(countE[ipmt] > threshold) {
        timeGaus[ipmt]=gRandom->Gaus(time[ipmt],25); 
-       if(timeGaus[ipmt]<besttimeright) {
-         besttimeright=timeGaus[ipmt]; //timeright
-         pmtBestRight=ipmt;}
+       if(timeGaus[ipmt]<besttimeA) {
+         besttimeA=timeGaus[ipmt]; //timeA
+         pmtBestA=ipmt;}
       }        
     }
    //folding with alignmentz position distribution  
-    if( besttimeleft > 10000. && besttimeleft <15000)
-      bestLeftTDC=Int_t ((besttimeleft+1000*timeDelayCFD[pmtBestLeft])
+    if( besttimeC > 10000. && besttimeC <15000)
+      bestCTDC=Int_t ((besttimeC+timeDelayCFD[pmtBestC])
                         /channelWidth);
  
-    if( besttimeright > 10000. && besttimeright <15000)
-      bestRightTDC=Int_t ((besttimeright+1000*timeDelayCFD[pmtBestRight])
+    if( besttimeA > 10000. && besttimeA <15000)
+      bestATDC=Int_t ((besttimeA+timeDelayCFD[pmtBestA])
                        /channelWidth);
 
-    if (bestRightTDC < 99999 && bestLeftTDC < 99999)
+    if (bestATDC < 99999 && bestCTDC < 99999)
       {
-       timeDiff=Int_t (((besttimeleft-besttimeright)+1000*delayVertex)
+       timeDiff=Int_t (((besttimeC-besttimeA)+1000*delayVertex)
                        /channelWidth);
-       meanTime=Int_t (((besttimeright+1000*timeDelayCFD[pmtBestLeft]+
-                         besttimeleft+1000*timeDelayCFD[pmtBestLeft])/2.)
+       meanTime=Int_t (((besttimeC+timeDelayCFD[pmtBestC]+
+                         besttimeA+timeDelayCFD[pmtBestA])/2.)
                        /channelWidth);
       }
-       AliDebug(10,Form(" time right& left %i %i  time diff && mean time in channels %i %i",bestRightTDC,bestLeftTDC, timeDiff, meanTime));
+       AliDebug(10,Form(" time A& C %i %i  time diff && mean time in channels %i %i",bestATDC,bestCTDC, timeDiff, meanTime));
     for (Int_t i=0; i<24; i++)
       {
                Float_t  al = countE[i]; 
@@ -283,16 +291,15 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
          // phe -> mV 0.3; 1MIP ->500phe -> ln (amp (mV)) = 5;
          // max 200ns, HIJING  mean 50000phe -> 15000mv -> ln = 15 (s zapasom)
          // channel 25ps
-         qt= 50.*al*gain[i]/ph2Mip;  // 50mv/Mip amp in mV 
+         qt= 50.*al/ph2Mip;  // 50mv/Mip amp in mV 
          //  fill TDC
-         trCFD = Int_t (timeGaus[i] + 1000.*timeDelayCFD[i])/channelWidth
-         trLED= Int_t (timeGaus[i] + 1000.*timeDelayLED[i]); 
+         trCFD = Int_t (timeGaus[i]/channelWidth + (timeDelayCFD[i]-timeDelayCFD[0]))
+         trLED= Int_t (timeGaus[i] + timeDelayLED[i]); 
          sl = ((TGraph*)slewingLED.At(i))->Eval(qt);
          trLED = Int_t(( trLED + 1000*sl )/channelWidth);
          qtCh=Int_t (1000.*TMath::Log(qt)) / channelWidth;
          fADC0->AddAt(0,i);
          fADC->AddAt(qtCh,i);
-         ftimeCFD->AddAt(Int_t (trCFD),i);
          ftimeLED->AddAt(trLED,i); 
          //      sumMult += Int_t ((al*gain[i]/ph2Mip)*50) ;
          sumMult += Int_t (qt/sumMultCoeff)  ;
@@ -301,6 +308,14 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
                        i, timeGaus[i],trCFD ));
        AliDebug(10,Form(" qt in mV %f qt in ns %f qt in channels %i   ",qt, 
                        TMath::Log(qt), qtCh));
+       // put slewing 
+       TGraph *fu1=(TGraph*) walk.At(i);
+       Float_t slew=fu1->Eval(Float_t(qtCh));
+       hr=fu1->GetHistogram();
+       Float_t maxValue=hr->GetMaximum(50);
+       trCFD=trCFD-Int_t((maxValue-slew)/channelWidth);
+       ftimeCFD->AddAt(Int_t (trCFD),i);
+       cout<<" slew "<<slew<<" "<<maxValue<<" "<<trCFD<<endl;
        }
       } //pmt loop
 
@@ -310,13 +325,11 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
       AliDebug(10,Form("summult mv %i   mult  in chammens %i in ps %i ", 
                      sumMult, fSumMult, fSumMult*channelWidth));
     }
-    //     if (  besttimeright<99999 || besttimeleft < 99999) {
 
-      fT0->AddDigit(bestRightTDC,bestLeftTDC,meanTime,timeDiff,fSumMult,
-                      ftimeCFD,fADC,ftimeLED,fADC0);
-      //     } 
+      fT0->AddDigit(bestATDC,bestCTDC,meanTime,timeDiff,fSumMult,
+                      ftimeCFD,fADC0,ftimeLED,fADC);
      
-      AliDebug(10,Form(" Digits wrote bestRightTDC %i bestLeftTDC %i  meanTime %i  timeDiff %i fSumMult %i ", bestRightTDC,bestLeftTDC,meanTime,timeDiff,fSumMult ));
+      AliDebug(10,Form(" Digits wrote bestATDC %i bestCTDC %i  meanTime %i  timeDiff %i fSumMult %i ", bestATDC,bestCTDC,meanTime,timeDiff,fSumMult ));
     pOutStartLoader->UnloadHits();
   } //input streams loop
   
@@ -339,23 +352,3 @@ void AliT0Digitizer::Exec(Option_t* /*option*/)
      pOutStartLoader->UnloadDigits();
      
 }
-
-
-//------------------------------------------------------------------------
-Bool_t AliT0Digitizer::RegisterPhotoE(Int_t ipmt,Double_t energy)
-{
-
-  
-  //  Float_t hc=197.326960*1.e6; //mev*nm
-  Double_t hc=1.973*1.e-6; //gev*nm
-  Float_t lambda=hc/energy;
-  Float_t eff = ((TGraph*) fEffPMT.At(ipmt))->Eval(lambda);
-  Double_t  p = gRandom->Rndm();
-
-  if (p > eff)
-    return kFALSE;
-  
-  return kTRUE;
-}
-
-//----------------------------------------------------------------------------
index cf2a2f6d5e1ac84f323471b9a4cf9c7e3fe0c454..46367d3876f0f820f6f62189de3fd48d5e249c00 100644 (file)
@@ -27,7 +27,7 @@ class AliT0Digitizer : public AliDigitizer {
 
   // Do the main work
   void Exec (Option_t* /*option=0*/) ;
-  Bool_t RegisterPhotoE(Int_t impt, Double_t energy);
+  //  Bool_t RegisterPhotoE(Int_t impt, Double_t energy);
   enum {kBgTag = -1};
  
 private:
index 3f39f5b8976cdc402d603244edac5bbcee8cc7df..6c45c98da3a34026259f433fbff4b3db995e4b86 100644 (file)
@@ -35,6 +35,7 @@
 
 AliT0CalibData* AliT0Parameters::fgCalibData = 0;
 AliT0CalibData* AliT0Parameters::fgLookUp = 0;
+AliT0CalibData* AliT0Parameters::fgSlewCorr =0;
 //====================================================================
 ClassImp(AliT0Parameters)
 #if 0
@@ -54,28 +55,23 @@ AliT0Parameters::Instance()
 
 //____________________________________________________________________
 AliT0Parameters::AliT0Parameters()
-  :fIsInit(kFALSE),fPh2Mip(0),fmV2Mip(0),fChannelWidth(0),fmV2Channel(0),fQTmin(0),fQTmax(0),fFixedGain(0),fSlewingLED(),fSlewingRec(),fPMTeff(),fTimeDelayLED(0),fTimeDelayCFD(0),fTimeDelayTVD(0),fCalibentry() 
+  :fIsInit(kFALSE),fPh2Mip(0),fmV2Mip(0),fChannelWidth(0),fmV2Channel(0),fQTmin(0),fQTmax(0),fSlewingLED(),fSlewingRec(),fPMTeff(),fTimeDelayLED(0),fTimeDelayCFD(0),fTimeDelayTVD(0),fCalibentry(), fLookUpentry(),fSlewCorr()
 {
   // Default constructor 
 
   for (Int_t ipmt=0; ipmt<24; ipmt++)
     {
-      SetTimeDelayCablesCFD(ipmt);
-      SetTimeDelayCablesLED(ipmt);
-      SetTimeDelayElectronicCFD(ipmt);
-      SetTimeDelayElectronicLED(ipmt);
-      SetTimeDelayPMT(ipmt);
-       SetVariableDelayLine(ipmt);
       SetSlewingLED(ipmt);
       SetSlewingRec(ipmt);
+      SetWalk(ipmt);
       SetPh2Mip();      
       SetmV2Mip();      
       SetChannelWidth();
       SetmV2channel();
-      SetGain();
       SetQTmin();
       SetQTmax();
       SetPMTeff(ipmt);
+
    }
   SetTimeDelayTVD();
   SetZposition();
@@ -95,10 +91,18 @@ AliT0Parameters::Init()
  
 
   AliCDBStorage *stor =AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT");
-  AliCDBEntry* fCalibentry  = stor->Get("T0/Calib/Gain_TimeDelay_Slewing_Walk",0);
+  //time equalizing
+  AliCDBEntry* fCalibentry  = stor->Get("T0/Calib/TimeDelay",0);
  if (fCalibentry){
    fgCalibData  = (AliT0CalibData*)fCalibentry->GetObject();
   }
+ else 
+   { AliError(" ALARM !!!! No time delays in CDB "); }
+ //slewing correction
+  AliCDBEntry* fSlewCorr  = stor->Get("T0/Calib/Slewing_Walk",0);
+ if (fSlewCorr){
+   fgSlewCorr  = (AliT0CalibData*)fSlewCorr->GetObject();
+  }
  // fLookUpentry  = cdb->Get("T0/Calib/LookUp_Table");
   fLookUpentry  = stor->Get("T0/Calib/LookUp_Table",0);
   if (fLookUpentry){
@@ -113,19 +117,6 @@ AliT0Parameters::Init()
 }
 
 
-//__________________________________________________________________
-Float_t
-AliT0Parameters::GetGain(Int_t ipmt) const
-{
-  // Returns the calibrated gain for each PMT 
-  // 
-
-  if (!fCalibentry) 
-    return fFixedGain;
-   
-  return fgCalibData->GetGain(ipmt);
-}
-
 //__________________________________________________________________
 Float_t
 AliT0Parameters::GetTimeDelayLED(Int_t ipmt) 
@@ -133,7 +124,7 @@ AliT0Parameters::GetTimeDelayLED(Int_t ipmt)
   // return time delay for LED channel
   // 
   if (!fCalibentry) {
-    fTimeDelayLED = fTimeDelayCablesLED[ipmt] + fTimeDelayElectronicLED[ipmt] + fTimeDelayPMT[ipmt];
+    fTimeDelayLED = 0;
     return  fTimeDelayLED;
   } 
   return fgCalibData ->GetTimeDelayLED(ipmt);
@@ -146,8 +137,8 @@ AliT0Parameters::GetTimeDelayCFD(Int_t ipmt)
    // 
   if (!fCalibentry) 
     {
-      fTimeDelayCFD = fTimeDelayCablesCFD[ipmt] + fTimeDelayElectronicCFD[ipmt] + fTimeDelayPMT[ipmt] + fVariableDelayLine[ipmt];
-      return fTimeDelayCFD+37;
+      fTimeDelayCFD = 1000+ipmt*100;
+      return fTimeDelayCFD;
     }
    
   return fgCalibData->GetTimeDelayCFD(ipmt);
@@ -231,6 +222,86 @@ TGraph *AliT0Parameters::GetSlewRec(Int_t ipmt) const
   return fgCalibData -> GetSlewRec(ipmt) ;
 }
 
+
+//________________________________________________________________
+void AliT0Parameters::SetWalk(Int_t ipmt)
+{
+
+ Int_t mv, ps; 
+  Int_t x[70000], y[70000], index[70000];
+  Float_t time[10000],amplitude[10000];
+  string buffer;
+  Bool_t down=false;
+  
+  ifstream inFile("data/CFD-Amp.txt");
+  //  if(!inFile) AliError(Form("Cannot open file %s !",filename));
+  
+  Int_t i=0, i1=0, i2=0;
+  while(getline(inFile,buffer)){
+    inFile >> ps >> mv;
+
+    x[i]=ps; y[i]=mv;
+    i++;
+  }
+  inFile.close();
+  TMath::Sort(i, y, index,down);
+  Int_t amp=0, iin=0, isum=0, sum=0;
+  Int_t ind=0;
+  for (Int_t ii=0; ii<70000; ii++)
+    {
+      ind=index[ii];
+      if(y[ind] == amp)
+       {
+         sum +=x[ind];
+         iin++;
+       }
+      else
+       {
+         if(iin>0)
+           time[isum] = Float_t (sum/(iin));
+         else
+           time[isum] =Float_t (x[ind]);
+         amplitude[isum] = Float_t (amp);
+         amp=y[ind];
+         //      cout<<ii<<" "<<ind<<" "<<y[ind]<<" "<<x[ind]<<" iin "<<iin<<" mean "<<time[isum]<<" amp "<< amplitude[isum]<<" "<<isum<<endl;
+         iin=0;
+         isum++;
+         sum=0;
+       }
+
+
+    }
+
+  inFile.close();
+
+   TGraph* gr = new TGraph(isum, amplitude, time);
+  fWalk.AddAtAndExpand(gr,ipmt);
+  
+  
+}
+//__________________________________________________________________
+
+TGraph *AliT0Parameters::GetWalk(Int_t ipmt) const
+{
+  if (!fCalibentry) {
+    return  (TGraph*)fWalk.At(ipmt); 
+  } 
+  return fgCalibData -> GetWalk(ipmt) ;
+}
+
+//__________________________________________________________________
+
+Float_t AliT0Parameters::GetWalkVal(Int_t ipmt, Float_t mv) const
+{
+  if (!fCalibentry) {
+    return ((TGraph*)fWalk.At(ipmt))->Eval(mv); 
+  } 
+  return fgCalibData -> GetWalkVal(ipmt, mv) ;
+}
+
+//__________________________________________________________________
+
 //__________________________________________________________________
 void 
 AliT0Parameters::SetPMTeff(Int_t ipmt)
index c694cdef3c780d2cfa374433d53498afeed1f984..ced59b4535310043da45946b12f9ec2cb7d094c6 100644 (file)
@@ -35,7 +35,6 @@ public:
   void SetmV2channel(Int_t size=320) { fmV2Channel = size; }
   void SetQTmin(Int_t qt=13) {fQTmin = qt;}
   void SetQTmax(Int_t qt=125) {fQTmax = qt;}
-  void SetGain(Int_t size=1) { fFixedGain = size; }
   void SetZposition( Float_t valueC=69.7, Float_t valueA=373) {
     fT0zPosition[0]=valueC, fT0zPosition[1]=valueA;}
   void SetPMTeff(Int_t ipmt);  
@@ -44,18 +43,6 @@ public:
   Float_t GetTimeDelayTVD()   { return fTimeDelayTVD; }
 
   // Set various variable parameter defaults
-  void SetTimeDelayCablesCFD(Int_t ipmt,Float_t r=150)   
-  { fTimeDelayCablesCFD[ipmt] = r;}
-  void SetTimeDelayCablesLED(Int_t ipmt,Float_t r=150)    
-  { fTimeDelayCablesLED[ipmt] = r;}
-  void SetTimeDelayPMT(Int_t ipmt,Float_t r=5)    
-  { fTimeDelayPMT[ipmt] = r;}
-  void SetTimeDelayElectronicCFD(Int_t ipmt,Float_t r=8)    
-  { fTimeDelayElectronicCFD[ipmt] = r;}
-  void SetTimeDelayElectronicLED(Int_t ipmt,Float_t r=10)  
-  { fTimeDelayElectronicLED[ipmt] = r;}
-  void SetVariableDelayLine(Int_t ipmt, Int_t v=0)  
-  { fVariableDelayLine[ipmt] = v;}
   void SetSlewingLED(Int_t ipmt); 
   void SetSlewingRec(Int_t ipmt); 
  
@@ -67,24 +54,12 @@ public:
   Int_t GetmV2channel()     const { return fmV2Channel; }
   Int_t GetQTmin() const {return fQTmin;}
   Int_t GetQTmax() const {return fQTmax;}
-  Float_t  GetGain(Int_t ipmt)        const;
   Float_t GetZposition(Int_t i) const {return fT0zPosition[i];}
   TGraph *  GetPMTeff(Int_t ipmt) const  
   {return (TGraph*)fPMTeff.At(ipmt);}
   Float_t GetpmtEFF(Int_t ipmt, Float_t lambda) const
   {return((TGraph*)fPMTeff.At(ipmt))->Eval(lambda);} 
 
-  Float_t  GetTimeDelayCablesCFD(Int_t ipmt) const 
-  {return fTimeDelayCablesCFD[ipmt]; } 
-  Float_t  GetTimeDelayCablesLED(Int_t ipmt) const 
-  {return fTimeDelayCablesLED[ipmt]; } ; 
-
-  Float_t  GetTimeDelayElectronicLED(Int_t ipmt) const 
-  {return fTimeDelayElectronicLED[ipmt]; } ; 
-  Float_t  GetTimeDelayElectronicCFD(Int_t ipmt) const 
-  {return fTimeDelayElectronicCFD[ipmt]; } ; 
-  Int_t GetVariableDelayLine(Int_t ipmt) const 
-  {return fVariableDelayLine[ipmt];}
 
   Float_t GetSlewingLED(Int_t ipmt, Float_t mv) const;
   //  {return((TGraph*)fSlewingLED.At(ipmt))->Eval(mv);} 
@@ -95,6 +70,10 @@ public:
   Float_t GetSlewingRec(Int_t ipmt, Float_t mv) const;
   //  {return((TGraph*)fSlewingRec.At(ipmt))->Eval(mv);} 
 
+  TGraph *GetWalk(Int_t ipmt )  const;// {return ((TF1*)fWalk.At(ipmt));}
+  Float_t  GetWalkVal(Int_t ipmt, Float_t mv ) const ;//{return ((TF1*)fWalk.At(ipmt))->Eval(mv);}
+   void SetWalk(Int_t ipmt) ;
+   
   Float_t GetTimeDelayCFD(Int_t ipmt);
   Float_t GetTimeDelayLED(Int_t ipmt);
 
@@ -115,16 +94,11 @@ protected:
   Int_t        fmV2Channel;     // ADC mv  2  channel # (200000ps/(25*25).
   Int_t fQTmin;                 //min  time for QTC
   Int_t fQTmax;                 //max  time fro QTC 
-  Int_t         fFixedGain;       //
-  Float_t fTimeDelayCablesCFD[24];       //! time delay in cables
-  Float_t fTimeDelayCablesLED[24];       //! time delay in cables
-  Float_t fTimeDelayElectronicCFD[24];       //! time delay in electronic
-  Float_t fTimeDelayElectronicLED[24];       //! time delay in electronic
-  Float_t fTimeDelayPMT[24];       //! time delay in PMT
   Int_t fVariableDelayLine[24];      //time delay in VDL for trigger equvalizing
   TObjArray fSlewingLED;  //array of slewing correction for each PMT
   TObjArray fSlewingRec;  //array of slewing correction for Reconstruction
   TObjArray fPMTeff; //array PMT registration efficiency
+  TObjArray fWalk; //array time-amplitude walk
   
   Float_t fTimeDelayLED;  //  sum time delay for LED channel
   Float_t fTimeDelayCFD;  // sum time delay for CFD channel
@@ -134,9 +108,11 @@ protected:
   
   static AliT0CalibData * fgCalibData; // singleton for Calibration data
   static AliT0CalibData * fgLookUp; // singleton for Calibration data
+  static AliT0CalibData * fgSlewCorr; // singleton for Calibration data
   
   AliCDBEntry*   fCalibentry ;  // pointer to T0 calibration object
   AliCDBEntry*   fLookUpentry ;  // pointer to T0 lokkup table
+  AliCDBEntry*   fSlewCorr ;  // pointer to slewing correction
   
   ClassDef(AliT0Parameters,2)
     private:
index 3a11f981b54d522bc4dd0e3f46dcc9a6f2007e6a..51cb2ef7667c45f324cf3a1a8ecd2c15da13cfa7 100644 (file)
 #include "AliBitPacking.h"
 #include "AliFstream.h"
 #include "AliRunLoader.h"
+#include "AliDAQ.h"
 
 ClassImp(AliT0RawData)
 
 //_____________________________________________________________________________
-AliT0RawData::AliT0RawData():TObject()
+  AliT0RawData::AliT0RawData():TObject(),
+ fVerbose(0),      
+ fIndex(-1) ,     
+ fEventNumber(0), 
+ fTimeCFD(new TArrayI(24)),    
+ fADC1( new TArrayI(24)),     
+ fTimeLED( new TArrayI(24)), 
+ fADC0( new TArrayI(24)),     
+ fFile(0x0),   
+ fDataHeaderPos(0),
+ fDRMDataHeaderPos(0),
+ fTRMDataHeaderPos(0),
+ fDigits(0)  
+
 {
   /*
 -  48 channels (2 words each as in TOF DDL) for :
@@ -57,22 +71,12 @@ and the same for amplified but A=Log(10*Amplitude).
 uncertances
   */
 
-  fIndex=-1;
-  fDigits = NULL;
-
-  fTimeCFD = new TArrayI(24);
-  fADC1 = new TArrayI(24);
-  fTimeLED = new TArrayI(24);
-  fADC0 = new TArrayI(24);
-  fFile = NULL;
-  fDataHeaderPos = 0;
-  fDRMDataHeaderPos = 0; 
-  memset(fBuffer,0,512*sizeof(UInt_t));
-
   //open the output file
   char fileName[15];
-  sprintf(fileName,"T0_%d.ddl", 0xd00);
+  strcpy(fileName,AliDAQ::DdlFileName("T0",0)); //The name of the output file
   fFile = new AliFstream(fileName);
+  memset(fBuffer,0,512*sizeof(UInt_t));
+
   //get event number 
   AliRunLoader *runloader = AliRunLoader::GetRunLoader();
   if (runloader) {
@@ -81,7 +85,21 @@ uncertances
 }
 
 //_____________________________________________________________________________
-AliT0RawData::AliT0RawData(const AliT0RawData &r):TObject()
+
+AliT0RawData::AliT0RawData(const AliT0RawData &r):TObject(),
+ fVerbose(0),      
+ fIndex(-1) ,     
+ fEventNumber(0), 
+ fTimeCFD(new TArrayI(24)),    
+ fADC1( new TArrayI(24)),     
+ fTimeLED( new TArrayI(24)), 
+ fADC0( new TArrayI(24)),     
+ fFile(0x0),   
+ fDataHeaderPos(0),
+ fDRMDataHeaderPos(0),
+ fTRMDataHeaderPos(0),
+ fDigits(0)  
+
 {
   //
   // AliT0rawData copy constructor
@@ -133,16 +151,16 @@ void AliT0RawData::GetDigits(AliT0digit *fDigits)
   
   // Get the digits array
   
-  fDigits->GetTime(*fTimeCFD);
-  fDigits->GetADC(*fADC1);
-  fDigits->GetTimeAmp(*fTimeLED);
-  fDigits->GetADCAmp(*fADC0);
+  fDigits->GetTimeCFD(*fTimeCFD);
+  fDigits->GetQT0(*fADC1);
+  fDigits->GetTimeLED(*fTimeLED);
+  fDigits->GetQT1(*fADC0);
   Int_t meantime = fDigits->MeanTime(); 
   Int_t timediff = fDigits->TimeDiff(); 
   Int_t mult0=fDigits->SumMult();
   Int_t mult1=fDigits->SumMult();
-  Int_t timeA = fDigits->BestTimeLeft();
-  Int_t timeC = fDigits->BestTimeRight();
+  Int_t timeA = fDigits->BestTimeC();
+  Int_t timeC = fDigits->BestTimeA();
   
   
   TArrayI  *allData = new TArrayI(110);
@@ -487,11 +505,11 @@ Int_t AliT0RawData::RawDataT0(AliT0digit *fDigits)
   fIndex=-1;
  
   AliRawDataHeaderSim header;
-  //loop over TOF DDL files
-    //write Dummy DATA HEADER
    WriteDataHeader(kTRUE, kFALSE);
   GetDigits(fDigits);
   //write packing digits
+  
+  
   fFile->WriteBuffer((char*) fBuffer,((fIndex+1)*sizeof(UInt_t)));
   //write real data header on its place
    WriteDataHeader(kFALSE, kFALSE);
index fd3ed44b090efa41f782a0ce6640b8cf2324767d..070f78231243ec30dc853a2f4934c0eacf4709a3 100644 (file)
@@ -63,24 +63,17 @@ class AliT0RawData : public TObject {
   UInt_t fBuffer[512];       // buffer for writing rawdata
   Int_t fIndex;              //number of 32 words to be stored into the output file
   Int_t fEventNumber;        // current event number
-
-  Int_t fTimeDiff     ; //time difference 
-  Int_t fMeanTime      ; // average time - ALICE start signal 
-  Int_t fBestTimeLeft;   //first particle on the left
-  Int_t fBestTimeRight;  //first particle on the right
-  Int_t fSumMult;        // sum multiplicity
   TArrayI * fTimeCFD;        //TDC on the each PMT
   TArrayI *  fADC1;           //QTC (ADC) on the each PMT
   TArrayI * fTimeLED;    // TDC with amplified signal
   TArrayI *  fADC0;        //QTC amplified
   AliFstream* fFile;    //logical name of the I/O file
- UInt_t fDataHeaderPos;//Data header position
- UInt_t fDRMDataHeaderPos;//Data DRM header position
- UInt_t fTRMDataHeaderPos;//Data TRM header position
- Int_t fWordsIn1stTRM; // Number of word in 1st TRM
+  UInt_t fDataHeaderPos;//Data header position
+  UInt_t fDRMDataHeaderPos;//Data DRM header position
+  UInt_t fTRMDataHeaderPos;//Data TRM header position
   AliT0digit *fDigits;  //! The T0 digits manager
-
-  ClassDef(AliT0RawData,1)             //  T0 raw data class
+  
+  ClassDef(AliT0RawData,2)             //  T0 raw data class
 
 };
 
index dd1e72a959307c1c8c1a24c94a7b1e90dab72106..7171dd0c2c33870df332031c245e2fc508c5cdea 100644 (file)
@@ -16,6 +16,7 @@ ClassImp(AliT0RawReader)
        fRawReader(rawReader),
        fData(NULL),
        fPosition(0)
+       
 {
   //
 // create an object to read T0raw digits
@@ -24,12 +25,22 @@ ClassImp(AliT0RawReader)
   fRawReader->Reset();
   fRawReader->Select("T0");
  
+  cout<<"  AliT0RawReader::AliT0RawReaderfRawReader->Select "<<endl;
 }
  AliT0RawReader::~AliT0RawReader ()
 {
   // 
 }
+/*
+AliT0RawReader::AliT0RawReader(const AliT0RawReader& o): TTask(o),
+     fRawReader(rawReader),
+       fData(NULL),
+       fPosition(0)
+{
+  //
+}
+*/
+
 
 Bool_t  AliT0RawReader::Next()
 {
@@ -67,6 +78,7 @@ Bool_t  AliT0RawReader::Next()
   Int_t time=0,  itdc=0, ichannel=0; 
   Int_t numberOfWordsInTRM=0, iTRM=0;
   Int_t tdcTime, koef,hit, meanTime, timeDiff ;
+  Int_t numTRM=2; // number of TRMs in game For test =1 !!!!!
 
 
 
@@ -89,63 +101,37 @@ Bool_t  AliT0RawReader::Next()
   for (Int_t i=0; i<4; i++) {
     word = GetNextWord();
   }
-  //TRMheader  
-   word = GetNextWord();
-   numberOfWordsInTRM=AliBitPacking::UnpackWord(word,4,16);
-   iTRM=AliBitPacking::UnpackWord(word,0,3);
-
-   //chain header
-   Int_t ichain=0;
-   word = GetNextWord();
-  
-   for (Int_t i=0; i<numberOfWordsInTRM; i++) {
-     word = GetNextWord();
-     tdcTime =  AliBitPacking::UnpackWord(word,31,31);   
-
-     if ( tdcTime == 1)
-       {
-        itdc=AliBitPacking::UnpackWord(word,24,27);
-        ichannel=AliBitPacking::UnpackWord(word,21,23);
-        time=AliBitPacking::UnpackWord(word,0,20);
-        //  koef = itdc*4 + ichannel/2;
-        koef = param->GetChannel(iTRM,itdc,ichain,ichannel);
-        //      cout<<" RawReader::Next ::"<<iTRM<<"  "<<itdc<<" "<<ichain<<" "<<ichannel<<" "<<  koef<<" "<<time<<endl;
-        if(fAllData[koef][0] == 0)  fAllData[koef][0]=time;  // yield only 1st particle
-         
-       }
-   }
-   word = GetNextWord(); //chain trailer
-   word = GetNextWord(); //TRM trailer
-     
-  //TRMheader  
-   word = GetNextWord();
-   numberOfWordsInTRM=AliBitPacking::UnpackWord(word,4,16);
-   iTRM=AliBitPacking::UnpackWord(word,0,3);
-   
-   //chain header
-   word = GetNextWord();
-   
-   for (Int_t iword=0; iword<numberOfWordsInTRM; iword++) {
-     word = GetNextWord();
-     tdcTime =  AliBitPacking::UnpackWord(word,31,31);   
-
-     if ( tdcTime == 1)
-       {
-        itdc=AliBitPacking::UnpackWord(word,24,27);
-        ichannel=AliBitPacking::UnpackWord(word,21,23);
-        time=AliBitPacking::UnpackWord(word,0,20);
-        //      koef = itdc*4 + ichannel/2;
-        koef = param->GetChannel(iTRM,itdc,ichain,ichannel);
-          if(fAllData[koef][0] == 0)    fAllData[koef][0]=time;
-                //      if(allData[koef+55] == 0) allData[koef+55]=time; // yield only 1st particle
-       }
-   }
-   meanTime = fAllData[49][0];  // T0 !!!!!!
-   timeDiff = fAllData[50][0];
-
-   word = GetNextWord();
-   word = GetNextWord();
+
+  for (Int_t ntrm=0; ntrm< numTRM; ntrm++)
+    {
+      //TRMheader  
+      word = GetNextWord();
+      numberOfWordsInTRM=AliBitPacking::UnpackWord(word,4,16);
+      iTRM=AliBitPacking::UnpackWord(word,0,3);
+      
+      //chain header
+      Int_t ichain=0;
+      word = GetNextWord();
+      
+      for (Int_t i=0; i<numberOfWordsInTRM; i++) {
+       word = GetNextWord();
+       tdcTime =  AliBitPacking::UnpackWord(word,31,31);   
+
+       if ( tdcTime == 1)
+         {
+           itdc=AliBitPacking::UnpackWord(word,24,27);
+           ichannel=AliBitPacking::UnpackWord(word,21,23);
+           time=AliBitPacking::UnpackWord(word,0,20);
+           //  koef = itdc*4 + ichannel/2;
+           koef = param->GetChannel(iTRM,itdc,ichain,ichannel);
+           //   cout<<" RawReader::Next ::"<<iTRM<<"  "<<itdc<<" "<<ichain<<" "<<ichannel<<" "<<  koef<<" "<<time<<endl;
+           if(fAllData[koef][0] == 0)  fAllData[koef][0]=time;  // yield only 1st particle
+           
+         }
+      }
+      word = GetNextWord(); //chain trailer
+      word = GetNextWord(); //TRM trailer
+    } //TRM loop
    return kTRUE;
 }
 //_____________________________________________________________________________
index 07fde3dcee1d9e2ff8b162eebf91d56e4f855f70..346308cc7568616f80b95ec3c61caa3942d92e9b 100644 (file)
@@ -11,9 +11,11 @@ class AliT0RawReader : public TTask {
   AliT0RawReader(AliRawReader *rawReader) ;
 
   virtual  ~AliT0RawReader();
-  AliT0RawReader(const AliT0RawReader& o)
-    : TTask(o)
-  {}
+  AliT0RawReader(const AliT0RawReader& o): TTask(o),
+       fData(NULL),
+       fPosition(0)
+ {}
+  
   AliT0RawReader& operator=(const AliT0RawReader&) { return *this; }
 
 
index a9348f06dcfe3e164a493599894a4535eb792244..bb8b89d6903833ef2e7439de261c72bcd0a7f5f1 100644 (file)
 /* $Id$ */
 /////////////////////////////////////////////////////////////////////////
 //  Class AliT0RecPoint for T0 time and ADC signals
-//  fTimeRight  - right side TOF signal
-//  fTimeLeft  - left side TOF signal
-//  fTimeBestRight - TOF first particle on the right side
-//  TimeBestLeft - TOF first particle on the left side
-//  fTimeAverage = (fTimeBestRight + TimeBestLeft ) /2. T0 signal
+//  fTimeA  - A side TOF signal
+//  fTimeC  - C side TOF signal
+//  fTimeBestA - TOF first particle on the A side
+//  TimeBestC - TOF first particle on the C side
+//  fTimeAverage = (fTimeBestA + TimeBestLeft ) /2. T0 signal
 //  fVertex - vertex position 
 //
 ///////////////////////////////////////////////////////////////////////
 ClassImp(AliT0RecPoint)
 
 //------------------------------------
-  AliT0RecPoint::AliT0RecPoint() : TObject(), fTimeAverage(0),fVertexPosition(0),fTimeBestRight(0),fTimeBestLeft(0),fMultC(0),fMultA(0)
+  AliT0RecPoint::AliT0RecPoint() : TObject(), fTimeAverage(0),fVertexPosition(0),fTimeBestA(0),fTimeBestC(0),fMultC(0),fMultA(0)
 {
   //ctor
   fTimeAverage=99999;
-  fTimeBestRight=99999;
-  fTimeBestLeft=99999;
+  fTimeBestA=99999;
+  fTimeBestC=99999;
   fVertexPosition=99999;
   fMultA=0;
   fMultC=0;
index c561b35ca442270f285311c44ad0d6547ba90494..836d0a1a05bf903e89d15e69099414db04fdc3e1 100644 (file)
@@ -14,16 +14,16 @@ class AliT0RecPoint: public TObject  {
     AliT0RecPoint();
     virtual ~AliT0RecPoint() {}
     Int_t  GetMeanTime() {return fTimeAverage;}
-    Int_t  GetBestTimeRight() {return fTimeBestRight ;}
-    Int_t  GetBestTimeLeft() {return fTimeBestLeft ;}
+    Int_t  GetBestTimeA() {return fTimeBestA ;}
+    Int_t  GetBestTimeC() {return fTimeBestC ;}
     Int_t GetMultC() {return fMultC;}
     Int_t GetMultA() {return fMultA;}
     Float_t  GetVertex() {return fVertexPosition;}
 
 
     void SetMeanTime(Int_t time) {fTimeAverage=time;}
-    void SetTimeBestRight( Int_t time) {fTimeBestRight = time;}
-    void SetTimeBestLeft( Int_t time) {fTimeBestLeft = time;}
+    void SetTimeBestA( Int_t time) {fTimeBestA = time;}
+    void SetTimeBestC( Int_t time) {fTimeBestC = time;}
     void SetVertex( Float_t vertex) {fVertexPosition= vertex;}
     void SetMultC(Int_t mult) {fMultC = mult;}
     void SetMultA(Int_t mult) {fMultA = mult;}
@@ -37,9 +37,9 @@ class AliT0RecPoint: public TObject  {
 
   private: 
     Int_t fTimeAverage;     // Average time
-    Float_t fVertexPosition;     // Diffrence time between left and right
-    Int_t fTimeBestRight;   //TOF first particle on the right
-    Int_t fTimeBestLeft;    //TOF first particle on the left
+    Float_t fVertexPosition;     // Diffrence time between C and A
+    Int_t fTimeBestA;   //TOF first particle on the A
+    Int_t fTimeBestC;    //TOF first particle on the C
     Int_t fMultC; // multiplicity on the 
     Int_t fMultA; // multiplicity on the 
  
index c1e40fea270081b593fa93b462a5dfd10f0c453d..a397e564f4bf8d386045639cbca566eb816ecff5 100644 (file)
 #include <TDirectory.h>
 
 #include "AliRunLoader.h"
-#include "AliRun.h"
 #include <AliESD.h>
 #include "AliLog.h"
+#include "AliT0Loader.h"
 #include <TClonesArray.h>
 #include "AliT0RecPoint.h"
-#include "AliT0.h"
 #include "AliRawReader.h"
 #include "AliT0RawReader.h"
-#include "AliT0Loader.h"
 #include "AliT0digit.h"
 #include "AliT0Reconstructor.h"
 #include "AliT0Parameters.h"
+#include "AliT0Calibrator.h"
 #include "AliCDBLocal.h"
 #include "AliCDBStorage.h"
 #include "AliCDBManager.h"
 
 ClassImp(AliT0Reconstructor)
 
-//____________________________________________________________________
-void
-AliT0Reconstructor::Init(AliRunLoader* runLoader,TTree* digitsTree ) const
+  AliT0Reconstructor:: AliT0Reconstructor(): AliReconstructor(),
+                       fDigits(NULL),
+                       fTree(0x0),
+                       fZposition(0)
+
 {
+ AliDebug(1,"Start reconstructor ");
+}
+//____________________________________________________________________
 
- // Initialize the reconstructor
-  AliDebug(2, Form("Init called with runloader 0x%x", runLoader));
-  // Initialize the parameters
-   AliT0Loader* pStartLoader = (AliT0Loader*) runLoader->GetLoader("T0Loader");
-  pStartLoader->LoadDigits("READ");
+AliT0Reconstructor::AliT0Reconstructor(const AliT0Reconstructor &r):
+  fDigits(NULL),
+  fTree(0x0),
+  fZposition(0)
+  
+{
+  //
+  // AliT0Reconstructor copy constructor
+  //
 
-  digitsTree = pStartLoader->TreeD();
+  ((AliT0Reconstructor &) r).Copy(*this);
 
 }
 
-//____________________________________________________________________
-  void  AliT0Reconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const
+//_____________________________________________________________________________
+AliT0Reconstructor &AliT0Reconstructor::operator=(const AliT0Reconstructor &r)
 {
-  //T0 raw data-> digits conversion
- // reconstruct time information from raw data
-    AliT0 *baseT0;
-    baseT0->Raw2Digits(rawReader, digitsTree);
-  
+  //
+  // Assignment operator
+  //
+
+  if (this != &r) ((AliT0Reconstructor &) r).Copy(*this);
+  return *this;
 
 }
+
+//_____________________________________________________________________________
+
 void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
-  //void AliT0Reconstructor::Reconstruct(AliRunLoader *runLoader) const
+
 {
 // T0 digits reconstruction
 // T0RecPoint writing 
 
-    //Q->T-> coefficients !!!! should be asked!!!
-  //  Float_t ph2MIP=500;
-  Float_t gain[24], timeDelayCFD[24], timeDelayLED[24];
+  
+  Float_t  timeDelayLED[24];
   Float_t zdetA,zdetC;
-  TObjArray slewingLED;
+  TObjArray slewingLEDrec;
+  TObjArray walk;
     
-  TArrayI * fADC = new TArrayI(24); 
-  TArrayI * fTimeCFD = new TArrayI(24); 
-  TArrayI * fADCLED = new TArrayI(24); 
-  TArrayI * fTimeLED = new TArrayI(24); 
-
+  TArrayI * timeCFD = new TArrayI(24); 
+  TArrayI * timeLED = new TArrayI(24); 
+  TArrayI * chargeQT0 = new TArrayI(24); 
+  TArrayI * chargeQT1 = new TArrayI(24); 
+  
   AliT0Parameters* param = AliT0Parameters::Instance();
   param->Init();
+  AliT0Calibrator *calib=new AliT0Calibrator(); 
 
   Int_t mV2Mip = param->GetmV2Mip();     
   //mV2Mip = param->GetmV2Mip();     
   Int_t channelWidth = param->GetChannelWidth() ;  
   
   for (Int_t i=0; i<24; i++){
-    timeDelayCFD[i] = param->GetTimeDelayCFD(i);
-    timeDelayLED[i] = param->GetTimeDelayLED(i);
-    gain[i] = param->GetGain(i);
-    //gain[i] = 1;
-    slewingLED.AddAtAndExpand(param->GetSlew(i),i);
+    TGraph* gr = param ->GetSlewRec(i);
+    slewingLEDrec.AddAtAndExpand(gr,i) ;  
   }
   zdetC = param->GetZposition(0);
   zdetA  = param->GetZposition(1);
@@ -114,19 +122,18 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
     return;
   }
   
-   digitsTree->GetEvent(0);
-   digitsTree->GetEntry(0);
-   brDigits->GetEntry(0);
-  fDigits->GetTime(*fTimeCFD);
-  fDigits->GetADC(*fADC);
-  fDigits->GetTimeAmp(*fTimeLED);
-  fDigits->GetADCAmp(*fADCLED);
-
-
-  Float_t besttimeright=999999;
-  Float_t besttimeleft=999999;
-  Int_t pmtBestRight=99999;
-  Int_t pmtBestLeft=99999;
+  digitsTree->GetEvent(0);
+  digitsTree->GetEntry(0);
+  brDigits->GetEntry(0);
+  fDigits->GetTimeCFD(*timeCFD);
+  fDigits->GetTimeLED(*timeLED);
+  fDigits->GetQT0(*chargeQT0);
+  fDigits->GetQT1(*chargeQT1);
+  
+  Float_t besttimeA=999999;
+  Float_t besttimeC=999999;
+  Int_t pmtBestA=99999;
+  Int_t pmtBestC=99999;
   Float_t timeDiff=999999, meanTime=0;
   
 
@@ -136,15 +143,18 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
 
   Float_t time[24], adc[24];
   for (Int_t ipmt=0; ipmt<24; ipmt++) {
-    if(fTimeCFD->At(ipmt)>0 ){
-      time[ipmt] = channelWidth *( fTimeCFD->At(ipmt)) - 1000*timeDelayCFD[ipmt];
-      //   Float_t adc_digPs = channelWidth * Float_t (fADCLED->At(ipmt)) ;
-      //      adc[ipmt] = TMath::Exp(adc_digPs/1000) /gain[ipmt];
-      adc[ipmt]=1;
-      AliDebug(1,Form(" time %f ps,  adc %f mv in MIP %i\n ",
-                     time[ipmt], adc[ipmt], Int_t (adc[ipmt]/mV2Mip +0.5)));
+    if(timeCFD->At(ipmt)>0 ){
+      Int_t qt0= chargeQT0->At(ipmt);
+      Int_t qt1= chargeQT1->At(ipmt);
+      if((qt1-qt0)>0)  adc[ipmt] = TMath::Exp( Double_t (channelWidth*(qt1-qt0)/1000));
+      time[ipmt] = channelWidth * (calib-> WalkCorrection( ipmt,qt1 , timeCFD->At(ipmt) ) ) ;
+      
+      //LED
+      Double_t sl = (timeLED->At(ipmt) - timeCFD->At(ipmt)- (1000.*timeDelayLED[ipmt]/channelWidth))*channelWidth;
+      Double_t qt=((TGraph*)slewingLEDrec.At(ipmt))->Eval(sl/1000.);
       frecpoints->SetTime(ipmt,time[ipmt]);
       frecpoints->SetAmp(ipmt,adc[ipmt]);
+      frecpoints->SetAmpLED(ipmt,qt);
     }
     else {
       time[ipmt] = 0;
@@ -154,27 +164,27 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
 
   for (Int_t ipmt=0; ipmt<12; ipmt++){
     if(time[ipmt] > 1 ) {
-      if(time[ipmt]<besttimeleft){
-       besttimeleft=time[ipmt]; //timeleft
-       pmtBestLeft=ipmt;
+      if(time[ipmt]<besttimeC){
+       besttimeC=time[ipmt]; //timeC
+       pmtBestC=ipmt;
       }
     }
   }
   for ( Int_t ipmt=12; ipmt<24; ipmt++){
     if(time[ipmt] > 1) {
-      if(time[ipmt]<besttimeright) {
-       besttimeright=time[ipmt]; //timeright
-        pmtBestRight=ipmt;}
+      if(time[ipmt]<besttimeA) {
+       besttimeA=time[ipmt]; //timeA
+        pmtBestA=ipmt;}
     }
   }
-  if(besttimeright !=999999)  frecpoints->SetTimeBestRight(Int_t(besttimeright));
-  if( besttimeleft != 999999 ) frecpoints->SetTimeBestLeft(Int_t(besttimeleft));
-  AliDebug(1,Form(" besttimeA %f ps,  besttimeC %f ps",besttimeright, besttimeleft));
+  if(besttimeA !=999999)  frecpoints->SetTimeBestA(Int_t(besttimeA));
+  if( besttimeC != 999999 ) frecpoints->SetTimeBestC(Int_t(besttimeC));
+  AliDebug(1,Form(" besttimeA %f ps,  besttimeC %f ps",besttimeA, besttimeC));
   Float_t c = 0.0299792; // cm/ps
   Float_t vertex = 0;
-  if(besttimeright !=999999 && besttimeleft != 999999 ){
-    timeDiff = besttimeleft - besttimeright;
-    meanTime = (besttimeright + besttimeleft)/2.;
+  if(besttimeA !=999999 && besttimeC != 999999 ){
+    timeDiff = besttimeC - besttimeA;
+    meanTime = (besttimeA + besttimeC)/2.;
     vertex = c*(timeDiff)/2.; //-(lenr-lenl))/2;
     AliDebug(1,Form("  timeDiff %f ps,  meanTime %f ps, vertex %f cm",timeDiff, meanTime,vertex ));
     frecpoints->SetVertex(vertex);
@@ -185,6 +195,121 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
 }
 
 
+//_______________________________________________________________________
+
+void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) const
+{
+// T0 raw ->
+// T0RecPoint writing 
+
+    //Q->T-> coefficients !!!! should be asked!!!
+  Float_t  timeDelayLED[24];
+  Float_t zdetA,zdetC;
+  TObjArray slewingLEDrec;
+  TObjArray walk;
+    
+  TArrayI * timeCFD = new TArrayI(24); 
+  TArrayI * timeLED = new TArrayI(24); 
+  TArrayI * chargeQT0 = new TArrayI(24); 
+  TArrayI * chargeQT1 = new TArrayI(24); 
+
+   AliT0RawReader myrawreader(rawReader);
+   if (!myrawreader.Next())
+     AliDebug(1,Form(" no raw data found!! %i", myrawreader.Next()));
+   Int_t allData[110][5];
+   for (Int_t i=0; i<110; i++) {
+     allData[i][0]=myrawreader.GetData(i,0);
+   }
+
+  AliT0Parameters* param = AliT0Parameters::Instance();
+  param->Init();
+  AliT0Calibrator *calib=new AliT0Calibrator(); 
+
+  Int_t mV2Mip = param->GetmV2Mip();     
+  //mV2Mip = param->GetmV2Mip();     
+  Int_t channelWidth = param->GetChannelWidth() ;  
+    
+  for (Int_t i=0; i<24; i++){
+    TGraph* gr = param ->GetSlewRec(i);
+    slewingLEDrec.AddAtAndExpand(gr,i) ;  
+  }
+  
+  zdetC = param->GetZposition(0);
+  zdetA  = param->GetZposition(1);
+    
+   for (Int_t in=0; in<24; in++)
+     {
+       timeLED->AddAt(allData[in+1][0],in);
+       timeCFD->AddAt(allData[in+25][0],in);
+       chargeQT1->AddAt(allData[in+55][0],in);
+       chargeQT0->AddAt(allData[in+79][0],in);
+       AliDebug(10, Form(" readed Raw %i %i %i %i %i", in, timeLED->At(in),timeCFD->At(in),chargeQT0->At(in),chargeQT1->At(in)));
+     }
+
+  Float_t besttimeA=999999;
+  Float_t besttimeC=999999;
+  Int_t pmtBestA=99999;
+  Int_t pmtBestC=99999;
+  Float_t timeDiff=999999, meanTime=0;
+
+  
+  AliT0RecPoint* frecpoints= new AliT0RecPoint ();
+  recTree->Branch( "T0", "AliT0RecPoint" ,&frecpoints, 405,1);
+  
+
+  Float_t time[24], adc[24];
+  for (Int_t ipmt=0; ipmt<24; ipmt++) {
+    if(timeCFD->At(ipmt)>0 ){
+      Int_t qt0= chargeQT0->At(ipmt);
+      Int_t qt1= chargeQT1->At(ipmt);
+      if((qt1-qt0)>0)  adc[ipmt] = TMath::Exp( Double_t (channelWidth*(qt1-qt0)/1000));
+      time[ipmt] = channelWidth * (calib-> WalkCorrection( ipmt,qt1 , timeCFD->At(ipmt) ) ) ;
+      Double_t sl = (timeLED->At(ipmt) - timeCFD->At(ipmt)- (1000.*timeDelayLED[ipmt]/channelWidth))*channelWidth;
+      Double_t qt=((TGraph*)slewingLEDrec.At(ipmt))->Eval(sl/1000.);
+      frecpoints->SetTime(ipmt,time[ipmt]);
+      frecpoints->SetAmp(ipmt,adc[ipmt]);
+      frecpoints->SetAmpLED(ipmt,qt);
+    }
+    else {
+      time[ipmt] = 0;
+      adc[ipmt] = 0;
+    }
+  }
+
+  for (Int_t ipmt=0; ipmt<12; ipmt++){
+    if(time[ipmt] > 1 ) {
+      if(time[ipmt]<besttimeC){
+       besttimeC=time[ipmt]; //timeC
+       pmtBestC=ipmt;
+      }
+    }
+  }
+  for ( Int_t ipmt=12; ipmt<24; ipmt++){
+    if(time[ipmt] > 1) {
+      if(time[ipmt]<besttimeA) {
+       besttimeA=time[ipmt]; //timeA
+        pmtBestA=ipmt;}
+    }
+  }
+  if(besttimeA !=999999)  frecpoints->SetTimeBestA(Int_t(besttimeA));
+  if( besttimeC != 999999 ) frecpoints->SetTimeBestC(Int_t(besttimeC));
+  AliDebug(1,Form(" besttimeA %f ps,  besttimeC %f ps",besttimeA, besttimeC));
+  Float_t c = 0.0299792; // cm/ps
+  Float_t vertex = 0;
+  if(besttimeA !=999999 && besttimeC != 999999 ){
+    timeDiff = besttimeC - besttimeA;
+    meanTime = (besttimeA + besttimeC)/2.;
+    vertex = c*(timeDiff)/2.; //-(lenr-lenl))/2;
+    AliDebug(1,Form("  timeDiff %f ps,  meanTime %f ps, vertex %f cm",timeDiff, meanTime,vertex ));
+    frecpoints->SetVertex(vertex);
+    frecpoints->SetMeanTime(Int_t(meanTime));
+    
+  }
+  recTree->Fill();
+}
+//____________________________________________________________
+
 void AliT0Reconstructor::FillESD(AliRunLoader* runLoader, AliESD *pESD) const
 {
 
@@ -224,9 +349,10 @@ void AliT0Reconstructor::FillESD(AliRunLoader* runLoader, AliESD *pESD) const
     
     brRec->GetEntry(0);
     Float_t timeStart, Zposition, amp[24], time[24];
+    Int_t mean0 = 12450;
     Int_t i;
     Zposition = frecpoints -> GetVertex();
-    timeStart = frecpoints -> GetMeanTime();
+    timeStart = frecpoints -> GetMeanTime() - mean0;
     for ( i=0; i<24; i++) {
        time[i] = Float_t (frecpoints -> GetTime(i)) / 1000.; // ps to ns
       amp[i] = frecpoints -> GetAmp(i);
index 797296d680ec28733dc3686de207336f3646723b..be347cc94fc9f9373a4e4d030bc83001bdfe2240 100644 (file)
@@ -12,31 +12,33 @@ class AliRunLoader;
 
 class AliT0Reconstructor: public AliReconstructor {
  public:
-  AliT0Reconstructor(): AliReconstructor() {};
+  AliT0Reconstructor();
   virtual ~AliT0Reconstructor() {};
+  AliT0Reconstructor( const AliT0Reconstructor& );
+  AliT0Reconstructor& operator=(const AliT0Reconstructor&); 
 
-  virtual void Init(AliRunLoader* runLoader, TTree* fdigits ) const;
-  virtual  void   ConvertDigits( AliRawReader* rawReader, TTree* fdigits) const;
-                    virtual  void   Reconstruct(TTree* fdigits, TTree * frecpoints) const;
- //  virtual  void   Reconstruct(TTree* , TTree * ) const {};
+
+   virtual  void   Reconstruct(TTree* fdigits, TTree * frecpoints) const;
+  //   virtual  void   Reconstruct(TTree* , TTree * ) const {};
+//  virtual  void   Reconstruct(TTree* , TTree * ) const {};
  
   virtual  void   Reconstruct(AliRunLoader* , AliRawReader*   ) const {};
   virtual  void   Reconstruct(AliRawReader* ) const {};
-  virtual  void   Reconstruct(AliRawReader* , TTree*) const {};
+  virtual  void   Reconstruct(AliRawReader*rawReader , TTree* recTree) const;
   virtual  void   Reconstruct(AliRunLoader* ) const  {};
   
   virtual void         FillESD(AliRunLoader* runLoader, AliESD* esd) const;
   virtual void         FillESD(AliRunLoader* , AliRawReader*, AliESD* ) const  {};
   virtual void         FillESD(  AliRawReader*,  TTree*, AliESD* ) const  {};
   virtual void         FillESD( TTree*,  TTree*, AliESD* ) const  {};
-  virtual Bool_t       HasLocalReconstruction() const {return kTRUE;};
-  virtual Bool_t       HasDigitConversion() const {return kTRUE;};
+  virtual Bool_t       HasLocalReconstruction() const {return kTRUE;}
+  virtual Bool_t       HasDigitConversion() const {return kFALSE;}
  public:
  
-  //  AliRunLoader*  fRunLoader;     // Run loader passed to Init
-  //  AliT0digit *fDigits   ; // digits
+ AliT0digit *fDigits   ; // digits
+ TTree*        fTree;
   Float_t fZposition; // vertex position
-  // AliT0 *baseT0;
+
  protected:
 
   ClassDef(AliT0Reconstructor, 0)   // class for the T0 reconstruction
index 93b3e521280a5f951dae389b964c25a8046fce5c..855c77c43541bf6b01ef61a62741bd71374fce68 100644 (file)
 void AliT0SetCDB()
 {
   TControlBar *menu = new TControlBar("vertical","T0 CDB");
-  menu->AddButton("Set Calib","SetCC()",
-                 "Set calibration coefficients");
-  menu->AddButton("Set Align","SetAC()",
+  menu->AddButton("Set time delay","SetTimeDelay()",
+                 "Set time dalay");
+  menu->AddButton("Set walk","SetWalk()",
+                 "Set slewing coorection");
+ menu->AddButton("Set Align","SetAC()",
                  "Set alignment coefficients");
   menu->AddButton("Set LookUpTable","SetLookUp()",
                   "Set LookUp table");
-  menu->AddButton("Read calibration CC","GetCC()",
-                 "Read calibration  coefficients");
+  menu->AddButton("Read time delay","GetTimeDelay()",
+                 "Read time delay");
+ menu->AddButton("Read walk","GetWalk()",
+                 "Read amplitude-time correction");
   menu->AddButton("Read alignment CC","GetAC()",
                  "Read face detector position ");
   menu->AddButton("Read Lookup","GetLookUp()",
@@ -85,7 +89,7 @@ void SetAC()
  }
 }
 //------------------------------------------------------------------------
-void SetCC()
+void SetTimeDelay()
 {
   // Writing calibration coefficients into the Calibration DB
   // Arguments:
@@ -99,27 +103,66 @@ void SetCC()
   DBFolder  ="local://Calib";
   firstRun  =  0;
   lastRun   =  10;
-  objFormat = "T0 initial gain factors, time delay, slewnig";
+  objFormat = "T0 initial time delay";
 
   AliT0CalibData *calibda=new AliT0CalibData("T0");
   
-  Float_t fGain = 1;
-  Float_t fTimeDelay  = 200;
+   Float_t fTimeDelay  = 1000;
   
+  
+  for(Int_t ipmt=0; ipmt<24; ipmt++) {
+    calibda->SetTimeDelayCFD(fTimeDelay+ipmt*100,ipmt);
+    //   calibda->SetTimeDelayLED(fTimeDelay,ipmt);
+    calibda->SetTimeDelayLED(0,ipmt);
+  }
+  calibda->Print();
+  //Store calibration data into database
+  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+
+  //  AliCDBManager::Instance()->SetSpecificStorage("T0",DBFolder.Data());
+  
+  AliCDBMetaData md;
+  md.SetComment(objFormat);
+  md.SetBeamPeriod(beamPeriod);
+  md.SetResponsible("Alla");
+  TString fPath="T0/Calib/TimeDelay";
+
+
+  // AliCDBStorage* storage = AliCDBManager::Instance()->GetSpecificStorage("T0");
+  AliCDBStorage* storage = AliCDBManager::Instance()->GetDefaultStorage();
+  if(storage) {
+    AliCDBId id(fPath.Data(),firstRun,lastRun);
+    storage->Put(calibda, id, &md);
+  }
+}
+
+//------------------------------------------------------------------------
+void SetWalk()
+{
+  // Writing calibration coefficients into the Calibration DB
+  // Arguments:
+
+  TString DBFolder;
+  Int_t firstRun   =  0;
+  Int_t lastRun    = 10;
+  Int_t beamPeriod =  1;
+  char* objFormat  = "";
+
+  DBFolder  ="local://Calib";
+  firstRun  =  0;
+  lastRun   =  10;
+  objFormat = "T0 initial slewnig correction";
+
+  AliT0CalibData *calibda=new AliT0CalibData("T0");
+  
+   
   TRandom rn;
   
   for(Int_t ipmt=0; ipmt<24; ipmt++) {
-    calibda->SetGain (fGain,ipmt);
-    calibda->SetTimeDelayCFD(fTimeDelay,ipmt);
-    calibda->SetTimeDelayLED(fTimeDelay,ipmt);
-    calibda->SetWalk(ipmt,"data/re.root");
+    calibda->SetWalk(ipmt,"data/CFD-Amp.txt");
     calibda->SetSlewingLED(ipmt,"data/CFD-LED.txt");
     calibda->SetSlewingRec(ipmt,"data/CFD-LED.txt");
-    Double_t value=calibda->GetSlewingLED(ipmt,300);
-    Double_t rec= calibda->GetSlewingRec(ipmt, value);
-    cout<<" in "<<value<<" out "<<rec<<endl;
   }
-  calibda->Print();
   //Store calibration data into database
   AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
 
@@ -129,7 +172,7 @@ void SetCC()
   md.SetComment(objFormat);
   md.SetBeamPeriod(beamPeriod);
   md.SetResponsible("Alla");
-  TString fPath="T0/Calib/Gain_TimeDelay_Slewing_Walk";
+  TString fPath="T0/Calib/Slewing_Walk";
 
 
   // AliCDBStorage* storage = AliCDBManager::Instance()->GetSpecificStorage("T0");
@@ -141,7 +184,7 @@ void SetCC()
 }
 
 //------------------------------------------------------------------------
-void GetCC()
+void GetTimeDelay()
 {
   // Read calibration coefficients into the Calibration DB
   // Arguments:
@@ -151,15 +194,33 @@ void GetCC()
   DBFolder  ="local://Calib";
   Int_t nRun=gAlice->GetRunNumber();
   
-  AliCDBManager *man = AliCDBManager::Instance();
-  AliCDBStorage *stor2 = man->GetStorage("local://Calib");
-  AliCDBEntry *entry;
-  entry = stor2->Get("T0/Calib/Gain_TimeDelay_Slewing_Walk");
-   
+  AliCDBStorage *stor =AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT");
+  AliCDBEntry* entry = stor->Get("T0/Calib/TimeDelay",0);
+  
   AliT0CalibData *clb = (AliT0CalibData*)entry->GetObject();
   clb->Print();
 }
 //------------------------------------------------------------------------
+void GetWalk()
+{
+  // Read calibration coefficients into the Calibration DB
+  // Arguments:
+  
+  TString DBFolder;
+  
+  DBFolder  ="local://Calib";
+  Int_t nRun=gAlice->GetRunNumber();
+  
+   AliCDBStorage *stor =AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT");
+   AliCDBEntry* entry = stor->Get("T0/Calib/Slewing_Walk",0);
+   
+   AliT0CalibData *clb = (AliT0CalibData*)entry->GetObject();
+   Int_t ipmt=0;
+   //  cin>>" enter channel number">>ipmt;
+   TGraph *gr = clb->GetWalk(ipmt); 
+   gr->Draw("AP");
+}
+//------------------------------------------------------------------------
 void GetAC()
 {
   // Read align coefficients into the Calibration DB
index 1450f01f5ded0fc5fbafacce8b0d31eb178f2cff..1a3736268d5924e70a47f98e31ebd4a75651c1a8 100644 (file)
@@ -76,13 +76,13 @@ void AliT0Trigger::Trigger()
     return;
   } 
   brDigits->GetEntry(0);
-  Int_t   besttimeright = fDigits->BestTimeRight();
-  Int_t   besttimeleft = fDigits->BestTimeLeft();
+  Int_t   besttimeA = fDigits->BestTimeA();
+  Int_t   besttimeC = fDigits->BestTimeC();
   Int_t   timeDiff = fDigits->TimeDiff();
   Int_t    sumMult=   fDigits->SumMult();
 
-  if (besttimeright > 0 && besttimeright <99999  )  SetInput("START_A_L0");
-  if (besttimeleft>0  && besttimeleft<99999)   SetInput("START_C_L0"); 
+  if (besttimeA > 0 && besttimeA <99999  )  SetInput("START_A_L0");
+  if (besttimeC>0  && besttimeC<99999)   SetInput("START_C_L0"); 
   if (timeDiff >5500 && timeDiff < 6500)       SetInput("START_Vertex_L0");
   if (sumMult > 175)                           SetInput("START_Centr_L0");
   if (sumMult>155 && sumMult <= 175)           SetInput("START_SemiCentral_L0");;
index 62b96e104709d15e0f6d84648f6c762d0b0234d0..5f108a37c16df886df393a8f3d5f65993912ad44 100644 (file)
 /* $Id$ */
 /////////////////////////////////////////////////////////////////////////
 //  Class AliT0digit for T0 digits
-//  fTimeRight  - right side TOF signal
-//  fTimeLeft  - left side TOF signal
-//  fTimeBestRight - TOF first particle on the right side
-//  TimeBestLeft - TOF first particle on the left side
-//  fTimeAverage = (fTimeBestRight + TimeBestLeft ) /2. T0 signal
-//  fTimeDiff = fTimeBestRight - TimeBestLeft  
+//  fTimeA  - right side TOF signal
+//  fTimeC  - left side TOF signal
+//  fTimeBestA - TOF first particle on the right side
+//  TimeBestC - TOF first particle on the left side
+//  fTimeAverage = (fTimeBestA + TimeBestC ) /2. T0 signal
+//  fTimeDiff = fTimeBestA - TimeBestC  
 //
 ///////////////////////////////////////////////////////////////////////
 
 ClassImp(AliT0digit)
 
 //-----------------------------------------------
-  AliT0digit::AliT0digit() :TObject()
-{
-
-  fTimeAverage   = 99999;
-  fTimeDiff      = 99999;
-  fBestTimeRight = 99999;
-  fBestTimeLeft  = 99999;
+  AliT0digit::AliT0digit() :TObject(),
+                           fTimeCFD(new TArrayI(24)),    
+                           fQT0( new TArrayI(24)),     
+                           fTimeLED( new TArrayI(24)), 
+                           fQT1( new TArrayI(24)),     
+                           fTimeAverage(99999),
+                           fTimeDiff(99999),
+                           fBestTimeA(99999),
+                           fBestTimeC (99999),
+                           fSumMult(0)
 
-  fTime = new TArrayI(24);
-  fADC  = new TArrayI(24);
-  fTimeAmp = new TArrayI(24);
-  fADCAmp  = new TArrayI(24);
+{
+  //
 }
 
-//-----------------------------------
+//_____________________________________________________________________________
+
 AliT0digit::~AliT0digit() {
   // destructor
-  delete fTime;
-  delete fADC;
-  delete fTimeAmp;
-  delete fADCAmp;
+  delete fTimeCFD;
+  delete fQT0;
+  delete fTimeLED;
+  delete fQT1;
 }
 //-----------------------------------
-void AliT0digit::SetTime (TArrayI &o)
+void AliT0digit::SetTimeCFD (TArrayI &o)
 {
   ////////////////////////////////////////
-  fTime = new TArrayI(24);
+  fTimeCFD = new TArrayI(24);
 
   Int_t i;
   for (i=0; i<24; i++)
     {
       Int_t buf=o.At(i);
-      fTime->AddAt(buf,i);
+      fTimeCFD->AddAt(buf,i);
     }
 }
 //--------------------------------------------
-void AliT0digit::GetTime (TArrayI &o)
+void AliT0digit::GetTimeCFD (TArrayI &o)
 {
   //
   Int_t i;
   for (i=0; i<24; i++)
     {
-      o[i]=fTime->At(i);
+      o[i]=fTimeCFD->At(i);
     }
 }
 //--------------------------------------------
-void AliT0digit::GetADC (TArrayI &o)
+void AliT0digit::GetQT0 (TArrayI &o)
 {
   //
   Int_t i;
   for (i=0; i<24; i++)
     {
-      o[i]=fADC->At(i);
+      o[i]=fQT0->At(i);
     }
 }
 //--------------------------------------------
-void AliT0digit::SetADC (TArrayI &o)
+void AliT0digit::SetQT0 (TArrayI &o)
 {
   //
-  fADC  = new TArrayI(24);
+  fQT0  = new TArrayI(24);
   Int_t i;
   for (i=0; i<24; i++)
     {
       Int_t buf=(o.At(i));
-      fADC->AddAt(buf,i);
+      fQT0->AddAt(buf,i);
     }
 }
 //-----------------------------------
-void AliT0digit::SetTimeAmp (TArrayI &o)
+void AliT0digit::SetTimeLED (TArrayI &o)
 {
   ////////////////////////////////////////
-  fTimeAmp = new TArrayI(24);
+  fTimeLED = new TArrayI(24);
 
   Int_t i;
   for (i=0; i<24; i++)
     {
       Int_t buf=o.At(i);
-      fTimeAmp->AddAt(buf,i);
+      fTimeLED->AddAt(buf,i);
     }
 }
 //--------------------------------------------
-void AliT0digit::GetTimeAmp (TArrayI &o)
+void AliT0digit::GetTimeLED (TArrayI &o)
 {
   //
   Int_t i;
   for (i=0; i<24; i++)
     {
-      o[i]=fTimeAmp->At(i);
+      o[i]=fTimeLED->At(i);
     }
 }
 //--------------------------------------------
-void AliT0digit::GetADCAmp (TArrayI &o)
+void AliT0digit::GetQT1 (TArrayI &o)
 {
   //
   Int_t i;
   for (i=0; i<24; i++)
     {
-      o[i]=fADCAmp->At(i);
+      o[i]=fQT1->At(i);
     }
 }
 //--------------------------------------------
-void AliT0digit::SetADCAmp (TArrayI &o)
+void AliT0digit::SetQT1 (TArrayI &o)
 {
   //
-  fADCAmp  = new TArrayI(24);
+  fQT1  = new TArrayI(24);
   Int_t i;
   for (i=0; i<24; i++)
     {
       Int_t buf=(o.At(i));
-      fADCAmp->AddAt(buf,i);
+      fQT1->AddAt(buf,i);
     }
 }
index 1d41108e92a5897bc72aa0c6c477612ede1e91fc..d23a74a65ec130ad68e3b20a0d5ce63b47d87fc9 100644 (file)
@@ -14,44 +14,46 @@ class AliT0digit: public TObject {
  public:
   AliT0digit();
   virtual ~AliT0digit();
-  Int_t BestTimeRight() {return fBestTimeRight;}
-  Int_t BestTimeLeft() {return fBestTimeLeft;}
+
+  Int_t BestTimeA() {return fBestTimeA;}
+  Int_t BestTimeC() {return fBestTimeC;}
   Int_t MeanTime() {return fTimeAverage;}
   Int_t TimeDiff() {return fTimeDiff;}
   Int_t SumMult() {return fSumMult;}
-  void SetTimeBestRight( Int_t time) {fBestTimeRight = time;}
-  void SetTimeBestLeft( Int_t time) {fBestTimeLeft = time;}
+  void SetTimeBestA( Int_t time) {fBestTimeA = time;}
+  void SetTimeBestC( Int_t time) {fBestTimeC = time;}
   void SetMeanTime(Int_t time) {fTimeAverage=time;}
   void SetDiffTime(Int_t time) {fTimeDiff=time;}
   void SetSumMult(Int_t time) {fSumMult=time;}
   
-  virtual void SetTime (TArrayI &o);
-  virtual void GetTime (TArrayI &o);
-  virtual void SetADC (TArrayI &o);
-  virtual void GetADC (TArrayI &o);
+  virtual void SetTimeCFD (TArrayI &o);
+  virtual void GetTimeCFD (TArrayI &o);
+  virtual void SetQT0 (TArrayI &o);
+  virtual void GetQT0 (TArrayI &o);
   
-  virtual void SetTimeAmp (TArrayI &o);
-  virtual void GetTimeAmp (TArrayI &o);
-  virtual void SetADCAmp (TArrayI &o);
-  virtual void GetADCAmp (TArrayI &o);
+  virtual void SetTimeLED (TArrayI &o);
+  virtual void GetTimeLED (TArrayI &o);
+  virtual void SetQT1 (TArrayI &o);
+  virtual void GetQT1 (TArrayI &o);
+
  private: 
 
-  Int_t fBestTimeRight;        // TOF first particle on the right 
-  Int_t fBestTimeLeft;         // TOF first particle on the left
+  TArrayI *fTimeCFD;    // array's TDC
+  TArrayI *fQT0;    // array's ADC
+  TArrayI *fTimeLED;    // array's TDC
+  TArrayI *fQT1;    // array's ADC
   Int_t fTimeAverage;             // mean time (start signal)
   Int_t fTimeDiff;             // time difference (vertex position)
-
-  TArrayI *fTime;    // array's TDC
-  TArrayI *fADC;    // array's ADC
-  TArrayI *fTimeAmp;    // array's TDC
-  TArrayI *fADCAmp;    // array's ADC
+  Int_t fBestTimeA;        // TOF first particle on the right 
+  Int_t fBestTimeC;         // TOF first particle on the left
   Int_t fSumMult;   //multiplisity
   AliT0digit( const AliT0digit& );
   AliT0digit& operator=(const AliT0digit&); 
   
-  ClassDef(AliT0digit,4)  //Digit (Header) object for set:T0
+  ClassDef(AliT0digit,5)  //Digit (Header) object for set:T0
 };
 
+
 typedef AliT0digit AliSTARTdigit; // for backward compatibility
 
 #endif
index 6b51a156837bd883999460da80f61987490c0718..2a6eaf6beecad774fc62e9ce141c758ae7c613e0 100644 (file)
 
 ClassImp(AliT0hit)
 
-AliT0hit::AliT0hit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
-  AliHit(shunt, track)
+
+  AliT0hit::AliT0hit(): AliHit(),
+                       fVolume(0),  
+                       fPmt(0),     
+                       fParticle(0),
+                       fEtot(0),     
+                       fTime(0)  
+  
 {
+  //
+}
+AliT0hit::AliT0hit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
+  AliHit(shunt, track),
+  fVolume(0),  
+  fPmt(0),     
+  fParticle(0),
+  fEtot(0),     
+  fTime(0)  
+  {
 //Normal T0 hit ctor
   
    fVolume = vol[0];
index 482720d7d7fb3ba1993326ba9462c5024176577f..284d36bcb8fb864beb237ae7929cea4a15e93d45 100644 (file)
@@ -12,7 +12,7 @@
  
 class AliT0hit : public AliHit {
 public:
-  AliT0hit(){}//Empty ctor
+  AliT0hit();//Empty ctor
   AliT0hit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
   virtual ~AliT0hit(){}//Empty virtual dtor
   Int_t Volume() const {return fVolume;}
index f62f8f1ebac94b8561a99029fffa9bfec2813984..7a90dd129fdfbe5fa9a2f74a1023b990bdc0dda5 100644 (file)
@@ -9,8 +9,8 @@
 #pragma link off all functions;
  
  
+#pragma link C++ class  AliT0+;
 #pragma link C++ class  AliT0digit+;
-#pragma link C++ class  AliT0Loader+;
 #pragma link C++ class  AliT0Trigger+;
 #pragma link C++ class  AliT0CalibData+;
 #pragma link C++ class  AliT0Parameters+;
index 2ecb187379c3c7d23f4faf3194589e0ce36cae14..9bfda5119c616b990c8edd0bbe0a6fc08e4d60bb 100644 (file)
@@ -15,5 +15,6 @@
 #pragma link C++ class  AliT0RecPoint+;
 #pragma link C++ class  AliT0Reconstructor+;
 #pragma link C++ class  AliT0RawReader+;
+#pragma link C++ class  AliT0Calibrator+;
 
 #endif
index 88135bf87bcc58254f69d96cf36c9735313707d6..d4105874a043ab1dac1580fbcecb8f9904d6191a 100644 (file)
@@ -15,7 +15,6 @@
 #pragma link C++ typedef  AliSTARTDigitizer;
 #pragma link C++ typedef  AliSTARTRawData;
  
-#pragma link C++ class  AliT0+;
 #pragma link C++ class  AliT0v0+;
 #pragma link C++ class  AliT0v1+;
 #pragma link C++ class  AliT0hit+;
index e8999cb69acf1099eaa89ea2f79171daad32ee1b..34bcc4e55e480189e347577214edb54d8d2bad25 100644 (file)
@@ -1,7 +1,7 @@
 #-*- Mode: Makefile -*-
 # $Id$
 
-SRCS= AliT0digit.cxx AliT0Loader.cxx AliT0Trigger.cxx \
+SRCS=  AliT0.cxx AliT0digit.cxx AliT0Trigger.cxx \
       AliT0CalibData.cxx AliT0Parameters.cxx AliT0LookUpValue.cxx
 
 HDRS= $(SRCS:.cxx=.h)
index 5d0d86619a712ca6418a096b3e523a8dfb35b53f..24efca5c3fc14297752637a4001031d3ffbdade8 100644 (file)
@@ -1,7 +1,7 @@
 #-*- Mode: Makefile -*-
 # $Id$
 
-SRCS= AliT0RecPoint.cxx AliT0Reconstructor.cxx AliT0RawReader.cxx 
+SRCS= AliT0RecPoint.cxx AliT0Reconstructor.cxx AliT0RawReader.cxx AliT0Calibrator.cxx
 
 HDRS= $(SRCS:.cxx=.h)
 
index 456f95464bd1213e828512e04cf04f7bc3eaeb04..1856f29ca5c6b104c93552ec07f70e0b4fb705c3 100644 (file)
@@ -1,7 +1,7 @@
 #-*- Mode: Makefile -*-
 # $Id$
 
-SRCS= AliT0.cxx AliT0v0.cxx AliT0v1.cxx AliT0hit.cxx AliT0Digitizer.cxx  AliT0RawData.cxx
+SRCS= AliT0v0.cxx AliT0v1.cxx AliT0hit.cxx AliT0Digitizer.cxx  AliT0RawData.cxx
 
 HDRS= $(SRCS:.cxx=.h)