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
23 class AliTOFClusterFinder : public TObject
26 enum {kTofMaxCluster=77777}; //maximal number of the TOF clusters
30 AliTOFClusterFinder(AliTOFcalib *calib);
31 AliTOFClusterFinder(AliRunLoader* runLoader, AliTOFcalib *calib);
32 AliTOFClusterFinder(const AliTOFClusterFinder &source); // copy constructor
33 AliTOFClusterFinder& operator=(const AliTOFClusterFinder &source); // ass. op.
34 virtual ~AliTOFClusterFinder();
36 void Digits2RecPoints(TTree* digitsTree, TTree* clusterTree);
37 void Digits2RecPoints(Int_t ievt);
38 void Digits2RecPoints(AliRawReader *rawReader, TTree *clustersTree);
39 void Digits2RecPoints(Int_t ievt, AliRawReader *rawReader);
40 void Raw2Digits(Int_t ievt, AliRawReader *rawReader); // temporary solution
41 void Raw2Digits(AliRawReader *rawReader, TTree* digitsTree);
47 void UnLoadClusters();
48 void SetVerbose(Int_t Verbose){fVerbose=Verbose;} // To set the verbose level
49 void SetDecoderVersion(Int_t version){fDecoderVersion=version;} // To set the decoder version
50 Bool_t GetDecoderVersion() const {return fDecoderVersion;} // To get the decoder version
51 UShort_t GetClusterVolIndex(Int_t *ind) const; //Volume Id getter
52 void GetClusterPars(Int_t *ind, Double_t *pos, Double_t *cov) const; //cluster par getter
55 AliRunLoader *fRunLoader; // Pointer to Run Loader
56 AliLoader *fTOFLoader; // Pointer to specific detector loader
58 TTree *fTreeD; // Digits tree
59 TTree *fTreeR; // Reconstructed points
61 AliTOFcluster *fTofClusters[kTofMaxCluster]; // pointers to the TOF clusters
63 TClonesArray *fDigits; // List of digits
64 TClonesArray *fRecPoints; // List of reconstructed points
66 Int_t fNumberOfTofClusters; // Number of TOF Clusters
70 //Int_t InsertCluster(Int_t *aa, Double_t *bb); // Fills TofClusters Array
71 //Int_t InsertCluster(Int_t *aa, Double_t *bb, Int_t *cc, Int_t d); // Fills TofClusters Array
72 Int_t InsertCluster(AliTOFcluster *tofCluster); // Fills TofClusters Array
73 Int_t FindClusterIndex(Double_t z) const; // Returns cluster index
74 void CalibrateRecPoint(); // Apply calibration pars to Clusters
76 Int_t fVerbose; //Verbose level (0:no msg, 1:msg, 2:digits in txt files)
77 Bool_t fDecoderVersion; //setting whether to use the new decoder version
78 // -true -> new version
79 // -false ->old version (default value!!)
80 AliTOFcalib *fTOFcalib; // pointer to the TOF calibration info
82 ClassDef(AliTOFClusterFinder,4) // To run TOF clustering