Added some more component and structs that were needed, compiles and load beautifully
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Nov 2009 01:56:30 +0000 (01:56 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 4 Nov 2009 01:56:30 +0000 (01:56 +0000)
HLT/CALO/AliHLTCaloClusterizer.cxx [new file with mode: 0644]
HLT/CALO/AliHLTCaloClusterizer.h [new file with mode: 0644]
HLT/CALO/AliHLTCaloDigitContainerDataStruct.h [new file with mode: 0644]
HLT/CALO/AliHLTCaloDigitDataStruct.h [new file with mode: 0644]
HLT/CALO/AliHLTCaloDigitMaker.cxx [new file with mode: 0644]
HLT/CALO/AliHLTCaloDigitMaker.h [new file with mode: 0644]
HLT/CALO/AliHLTCaloRecPointContainerStruct.h [new file with mode: 0644]
HLT/CALO/AliHLTCaloRecPointDataStruct.h [new file with mode: 0644]

diff --git a/HLT/CALO/AliHLTCaloClusterizer.cxx b/HLT/CALO/AliHLTCaloClusterizer.cxx
new file mode 100644 (file)
index 0000000..32db167
--- /dev/null
@@ -0,0 +1,235 @@
+// $Id$\r
+\r
+/**************************************************************************\r
+ * This file is property of and copyright by the ALICE HLT Project        * \r
+ * All rights reserved.                                                   *\r
+ *                                                                        *\r
+ * Primary Authors: Oystein Djuvsland                                     *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          * \r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+\r
+/** \r
+ * @file   AliHLTCaloClusterizer.cxx\r
+ * @author Oystein Djuvsland\r
+ * @date \r
+ * @brief  Clusterizer for PHOS HLT \r
+ */\r
+\r
+// see header file for class documentation\r
+// or\r
+// refer to README to build package\r
+// or\r
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt\r
+\r
+#include "AliHLTCaloClusterizer.h"\r
+//#include "AliHLTCaloBase.h"\r
+#include "AliHLTLogging.h"\r
+#include "TMath.h"\r
+#include "AliHLTCaloRecPointContainerStruct.h"\r
+#include "AliHLTCaloRecPointDataStruct.h"\r
+#include "AliHLTCaloDigitDataStruct.h"\r
+#include "AliHLTCaloDigitContainerDataStruct.h"\r
+#include "TClonesArray.h"\r
+\r
+//#include "AliHLTCaloConstants.h"\r
+\r
+#include "AliHLTCaloConstantsHandler.h";\r
+#include "AliHLTCaloConstants.h";\r
+\r
+//#include "AliHLTCaloClusterHandler.h"\r
+//#include "AliPHOSDigit.h"\r
+\r
+//#ifndef HAVENOT__PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam\r
+//#include "AliPHOSRecoParam.h"\r
+//#else\r
+//#include "AliPHOSRecoParamEmc.h"\r
+//ff#endif\r
+#include <iostream>\r
+\r
+\r
+using namespace std;\r
+\r
+ClassImp(AliHLTCaloClusterizer);\r
+\r
+AliHLTCaloClusterizer::AliHLTCaloClusterizer(TString det):\r
+  AliHLTCaloConstantsHandler(det),\r
+  fRecPointDataPtr(0),\r
+  fDigitDataPtr(0),\r
+  fEmcClusteringThreshold(0),\r
+  fEmcMinEnergyThreshold(0),\r
+  fEmcTimeGate(0),\r
+  fDigitsInCluster(0),\r
+  fDigitContainerPtr(0),\r
+  fMaxDigitIndexDiff(0)\r
+{\r
+  //See header file for documentation\r
+  fEmcClusteringThreshold = 0.2;\r
+  fEmcMinEnergyThreshold = 0.03;\r
+  fEmcTimeGate = 1.e-6 ;\r
+  \r
+  fMaxDigitIndexDiff = 2*fCaloConstants->GetNZROWSMOD();\r
+}//end\r
+\r
+\r
+AliHLTCaloClusterizer::~AliHLTCaloClusterizer()  \r
+{\r
+  //See header file for documentation\r
+}\r
+\r
+void \r
+AliHLTCaloClusterizer::SetRecPointDataPtr(AliHLTCaloRecPointDataStruct* recPointDataPtr)\r
+{\r
+  // See header file for documentation\r
+  fRecPointDataPtr = recPointDataPtr;\r
+}\r
+\r
+// void\r
+// AliHLTCaloClusterizer::SetRecoParameters(AliPHOSRecoParam* params)\r
+// {\r
+//   //see header file for documentation\r
+// #ifndef HAVE_NOT_PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam\r
+//   // the new AliPHOSRecoParam functions, available from revision\r
+//   //  fEmcClusteringThreshold = params->GetEMCClusteringThreshold();\r
+//   // fEmcMinEnergyThreshold = params->GetEMCMinE();\r
+//   //  fLogWeight = params->GetEMCLogWeight();\r
+//   params++;\r
+//   params--;\r
+// #else\r
+//   fEmcClusteringThreshold = params->GetClusteringThreshold();\r
+//   fEmcMinEnergyThreshold = params->GetMinE();\r
+//   fLogWeight = params->GetLogWeight();\r
+// #endif\r
+// }  \r
+\r
+Int_t \r
+AliHLTCaloClusterizer::ClusterizeEvent(UInt_t availableSize, UInt_t& totSize)\r
+{\r
+  //see header file for documentation\r
+  Int_t nRecPoints = 0;\r
+\r
+  UInt_t maxRecPointSize = sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... \r
+\r
+  //Clusterization starts\r
+  for(UInt_t i = 0; i < fDigitContainerPtr->fNDigits; i++)\r
+    { \r
+      fDigitsInCluster = 0;\r
+     \r
+      if(fDigitContainerPtr->fDigitDataStruct[i].fEnergy < fEmcClusteringThreshold)\r
+       {\r
+         continue;\r
+       }\r
+      if(availableSize < (totSize + maxRecPointSize)) \r
+       {\r
+         return -1; //Might get out of buffer, exiting\r
+       }\r
+\r
+      // First digit is placed at the fDigits member variable in the recpoint\r
+      fDigitDataPtr = &(fRecPointDataPtr->fDigits);\r
+\r
+      fRecPointDataPtr->fAmp = 0;\r
+      fRecPointDataPtr->fModule = fDigitContainerPtr->fDigitDataStruct[i].fModule;\r
+\r
+      // Assigning digit data to the digit pointer\r
+      fRecPointDataPtr->fDigits = fDigitContainerPtr->fDigitDataStruct[i];\r
+\r
+      // Incrementing the pointer to be ready for new entry\r
+      fDigitDataPtr++;\r
+\r
+      fRecPointDataPtr->fAmp += fDigitContainerPtr->fDigitDataStruct[i].fEnergy;\r
+      fDigitContainerPtr->fDigitDataStruct[i].fEnergy = 0;\r
+      fDigitsInCluster++;\r
+      nRecPoints++;\r
+\r
+      // Scanning for the neighbours\r
+      ScanForNeighbourDigits(i, fRecPointDataPtr);\r
+\r
+      totSize += sizeof(AliHLTCaloRecPointDataStruct) + (fDigitsInCluster-1)*sizeof(AliHLTCaloDigitDataStruct);   \r
+      fRecPointDataPtr->fMultiplicity = fDigitsInCluster;     \r
+\r
+      fRecPointDataPtr = reinterpret_cast<AliHLTCaloRecPointDataStruct*>(fDigitDataPtr);\r
+    }//end of clusterization\r
+\r
+   return nRecPoints;\r
+}\r
+\r
+void\r
+AliHLTCaloClusterizer::ScanForNeighbourDigits(Int_t index, AliHLTCaloRecPointDataStruct* recPoint)\r
+{\r
+  //see header file for documentation\r
+  Int_t max = TMath::Min((Int_t)fDigitContainerPtr->fNDigits, (Int_t)fMaxDigitIndexDiff+index);\r
+  Int_t min = TMath::Max(0, (Int_t)(index - (Int_t)fMaxDigitIndexDiff));\r
+\r
+  max = fDigitContainerPtr->fNDigits;\r
+  min = 0;\r
+  for(Int_t j = min; j < max; j++)\r
+    {\r
+      if(fDigitContainerPtr->fDigitDataStruct[j].fEnergy > fEmcMinEnergyThreshold)\r
+       {\r
+         if(j != index)\r
+           {\r
+             if(AreNeighbours(&(fDigitContainerPtr->fDigitDataStruct[index]),\r
+                              &(fDigitContainerPtr->fDigitDataStruct[j])))\r
+               {\r
+                 // Assigning value to digit ptr\r
+                 *fDigitDataPtr = fDigitContainerPtr->fDigitDataStruct[j];\r
+                 // Incrementing digit pointer to be ready for new entry\r
+                 fDigitDataPtr++;\r
+\r
+                 recPoint->fAmp += fDigitContainerPtr->fDigitDataStruct[j].fEnergy;\r
+                 fDigitContainerPtr->fDigitDataStruct[j].fEnergy = 0;        \r
+                 fDigitsInCluster++;\r
+                 ScanForNeighbourDigits(j, recPoint);\r
+               }\r
+           }\r
+       }\r
+    }\r
+  return;\r
+}\r
+\r
+Int_t \r
+AliHLTCaloClusterizer::AreNeighbours(AliHLTCaloDigitDataStruct* digit1, \r
+                                           AliHLTCaloDigitDataStruct* digit2)\r
+{\r
+  //see header file for documentation\r
+  if ( (digit1->fModule == digit2->fModule) /*&& (coord1[1]==coord2[1])*/ ) // inside the same PHOS module\r
+    { \r
+//       Int_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ );  \r
+//       Int_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); \r
+//       if (( coldiff <= 1   &&  rowdiff == 0 ) || ( coldiff == 0 &&  rowdiff <= 1 ))\r
+//     {\r
+//       cout << "Are neighbours: digit (E = "  << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << \r
+//         " is neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl;\r
+\r
+//       if(TMath::Abs(digit1->fTime - digit2->fTime ) < fEmcTimeGate)\r
+//         {\r
+//           return 1; \r
+//         }\r
+//     }\r
+\r
+      Float_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ );  \r
+      Float_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); \r
+      if (( coldiff <= 2.4   &&  rowdiff < 0.4 ) || ( coldiff < 0.4 &&  rowdiff <= 2.4 ))\r
+       {\r
+         //      cout << "Are neighbours: digit (E = "  << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << \r
+         //        " is neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl;\r
+\r
+         if(TMath::Abs(digit1->fTime - digit2->fTime ) < fEmcTimeGate)\r
+           {\r
+             return 1; \r
+           }\r
+       }\r
+      else\r
+       {\r
+         //  cout << "Not neighbours: digit (E = "  << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << \r
+         //  " is not neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl;\r
+       }\r
+    }\r
+  return 0;\r
+}\r
diff --git a/HLT/CALO/AliHLTCaloClusterizer.h b/HLT/CALO/AliHLTCaloClusterizer.h
new file mode 100644 (file)
index 0000000..5ba717e
--- /dev/null
@@ -0,0 +1,174 @@
+//-*- Mode: C++ -*-\r
+// $Id$\r
+\r
+/**************************************************************************\r
+ * This file is property of and copyright by the ALICE HLT Project        * \r
+ * All rights reserved.                                                   *\r
+ *                                                                        *\r
+ * Primary Authors: Oystein Djuvsland                                     *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          * \r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+\r
+#ifndef ALIHLTCALOCLUSTERIZER_H\r
+#define ALIHLTCALOCLUSTERIZER_H\r
+\r
+\r
+/**\r
+ * Class does clusterization in for Calorimeters on an event basis. It is intended \r
+ * for use in HLT, but can also be used offline\r
+ *\r
+ * @file   AliHLTCaloClusterizer.h\r
+ * @author Oystein Djuvsland\r
+ * @date\r
+ * @brief  Clusterizer for CALO HLT\r
+ */\r
+\r
+// see header file for class documentation\r
+// or\r
+// refer to README to build package\r
+// or\r
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt\r
+\r
+//#include "AliHLTCaloBase.h"\r
+\r
+#include "AliHLTCaloRecPointContainerStruct.h"\r
+#include "AliHLTCaloRecPointDataStruct.h"\r
+#include "AliHLTCaloDigitContainerDataStruct.h"\r
+#include "AliHLTCaloDigitDataStruct.h"\r
+#include "AliHLTCaloConstantsHandler.h"\r
+#include "TString.h"\r
+\r
+//#include "AliPHOSGeometry.h"\r
+\r
+class TClonesArray;\r
+//class AliPHOSDigit;\r
+//class AliPHOSRecoParamEmc;\r
+//class AliPHOSRecoParam;\r
+\r
+/** \r
+ * @class AliHLTCaloClusterizer\r
+ * Clusterizer for CALO HLT. The clusterizer takes digits as input, either\r
+ * in the form of a container of AliHLTCaloDigitDataStruct or a\r
+ * TClonesArray of AliPHOSDigit through an instance of a AliPHOSLoader\r
+ *\r
+ * @ingroup alihlt_calo\r
+ */\r
+//class AliHLTCaloClusterizer : public AliHLTCaloBase\r
+\r
+\r
+\r
+class AliHLTCaloClusterizer : public AliHLTCaloConstantsHandler\r
+{\r
+  \r
+public:\r
+  \r
+  /** Constructor */\r
+  AliHLTCaloClusterizer(TString det);    \r
+  \r
+  /** Destructor */\r
+  virtual ~AliHLTCaloClusterizer();\r
+\r
+//   /** Copy constructor */  \r
+//   AliHLTCaloClusterizer(const AliHLTCaloClusterizer &) : \r
+//     //    AliHLTCaloBase(),\r
+//     AliHLTCaloConstantsHandler(new TString("BALLE")),\r
+//     fRecPointDataPtr(0),\r
+//     fDigitDataPtr(0),\r
+//     fEmcClusteringThreshold(0),\r
+//     fEmcMinEnergyThreshold(0),\r
+//     fEmcTimeGate(0),\r
+//     fDigitsInCluster(0),\r
+//     fDigitContainerPtr(0),\r
+//     fMaxDigitIndexDiff(2*NZROWSMOD)\r
+//   {\r
+//     //Copy constructor not implemented\r
+//   }\r
+  \r
+  /** Assignment */\r
+  AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer)\r
+  {\r
+    //Assignment\r
+    return *this; \r
+  }\r
+  \r
+  /** Set digit container */\r
+  void SetDigitContainer(AliHLTCaloDigitContainerDataStruct* digitContainerPtr)\r
+  { fDigitContainerPtr = digitContainerPtr; }\r
+\r
+  /** Set rec point data buffer */\r
+  void SetRecPointDataPtr(AliHLTCaloRecPointDataStruct* recPointDataPtr);\r
+\r
+  /** Set reco parameters */\r
+  //  void SetRecoParameters(AliPHOSRecoParam* recoPars);\r
+\r
+  /** Set emc clustering threshold */\r
+  void SetEmcClusteringThreshold(Float_t threshold) { fEmcClusteringThreshold = threshold; }\r
+\r
+  /** Set emc min energy threshold */\r
+  void SetEmcMinEnergyThreshold(Float_t threshold) { fEmcMinEnergyThreshold = threshold; }\r
+\r
+  /** Set emc time gate */\r
+  void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; }\r
+  \r
+  /** Starts clusterization of the event */ \r
+  virtual Int_t ClusterizeEvent(UInt_t availableSize, UInt_t& totSize);\r
+  \r
+  /**\r
+   * For a given digit this digit scans for neighbouring digits which \r
+   * passes the threshold for inclusion in a rec point. If one is found \r
+   * it is added to the current rec point\r
+   * @param digIndex index of the digit in the digit container\r
+   * @param recPoint pointer to the current rec point\r
+   */\r
+  virtual void ScanForNeighbourDigits(Int_t digIndex, AliHLTCaloRecPointDataStruct* recPoint);\r
+\r
+  /**\r
+   * Checks if two digits are neighbours\r
+   * @param d1 first digit\r
+   * @param d2 second digit\r
+   */\r
+  virtual Int_t AreNeighbours(AliHLTCaloDigitDataStruct* d1, AliHLTCaloDigitDataStruct* d2);\r
+\r
+\r
+protected:\r
+\r
+  /** Pointer to the rec point output */\r
+  AliHLTCaloRecPointDataStruct* fRecPointDataPtr;              //! transient\r
+\r
+  /** Pointer to the digit output */\r
+  AliHLTCaloDigitDataStruct* fDigitDataPtr;                    //! transient\r
+\r
+  /** Energy threshold for starting a cluster for the calorimeter */\r
+  Float_t fEmcClusteringThreshold;                             //COMMENT\r
+\r
+  /** Energy threshold for including a crystal in a cluster */\r
+  Float_t fEmcMinEnergyThreshold;                              //COMMENT\r
+\r
+  /** Maximum time difference for inclusion in a rec point */\r
+  Float_t fEmcTimeGate;                                        //COMMENT\r
+\r
+  /** Counts the digits in a rec point */\r
+  Int_t fDigitsInCluster;                                      //COMMENT\r
+\r
+  /** Contains the digits from one event */\r
+  AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr;      //! transient\r
+\r
+  /** Maximum difference in index to be a neighbour */\r
+  Int_t fMaxDigitIndexDiff;                                    //COMMENT\r
+\r
+private:\r
+  AliHLTCaloClusterizer();\r
+\r
+  ClassDef(AliHLTCaloClusterizer, 0);\r
+\r
+\r
+};\r
+\r
+#endif\r
diff --git a/HLT/CALO/AliHLTCaloDigitContainerDataStruct.h b/HLT/CALO/AliHLTCaloDigitContainerDataStruct.h
new file mode 100644 (file)
index 0000000..c8da4c3
--- /dev/null
@@ -0,0 +1,66 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTCaloDigitContainerDataStruct.h 35107 2009-09-30 01:45:06Z phille $
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Oystein Djuvsland                                                      *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+x * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          * 
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+
+#ifndef ALIHLTCALODIGITCONTAINERSTRUCT_H
+#define ALIHLTCALODIGITCONTAINERSTRUCT_H
+
+/**
+ * Digit data struct for CALO HLT
+ *
+ * @file   AliHLTCaloDigitContainerDataStruct.h
+ * @author Oystein Djuvsland
+ * @date
+ * @brief  Digit container data struct for CALO HLT
+ */
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "Rtypes.h"
+#include "AliHLTCaloDigitDataStruct.h"
+#include "AliHLTCaloConstant.h"
+
+
+using namespace CaloHLTConst;
+
+/**
+ * @struct AliHLTCaloDigitContainerDataStruct
+ * Digit container data struct for Calo HLT
+ *
+ * @ingroup alihlt_calo
+ */
+struct AliHLTCaloDigitContainerDataStruct
+{
+
+  /** Number of digits in container */
+  UInt_t fNDigits;                                     //COMMENT
+
+  /** Module number */
+  UInt_t fCaloModule;                                  //COMMENT
+
+  /** Array of digits in container */
+  AliHLTCaloDigitDataStruct fDigitDataStruct[NXCOLUMNSRCU*NZROWSRCU*NGAINS];    //COMMENT
+
+};
+
+
+#endif
diff --git a/HLT/CALO/AliHLTCaloDigitDataStruct.h b/HLT/CALO/AliHLTCaloDigitDataStruct.h
new file mode 100644 (file)
index 0000000..d357158
--- /dev/null
@@ -0,0 +1,87 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTCaloDigitDataStruct.h 35319 2009-10-07 15:27:09Z odjuvsla $
+
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Oystein Djuvsland                                     *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#ifndef ALIHLTCALODIGITDATASTRUCT_H
+#define ALIHLTCALODIGITDATASTRUCT_H
+
+#include "Rtypes.h"
+
+/**
+ * Digit struct for Calo HLT
+ *
+ * @file   AliHLTCaloDigitDataStruct.h
+ * @author Oystein Djuvsland
+ * @date
+ * @brief  Digit struct for calo HLT
+ */
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+/**
+ * @struct AliHLTCaloDigitDataStruct
+ * Digit struct for Calo HLT
+ *
+ * @ingroup alihlt_calo
+ */
+struct AliHLTCaloDigitDataStruct
+{
+  /** The x coordinate */
+  UShort_t fX;
+
+  /** The z coordinate */
+  UShort_t fZ;
+
+  /** x position in local coordinates*/
+  Float_t fLocX;
+
+  /** z position in local coordinates*/
+  Float_t fLocZ;
+
+  /** The module number */
+  Int_t fModule;
+
+  /** The amplitude in ADC counts */
+  Float_t fAmplitude;
+
+  /** The time in sample count */ 
+  Float_t fTime;
+
+  /* The energy in GeV */
+  Float_t fEnergy;
+
+  /** The gain */
+  Int_t fGain;
+  
+  /** The crazyness */
+  Int_t fCrazyness; 
+
+  /** The baseline */
+  Float_t fBaseline;
+
+  /** Energy from overflow in channel? */
+  Bool_t fOverflow;
+
+};
+
+#endif
+
diff --git a/HLT/CALO/AliHLTCaloDigitMaker.cxx b/HLT/CALO/AliHLTCaloDigitMaker.cxx
new file mode 100644 (file)
index 0000000..785dac6
--- /dev/null
@@ -0,0 +1,296 @@
+// $Id$\r
+\r
+/**************************************************************************\r
+ * This file is property of and copyright by the ALICE HLT Project        * \r
+ * All rights reserved.                                                   *\r
+ *                                                                        *\r
+ * Primary Authors: Oystein Djuvsland                                     *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          * \r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+ /** \r
+ * @file   AliHLTCALOClusterizer.cxx\r
+ * @author Oystein Djuvsland\r
+ * @date \r
+ * @brief  Digit maker for CALO HLT  \r
+ */\r
+  \r
+\r
+    \r
+\r
+// see header file for class documentation\r
+// or\r
+// refer to README to build package\r
+// or\r
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt\r
+\r
+#include "AliHLTCaloDigitMaker.h"\r
+\r
+#include "AliHLTCaloConstants.h"\r
+#include "AliHLTCaloMapper.h"\r
+\r
+#include "AliHLTCaloChannelDataStruct.h"\r
+#include "AliHLTCaloChannelDataHeaderStruct.h"\r
+#include "AliHLTCaloDigitDataStruct.h"\r
+#include "AliHLTCaloSharedMemoryInterfacev2.h" // added by PTH\r
+//#include "AliPHOSEMCAGeometry.h"\r
+#include "TH2F.h"\r
+#include "AliHLTCaloConstantsHandler.h"\r
+#include "AliHLTCaloConstants.h"\r
+\r
+ClassImp(AliHLTCaloDigitMaker);\r
+\r
+//using namespace CaloHLTConst;\r
+\r
+AliHLTCaloDigitMaker::AliHLTCaloDigitMaker(TString det) :\r
+  AliHLTCaloConstantsHandler(det),\r
+  fShmPtr(0),\r
+  fDigitStructPtr(0),\r
+  fDigitCount(0),\r
+  fOrdered(true),\r
+  fMapperPtr(0),\r
+  fHighGainFactors(0),\r
+  fLowGainFactors(0),\r
+  fBadChannelMask(0),\r
+  fChannelBook(0)\r
+{\r
+  //BALLE BALLE\r
+  \r
+  //Must set this in the child instance\r
+  \r
+  // See header file for documentation\r
+\r
+  fShmPtr = new AliHLTCaloSharedMemoryInterfacev2();\r
+\r
+  fHighGainFactors = new Float_t*[fCaloConstants->GetNXCOLUMNSMOD()];\r
+  fLowGainFactors = new Float_t*[fCaloConstants->GetNXCOLUMNSMOD()];\r
+\r
+  fBadChannelMask = new Float_t**[fCaloConstants->GetNXCOLUMNSMOD()];\r
+\r
+  fChannelBook= new AliHLTCaloDigitDataStruct**[fCaloConstants->GetNXCOLUMNSMOD()];\r
+\r
+  for(int x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)\r
+    {\r
+      fHighGainFactors[x] = new Float_t[fCaloConstants->GetNZROWSMOD()];\r
+      fLowGainFactors[x] = new Float_t[fCaloConstants->GetNZROWSMOD()];\r
+\r
+      fBadChannelMask[x] = new Float_t*[fCaloConstants->GetNZROWSMOD()];\r
+\r
+      fChannelBook[x] = new AliHLTCaloDigitDataStruct*[fCaloConstants->GetNZROWSMOD()];\r
+\r
+      for(int z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)\r
+       {\r
+\r
+         fHighGainFactors[x][z] = 0.005;\r
+         fLowGainFactors[x][z] = 0.08;\r
+        \r
+         fBadChannelMask[x][z] = new Float_t[fCaloConstants->GetNGAINS()];\r
+         fBadChannelMask[x][z][fCaloConstants->GetHIGHGAIN()] = 1;\r
+         fBadChannelMask[x][z][fCaloConstants->GetLOWGAIN()] = 1; \r
+         \r
+         fChannelBook[x][z] = 0;\r
+         \r
+       }\r
+    }    \r
+  \r
+  //Must be set in child instance\r
+//fMapperPtr = new AliHLTCaloMapper(det);\r
+}\r
+   \r
+AliHLTCaloDigitMaker::~AliHLTCaloDigitMaker() \r
+{\r
+  //See header file for documentation\r
+}\r
+\r
+Int_t\r
+AliHLTCaloDigitMaker::MakeDigits(AliHLTCaloChannelDataHeaderStruct* channelDataHeader, AliHLTUInt32_t availableSize)\r
+{\r
+  //See header file for documentation\r
+  \r
+  Int_t j = 0;\r
+  UInt_t totSize = sizeof(AliHLTCaloDigitDataStruct);\r
+  \r
+//   Int_t xMod = -1;\r
+//   Int_t zMod = -1;\r
+  \r
+  UShort_t coord1[4];\r
+  UShort_t coord2[4];\r
+  Float_t locCoord[3];\r
+  \r
+  \r
+  AliHLTCaloChannelDataStruct* currentchannel = 0;\r
+  AliHLTCaloChannelDataStruct* currentchannelLG = 0;  \r
+  AliHLTCaloChannelDataStruct* tmpchannel = 0;\r
+  \r
+  fShmPtr->SetMemory(channelDataHeader);\r
+  currentchannel = fShmPtr->NextChannel();\r
+\r
+  while(currentchannel != 0)\r
+    {\r
+      if(availableSize < totSize) return -1;\r
+\r
+      fMapperPtr->GetChannelCoord(currentchannel->fChannelID, coord1);\r
+      \r
+      tmpchannel = currentchannel;\r
+         \r
+      if(coord1[2] == fCaloConstants->GetHIGHGAIN()) // We got a completely new crystal\r
+       {\r
+         fMapperPtr->GetLocalCoord(currentchannel->fChannelID, locCoord);\r
+         if(UseDigit(coord1, currentchannel))\r
+           {\r
+             AddDigit(currentchannel, coord1, locCoord);\r
+             j++;            \r
+             totSize += sizeof(AliHLTCaloDigitDataStruct);\r
+           }\r
+         currentchannel = fShmPtr->NextChannel(); // Get the next channel\r
+       }\r
+      else if(coord1[2] == fCaloConstants->GetLOWGAIN())\r
+       {\r
+         fMapperPtr->GetLocalCoord(currentchannel->fChannelID, locCoord);\r
+         if(UseDigit(coord1, currentchannel))\r
+           {\r
+             AddDigit(currentchannel, coord1, locCoord);\r
+             j++;            \r
+             totSize += sizeof(AliHLTCaloDigitDataStruct);\r
+           }\r
+         currentchannel = fShmPtr->NextChannel(); // Get the next channel\r
+       }\r
+    }\r
+\r
+  fDigitCount += j;\r
+  return fDigitCount; \r
+}\r
+\r
+void \r
+AliHLTCaloDigitMaker::SetGlobalHighGainFactor(Float_t factor)\r
+{\r
+  //See header file for documentation\r
+  for(int x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)\r
+    {\r
+      for(int z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)\r
+       {\r
+         fHighGainFactors[x][z] = factor;\r
+       }\r
+    }\r
+}\r
+\r
+void\r
+AliHLTCaloDigitMaker::SetGlobalLowGainFactor(Float_t factor)\r
+{\r
+  //See header file for documentation\r
+  for(int x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)\r
+    {\r
+      for(int z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)\r
+       {\r
+         fLowGainFactors[x][z] = factor;\r
+       }\r
+    }\r
+}\r
+\r
+void\r
+AliHLTCaloDigitMaker::SetBadChannelMask(TH2F* badChannelHGHist, TH2F* badChannelLGHist, Float_t qCut)\r
+{\r
+ for(int x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)\r
+    {\r
+      for(int z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)\r
+       {\r
+         if(badChannelHGHist->GetBinContent(x, z) < qCut && badChannelHGHist->GetBinContent(x, z) > 0)\r
+           {\r
+             fBadChannelMask[x][z][fCaloConstants->GetHIGHGAIN()] = 1;\r
+           }\r
+         else\r
+           {\r
+             fBadChannelMask[x][z][fCaloConstants->GetHIGHGAIN()] = 0;\r
+           }\r
+         if(badChannelLGHist->GetBinContent(x, z) < qCut && badChannelLGHist->GetBinContent(x, z) > 0)\r
+           {\r
+             fBadChannelMask[x][z][fCaloConstants->GetLOWGAIN()] = 0;\r
+           }\r
+         else\r
+           {\r
+             fBadChannelMask[x][z][fCaloConstants->GetLOWGAIN()] = 0;\r
+           }\r
+       }\r
+    }\r
+}\r
+\r
+void\r
+AliHLTCaloDigitMaker::Reset()\r
+{\r
+  fDigitCount = 0;\r
+  for(int x = 0; x < fCaloConstants->GetNXCOLUMNSMOD(); x++)\r
+    {\r
+      for(int z = 0; z < fCaloConstants->GetNZROWSMOD(); z++)\r
+       {\r
+         fChannelBook[x][z] = 0;\r
+       }\r
+    }    \r
+\r
+}\r
+\r
+\r
+void AliHLTCaloDigitMaker::AddDigit(AliHLTCaloChannelDataStruct* channelData, UShort_t* channelCoordinates, Float_t* localCoordinates)\r
+{\r
+\r
+  fChannelBook[channelCoordinates[0]][channelCoordinates[0]] = fDigitStructPtr;\r
+\r
+  fDigitStructPtr->fX = channelCoordinates[0];\r
+  fDigitStructPtr->fZ = channelCoordinates[1];\r
+\r
+  fDigitStructPtr->fLocX = localCoordinates[0];\r
+  fDigitStructPtr->fLocZ = localCoordinates[1];\r
+\r
+  if(channelCoordinates[2] == fCaloConstants->GetHIGHGAIN() )\r
+    {\r
+      fDigitStructPtr->fEnergy = channelData->fEnergy*fHighGainFactors[channelCoordinates[0]][channelCoordinates[1]];\r
+      if(channelData->fEnergy >= 1023)\r
+       {\r
+         fDigitStructPtr->fOverflow = true;\r
+       }\r
+      //       printf("HG channel (x = %d, z = %d) with amplitude: %f --> Digit with energy: %f \n", channelCoordinates[0], channelCoordinates[1], channelData->fEnergy, fDigitStructPtr->fEnergy);\r
+    }\r
+  else\r
+    {\r
+      fDigitStructPtr->fEnergy = channelData->fEnergy*fLowGainFactors[channelCoordinates[0]][channelCoordinates[1]];\r
+      if(channelData->fEnergy >= 1023)\r
+       {\r
+         fDigitStructPtr->fOverflow = true;\r
+       }\r
+      //       printf("LG channel (x = %d, z = %d) with amplitude: %f --> Digit with energy: %f\n", channelCoordinates[0], channelCoordinates[1], channelData->fEnergy, fDigitStructPtr->fEnergy); \r
+    }\r
+  fDigitStructPtr->fTime = channelData->fTime * 0.0000001; //TODO\r
+  fDigitStructPtr->fCrazyness = channelData->fCrazyness;\r
+  fDigitStructPtr->fModule = channelCoordinates[3];\r
+  fDigitStructPtr++;\r
+}\r
+\r
+bool AliHLTCaloDigitMaker::UseDigit(UShort_t *channelCoordinates, AliHLTCaloChannelDataStruct *channel) \r
+{\r
+  AliHLTCaloDigitDataStruct *tmpDigit = fChannelBook[channelCoordinates[0]][channelCoordinates[1]];\r
+  if(tmpDigit)\r
+    {\r
+      if(channelCoordinates[2] == fCaloConstants->GetLOWGAIN())\r
+       {\r
+         if(tmpDigit->fOverflow)\r
+           {\r
+             return true;\r
+           }\r
+         return false;\r
+       }\r
+      else\r
+       {\r
+         if(channel->fEnergy >= fCaloConstants->GetMAXBINVALUE() )\r
+           {\r
+             return false;\r
+           }\r
+         return true;\r
+       }\r
+    }\r
+  return true;\r
+}\r
diff --git a/HLT/CALO/AliHLTCaloDigitMaker.h b/HLT/CALO/AliHLTCaloDigitMaker.h
new file mode 100644 (file)
index 0000000..f0bcb7c
--- /dev/null
@@ -0,0 +1,194 @@
+//-*- Mode: C++ -*-\r
+// $Id$\r
+\r
+\r
+/**************************************************************************\r
+ * This file is property of and copyright by the ALICE HLT Project        *\r
+ * All rights reserved.                                                   *\r
+ *                                                                        *\r
+ * Primary Authors: Oystein Djuvsland                                     *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          *\r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+#ifndef ALIHLTCALODIGITMAKER_H\r
+#define ALIHLTCALODIGITMAKER_H\r
+\r
+/**\r
+ * Class makes digits from information from raw data\r
+ *\r
+ * @file   AliHLTCaloDigitMaker.h\r
+ * @author Oystein Djuvsland\r
+ * @date\r
+ * @brief  Digit maker for Calo HLT\r
+ */\r
+\r
+// see below for class documentation\r
+// or\r
+// refer to README to build package\r
+// or\r
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt\r
+\r
+//#include "AliHLTCaloBase.h"\r
+#include "AliHLTCaloConstants.h"\r
+#include "AliHLTCaloDigitDataStruct.h"\r
+#include "AliHLTCaloChannelDataStruct.h"\r
+#include "AliHLTDataTypes.h"\r
+#include "TString.h"\r
+#include "AliHLTCaloConstantsHandler.h"\r
+\r
+/**\r
+ * @class AliHLTCaloDigitMaker\r
+ * Digit maker for CALO HLT. Takes input from AliHLTCaloRawAnalyzer, and \r
+ * outputs a block of AliHLTCaloDigitDataStruct container\r
+ * @ingroup alihlt_calo\r
+ */\r
+\r
+class TH2F;\r
+class AliHLTCaloSharedMemoryInterfacev2; // added by PTH\r
+class AliHLTCaloChannelDataHeaderStruct;\r
+class AliHLTCaloMapper;\r
+class TString;\r
+\r
+//using namespace CaloHLTConst;\r
+//class AliHLTCaloDigitMaker : public AliHLTCaloBase\r
+\r
+\r
+\r
+class AliHLTCaloDigitMaker : public AliHLTCaloConstantsHandler\r
+{\r
+\r
+public:\r
+\r
+  /** Constructor */\r
+  AliHLTCaloDigitMaker(TString det);\r
+\r
+  /** Destructor */\r
+  virtual ~AliHLTCaloDigitMaker();\r
+\r
+//   /** Copy constructor */  \r
+//   AliHLTCaloDigitMaker(const AliHLTCaloDigitMaker &) : \r
+//     //    AliHLTCaloBase(),\r
+//     fShmPtr(0),\r
+//     fDigitStructPtr(0),\r
+//     fDigitCount(0),\r
+//     fOrdered(true),\r
+//     fMapperPtr(0),\r
+//     fHighGainFactors(0),\r
+//     fLowGainFactors(0),\r
+//     fBadChannelMask(0),\r
+//     fChannelBook(0)\r
+//   {\r
+//     //Copy constructor not implemented\r
+//   }\r
+  \r
+  /** Assignment */\r
+  AliHLTCaloDigitMaker & operator = (const AliHLTCaloDigitMaker)\r
+  {\r
+    //Assignment\r
+    return *this; \r
+  }\r
+\r
+  /**\r
+   * Sets the pointer to the output\r
+   * @param the output pointer\r
+   */\r
+  void SetDigitDataPtr(AliHLTCaloDigitDataStruct *digitDataPtr) \r
+  { fDigitStructPtr = digitDataPtr; }\r
+\r
+  /**\r
+   * Set the global high gain conversion factory \r
+   * @param factor is the conversion factor\r
+   */\r
+  void SetGlobalHighGainFactor(Float_t factor);\r
+\r
+  /**\r
+   * Set the global low gain conversion factory \r
+   * @param factor is the conversion factor\r
+   */\r
+  void SetGlobalLowGainFactor(Float_t factor);\r
+\r
+  /**\r
+   * Make the digits for one event.\r
+   * @param channelDataHeader is the data header from the AliHLTCaloRawAnalyzer\r
+   * @return the number of digits found\r
+   */\r
+  Int_t MakeDigits(AliHLTCaloChannelDataHeaderStruct* channelDataHeader, AliHLTUInt32_t availableSize);\r
+\r
+\r
+  /**\r
+   * Set the mask for dead channels\r
+   * @param badChannelHGHist is a pointer to a high gain bad channel histogram\r
+   * @param badChannelLGHist is a pointer to a low gain bad channel histogram\r
+   * @param qCut is the cut \r
+   */\r
+  void SetBadChannelMask(TH2F* badChannelHGHist, TH2F* badChannelLGHist, Float_t qCut);\r
+\r
+  /**\r
+   * Set ordering of gains or not\r
+   */\r
+  void SetOrdered(bool val) { fOrdered = val; }\r
+  \r
+  void Reset();\r
+\r
+private:\r
+  \r
+  AliHLTCaloDigitMaker();\r
+  \r
+  /**\r
+   * Add a new digit\r
+   * @param channelData is the channel data\r
+   * @param coordinates is the coordinates of the channel, including gain and module\r
+   */\r
+  void AddDigit(AliHLTCaloChannelDataStruct* channelData, UShort_t* channelCoordinates, Float_t* localCoordinates);\r
+\r
+  /**\r
+   * Check if we already have this crystal. If so, keep the high gain as long as it \r
+   * is not in overflow. \r
+   * @param channelCoordinates is a array of coordinates for the channel.\r
+   * @param channel is a pointer to a struct containing channel information\r
+   * @return true if we should use the digit. \r
+   */\r
+  bool UseDigit(UShort_t *channelCoordinates, AliHLTCaloChannelDataStruct *channel);\r
+\r
+\r
+  /** Pointer to shared memory interface */\r
+  AliHLTCaloSharedMemoryInterfacev2* fShmPtr;                    //! transient\r
+\r
+  /** Pointer to the AliHLTCaloDigitDataStruct */\r
+  AliHLTCaloDigitDataStruct *fDigitStructPtr;                    //! transient\r
+\r
+  /** Digit count */\r
+  Int_t fDigitCount;                                             //COMMENT\r
+\r
+  /** Are the gains ordered? */\r
+  bool fOrdered;                                                 //COMMENT\r
+\r
+  /** Mapper */\r
+  AliHLTCaloMapper* fMapperPtr;                                  //COMMENT\r
+\r
+  /** High gain energy conversion factors */\r
+  Float_t **fHighGainFactors;                                    //! transient\r
+\r
+  /** Low gain energy conversion factors */\r
+  Float_t **fLowGainFactors;                                     //!transient\r
+\r
+  /** Bad channel mask */\r
+  Float_t ***fBadChannelMask;                                    //! transient\r
+\r
+  /** Channel book keeping variable */\r
+  AliHLTCaloDigitDataStruct ***fChannelBook;                     //! transient\r
+\r
+\r
+  ClassDef(AliHLTCaloDigitMaker, 0); \r
+\r
+};\r
+\r
+\r
+#endif\r
\r
diff --git a/HLT/CALO/AliHLTCaloRecPointContainerStruct.h b/HLT/CALO/AliHLTCaloRecPointContainerStruct.h
new file mode 100644 (file)
index 0000000..bfb6d7d
--- /dev/null
@@ -0,0 +1,52 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTCaloRecPointContainerStruct.h 29824 2008-11-10 13:43:55Z richterm $
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Oystein Djuvsland                                                      *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          * 
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#ifndef ALIHLTCALORECPOINTCOINTAINERSTRUCT_H
+#define ALIHLTCALORECPOINTCOINTAINERSTRUCT_H
+/**
+ * Rec point container struct for CALO HLT
+ *
+ * @file   AliHLTCaloRecPointContainerStruct.h
+ * @author Oystein Djuvsland
+ * @date
+ * @brief  Rec point container struct for CALO HLT
+ */
+
+#include "AliHLTCaloRecPointDataStruct.h"
+
+/**
+ * @struct AliHLTCaloRecPointContainerStruct
+ * Rec point container struct for CALO HLT
+ *
+ * @ingroup alihlt_calo
+ */
+struct AliHLTCaloRecPointContainerStruct
+{
+
+  /** The CALO module number */
+  UInt_t fCaloModule;
+
+  /** The number of rec points */
+  UInt_t fNRecPoints; 
+
+  /** Array of rec points in the container */
+  AliHLTCaloRecPointDataStruct fRecPointArray[100];
+
+};
+
+#endif
diff --git a/HLT/CALO/AliHLTCaloRecPointDataStruct.h b/HLT/CALO/AliHLTCaloRecPointDataStruct.h
new file mode 100644 (file)
index 0000000..fba471c
--- /dev/null
@@ -0,0 +1,88 @@
+//-*- Mode: C++ -*-
+// $Id: AliHLTCaloRecPointDataStruct.h 29824 2008-11-10 13:43:55Z richterm $
+
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Oystein Djuvsland                                                      *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          * 
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#ifndef ALIHLTCALORECPOINTDATASTRUCT_H
+#define ALIHLTCALORECPOINTDATASTRUCT_H
+
+/**
+ * Rec point data struct for CALO HLT
+ *
+ * @file   AliHLTCaloRecPointDataStruct.h
+ * @author Oystein Djuvsland
+ * @date
+ * @brief  Rec point data struct for CALO HLT
+ */
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "AliHLTCaloDigitDataStruct.h"
+
+/**
+ * @struct AliHLTCaloRecPointDataStruct
+ * Rec point data struct for Calo HLT
+ *
+ * @ingroup alihlt_calo
+ */
+struct AliHLTCaloRecPointDataStruct
+{
+
+  //AliHLTUInt8_t fMultiplicity; 
+  /** Multiplicity of digits in the rec point */
+  UInt_t fMultiplicity;                       //COMMENT
+
+  /** x coordinate */
+  Float_t fX;                                 //COMMENT
+
+  /** z coordinate */ 
+  Float_t fZ;                                 //COMMENT
+
+  /** Module number */
+  Int_t fModule;                              //COMMENT
+
+  /** The total energy of the rec point */
+  Float_t fAmp;                               //COMMENT
+
+  /** Second moment along x axis */
+  Float_t fM2x;                               //COMMENT
+
+  /** Second moment along z axis */ 
+  Float_t fM2z;                               //COMMENT
+
+  /** Third moment along x axis */
+  Float_t fM3x;                               //COMMENT
+
+  /** Fourth moment along z axis */ 
+  Float_t fM4z;                               //COMMENT
+
+  /** Angle between cog vector and eigen vector */
+  Float_t fPhixe;                             //COMMENT
+
+  /** Distance to nearest bad channel */
+  Float_t fDistanceToBadChannel;              //COMMENT
+
+  /** Digits in the rec point */
+  AliHLTCaloDigitDataStruct fDigits;          //COMMENT
+
+};
+
+#endif