]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCClusterFinder.h
Updated SNM Glauber fit
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinder.h
index d95eeab48f86524b8e1cca64bf5b28317f630d7f..30301c4cb67f5b726560524462f8edf1c2efc6d3 100644 (file)
@@ -1,26 +1,32 @@
-// @(#) $Id$
-// Original: AliHLTClustFinderNew.h,v 1.13 2004/06/18 10:55:26 loizides 
+//-*- Mode: C++ -*-
+// $Id$
 
-#ifndef AliHLTTPC_CLUSTERFINDER
-#define AliHLTTPC_CLUSTERFINDER
+#ifndef ALIHLTTPCCLUSTERFINDER_H
+#define ALIHLTTPCCLUSTERFINDER_H
 //* This file is property of and copyright by the ALICE HLT Project        * 
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               *
 
-/** @file   AliHLTTPCClusterFinder.h
-    @author Anders Vestbo, Constantin Loizides
-           Kenneth Aamodt kenneth.aamodt@student.uib.no
-    @brief  Cluster Finder for the TPC
-*/
+/ @file   AliHLTTPCClusterFinder.h
+//  @author Anders Vestbo, Constantin Loizides
+//         Kenneth Aamodt kenneth.aamodt@student.uib.no
+//  @brief  HLT Cluster Finder for the TPC
+//  @note
 
 #include "AliHLTLogging.h"
 #include <vector>
 #include "AliHLTTPCTransform.h"
+#include "AliHLTTPCDigitData.h"
+#include "AliHLTTPCDigitReader.h"
+#include "AliTPCRecoParam.h"
+#include "AliHLTTPCClusterMCData.h"
+#include "AliHLTTPCRawCluster.h"
 
 class AliHLTTPCPad;
-class AliHLTTPCSpacePointData;
-class AliHLTTPCDigitReader;
+struct AliHLTTPCSpacePointData;
 class AliHLTTPCClusters;
+class AliTPCTransform;
+class AliTPCParam;
 
 /**
  * @class AliHLTTPCClusterFinder
@@ -120,6 +126,9 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   };
   typedef struct AliClusterData AliClusterData; //!
 
+  static Bool_t CompareWeights( const AliHLTTPCClusterMCWeight &mc1,  const AliHLTTPCClusterMCWeight &mc2 ){ return mc1.fWeight > mc2.fWeight; }
+  
+
   /** standard constructor */
   AliHLTTPCClusterFinder();
 
@@ -150,6 +159,11 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   /**  Fills the hw address list */
   Int_t FillHWAddressList(AliHLTUInt16_t *hwaddlist, Int_t maxHWAddress);
 
+ /**  Fills the mc info */
+  Int_t FillOutputMCInfo(AliHLTTPCClusterMCLabel * outputMCInfo, Int_t maxNumberOfClusterMCInfo);
+
+  Int_t FillOutputRaw(AliHLTTPCRawCluster* rawClusters, unsigned sizeInByte) const;
+
   /** Set the pointer to the outputbuffer */
   void SetOutputArray(AliHLTTPCSpacePointData *pt);
 
@@ -157,7 +171,7 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   Int_t GetNumberOfClusters() const {return fNClusters;}
 
   /** Returns the Ocuppancy limit */
-  Float_t GetOccupancyLimit() {return fOccupancyLimit;}
+  Float_t GetOccupancyLimit() const {return fOccupancyLimit;}
   
   // setters
   void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
@@ -168,6 +182,7 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   void SetDoPadSelection(Bool_t input){fDoPadSelection=input;}
   void SetLastTimeBin(Int_t ltb){fLastTimeBin=ltb;}
   void SetFirstTimeBin(Int_t ftb){fFirstTimeBin=ftb;}
+  void SetReleaseMemory( Bool_t v ){ fReleaseMemory = v;}
   void UpdateLastTimeBin(){fLastTimeBin=AliHLTTPCTransform::GetNTimeBins();}
 
 //---------------------------------- Under this line the old sorted clusterfinder functions can be found --------------------------------
@@ -183,15 +198,25 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   void SetMatchWidth(UInt_t i) {fMatch=i;}
   void SetSTDOutput(Bool_t f=kFALSE) {fStdout=f;}  
   void SetCalcErr(Bool_t f=kTRUE) {fCalcerr=f;}
-  void SetRawSP(Bool_t f=kFALSE) {fRawSP=f;}
+  void SetFillRawClusters(Bool_t f=kFALSE) {fFillRawClusters=f;}
   void SetReader(AliHLTTPCDigitReader* f){fDigitReader = f;}
+
+  void Set32BitFormat(Bool_t flag){f32BitFormat = flag;}
+
+  void SetDoMC(Bool_t flag){fDoMC = flag;}
   
   vector<AliHLTUInt16_t> fClustersHWAddressVector;  //! transient
   
   typedef vector<AliHLTTPCPad*> AliHLTTPCPadVector;
   
   vector<AliHLTTPCPadVector> fRowPadVector;     //! transient
+  
+  void FillMCClusterVector(vector<AliHLTTPCDigitData> *digitData);
+
+  vector<AliHLTTPCClusterMCWeight> GetClusterMCInfo() const {return fClusterMCVector;}
+
+  Bool_t UpdateCalibDB();
+
  protected: 
   /** copy constructor prohibited */
   AliHLTTPCClusterFinder(const AliHLTTPCClusterFinder&);
@@ -207,7 +232,7 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   Bool_t fDeconvPad;       //! deconv in pad direction
   Bool_t fStdout;          //! have print out in write clusters
   Bool_t fCalcerr;         //! calculate centroid sigmas
-  Bool_t fRawSP;           //! store centroids in raw system
+  Bool_t fFillRawClusters; //! store centroids in raw system in separate array
 
 
   Int_t fFirstRow;       //! first row
@@ -228,6 +253,12 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
   Bool_t fVectorInitialized;  //! flag to check if pad vector is initialized
  
   vector<AliHLTTPCClusters> fClusters;                             //! transient
+
+  vector<AliHLTTPCClusterMCLabel> fClustersMCInfo;                           //! transient
+
+  vector<AliHLTTPCDigitData> fMCDigits;                            //! transient
+
+  vector<AliHLTTPCRawCluster> fRawClusters;                        //! transient
   
   UInt_t* fNumberOfPadsInRow;                                      //! transient
   
@@ -245,11 +276,26 @@ class AliHLTTPCClusterFinder : public AliHLTLogging {
 
   Bool_t fChargeOfCandidatesFalling;                               //! transient
 
+  Bool_t f32BitFormat;                                             //! transient
+
+  Bool_t fDoMC;                                                    //! transient
+
+  vector<AliHLTTPCClusterMCWeight> fClusterMCVector;                               //! transient
+
+  AliTPCTransform * fOfflineTransform;                             //! transient
+
+  AliTPCParam   *fOfflineTPCParam;                                 //! transient
+
+  AliTPCRecoParam fOfflineTPCRecoParam;                            //! transient
+
+  Float_t fTimeMeanDiff;                                           //! transient
+
+  Bool_t fReleaseMemory; //! flag to release the memory after each event
 
 #ifdef do_mc
-  void GetTrackID(Int_t pad,Int_t time,Int_t *trackID);
+  void GetTrackID(Int_t pad,Int_t time,Int_t *trackID) const;
 #endif
   
-  ClassDef(AliHLTTPCClusterFinder,6) //Fast cluster finder
+  ClassDef(AliHLTTPCClusterFinder, 0) //Fast cluster finder
 };
 #endif