]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/CALO/AliHLTCaloClusterizer.h
- fixing major bug in clusterizer causing almost all events to contain only one cluster
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloClusterizer.h
index ebfb0c5e66a156c3a49ef0f617e5eab49376d2a3..513964e07ccaec7d57e58cffcfa073a15b6558c2 100644 (file)
@@ -122,10 +122,24 @@ public:
   */\r
   AliHLTCaloRecPointDataStruct** GetRecPoints() const { return fRecPointArray; }\r
 \r
-  Int_t CheckDigits(AliHLTCaloRecPointDataStruct **recArray = 0, AliHLTCaloDigitDataStruct **digArray = 0, Int_t nRP = 0);\r
-\r
-  Int_t CheckDigits(AliHLTCaloRecPointDataStruct **recArray, AliHLTCaloDigitDataStruct *digArray, Int_t nRP = 0);\r
-\r
+  /** \r
+  * Sort the digits by energy\r
+  */\r
+  void SetSortDigitsByEnergy();\r
+  \r
+  /** \r
+  * Sort the digits by position\r
+  */\r
+  void SetSortDigitsByPosition();\r
+  \r
+  /** \r
+  * Set the sorting function (as required by stdlib's qsort) if you don't want to use the provided ones \r
+  */\r
+  void SetSortingFunction(Int_t (*compare)(const void*, const void*)) { fCompareFunction = compare; }\r
+  \r
+  /** Set the detector (PHOS or EMCAL) */\r
+  void SetDetector(TString det);\r
+  \r
 protected:\r
 \r
    /** \r
@@ -137,7 +151,31 @@ protected:
    * Check the rec point array size and resize the array if necessary\r
    */\r
   virtual Int_t CheckArray(); //COMMENT\r
+  \r
+  /** \r
+  * Sort the digits\r
+  */\r
+  void SortDigits();\r
 \r
+  /** \r
+  * Compare digits by position\r
+  */\r
+  static Int_t CompareDigitsByPosition(const void *dig0, const void *dig);\r
+  \r
+  /** \r
+  * Compare digits by energy\r
+  */\r
+  static Int_t CompareDigitsByEnergy(const void *dig0, const void *dig);\r
+  \r
+  /** \r
+  * Pointer to the compare function for the sorting of digits\r
+  */\r
+  //Int_t (AliHLTCaloClusterizer::*fCompareFunction)(const void*, const void*);\r
+  Int_t (*fCompareFunction)(const void*, const void*);\r
+  \r
+  /** Check if two modules are connected */\r
+  Bool_t AreEdgeCells(AliHLTCaloDigitDataStruct *digit0, AliHLTCaloDigitDataStruct *digit1);\r
+  \r
   /** Array of pointers to the rec point output */\r
   AliHLTCaloRecPointDataStruct **fRecPointArray; //COMMENT\r
 \r
@@ -185,17 +223,31 @@ protected:
 \r
   /** Number of digits in event */\r
   Int_t fNDigits;                                              //COMMENT\r
+  \r
+  /** Are we sorting digits by position? */\r
+  Bool_t fSortedByPosition; //COMMENT\r
+\r
+  /** Are we sorting digits by energy? */\r
+  Bool_t fSortedByEnergy; //COMMENT\r
+\r
+   /** Are we sorting at all? */\r
+   Bool_t fSortDigits; //COMMENT\r
+   \r
+   /** Is this running for EMCAL */\r
+   Bool_t fIsEMCAL; //COMMENT\r
 \r
 private:\r
 \r
   /** Default constructor, prohibited */\r
-  //AliHLTCaloClusterizer();                          // COMMENT\r
+  AliHLTCaloClusterizer();                          // COMMENT\r
   \r
   /** Copy constructor, prohibited */\r
-  //AliHLTCaloClusterizer (const AliHLTCaloClusterizer &); //COMMENT\r
+  AliHLTCaloClusterizer (const AliHLTCaloClusterizer &); //COMMENT\r
   \r
   /** Assignment operator, prohibited */\r
-  //AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer &); //COMMENT\r
+  AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer &); //COMMENT\r
+\r
+  UChar_t* fBuffer; // Buffer for storing of Cluster Data\r
 \r
   ClassDef(AliHLTCaloClusterizer, 0);\r
 \r