]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFClusterFinder.h
Make OCDB object version 0 (savannah #101470).
[u/mrichter/AliRoot.git] / TOF / AliTOFClusterFinder.h
index 129acd1ef3b80753134fe7ca956b6a00bb3bf56d..c05b9907d7985b3840095cae442b76360e98f6a7 100644 (file)
@@ -2,8 +2,13 @@
 #define ALITOFCLUSTERFINDER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
+// AliTOFClusterFinder Class
+// Task: Transform digits/raw data to TOF Clusters, to fill TOF RecPoints
+// and feed TOF tracking 
 
-#include "AliRawReader.h"
+#include "TTask.h"
+
+#include "AliTOFRawStream.h"
 
 class TClonesArray;
 class TFile;
@@ -11,30 +16,45 @@ class TTree;
 
 class AliLoader;
 class AliRunLoader;
+class AliRawReader;
+class AliTOFrawData;
 
 class AliTOFGeometry;
+class AliTOFcluster;
+class AliTOFcalib;
 
-class AliTOFClusterFinder : public TObject
+class AliTOFClusterFinder : public TTask
 {
 
   enum {kTofMaxCluster=77777}; //maximal number of the TOF clusters
 
  public:
 
-  AliTOFClusterFinder();
-  AliTOFClusterFinder(AliRunLoader* runLoader);
+  AliTOFClusterFinder(AliTOFcalib *calib);
+  AliTOFClusterFinder(AliRunLoader* runLoader, AliTOFcalib *calib);
+  AliTOFClusterFinder(const AliTOFClusterFinder &source); // copy constructor
+  AliTOFClusterFinder& operator=(const AliTOFClusterFinder &source); // ass. op.
   virtual ~AliTOFClusterFinder();
 
+  void Digits2RecPoints(TTree* digitsTree, TTree* clusterTree);
   void Digits2RecPoints(Int_t ievt);
   void Digits2RecPoints(AliRawReader *rawReader, TTree *clustersTree);
   void Digits2RecPoints(Int_t ievt, AliRawReader *rawReader);
   void Raw2Digits(Int_t ievt, AliRawReader *rawReader); // temporary solution
+  void Raw2Digits(AliRawReader *rawReader, TTree* digitsTree); 
   void FillRecPoint();
   void ResetRecpoint();
   void Load();
   void LoadClusters();
   void UnLoad();
   void UnLoadClusters();
+  void SetVerbose(Int_t Verbose){fVerbose=Verbose;} // To set the verbose level
+  void SetDecoderVersion(Int_t version){fDecoderVersion=version;} // To set the decoder version
+  Int_t GetDecoderVersion() const {return fDecoderVersion;} // To get the decoder version
+  UShort_t  GetClusterVolIndex(const Int_t * const ind) const; //Volume Id getter
+  void GetClusterPars(Int_t *ind, Double_t *pos, Double_t *cov) const; //cluster par getter
+  Int_t GetNumberOfTOFclusters() const {return fNumberOfTofClusters;} // number of clusters getter
+  Int_t GetNumberOfTOFtrgPads() const {return fNumberOfTofTrgPads;} // number of pads getter
 
  protected:
   AliRunLoader *fRunLoader;      // Pointer to Run Loader
@@ -45,21 +65,28 @@ class AliTOFClusterFinder : public TObject
 
   AliTOFcluster *fTofClusters[kTofMaxCluster];  // pointers to the TOF clusters
 
-  AliTOFGeometry  *fTOFGeometry; // Pointer to TOF geometry
   TClonesArray *fDigits;         // List of digits
   TClonesArray *fRecPoints;      // List of reconstructed points
 
   Int_t fNumberOfTofClusters;    // Number of TOF Clusters
+  Int_t fNumberOfTofTrgPads;  // Number of TOF trigger pads
 
  private:
+  void  FillTOFtriggerMap(Int_t iDDL, AliTOFrawData *tofRawDatum);
 
   //Int_t InsertCluster(Int_t *aa, Double_t *bb);    // Fills TofClusters Array
   //Int_t InsertCluster(Int_t *aa, Double_t *bb, Int_t *cc, Int_t d); // Fills TofClusters Array
   Int_t InsertCluster(AliTOFcluster *tofCluster);    // Fills TofClusters Array
   Int_t FindClusterIndex(Double_t z) const; // Returns cluster index 
+  void  CalibrateRecPoint(UInt_t timestamp = 0); // Apply calibration pars to Clusters
 
+  Int_t fVerbose;           // Verbose level (0:no msg,
+                            //  1:msg, 2:digits in txt files)
+  Int_t fDecoderVersion;   //setting whether to use the new decoder version 
+  AliTOFcalib *fTOFcalib;         // pointer to the TOF calibration info
+  AliTOFRawStream fTOFRawStream; // AliTOFRawStream variable
 
-  ClassDef(AliTOFClusterFinder,1) // To run TOF clustering
+  ClassDef(AliTOFClusterFinder,8) // To run TOF clustering
 };
 #endif