]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCClusterFinderComponent.h
Cleaning up ClassDef. Should have the version == 0 for the algorithmic classes like...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinderComponent.h
index a83c54e8dc603e4cea65c26578912d92e3a2539c..44218c7d41adf9a2dd867470baf675d5733cb8e6 100644 (file)
@@ -14,6 +14,7 @@
 */
 
 #include "AliHLTProcessor.h"
+#include "AliHLTComponentBenchmark.h"
 
 class AliHLTTPCClusterFinder;
 class AliHLTTPCDigitReader;
@@ -23,20 +24,87 @@ class AliHLTTPCDigitReader;
  * Implementation of the cluster finder component.
  * The component implements the interface methods of the @ref AliHLTProcessor.
  * The actual cluster finding algorithm is implemented in @ref AliHLTTPCClusterFinder.
- * The component can handle unpacked and packed data of different formats via the
- * AliHLTTPCDigitReader implementations. Two components are registered, the
- * TPCClusterFinderUnpacked and the TPCClusterFinderPacked. The latter one can
- * instantiate different digit readers depending on the arguments.
+ * Two components are registered, TPCClusterFinderPacked and TPCClusterFinderDecoder.
+ * TPCClusterFinderDecoder use the AliTPCRawStream class for decoding of the data, while TPCClusterFinderDecoder 
+ * use the AliAltroDecoder for decoding the data.
+ *
+ * TPCClusterFinderDecoder is the fastest of the two, this is due to that the AliAltroDecoder
+ * returns data in a bunch format. A bunch consist of consecutive signals.
+ * TPCClusterFinderPacked first have to read the data one by one, which means that row, pad and
+ * time signals have to be compared between each new digit, which leads to a slower alorithm. 
  * 
- * The component has the following component arguments:
- * - adc-threshold   ADC count threshold for zero suppression, if <0 the base line
- *                   calculation and subtraction is switched off
- * - pp-run          set parameters specific to a pp run; currently this switches
- *                   cluster deconvolution off for pp runs (not true for unsorted reading)
- * - unsorted        if 1 the data will be read unsorted in to a PadArray object. This should
- *                   only be done on patch level since it use a lot of memory
- * - patch           specify on which patch to resd the data unsorted
  *
+ * The clusterfinder is now using the AliTPCTransform instead of the AliHLTTPCTransform for  
+ * transformations from row, pad time -> x,y,z.
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b TPCClusterFinderDecoder and TPCClusterFinderPacked <br>
+ * Library: \b libAliHLTTPC
+ * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br>
+ * Output Data Types: @ref AliHLTTPCDefinitions::fgkClustersDataType and/or kAliHLTDataTypeHwAddr16 <br> 
+ *
+ *
+ * Mandatory arguments: <br>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ *
+ * Optional arguments: <br>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -deconvolute-time <br>  
+ *      Turns on deconvolution in the time direction.
+ * \li -deconvolute-pad <br>  
+ *      Turns on deconvolution in the pad direction.
+ * \li -timebins <br>  
+ *      Sets the number of timebins (446 for simulated data, and 1024 for real data) Default:1024
+ * \li -first-timebin <br>  
+ *      First timebin taken into consideration when reading the data. 
+ * \li -last-timebin <br>  
+ *      Last timebin taken into consideration when reading the data. 
+ * \li -sorted <br>  
+ *      Switch off unsorted reading of data. Equivalent to the old argument unsorted 0.
+ * \li -active-pads <br>  
+ *      Switch off unsorted reading of data. Equivalent to the old argument unsorted 0.
+ * \li -occupancy-limit <br>  
+ *      Set the occupancy limit for the sorted clusterfinding.
+ *
+ *
+ * Obsolete arguments: <br>
+ * \li occupancy-limit <br>  
+ * \li rawreadermode   <br>  
+ * \li pp-run          <br>  
+ * \li adc-threshold   <br>  
+ * \li oldrcuformat    <br>  
+ * \li unsorted        <br>  
+ * \li nsigma-threshold <br>  
+ *
+ * <h2>Default CDB entries:</h2>
+ * The component has these default CDB entries
+ * \li <tt>GRP/GRP/Data</tt>.               
+ * \li <tt>TPC/Calib/PadTime0</tt>.         
+ * \li <tt>TPC/Calib/Parameters</tt>.       
+ * \li <tt>TPC/Calib/TimeDrift</tt>.        
+ * \li <tt>TPC/Calib/Temperature</tt>.      
+ *
+ * TODO: pad by pad gain calibration also has to be added to the clusterfinder
+ *
+ * And it also needs these below to avoid warnings during initialization and update of calibDB
+ * \li <tt>TPC/Calib/PadGainFactor</tt>.    
+ * \li <tt>TPC/Calib/TimeGain</tt>.
+ * \li <tt>TPC/Calib/GainFactorDedx</tt>.
+ * \li <tt>TPC/Calib/PadNoise</tt>.
+ * \li <tt>TPC/Calib/Pedestals</tt>.
+ * \li <tt>TPC/Calib/ClusterParam</tt>.
+ * \li <tt>TPC/Calib/AltroConfig</tt>.
+ * \li <tt>TPC/Calib/Pulser</tt>.
+ * \li <tt>TPC/Calib/CE</tt>.
+ * \li <tt>TPC/Calib/Raw</tt>.
+ * \li <tt>TPC/Calib/QA</tt>.
+ * \li <tt>TPC/Calib/Mapping</tt>.
+ * \li <tt>TPC/Calib/Goofie</tt>.
+ * \li <tt>TPC/Calib/HighVoltage</tt>.
+ * \li <tt>TPC/Calib/Ref</tt>.
+ *
+ * These entries are used by the AliTPCTransform class to correct for T0, drift and ExB.
  * @ingroup alihlt_tpc_components
  */
 class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
@@ -54,7 +122,9 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        /** Unpacked data of format AliHLTTPCUnpackedRawData */
        kClusterFinderUnpacked,
        /** real data, fast AliAltroDecoder used for data decoding */
-       kClusterFinderDecoder
+       kClusterFinderDecoder,
+       /** real data, offline altro decoder 32 bit format*/
+       kClusterFinder32Bit
       };
 
         /**
@@ -68,18 +138,20 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        // Public functions to implement AliHLTComponent's interface.
        // These functions are required for the registration process
 
-  /** interface function, see @ref AliHLTComponent for description */
+  /** interface function, see AliHLTComponent for description */
   const char* GetComponentID();
-  /** interface function, see @ref AliHLTComponent for description */
+  /** interface function, see AliHLTComponent for description */
   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
-  /** interface function, see @ref AliHLTComponent for description */
+  /** interface function, see AliHLTComponent for description */
   AliHLTComponentDataType GetOutputDataType();
-  /** interface function, see @ref AliHLTComponent for description */
+  /** interface function, see AliHLTComponent for description */
   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
-  /** interface function, see @ref AliHLTComponent for description */
+  /** interface function, see AliHLTComponent for description */
   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
-  /** interface function, see @ref AliHLTComponent for description */
+  /** interface function, see AliHLTComponent for description */
   AliHLTComponent* Spawn();
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetOCDBObjectDescription( TMap* const targetMap);
 
     protected:
        
@@ -92,6 +164,8 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
                     AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
                     AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+       int Configure(const char* arguments);
+       int ScanConfigurationArgument(int argc, const char** argv);
        int Reconfigure(const char* cdbEntry, const char* chainId);
        
        using AliHLTProcessor::DoEvent;
@@ -108,16 +182,25 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        /** the reader object for data decoding */
        AliHLTTPCDigitReader* fReader;                                               //!transient
 
-       bool fClusterDeconv; //!transient
-       float fXYClusterError; //!transient
+       /** flag to deconvolute in time direction */
+       Bool_t fDeconvTime;                                                          //!transient
+
+       /** flag to deconvolute in pad direction */
+       Bool_t fDeconvPad;                                                           //!transient
+       /** flag to switch on/off deconvolution in pad and time directions (used by sorted clusterfinding method) */
+       bool fClusterDeconv;                                                         //!transient
+       /** Error in xy of cluster */
+       float fXYClusterError;                                                       //!transient
+       /** Error in Z direction of cluster */
        float fZClusterError; //!transient
        /**
         * switch to indicated the reader
         * use fModeSwitch = 0 for packed inputtype "gkDDLPackedRawDataType"
         * use fModeSwitch = 1 for unpacked inputtype "gkUnpackedRawDataType"
         * use fModeSwitch = 2 for packed inputtype "gkDDLPackedRawDataType" with new digit reader
+        * use fModeSwitch = 3 for packed inputtype "gkDDLPackedRawDataType" with 32bit digit reader
         */
-       Int_t fModeSwitch;                                                           // see above
+       Int_t fModeSwitch;                                                            // see above
       
        /*
         * Reads the data the new unsorted way if true
@@ -132,12 +215,27 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        Int_t fPatch;                                                                  //!transient
 
        /*
-        * Switch to specify if one ship out a list of active pads.
-        * Used for the 2007 December run. 
+        * Switch to specify if one ship out a list of active pads (pads conected to a cluster).
         */
        Int_t fGetActivePads;                                                          //!transient
 
-       ClassDef(AliHLTTPCClusterFinderComponent, 4)
+       /** First timebin taken into account when reading the data */
+       Int_t fFirstTimeBin;                                                           //!transient
+
+       /** Last timebin taken in to account when reading the data */
+       Int_t fLastTimeBin;                                                            //!transient
+
+       Bool_t fDoMC; // flag to provide MC labels
+       Bool_t fReleaseMemory; // flag to release the memory after each event
+       AliHLTComponentBenchmark fBenchmark; // benchmark
+
+       /// the default configuration entry for this component
+       static const char* fgkOCDBEntryPacked; //!transient
+       static const char* fgkOCDBEntryUnpacked; //!transient
+       static const char* fgkOCDBEntryDecoder; //!transient
+       static const char* fgkOCDBEntry32Bit; //!transient
+
+       ClassDef(AliHLTTPCClusterFinderComponent, 0)
 
 };
 #endif