1 #ifndef ALITOFCLUSTERFINDER_H
2 #define ALITOFCLUSTERFINDER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5 // AliTOFClusterFinder Class
6 // Task: Transform digits/raw data to TOF Clusters, to fill TOF RecPoints
7 // and feed TOF tracking
11 #include "AliTOFRawStream.h"
25 class AliTOFClusterFinder : public TTask
28 enum {kTofMaxCluster=77777}; //maximal number of the TOF clusters
32 AliTOFClusterFinder(AliTOFcalib *calib);
33 AliTOFClusterFinder(AliRunLoader* runLoader, AliTOFcalib *calib);
34 AliTOFClusterFinder(const AliTOFClusterFinder &source); // copy constructor
35 AliTOFClusterFinder& operator=(const AliTOFClusterFinder &source); // ass. op.
36 virtual ~AliTOFClusterFinder();
38 void Digits2RecPoints(TTree* digitsTree, TTree* clusterTree);
39 void Digits2RecPoints(Int_t ievt);
40 void Digits2RecPoints(AliRawReader *rawReader, TTree *clustersTree);
41 void Digits2RecPoints(Int_t ievt, AliRawReader *rawReader);
42 void Raw2Digits(Int_t ievt, AliRawReader *rawReader); // temporary solution
43 void Raw2Digits(AliRawReader *rawReader, TTree* digitsTree);
49 void UnLoadClusters();
50 void SetVerbose(Int_t Verbose){fVerbose=Verbose;} // To set the verbose level
51 void SetDecoderVersion(Int_t version){fDecoderVersion=version;} // To set the decoder version
52 Int_t GetDecoderVersion() const {return fDecoderVersion;} // To get the decoder version
53 UShort_t GetClusterVolIndex(const Int_t * const ind) const; //Volume Id getter
54 void GetClusterPars(Int_t *ind, Double_t *pos, Double_t *cov) const; //cluster par getter
57 AliRunLoader *fRunLoader; // Pointer to Run Loader
58 AliLoader *fTOFLoader; // Pointer to specific detector loader
60 TTree *fTreeD; // Digits tree
61 TTree *fTreeR; // Reconstructed points
63 AliTOFcluster *fTofClusters[kTofMaxCluster]; // pointers to the TOF clusters
65 TClonesArray *fDigits; // List of digits
66 TClonesArray *fRecPoints; // List of reconstructed points
68 Int_t fNumberOfTofClusters; // Number of TOF Clusters
72 //Int_t InsertCluster(Int_t *aa, Double_t *bb); // Fills TofClusters Array
73 //Int_t InsertCluster(Int_t *aa, Double_t *bb, Int_t *cc, Int_t d); // Fills TofClusters Array
74 Int_t InsertCluster(AliTOFcluster *tofCluster); // Fills TofClusters Array
75 Int_t FindClusterIndex(Double_t z) const; // Returns cluster index
76 void CalibrateRecPoint(UInt_t timestamp = 0); // Apply calibration pars to Clusters
78 Int_t fVerbose; // Verbose level (0:no msg,
79 // 1:msg, 2:digits in txt files)
80 Int_t fDecoderVersion; //setting whether to use the new decoder version
81 AliTOFcalib *fTOFcalib; // pointer to the TOF calibration info
82 AliTOFRawStream fTOFRawStream; // AliTOFRawStream variable
84 ClassDef(AliTOFClusterFinder,6) // To run TOF clustering