X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FMUON%2FOnlineAnalysis%2FAliHLTMUONDecisionComponent.h;h=f834ba41f7d292820108875d90d081f5c290325c;hb=0d23294b2a31760a9a59e486e056f9b76254661a;hp=b6eb602871129d869be3e8be5d7bc47d3d879516;hpb=cf7b241afdc7a41eeea05c0794fcc25ca787f1f3;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/MUON/OnlineAnalysis/AliHLTMUONDecisionComponent.h b/HLT/MUON/OnlineAnalysis/AliHLTMUONDecisionComponent.h index b6eb6028711..f834ba41f7d 100644 --- a/HLT/MUON/OnlineAnalysis/AliHLTMUONDecisionComponent.h +++ b/HLT/MUON/OnlineAnalysis/AliHLTMUONDecisionComponent.h @@ -4,7 +4,7 @@ * ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -/* $Id: $ */ +// $Id: $ /// /// @file AliHLTMUONDecisionComponent.h @@ -15,12 +15,12 @@ #include "AliHLTMUONProcessor.h" #include "AliHLTMUONDataTypes.h" -#include #if __GNUC__ && __GNUC__ < 3 #define std #endif +extern "C" struct AliHLTMUONTrackStruct; extern "C" struct AliHLTMUONMansoTrackStruct; extern "C" struct AliHLTMUONTrackDecisionStruct; extern "C" struct AliHLTMUONPairDecisionStruct; @@ -44,6 +44,87 @@ extern "C" struct AliHLTMUONPairsDecisionBlockStruct; * are applied. The number of pairs that pass the low or high mass cut are then * counted. The results are encoded into two data blocks, one for trigger decisions * for single tracks and another for the track pairs. + * + *

General properties:

+ * + * Component ID: \b MUONDecisionComponent
+ * Library: \b libAliHLTMUON.so
+ * Input Data Types: \li AliHLTMUONConstants::MansoTracksBlockDataType() = "MANTRACK:MUON"
+ * \li AliHLTMUONConstants::TracksBlockDataType() = "TRACKS :MUON"
+ * Output Data Types: \li AliHLTMUONConstants::SinglesDecisionBlockDataType() = "DECIDSIN:MUON" + * \li AliHLTMUONConstants::PairsDecisionBlockDataType() = "DECIDPAR:MUON"
+ * + *

Mandatory arguments:

+ * None. + * + *

Optional arguments:

+ * + * \li -lowptcut value
+ * Sets the low pT cut value to use when applying the decision. The value + * should be a floating point number and has units GeV/c. If this parameter is + * specified then it will not be loaded from CDB.
+ * \li -highptcut value
+ * Sets the high pT cut value to use when applying the decision. The value + * should be a floating point number and has units GeV/c. If this parameter is + * specified then it will not be loaded from CDB.
+ * \li -lowmasscut value
+ * Sets the low invariant mass cut value to use when applying the decision. + * The value should be a floating point number and has units GeV/c^2. + * If this parameter is specified then it will not be loaded from CDB.
+ * \li -highmasscut value
+ * Sets the high invariant mass cut value to use when applying the decision. + * The value should be a floating point number and has units GeV/c^2. + * If this parameter is specified then it will not be loaded from CDB.
+ * \li -no_singles_detail
+ * If specified the detailed decision information for tracks is not added to + * the output. Only the scalar values are then present in the output data block + * for decisions on single tracks.
+ * \li -no_pairs_detail
+ * If specified the detailed decision information for track pairs is not added + * to the output. Only the scalar values are then present in the output data + * block for decisions for track pairs.
+ * \li -warn_on_unexpected_block
+ * This will cause the component to generate warnings when it receives data block + * types it does not know how to handle. Without this option the component only + * generates debug messages when they are compiled in.
+ * \li -cdbpath path
+ * This allows one to override the path to use for the CDB location. + * path must be a valid CDB URI. By default the HLT system framework + * sets the CDB path.
+ * \li -run number
+ * This allows one to override the run number to use. number must be + * a positive integer number. By default the HLT system framework sets the + * run number.
+ * \li -delaysetup
+ * If indicated then part of the initialisation of the component is forcefully + * delayed to the first event received, i.e. the Start-of-Run event.
+ * \li -dumponerror
+ * This flag will cause the component to dump the data blocks it received if + * an error occurs during the processing of an event.
+ * \li -dumppath path
+ * Allows one to specify the path in which to dump the received data blocks + * if an error occurs.
+ * + *

Standard configuration:

+ * The configuration is taken from the CDB by default. It can be overridden with + * the command line arguments. + * + *

Default CDB entries:

+ * HLT/ConfigMUON/DecisionComponent - Contains a TMap with the cut parameters. + * + *

Performance:

+ * For worst case numbers of tracks the decision component requires less than a + * millisecond to process an event. + * + *

Memory consumption:

+ * This is a linear function of the input data size, but only a fraction. Thus the + * memory usage is minimal. It should be under 1 MBytes. + * + *

Output size:

+ * This will depend linearly on the number of tracks found. But for nominal + * multiplicities this should be less than 16 kBytes. + * + * @ingroup alihlt_dimuon_component */ class AliHLTMUONDecisionComponent : public AliHLTMUONProcessor { @@ -75,7 +156,7 @@ protected: AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, - std::vector& outputBlocks + AliHLTComponentBlockDataList& outputBlocks ); using AliHLTProcessor::DoEvent; @@ -99,7 +180,25 @@ private: bool setLowMassCut = true, bool setHighMassCut = true ); + /// Internal track information structure for the fTracks buffer. + struct AliTrackInfo + { + AliHLTInt32_t fId; /// Track ID. + AliHLTFloat32_t fPx, fPy, fPz; /// Momentum vector. + AliHLTMUONParticleSign fSign; /// The particle's charge sign. + }; + + /** + * Creates a new element in fTracks and returns it. + * NULL is returned if no more memory could be allocated. + */ + AliTrackInfo* NewTrack(); + + /// Adds Manso track information to the list of tracks to process. int AddTrack(const AliHLTMUONMansoTrackStruct* track); + + /// Adds track information from the full tracker component to the list of tracks to process. + int AddTrack(const AliHLTMUONTrackStruct* track); int ApplyTriggerAlgorithm( AliHLTMUONSinglesDecisionBlockStruct& singlesHeader, @@ -107,16 +206,15 @@ private: AliHLTMUONPairsDecisionBlockStruct& pairsHeader, AliHLTMUONPairDecisionStruct* pairsDecision ); - + AliHLTUInt32_t fMaxTracks; /// The maximum number of elements that can be stored in fTracks. AliHLTUInt32_t fTrackCount; /// The current number of elements stored in fTracks. - const AliHLTMUONMansoTrackStruct** fTracks; /// Pointers to the track structures in input data blocks. + AliTrackInfo* fTracks; /// Pointers to the Manso track structures in input data blocks. AliHLTFloat32_t fLowPtCut; /// The low pT cut value to apply to tracks. [GeV/c] AliHLTFloat32_t fHighPtCut; /// The high pT cut value to apply to tracks. [GeV/c] AliHLTFloat32_t fLowMassCut; /// The low invariant mass cut value to apply to tracks. [GeV/c^2] AliHLTFloat32_t fHighMassCut; /// The high invariant mass cut value to apply to tracks. [GeV/c^2] bool fWarnForUnexpecedBlock; /// Flag indicating if we should log a warning if we got a block of an unexpected type. - bool fDelaySetup; ///< Indicates if the component should delay loading and initialising from the CDB to the start of run event. bool fLowPtCutSet; ///< Indicates if the low pT cut parameter was set on the command line. bool fHighPtCutSet; ///< Indicates if the high pT cut parameter was set on the command line. bool fLowMassCutSet; ///< Indicates if the low invariant mass cut parameter was set on the command line.