for pass0 AliT0PreprocessorOffline.cxx
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Mar 2011 14:08:16 +0000 (14:08 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Mar 2011 14:08:16 +0000 (14:08 +0000)
T0/AliT0CalibOffsetChannelsTask.cxx
T0/AliT0CalibOffsetChannelsTask.h
T0/AliT0CalibTimeEq.cxx
T0/AliT0CalibTimeEq.h
T0/AliT0PreprocessorOffline.h

index 0cb352f..e8cd0e5 100644 (file)
-#include "TChain.h"
-#include "TTree.h"
-#include "TH1D.h"
-#include "TF1.h"
-#include "TCanvas.h"
-#include "TObjArray.h"
-
-#include "AliAnalysisTask.h"
-#include "AliAnalysisManager.h"
-
-#include "AliESDEvent.h"
-#include "AliESDInputHandler.h"
-
-#include "AliT0CalibSeasonTimeShift.h"
-#include "AliT0CalibOffsetChannelsTask.h"
-
-#include "AliCDBMetaData.h"
-#include "AliCDBId.h"
-#include "AliCDBEntry.h"
-#include "AliCDBManager.h"
-#include "AliCDBStorage.h"
-
-// Task should calculate channels offset 
-// Authors: Alla 
-
-ClassImp(AliT0CalibOffsetChannelsTask)
-//________________________________________________________________________
-AliT0CalibOffsetChannelsTask::AliT0CalibOffsetChannelsTask() 
-  : AliAnalysisTaskSE(),  fESD(0), fTzeroObject(0),fRunNumber(0)
-{
-  // Constructor
-
-  // Define input and output slots here
-  // Input slot #0 works with a TChain
-  DefineInput(0, TChain::Class());
-  DefineOutput(1, TObjArray::Class());
-  fTzeroObject = new TObjArray(0);
-  fTzeroObject->SetOwner(kTRUE);
-  // Output slot #0 id reserved by the base class for AOD
-  // Output slot #1 writes into a TH1 container
-  // DefineOutput(1, TList::Class());
-}
-
-
-//________________________________________________________________________
-AliT0CalibOffsetChannelsTask::AliT0CalibOffsetChannelsTask(const char *name) 
-  : AliAnalysisTaskSE(name), fESD(0), fTzeroObject(0),fRunNumber(0)
-{
-  // Constructor
-  
-  // Define input and output slots here
-  // Input slot #0 works with a TChain
-  DefineInput(0, TChain::Class());
-  DefineOutput(1, TObjArray::Class());
-  // Output slot #0 id reserved by the base class for AOD
-  // Output slot #1 writes into a TH1 container
-  // DefineOutput(1, TList::Class());
-}
-
-//________________________________________________________________________
-AliT0CalibOffsetChannelsTask::~AliT0CalibOffsetChannelsTask() 
-{
-  // Destructor
- printf("AliT0CalibOffsetChannels~AliT0CalibOffsetChannels() ");
- if( fTzeroObject )fTzeroObject->Delete();
-}
-
-//________________________________________________________________________
-void AliT0CalibOffsetChannelsTask::ConnectInputData(Option_t *) {
-  //
-  //
-  //
-  TTree* tree=dynamic_cast<TTree*>(GetInputData(0));
-  if (!tree) {
-    printf("ERROR: Could not read chain from input slot 0");
-  } 
-  else {
-    AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-    if (!esdH) {
-      printf ("ERROR: Could not get ESDInputHandler");
-    } 
-    else {
-      fESD = esdH->GetEvent();
-      printf ("*** CONNECTED NEW EVENT ****");
-    }
-  }
-}
-
-//________________________________________________________________________
-void AliT0CalibOffsetChannelsTask::UserCreateOutputObjects()
-{
-  // Create histograms
-  for (Int_t i=0; i<24; i++) {
-    fTimeDiff[i]   = new TH1F (Form("CFD1minCFD%d",i+1),"fTimeDiff",300, -300, 300);
-    fCFD[i]   = new TH1F("CFD","CFD",500, 6000, 7000);
-  }
-  fTzeroObject = new TObjArray(0);
-  fTzeroObject->SetOwner(kTRUE);
-  PostData(1, fTzeroObject);
-  // Called once
-}
-
-//________________________________________________________________________
-void AliT0CalibOffsetChannelsTask::UserExec(Option_t *) 
-{
-  // Main loop
-  // Called for each event
-
-  // Post output data.
-  fESD = dynamic_cast<AliESDEvent*>(InputEvent());
-  if (!fESD) {
-    printf("ERROR: fESD not available\n");
-    return;
-  }
-
-  const Double32_t* time = fESD->GetT0time();
-  for (Int_t i=0; i<12; i++) {
-    if( time[i]>1 ){
-      fCFD[i]->Fill( time[i]);
-      if(  time[0]>1 ) 
-       fTimeDiff[i]->Fill( time[i]-time[0]);
-    }
-  }
-  for (Int_t i=12; i<24; i++) {
-    if( time[i]>1) {
-      fCFD[i]->Fill( time[i]);
-      if( time[12]>1 ) 
-       fTimeDiff[i]->Fill( time[i]-time[12]);
-    }
-  }
-  fRunNumber =  fESD->GetRunNumber() ; 
-  
-  // printf("%lf   %lf  %lf\n",orA,orC,time);
-  PostData(1, fTzeroObject);
-}      
- //________________________________________________________________________
-void AliT0CalibOffsetChannelsTask::Terminate(Option_t *) 
-{
-  
-  // Called once at the end of the query
-  for (Int_t i=0; i<24; i++)
-    fTzeroObject->AddAtAndExpand(fTimeDiff[i],i);
-
-  for (Int_t i=24; i<48; i++)
-    fTzeroObject->AddAtAndExpand(fCFD[i],i);
-
-}
-
+#include "TChain.h"\r
+#include "TTree.h"\r
+#include "TH1D.h"\r
+#include "TF1.h"\r
+#include "TCanvas.h"\r
+#include "TObjArray.h"\r
+\r
+#include "AliAnalysisTask.h"\r
+#include "AliAnalysisManager.h"\r
+\r
+#include "AliESDEvent.h"\r
+#include "AliESDInputHandler.h"\r
+\r
+#include "AliT0CalibOffsetChannelsTask.h"\r
+\r
+//#include "AliCDBMetaData.h"\r
+//#include "AliCDBId.h"\r
+//#include "AliCDBEntry.h"\r
+//#include "AliCDBManager.h"\r
+//#include "AliCDBStorage.h"\r
+\r
+// Task should calculate channels offset \r
+// Authors: Alla \r
+\r
+ClassImp(AliT0CalibOffsetChannelsTask)\r
+//________________________________________________________________________\r
+AliT0CalibOffsetChannelsTask::AliT0CalibOffsetChannelsTask() \r
+  : AliAnalysisTaskSE(),  fESD(0x0), fTzeroObject(0x0),\r
+  fTzeroORA(0x0), fTzeroORC(0x0), fResolution(0x0), fTzeroORAplusORC(0x0),\r
+  fRunNumber(0)\r
+{\r
+  // Constructor\r
+\r
+  for( int ip=0; ip < 24; ip++){\r
+    fTimeDiff[ip] = 0;\r
+    fCFD[ip]      = 0;\r
+  }\r
+\r
+  // Define input and output slots here\r
+  // Input slot #0 works with a TChain\r
+  //  DefineInput(0,  TChain::Class());\r
+  //  DefineOutput(1, TObjArray::Class());\r
+}\r
+\r
+\r
+//________________________________________________________________________\r
+AliT0CalibOffsetChannelsTask::AliT0CalibOffsetChannelsTask(const char *name) \r
+  : AliAnalysisTaskSE(name), fESD(0), fTzeroObject(0),\r
+  fTzeroORA(0x0), fTzeroORC(0x0), fResolution(0x0), fTzeroORAplusORC(0x0),\r
+  fRunNumber(0)\r
+{\r
+  // Constructor\r
\r
+  for( int ip=0; ip < 24; ip++){\r
+    fTimeDiff[ip] = 0;\r
+    fCFD[ip]      = 0;\r
+  }\r
\r
+  // Define input and output slots here\r
+  // Input slot #0 works with a TChain\r
+  DefineInput(0, TChain::Class());\r
+  DefineOutput(1, TObjArray::Class());\r
+  // Output slot #0 id reserved by the base class for AOD\r
+  // Output slot #1 writes into a TH1 container\r
+}\r
+\r
+//________________________________________________________________________\r
+AliT0CalibOffsetChannelsTask::~AliT0CalibOffsetChannelsTask() \r
+{\r
+  // Destructor\r
+  // printf("AliT0CalibOffsetChannels~AliT0CalibOffsetChannels() ");\r
+  delete fTzeroORA;\r
+  delete fTzeroORC;\r
+  delete fResolution;\r
+  delete fTzeroORAplusORC;\r
+  delete [] fTimeDiff;\r
+  delete [] fCFD;\r
+\r
+  delete fTzeroObject;\r
+}\r
+\r
+//________________________________________________________________________\r
+/*void AliT0CalibOffsetChannelsTaskX::ConnectInputData(Option_t *) {\r
+  //\r
+  //\r
+  //\r
+  TTree* tree=dynamic_cast<TTree*>(GetInputData(0));\r
+  if (!tree) {\r
+    printf("ERROR: Could not read chain from input slot 0");\r
+  } \r
+  else {\r
+    AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());\r
+    if (!esdH) {\r
+      printf ("ERROR: Could not get ESDInputHandler");\r
+    } \r
+    else {\r
+      fESD = esdH->GetEvent();\r
+      printf ("*** CONNECTED NEW EVENT ****");\r
+    }\r
+  }\r
+}\r
+*/\r
+//________________________________________________________________________\r
+void AliT0CalibOffsetChannelsTask::UserCreateOutputObjects()\r
+{\r
+  // Create histograms\r
+  for (Int_t i=0; i<24; i++) {\r
+    fTimeDiff[i]   = new TH1F (Form("CFD1minCFD%d",i+1),"fTimeDiff",300, -300, 300);\r
+    fCFD[i]        = new TH1F(Form("CFD%d",i+1),"CFD",500, 2000, 3000);//6000, 7000);\r
+  }\r
+\r
+  fTzeroORAplusORC = new TH1F("fTzeroORAplusORC","ORA+ORC /2",400,-2000,2000);   //or A plus or C \r
+  fResolution      = new TH1F("fResolution","fResolution",400,-2000,2000);// or A minus or C spectrum\r
+  fTzeroORA        = new TH1F("fTzeroORA","fTzeroORA",400,-2000,2000);// or A spectrum\r
+  fTzeroORC        = new TH1F("fTzeroORC","fTzeroORC",400,-2000,2000);// or C spectrum\r
+\r
+  \r
+  fTzeroObject     = new TObjArray(0);\r
+  fTzeroObject->SetOwner(kTRUE);\r
+  \r
+  for (Int_t i=0; i<24; i++)\r
+    fTzeroObject->AddAtAndExpand(fTimeDiff[i],i);\r
+\r
+  for (Int_t i=0; i<24; i++)\r
+    fTzeroObject->AddAtAndExpand(fCFD[i],i+24); //24 - 48\r
+\r
+  fTzeroObject->AddAtAndExpand(fTzeroORAplusORC, 48);\r
+  fTzeroObject->AddAtAndExpand(fResolution, 49);\r
+  fTzeroObject->AddAtAndExpand(fTzeroORA, 50);\r
+  fTzeroObject->AddAtAndExpand(fTzeroORC, 51);\r
+\r
+  PostData(1, fTzeroObject);\r
+  // Called once\r
+}\r
+\r
+//________________________________________________________________________\r
+void AliT0CalibOffsetChannelsTask::UserExec(Option_t *) \r
+{\r
+  // Main loop\r
+  // Called for each event\r
+\r
+  // Post output data.\r
+  fESD = dynamic_cast<AliESDEvent*>(InputEvent());\r
+  if (!fESD) {\r
+    printf("ERROR: fESD not available\n");\r
+    return;\r
+  }\r
+\r
+  fRunNumber =  fESD->GetRunNumber() ; \r
+\r
+  const Double32_t* time = fESD->GetT0time();\r
+  for (Int_t i=0; i<12; i++) {\r
+    if( time[i]>1 ){\r
+      fCFD[i]->Fill( time[i]);\r
+      if(  time[0]>1 ) \r
+       fTimeDiff[i]->Fill( time[i]-time[0]);\r
+    }\r
+  }\r
+  for (Int_t i=12; i<24; i++) {\r
+    if( time[i]>1) {\r
+      fCFD[i]->Fill( time[i]);\r
+      if( time[12]>1 ) \r
+       fTimeDiff[i]->Fill( time[i]-time[12]);\r
+    }\r
+  }\r
+  const Double32_t* mean = fESD->GetT0TOF();\r
+  Double32_t meanTOF = mean[0] + 100000. ;\r
+  Double32_t orA = mean[1] + 100000.;\r
+  Double32_t orC = mean[2] + 100000.;\r
\r
+  if(orA<9999) fTzeroORA->Fill(orA);\r
+  if(orC<9999) fTzeroORC->Fill(orC);\r
+  if(orA<9999 && orC<9999) fResolution->Fill((orA-orC)/2.);\r
+  if(orA<9999 && orC<9999) fTzeroORAplusORC->Fill(meanTOF); \r
+\r
+  //  printf("%f   %f  %f\n",orA,orC,meanTOF);\r
+  PostData(1, fTzeroObject);\r
+}      \r
+ //________________________________________________________________________\r
+void AliT0CalibOffsetChannelsTask::Terminate(Option_t *) \r
+{\r
+  \r
+   // Called once at the end of the query\r
+}\r
\r
index 8ff1504..cbd045b 100644 (file)
@@ -5,8 +5,8 @@
 // Authors: FK  \r
 \r
 class TH1F;\r
+class TObjArray; \r
 class AliESDEvent;\r
-class AliT0CalibSeasonTimeShift;\r
 \r
 #include "AliAnalysisTaskSE.h"\r
 \r
@@ -16,21 +16,22 @@ class AliT0CalibOffsetChannelsTask : public AliAnalysisTaskSE {
   AliT0CalibOffsetChannelsTask(const char *name);\r
   virtual ~AliT0CalibOffsetChannelsTask(); \r
   \r
-  virtual void ConnectInputData(Option_t *option);\r
   virtual void   UserCreateOutputObjects();\r
-  //  virtual void     Process(AliESDEvent *event);\r
   virtual void   UserExec(Option_t *option);\r
   virtual void   Terminate(Option_t *);\r
   TObjArray* GetOffsetHistos() {return fTzeroObject;}\r
   \r
  private:\r
-  AliESDEvent *fESD;        //! ESD object\r
-  TObjArray *fTzeroObject;  //array with CFDi-CFD1 and  CFDi\r
-  TH1F        *fTimeDiff[24];   //! CFDi-CFD1 vs Npmt   \r
-  TH1F        *fCFD[24];   //! CFDi  vs Npmt \r
-   int         fRunNumber;\r
+  AliESDEvent *fESD;          //! ESD object\r
+  TObjArray   *fTzeroObject;  // array with CFDi-CFD1 and  CFDi\r
+  TH1F        *fTimeDiff[24]; //! CFDi-CFD1 vs Npmt   \r
+  TH1F        *fCFD[24];      //! CFDi  vs Npmt \r
+  TH1F        *fTzeroORA;     //! or A spectrum    \r
+  TH1F        *fTzeroORC;     //! or C spectrum    \r
+  TH1F        *fResolution;   //! or A minus or C spectrum    \r
+  TH1F        *fTzeroORAplusORC; //! ORA+ORC /2 \r
+  int         fRunNumber;\r
   \r
-   //  AliT0CalibSeasonTimeShift *fTzeroObject;\r
  \r
   AliT0CalibOffsetChannelsTask(const AliT0CalibOffsetChannelsTask&); // not implemented\r
   AliT0CalibOffsetChannelsTask& operator=(const AliT0CalibOffsetChannelsTask&); // not implemented\r
index 7ff7184..7aabf7d 100644 (file)
@@ -112,7 +112,7 @@ Bool_t AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
   Float_t meandiff, sigmadiff, meanver, meancfdtime, sigmacfdtime;
   meandiff = sigmadiff =  meanver = meancfdtime = sigmacfdtime =0;
   Double_t rmsver=0;
- Int_t nent=0;
+  Int_t nent=0;
   Bool_t ok=false;
   gFile = TFile::Open(filePhys);
   if(!gFile) {
@@ -120,7 +120,6 @@ Bool_t AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
   }
   else
     {
-        gFile->ls();
       ok=true;
       for (Int_t i=0; i<24; i++)
        {
@@ -156,17 +155,17 @@ Bool_t AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
          if(cfdtime) {
            nent = Int_t(cfdtime->GetEntries());
            if(nent>500 )  {
-             if(cfdtime->GetRMS()>1.5 &&  cfdtime->GetRMS()<30)
+             if(cfdtime->GetRMS()>1.5 )
                GetMeanAndSigma(cfdtime,meancfdtime, sigmacfdtime);
              if(cfdtime->GetRMS()<=1.5) 
                {
                  meancfdtime = cfdtime->GetMean();
                  sigmacfdtime = cfdtime->GetRMS();
                }
-             if(cfdtime->GetRMS()>30) 
+             if(sigmacfdtime>50 ) 
                {
-               ok=false;
-               AliWarning(Form("Data is not good enouph in PMT %i  - meancfdtime %f rsm %f nentries %i", i,meancfdtime, sigmacfdtime, nent));
+                 ok=false;
+                 AliWarning(Form("Data is not good enouph in PMT %i  - meancfdtime %f rsm %f nentries %i", i,meancfdtime, sigmacfdtime, nent));
                }
            }
          }
@@ -201,12 +200,11 @@ Bool_t AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys)
 }
 
 //________________________________________________________________
-Bool_t AliT0CalibTimeEq::ComputeOfflineParams(const char* filePhys)
+Bool_t AliT0CalibTimeEq::ComputeOfflineParams(const char* filePhys, Float_t *timecdb, Int_t badpmt)
 {
   // compute online equalized time
   Float_t meandiff, sigmadiff, meanver, meancfdtime, sigmacfdtime;
   meandiff = sigmadiff =  meanver = meancfdtime = sigmacfdtime =0;
-  // Double_t rms=0, rmscfd=0; 
   Double_t rmsver=0;
   Int_t nent=0;
   Bool_t ok=false;
@@ -218,29 +216,33 @@ Bool_t AliT0CalibTimeEq::ComputeOfflineParams(const char* filePhys)
     {
       meandiff = sigmadiff =  meanver = meancfdtime = sigmacfdtime =0;
       ok=true;
-      TObjArray * TzeroObj = (TObjArray*) gFile->Get("fTzeroObject");
-      for (Int_t i=0; i<24; i++)
+    TDirectory *dr = (TDirectory*) gFile->Get("T0Calib");
+    TObjArray * TzeroObj = (TObjArray*) dr->Get("fTzeroObject");
+       for (Int_t i=0; i<24; i++)
        {
+         if (i != badpmt) {
          TH1F *cfddiff = (TH1F*)TzeroObj->At(i);
          TH1F *cfdtime = (TH1F*)TzeroObj->At(i+24);
          if(!cfddiff) AliWarning(Form("no Diff histograms collected by PHYS DA for channel %i", i));
          //      printf(" i = %d buf1 = %s\n", i, buf1);
          if(cfddiff) {
            nent = Int_t(cfddiff->GetEntries());
-           if(nent>500 )  {
-             if(cfddiff->GetRMS()>1.5 &&  cfddiff->GetRMS()<20)
+           if(nent>10 )  {
+             if(cfddiff->GetRMS()>1.5 &&  cfddiff->GetRMS()<30)
                GetMeanAndSigma(cfddiff, meandiff, sigmadiff);
              if(cfddiff->GetRMS()<=1.5) 
                {
                  meandiff = cfddiff->GetMean();
                  sigmadiff = cfddiff->GetRMS();
                }
+             //   printf(" ipmt %i meandiff %f sigmadiff %f mean %f rms %f\n", i, meandiff,sigmadiff,cfddiff->GetMean(),  cfddiff->GetRMS() );
              
-             if(cfddiff->GetRMS()>20) 
+             if(sigmadiff > 30) 
                {
                  ok=false;
                  AliWarning(Form("Data is not good  in PMT %i - mean %f rsm %f nentries %i", i,meandiff,sigmadiff , nent));
                }
+
            }
            else 
              {
@@ -248,18 +250,17 @@ Bool_t AliT0CalibTimeEq::ComputeOfflineParams(const char* filePhys)
                AliWarning(Form(" Not  enouph data in PMT %i- PMT1:  %i ", i, nent));
              }
          }         
-           //      printf(" i = %d buf1 = %s\n", i, buf1);
          if(cfdtime) {
            nent = Int_t(cfdtime->GetEntries());
-           if(nent>500 )  {
-             if(cfdtime->GetRMS()>1.5 &&  cfdtime->GetRMS()<30)
+           if(nent>10 )  {
+             if(cfdtime->GetRMS()>1.5 )
                GetMeanAndSigma(cfdtime,meancfdtime, sigmacfdtime);
              if(cfdtime->GetRMS()<=1.5) 
                {
                  meancfdtime = cfdtime->GetMean();
                  sigmacfdtime=cfdtime->GetRMS();
                }
-             if(cfdtime->GetRMS()>30) 
+             if(sigmacfdtime>50) 
                {
                  ok=false;
                  AliWarning(Form("Data is not good enouph in PMT %i  - meancfdtime %f rsm %f nentries %i", i,meancfdtime, sigmacfdtime, nent));
@@ -271,14 +272,13 @@ Bool_t AliT0CalibTimeEq::ComputeOfflineParams(const char* filePhys)
                AliWarning(Form(" Not  enouph data in PMT in CFD peak %i - %i ", i, nent));
              }
          }
-
-         SetTimeEq(i,meandiff);
+         SetTimeEq(i,timecdb[i] + meandiff);
          SetTimeEqRms(i,sigmadiff);
          SetCFDvalue(i,0,meancfdtime);
          SetCFDvalue(i,0,sigmacfdtime);
          if (cfddiff) delete cfddiff;
          if (cfdtime) delete cfdtime;
-
+         } //bad pmt
        }
       TH1F *ver = (TH1F*) gFile->Get("hVertex");
       if(!ver) AliWarning("no T0 histogram collected by PHYS DA ");
@@ -308,7 +308,7 @@ void AliT0CalibTimeEq::GetMeanAndSigma(TH1F* hist,  Float_t &mean, Float_t &sigm
   sigmaEstimate = hist->GetRMS();
   TF1* fit= new TF1("fit","gaus", meanEstimate - window*sigmaEstimate, meanEstimate + window*sigmaEstimate);
   fit->SetParameters(hist->GetBinContent(maxBin), meanEstimate, sigmaEstimate);
-  hist->Fit("fit","R");
+  hist->Fit("fit","RQ","Q");
 
   mean  = (Float_t) fit->GetParameter(1);
   sigma = (Float_t) fit->GetParameter(2);
index 12d4bc1..9e1542d 100644 (file)
@@ -24,9 +24,8 @@ class AliT0CalibTimeEq: public TNamed {
   virtual void  Print(Option_t* option= "") const; 
   
   Bool_t ComputeOnlineParams(const char* filePhys);
-  Bool_t ComputeOfflineParams(const char* filePhys);
-
-  Float_t  GetCFDvalue(Int_t channel,Int_t number)        const {return fCFDvalue[channel][number];}
+  Bool_t ComputeOfflineParams(const char* filePhys, Float_t *timecdb, Int_t badpmt);
+  Float_t  GetCFDvalue(Int_t channel,Int_t number)  const {return fCFDvalue[channel][number];}
   Float_t* GetCFDvalue()          const {return (float*)fCFDvalue;}
   Float_t  GetTimeEq(Int_t channel)        const {return fTimeEq[channel];}
   Float_t* GetTimeEq()          const {return (float*)fTimeEq;}
index 2fa3f82..d944677 100644 (file)
@@ -16,12 +16,18 @@ class AliT0PreprocessorOffline: public TNamed
   AliT0PreprocessorOffline();  
   virtual ~AliT0PreprocessorOffline();
   void CalibOffsetChannels(TString FileName, Int_t ustartRun, Int_t uendRun, TString ocdbStorage);
+  void CalibT0sPosition(TString FileName, Int_t ustartRun, Int_t uendRun, TString ocdbStorage);
+  void  Process(TString FileName, Int_t ustartRun, Int_t uendRun, TString ocdbStorage);
   private:
-       AliT0PreprocessorOffline(const AliT0PreprocessorOffline & proc); // copy constructor    
-       AliT0PreprocessorOffline& operator=(const AliT0PreprocessorOffline&); //operator
+  AliT0PreprocessorOffline(const AliT0PreprocessorOffline & proc); // copy constructor 
+  AliT0PreprocessorOffline& operator=(const AliT0PreprocessorOffline&); //operator
+  Int_t startRun;                         // start Run - used to make fast selection in THnSparse
+  Int_t endRun;                           // end   Run - used to make fast selection in THnSparse
+  Int_t startTime;                        // startTime - used to make fast selection in THnSparse
+  Int_t endTime;                          // endTime   - used to make fast selection in THnSparse
+  TString  ocdbStorage;                   // path to the OCDB storage
  
-       ClassDef(AliT0PreprocessorOffline, 1)
+  ClassDef(AliT0PreprocessorOffline, 1)
 };