Fix coverity defect
[u/mrichter/AliRoot.git] / TRD / AliTRDReconstructor.h
index 3eafd50..0d960d2 100644 (file)
 #include "AliDetectorRecoParam.h"
 #include "AliTRDpidUtil.h"
 #include "AliTRDrecoParam.h"
+#include "AliTRDdigitsParam.h"
 
 class TClonesArray;
 class TTreeSRedirector;
 class AliRawReader;
+class AliTRDclusterizer;
 class AliTRDReconstructor: public AliReconstructor 
 {
 public:
@@ -31,8 +33,9 @@ public:
     ,kHLT            = BIT(4)
     ,kProcTracklets  = BIT(5) // process online tracklets
     ,kDebug          = BIT(6)
-    ,kOwner          = BIT(7)
-    ,kNsteer         = 7       // number of tasks
+    ,kClRadialCorr   = BIT(7) // toggle radial correction in clusters
+    ,kOwner          = BIT(8)
+    ,kNsteer         = 8      // number of tasks
   };
   AliTRDReconstructor();
   virtual ~AliTRDReconstructor();
@@ -41,15 +44,17 @@ public:
 
   virtual void        ConvertDigits(AliRawReader *rawReader, TTree *digitsTree) const;
   virtual AliTracker* CreateTracker() const;
-  TTreeSRedirector*   GetDebugStream(AliTRDrecoParam::ETRDReconstructionTask task) const { return task < AliTRDrecoParam::kTRDreconstructionTasks ? fDebugStream[task] : 0x0; }
+  TTreeSRedirector*   GetDebugStream(AliTRDrecoParam::ETRDReconstructionTask task) const { return task < AliTRDrecoParam::kTRDreconstructionTasks ? fDebugStream[task] : NULL; }
 
   virtual void        FillESD(AliRawReader *, TTree *clusterTree, AliESDEvent *esd) const { FillESD((TTree * )NULL, clusterTree, esd);                    }
   virtual void        FillESD(TTree *digitsTree, TTree *clusterTree, AliESDEvent *esd) const;
   static TClonesArray* GetClusters() {return fgClusters;}
   static TClonesArray* GetTracklets() {return fgTracklets;}
+  static Int_t        GetNTimeBins() {return fgNTimeBins;}
   Int_t               GetNdEdxSlices() const     { return (Int_t)AliTRDpidUtil::GetNdEdxSlices(GetPIDMethod());}
   AliTRDpidUtil::ETRDPIDMethod       GetPIDMethod() const       { return GetRecoParam()->IsPIDNeuralNetwork() ? AliTRDpidUtil::kNN : AliTRDpidUtil::kLQ;}
   static const AliTRDrecoParam* GetRecoParam() { return dynamic_cast<const AliTRDrecoParam*>(AliReconstructor::GetRecoParam(2)); }
+
   virtual Bool_t      HasDigitConversion() const { return fSteerParam&kDigitsConversion;  };
   Bool_t              IsCosmic() const { return GetRecoParam()->GetEventSpecie() & AliRecoParam::kCosmic;}
   Bool_t              IsWritingClusters() const  { return fSteerParam&kWriteClusters;}
@@ -58,33 +63,37 @@ public:
   Bool_t              IsSeeding() const          { return fSteerParam&kSeeding;}
   Bool_t              IsProcessingTracklets() const { return fSteerParam&kProcTracklets;}
   Bool_t              IsDebugStreaming() const { return fSteerParam&kDebug;}
+  Bool_t              UseClusterRadialCorrection() const { return fSteerParam&kClRadialCorr;}
 
   static void         Options(UInt_t steer=0);
   virtual void        Reconstruct(AliRawReader *rawReader, TTree *clusterTree) const;
   virtual void        Reconstruct(TTree *digitsTree, TTree *clusterTree) const;
 
-  static void         SetClusters(TClonesArray *clusters) {fgClusters = clusters;} 
-  static void         SetTracklets(TClonesArray *tracklets) {fgTracklets = tracklets;}
+  static void         SetClusters(TClonesArray *clusters)  { fgClusters = clusters;} 
+  static void         SetTracklets(TClonesArray *tracklets) { fgTracklets = tracklets;}
   void               SetOption(Option_t *opt);
 
 private:
   AliTRDReconstructor(const AliTRDReconstructor &r); //Not implemented
   AliTRDReconstructor& operator = (const AliTRDReconstructor&); //Not implemented
 
-  static Char_t    *fgSteerNames[kNsteer];//! steering names
-  static Char_t    *fgSteerFlags[kNsteer];//! steering flags
-  static Char_t    *fgTaskNames[AliTRDrecoParam::kTRDreconstructionTasks]; //! tasks names
-  static Char_t    *fgTaskFlags[AliTRDrecoParam::kTRDreconstructionTasks]; //! tasks flags
+  static Char_t const *fgSteerNames[kNsteer];//! steering names
+  static Char_t const *fgSteerFlags[kNsteer];//! steering flags
+  static Char_t const   *fgTaskNames[AliTRDrecoParam::kTRDreconstructionTasks]; //! tasks names
+  static Char_t const   *fgTaskFlags[AliTRDrecoParam::kTRDreconstructionTasks]; //! tasks flags
   UInt_t            fSteerParam;          // steering bits
   TTreeSRedirector *fDebugStream[AliTRDrecoParam::kTRDreconstructionTasks];// Debug Streamer container;
  
-  static TClonesArray *fgClusters;    // list of clusters for local reconstructor
-  static TClonesArray *fgTracklets;   // list of online tracklets for local reconstructor
+  static TClonesArray *fgClusters;    //  list of clusters for local reconstructor
+  static TClonesArray *fgTracklets;   //  list of online tracklets for local reconstructor
+  static Int_t         fgNTimeBins;   //  number of time bins as given by the clusterizer
+  AliTRDclusterizer   *fClusterizer;  //! instance of TRD clusterizer
 
-  ClassDef(AliTRDReconstructor, 2)    //  Class for the TRD reconstruction
+  ClassDef(AliTRDReconstructor, 4)    //  Class for the TRD reconstruction
 
 };
 
 
 
 #endif
+