]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/CALO/AliHLTCaloDigitMaker.h
end-of-line normalization
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloDigitMaker.h
index 0fede49aeb2f04c11cc5b71e0c8f00266e09067d..53e47881176f8cbcf9bee46a76b5b3208b3d2d7e 100644 (file)
-//-*- 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 "AliHLTCaloConstantsHandler.h"\r
-#include "AliHLTCaloDigitDataStruct.h"\r
-#include "AliHLTCaloChannelDataStruct.h"\r
-#include "AliHLTDataTypes.h"\r
-#include "AliHLTLogging.h"\r
-#include "TString.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 AliHLTCaloCoordinate;\r
-class TString;\r
-\r
-//using namespace CaloHLTConst;\r
-//class AliHLTCaloDigitMaker : public AliHLTCaloBase\r
-\r
-\r
-\r
-class AliHLTCaloDigitMaker : AliHLTCaloConstantsHandler, public AliHLTLogging\r
-{\r
-\r
-public:\r
-\r
-  /** Constructor */\r
-  AliHLTCaloDigitMaker(TString det);\r
-\r
-  /** Destructor */\r
-  virtual ~AliHLTCaloDigitMaker();\r
-\r
-  /**\r
-   * Sets the pointer to the output\r
-   * @param digitDataPtr 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
-   * 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 the status of channel \r
-   * @param x is x\r
-   * @param z is z\r
-   * @param bad if it's bad\r
-   */\r
-   void SetBadChannel(Int_t x, Int_t z, Bool_t bad = true);\r
-   \r
-   /** \r
-   * Set the ADC to energy (GeV) gain \r
-   * @param x is x\r
-   * @param z is z\r
-   * @param ratio - High/Low ratio\r
-   * @param gain is the gain\r
-   */\r
-   void SetGain(Int_t x, Int_t z, Float_t ratio, Float_t gain);\r
-   \r
-   /**\r
-   * Set the time window for which we accept energy signals\r
-   * @param min is the minumum time\r
-   * @param max is the maximum time\r
-   */\r
-   void SetTimeWindow(Float_t min, Float_t max) { fMinTime = min; fMaxTime = max; }\r
-   \r
-  /** Reset the channel book */\r
-  void Reset();\r
-\r
-  /** Set the mapper */\r
-  void SetMapper(AliHLTCaloMapper *mapper) { fMapperPtr = mapper; }\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, AliHLTCaloCoordinate &coord);\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(AliHLTCaloCoordinate &coord, AliHLTCaloChannelDataStruct *channel);\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
-  /** 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
-  Bool_t ***fBadChannelMask;                                    //! transient\r
-\r
-  /** Channel book keeping variable */\r
-  AliHLTCaloDigitDataStruct ***fChannelBook;                     //! transient\r
-\r
-  /** Maximum energy we allow in a channel */\r
-  Float_t fMaxEnergy;                                            //COMMENT\r
-  \r
-  /** Minimum accepted time */\r
-  Float_t fMinTime;                                                       //COMMENT\r
-  \r
-  /** Maximum accepted time */            \r
-  Float_t fMaxTime;                                                //COMMENT\r
-\r
-  /** Assignment operator and copy constructor not implemented */\r
-  AliHLTCaloDigitMaker(const AliHLTCaloDigitMaker &);\r
-  AliHLTCaloDigitMaker & operator = (const AliHLTCaloDigitMaker &);\r
-\r
-  ClassDef(AliHLTCaloDigitMaker, 0); \r
-\r
-};\r
-\r
-#endif\r
\r
+//-*- Mode: C++ -*-
+// $Id$
+
+
+/**************************************************************************
+ * 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 ALIHLTCALODIGITMAKER_H
+#define ALIHLTCALODIGITMAKER_H
+
+/**
+ * Class makes digits from information from raw data
+ *
+ * @file   AliHLTCaloDigitMaker.h
+ * @author Oystein Djuvsland
+ * @date
+ * @brief  Digit maker 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 "AliHLTCaloBase.h"
+#include "AliHLTCaloConstantsHandler.h"
+#include "AliHLTCaloDigitDataStruct.h"
+#include "AliHLTCaloChannelDataStruct.h"
+#include "AliHLTDataTypes.h"
+#include "AliHLTLogging.h"
+#include "TString.h"
+
+/**
+ * @class AliHLTCaloDigitMaker
+ * Digit maker for CALO HLT. Takes input from AliHLTCaloRawAnalyzer, and 
+ * outputs a block of AliHLTCaloDigitDataStruct container
+ * @ingroup alihlt_calo
+ */
+
+class TH2F;
+class AliHLTCaloSharedMemoryInterfacev2; // added by PTH
+struct AliHLTCaloChannelDataHeaderStruct;
+class AliHLTCaloMapper;
+class AliHLTCaloCoordinate;
+class TString;
+
+//using namespace CaloHLTConst;
+//class AliHLTCaloDigitMaker : public AliHLTCaloBase
+
+
+
+class AliHLTCaloDigitMaker : AliHLTCaloConstantsHandler, public AliHLTLogging
+{
+
+public:
+
+  /** Constructor */
+  AliHLTCaloDigitMaker(TString det);
+
+  /** Destructor */
+  virtual ~AliHLTCaloDigitMaker();
+
+  /**
+   * Sets the pointer to the output
+   * @param digitDataPtr the output pointer
+   */
+  void SetDigitDataPtr(AliHLTCaloDigitDataStruct *digitDataPtr) 
+  { fDigitStructPtr = digitDataPtr; }
+
+  /**
+   * Set the global high gain conversion factory 
+   * @param factor is the conversion factor
+   */
+  void SetGlobalHighGainFactor(Float_t factor);
+
+  /**
+   * Set the global low gain conversion factory 
+   * @param factor is the conversion factor
+   */
+  void SetGlobalLowGainFactor(Float_t factor);
+
+  /**
+   * Make the digits for one event.
+   * @param channelDataHeader is the data header from the AliHLTCaloRawAnalyzer
+   * @return the number of digits found
+   */
+  Int_t MakeDigits(AliHLTCaloChannelDataHeaderStruct* channelDataHeader, AliHLTUInt32_t availableSize);
+
+  /**
+   * Set the mask for dead channels
+   * @param badChannelHGHist is a pointer to a high gain bad channel histogram
+   * @param badChannelLGHist is a pointer to a low gain bad channel histogram
+   * @param qCut is the cut 
+   */
+  void SetBadChannelMask(TH2F* badChannelHGHist, TH2F* badChannelLGHist, Float_t qCut);
+
+   /** 
+   * Set the status of channel 
+   * @param x is x
+   * @param z is z
+   * @param bad if it's bad
+   */
+   void SetBadChannel(Int_t x, Int_t z, Bool_t bad = true);
+   
+   /** 
+   * Set the ADC to energy (GeV) gain 
+   * @param x is x
+   * @param z is z
+   * @param ratio - High/Low ratio
+   * @param gain is the gain
+   */
+   void SetGain(Int_t x, Int_t z, Float_t ratio, Float_t gain);
+   
+   /**
+   * Set the time window for which we accept energy signals
+   * @param min is the minumum time
+   * @param max is the maximum time
+   */
+   void SetTimeWindow(Float_t min, Float_t max) { fMinTime = min; fMaxTime = max; }
+   
+  /** Reset the channel book */
+  void Reset();
+
+  /** Set the mapper */
+  void SetMapper(AliHLTCaloMapper *mapper) { fMapperPtr = mapper; }
+
+private:
+  
+  AliHLTCaloDigitMaker();
+  
+  /**
+   * Add a new digit
+   * @param channelData is the channel data
+   * @param coordinates is the coordinates of the channel, including gain and module
+   */
+  void AddDigit(AliHLTCaloChannelDataStruct* channelData, AliHLTCaloCoordinate &coord);
+
+  /**
+   * Check if we already have this crystal. If so, keep the high gain as long as it 
+   * is not in overflow. 
+   * @param channelCoordinates is a array of coordinates for the channel.
+   * @param channel is a pointer to a struct containing channel information
+   * @return true if we should use the digit. 
+   */
+  bool UseDigit(AliHLTCaloCoordinate &coord, AliHLTCaloChannelDataStruct *channel);
+
+  /** Pointer to shared memory interface */
+  AliHLTCaloSharedMemoryInterfacev2* fShmPtr;                    //! transient
+
+  /** Pointer to the AliHLTCaloDigitDataStruct */
+  AliHLTCaloDigitDataStruct *fDigitStructPtr;                    //! transient
+
+  /** Digit count */
+  Int_t fDigitCount;                                             //COMMENT
+
+  /** Mapper */
+  AliHLTCaloMapper* fMapperPtr;                                  //COMMENT
+
+  /** High gain energy conversion factors */
+  Float_t **fHighGainFactors;                                    //! transient
+
+  /** Low gain energy conversion factors */
+  Float_t **fLowGainFactors;                                     //!transient
+
+  /** Bad channel mask */
+  Bool_t ***fBadChannelMask;                                    //! transient
+
+  /** Channel book keeping variable */
+  AliHLTCaloDigitDataStruct ***fChannelBook;                     //! transient
+
+  /** Maximum energy we allow in a channel */
+  Float_t fMaxEnergy;                                            //COMMENT
+  
+  /** Minimum accepted time */
+  Float_t fMinTime;                                                       //COMMENT
+  
+  /** Maximum accepted time */            
+  Float_t fMaxTime;                                                //COMMENT
+
+  /** Assignment operator and copy constructor not implemented */
+  AliHLTCaloDigitMaker(const AliHLTCaloDigitMaker &);
+  AliHLTCaloDigitMaker & operator = (const AliHLTCaloDigitMaker &);
+
+  ClassDef(AliHLTCaloDigitMaker, 0); 
+
+};
+
+#endif