X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FTPCLib%2FAliHLTTPCClusterFinderComponent.h;h=49ae612bfc26253d8fc6bc2ddfcec28d972190d6;hb=2893a43aed2382d07bb4268d490878c6e397a040;hp=2c7b48ce19e78b425f9b332d2111cadbe6ff042c;hpb=64defa03abe9db25106c9dcbad40d51fe5012d14;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h index 2c7b48ce19e..49ae612bfc2 100644 --- a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h +++ b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h @@ -1,78 +1,156 @@ -// @(#) $Id$ +//-*- Mode: C++ -*- +// $Id$ #ifndef ALIHLTTPCCLUSTERFINDERCOMPONENT_H #define ALIHLTTPCCLUSTERFINDERCOMPONENT_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 */ +//* 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 AliHLTTPCClusterFinderComponent.h - @author Timm Steinbeck, Matthias Richter, Jochen Thaeder - @date - @brief The TPC cluster finder component. -*/ - -// see below for class documentation -// or -// refer to README to build package -// or -// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt +/// @file AliHLTTPCClusterFinderComponent.h +/// @author Timm Steinbeck, Matthias Richter, Kenneth Aamodt +/// @date +/// @brief The TPC cluster finder component. +/// #include "AliHLTProcessor.h" +#include "AliHLTComponentBenchmark.h" class AliHLTTPCClusterFinder; -class AliHLTTPCPadArray; class AliHLTTPCDigitReader; +class AliTPCTransform; /** * @class AliHLTTPCClusterFinderComponent * 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. - * - * The component has the following component arguments: - * - rawreadermode the mode for the @ref AliHLTTPCDigitReaderRaw, use -2 if using unsorted - * - 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 + * Two components are registered, TPCClusterFinderUnpacked is for reading the HLT + * internal digit data format used in the simulation. TPCClusterFinder32Bit uses + * the AliHLTTPCDigitReader for raw data. After a phase of different decoder/raw stream + * implementations the CF for raw data is using the default offline raw stream for + * the 32bit RCU format AliAltroRawStreamV3, which also has a fall back to the 40bit + * AliAltroRawStream if the old RCU format is detected. + * + * The clusterfinder is now using the AliTPCTransform instead of the AliHLTTPCTransform for + * transformations from row, pad time -> x,y,z. + * + *

General properties:

+ * + * Component ID: \b TPCClusterFinderUnpacked and TPCClusterFinder32Bit
+ * Library: \b libAliHLTTPC + * Input Data Types: @ref kAliHLTDataTypeDDLRaw
+ * Output Data Types: @ref AliHLTTPCDefinitions::fgkClustersDataType and/or kAliHLTDataTypeHwAddr16
+ * + * + * Mandatory arguments:
+ * + * + * Optional arguments:
+ * + * \li -deconvolute-time
+ * Turns on deconvolution in the time direction. + * \li -deconvolute-pad
+ * Turns on deconvolution in the pad direction. + * \li -timebins
+ * Sets the number of timebins (446 for simulated data, and 1024 for real data) Default:1024 + * \li -first-timebin
+ * First timebin taken into consideration when reading the data. + * \li -last-timebin
+ * Last timebin taken into consideration when reading the data. + * \li -sorted
+ * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0. + * \li -active-pads
+ * Switch off unsorted reading of data. Equivalent to the old argument unsorted 0. + * \li -occupancy-limit
+ * Set the occupancy limit for the sorted clusterfinding. + * * - * @ingroup alihlt_tpc + * Obsolete arguments:
+ * \li occupancy-limit
+ * \li rawreadermode
+ * \li pp-run
+ * \li adc-threshold
+ * \li oldrcuformat
+ * \li unsorted
+ * \li nsigma-threshold
+ * + *

Default CDB entries:

+ * The component has these default CDB entries + * \li GRP/GRP/Data. + * \li TPC/Calib/PadTime0. + * \li TPC/Calib/Parameters. + * \li TPC/Calib/TimeDrift. + * \li TPC/Calib/Temperature. + * + * 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 TPC/Calib/PadGainFactor. + * \li TPC/Calib/TimeGain. + * \li TPC/Calib/GainFactorDedx. + * \li TPC/Calib/PadNoise. + * \li TPC/Calib/Pedestals. + * \li TPC/Calib/ClusterParam. + * \li TPC/Calib/AltroConfig. + * \li TPC/Calib/Pulser. + * \li TPC/Calib/CE. + * \li TPC/Calib/Raw. + * \li TPC/Calib/QA. + * \li TPC/Calib/Mapping. + * \li TPC/Calib/Goofie. + * \li TPC/Calib/HighVoltage. + * \li TPC/Calib/Ref. + * + * These entries are used by the AliTPCTransform class to correct for T0, drift and ExB. + * @ingroup alihlt_tpc_components */ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor { public: + /** + * Defines for the cluster finder type. + * The cluster finders can work on different formats of input data, + * the AliHLTTPCDigitReader interface provides a transparent way to + * read the data. + */ + enum { + // deprecated option for offline AliAltroRawStream + kClusterFinderPacked, + // Unpacked data of format AliHLTTPCUnpackedRawData */ + kClusterFinderUnpacked, + // deprecated option for AliAltroDecoder + kClusterFinderDecoder, + // real data, offline altro decoder 32 bit format*/ + kClusterFinder32Bit + }; + /** * constructor - * @param packed whether to use the packed or unpacked reader + * @param mode input type see e.g. @ref kClusterFinderUnpacked */ - AliHLTTPCClusterFinderComponent(bool packed); + AliHLTTPCClusterFinderComponent(int mode); /** destructor */ virtual ~AliHLTTPCClusterFinderComponent(); // 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& 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: @@ -85,10 +163,15 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector& outputBlocks ); + int Configure(const char* arguments); + int ScanConfigurationArgument(int argc, const char** argv); + int Reconfigure(const char* cdbEntry, const char* chainId); using AliHLTProcessor::DoEvent; private: + /** standard constructor prohibited */ + AliHLTTPCClusterFinderComponent(); /** copy constructor prohibited */ AliHLTTPCClusterFinderComponent(const AliHLTTPCClusterFinderComponent&); /** assignment operator prohibited */ @@ -98,41 +181,57 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor /** the reader object for data decoding */ AliHLTTPCDigitReader* fReader; //!transient - bool fClusterDeconv; //!transient - float fXYClusterError; //!transient - float fZClusterError; //!transient - /** - * switch to indicated the reader - * use fPackedSwitch = true for packed inputtype "gkDDLPackedRawDataType" - * use fPackedSwitch = false for unpacked inputtype "gkUnpackedRawDataType" - */ - Int_t fPackedSwitch; // see above + /** flag to deconvolute in time direction */ + Bool_t fDeconvTime; //!transient + /** the object to set the time stamp */ + AliTPCTransform *fTS; //!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 - /* - * Reads the data the new unsorted way if true - * - */ - Int_t fUnsorted; //!transient + /* + * Reads the data the new unsorted way if true + * + */ + Int_t fUnsorted; //!transient - /* - * Patch number to be read, currently given as component argument, - * will be changed later. - */ - Int_t fPatch; //!transient + /* + * Patch number to be read, currently given as component argument, + * will be changed later. + */ + Int_t fPatch; //!transient - /* - * Switch to specify if one ship out a list of active pads. - * Used for the 2007 December run. - */ - Int_t fGetActivePads; //!transient + /* + * Switch to specify if one ship out a list of active pads (pads conected to a cluster). + */ + Int_t fGetActivePads; //!transient - /* - * Pointer to a PadArray object containing a double array of all the pads in - * the current patch. - */ - AliHLTTPCPadArray * fPadArray; //!transient + /** 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 + Bool_t fPublishRawClusters; // publish raw clusters in addition + AliHLTComponentBenchmark fBenchmark; // benchmark - ClassDef(AliHLTTPCClusterFinderComponent, 2) + ClassDef(AliHLTTPCClusterFinderComponent, 0) - }; +}; #endif