-#ifndef TRDclusterizer_h
-#define TRDclusterizer_h
+#ifndef ALITRDCLUSTERIZER_H
+#define ALITRDCLUSTERIZER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster finder base class //
+// //
+////////////////////////////////////////////////////////////////////////////
+
#include <TNamed.h>
-#include <TFile.h>
-///////////////////////////////////////////////////////
-// Finds and handles cluster //
-///////////////////////////////////////////////////////
+class TFile;
+class TTree;
+class TObjArray;
+
+class AliRunLoader;
+
+class AliTRD;
+class AliTRDcluster;
class AliTRDclusterizer : public TNamed {
AliTRDclusterizer();
AliTRDclusterizer(const Text_t* name, const Text_t* title);
- ~AliTRDclusterizer();
-
- virtual void Init();
- virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
- virtual Bool_t MakeCluster() = 0;
- virtual Bool_t WriteCluster();
+ AliTRDclusterizer(const AliTRDclusterizer &c);
+ virtual ~AliTRDclusterizer();
+ AliTRDclusterizer &operator=(const AliTRDclusterizer &c);
+
+ virtual void Copy(TObject &c) const;
+ virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
+ virtual Bool_t OpenInput(Int_t nEvent = 0);
+ virtual Bool_t OpenOutput();
+ virtual Bool_t MakeClusters() = 0;
+ virtual Bool_t WriteClusters(Int_t det);
+ void ResetRecPoints();
+
+ TObjArray *RecPoints();
+ virtual AliTRDcluster *AddCluster(Double_t *pos, Int_t timebin, Int_t det
+ , Double_t amp, Int_t *tracks
+ , Double_t *sig, Int_t iType, Float_t center = 0);
protected:
- TFile *fInputFile; //! AliROOT input file
-
- Int_t fEvent; //! Event number
-
- ClassDef(AliTRDclusterizer,1) // TRD-Cluster manager base class
-
-};
-
-//_____________________________________________________________________________
-class AliTRDcluster : public TObject {
-
-public:
-
- Int_t fDetector; // TRD detector number
-
- Int_t fTimeSlice; // Timeslice in chamber where cluster has been found
- Float_t fEnergy; // Charge sum of this cluster
-
- Float_t fX; // X coord in ALICE reference frame
- Float_t fY; // Y coord in ALICE reference frame
- Float_t fZ; // Z coord in ALICE reference frame
-
- Int_t fTracks[3]; // Track information
-
-public:
-
- AliTRDcluster() {};
- AliTRDcluster(Int_t *tracks, Int_t *cluster, Float_t energy, Float_t *pos);
- virtual ~AliTRDcluster() {};
-
- inline virtual Int_t *GetTracks() { return &fTracks[0]; }
+ Double_t CalcXposFromTimebin(Float_t timebin, Int_t idet, Int_t col, Int_t row);
+
+ AliRunLoader *fRunLoader; //! Run Loader
+ TTree *fClusterTree; //! Tree with the cluster
+ TObjArray *fRecPoints; //! Array of clusters
- ClassDef(AliTRDcluster,1) // Cluster for Transition Radiation Detector
+ ClassDef(AliTRDclusterizer,4) // TRD-Cluster manager base class
};