LCOV - code coverage report
Current view: top level - HLT/MUON - AliHLTMUONPairsDecisionBlockStruct.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 11 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 3 0.0 %

          Line data    Source code
       1             : #ifndef ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H
       2             : #define ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H
       3             : /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : // $Id$
       7             : 
       8             : /**
       9             :  * @file   AliHLTMUONPairsDecisionBlockStruct.h
      10             :  * @author Artur Szostak <artursz@iafrica.com>
      11             :  * @date   21 May 2007
      12             :  * @brief  Definition of internal dimuon HLT trigger decision data structure containing decision information for pairs of tracks.
      13             :  *
      14             :  * The structures are defined with C linkage since C generally gives us more
      15             :  * binary compatibility between compilers.
      16             :  */
      17             : 
      18             : #include "AliHLTMUONDataTypes.h"
      19             : 
      20             : extern "C"
      21             : {
      22             : 
      23             : /**
      24             :  * Structure contains information about the trigger decision for a pair of tracks.
      25             :  */
      26             : struct AliHLTMUONPairDecisionStruct
      27             : {
      28             :         // The ID numbers of the tracks we are referring to.
      29             :         // These could also be trigger record ID numbers.
      30             :         AliHLTInt32_t fTrackAId;
      31             :         AliHLTInt32_t fTrackBId;
      32             :         
      33             :         // The trigger bits have the following meaning:
      34             :         // bit:  [31 --- 7][ 6 ][ 5 ][   4  ][3--2][1--0]
      35             :         // field: reserved  hiM  loM  unlike  hipt  lopt
      36             :         // Reserved bits should be set to zero.
      37             :         // hiM == Pair passed the high invariant mass cut.
      38             :         // loM == Pair passed the low invariant mass cut.
      39             :         // unlike == is the pair an unlike sign pair.
      40             :         // hipt: 0 if neither track has pt > high pt cut, 1 if either has
      41             :         // and 2 if both have. A value of 3 is invalid.
      42             :         // lopt: 0 if neither track has pt > lo pt cut, 1 if either has
      43             :         // and 2 if both have. A value of 3 is invalid.
      44             :         AliHLTUInt32_t fTriggerBits;
      45             :         
      46             :         AliHLTFloat32_t fInvMass; // Invariant mass of the track pair assuming
      47             :                                   // they are both muons in (GeV/c^2)
      48             : };
      49             : 
      50             : /**
      51             :  * AliHLTMUONPairsDecisionBlockStruct defines the format of the internal
      52             :  * dimuon HLT decision data block for pairs of tracks.
      53             :  */
      54             : struct AliHLTMUONPairsDecisionBlockStruct
      55             : {
      56             :         AliHLTMUONDataBlockHeader fHeader; // Common data block header.
      57             :         
      58             :         // Number of unlike sign pt triggers for both tracks having any pt.
      59             :         AliHLTUInt32_t fNunlikeAnyPt;
      60             :         
      61             :         // Number of unlike sign low pt triggers where both tracks have
      62             :         // pt > low cut.
      63             :         AliHLTUInt32_t fNunlikeLowPt;
      64             :         
      65             :         // Number of unlike sign high pt triggers where both tracks have
      66             :         // pt > high cut.
      67             :         AliHLTUInt32_t fNunlikeHighPt;
      68             :         
      69             :         // Number of like sign pt triggers where both tracks have any pt.
      70             :         AliHLTUInt32_t fNlikeAnyPt;
      71             :         
      72             :         // Number of like sign low pt triggers where both tracks have
      73             :         // pt > low cut.
      74             :         AliHLTUInt32_t fNlikeLowPt;
      75             :         
      76             :         // Number of like sign high pt triggers where both tracks have
      77             :         // pt > high cut.
      78             :         AliHLTUInt32_t fNlikeHighPt;
      79             :         
      80             :         // Number of pairs that have invariant mass > low mass cut, any pt
      81             :         // and unlike sign.
      82             :         AliHLTUInt32_t fNmassAny;
      83             :         
      84             :         // Number of pairs that have invariant mass > low mass cut,
      85             :         // pt > low pt cut and unlike sign.
      86             :         AliHLTUInt32_t fNmassLow;
      87             :         
      88             :         // Number of pairs that have invariant mass > high mass cut,
      89             :         // pt > high pt cut and unlike sign.
      90             :         AliHLTUInt32_t fNmassHigh;
      91             : 
      92             :         // Array of decisions for track pairs.
      93             :         //AliHLTMUONPairDecisionStruct fDecision[/*fHeader.fNrecords*/];
      94             : };
      95             : 
      96             : } // extern "C"
      97             : 
      98             : 
      99             : /**
     100             :  * Stream operator for usage with std::ostream classes which prints the
     101             :  * trigger decision information for pairs of tracks in the following format:
     102             :  *  {fTrackAId = xx, fTrackBId = yy, fTriggerBits = 0xZZ, fInvMass = ww}
     103             :  */
     104             : inline std::ostream& operator << (
     105             :                 std::ostream& stream, const AliHLTMUONPairDecisionStruct& trig
     106             :         )
     107             : {
     108           0 :         std::ios::fmtflags oldflags = stream.flags();
     109           0 :         stream  << "{fTrackAId = " << trig.fTrackAId
     110           0 :                 << ", fTrackBId = " << trig.fTrackBId << ", fTriggerBits = "
     111           0 :                 << std::showbase << std::hex << trig.fTriggerBits << std::dec
     112           0 :                 << ", fInvMass = " << trig.fInvMass << "}";
     113           0 :         stream.flags(oldflags);
     114           0 :         return stream;
     115             : }
     116             : 
     117             : /**
     118             :  * Stream operator for usage with std::ostream classes which prints the
     119             :  * AliHLTMUONPairsDecisionBlockStruct in the following format:
     120             :  *   {fHeader = aa, fNunlikeLowPt = bb, fNunlikeHighPt = cc, fNlikeLowPt = dd,
     121             :  *    fNlikeHighPt = ee, fNmassAny = ff, fNmassLow = gg, fNmassHigh = hh
     122             :  *    fDecision[] = [{..}, {..}, ...]}
     123             :  */
     124             : std::ostream& operator << (
     125             :                 std::ostream& stream,
     126             :                 const AliHLTMUONPairsDecisionBlockStruct& block
     127             :         );
     128             : 
     129             : 
     130             : inline bool operator == (
     131             :                 const AliHLTMUONPairDecisionStruct& a,
     132             :                 const AliHLTMUONPairDecisionStruct& b
     133             :         )
     134             : {
     135           0 :         return a.fTrackAId == b.fTrackAId and a.fTrackBId == b.fTrackBId
     136           0 :                 and a.fTriggerBits == b.fTriggerBits
     137           0 :                 and a.fTriggerBits == b.fTriggerBits;
     138             : }
     139             : 
     140             : inline bool operator != (
     141             :                 const AliHLTMUONPairDecisionStruct& a,
     142             :                 const AliHLTMUONPairDecisionStruct& b
     143             :         )
     144             : {
     145           0 :         return not operator == (a, b);
     146             : }
     147             : 
     148             : 
     149             : bool operator == (
     150             :                 const AliHLTMUONPairsDecisionBlockStruct& a,
     151             :                 const AliHLTMUONPairsDecisionBlockStruct& b
     152             :         );
     153             : 
     154             : inline bool operator != (
     155             :                 const AliHLTMUONPairsDecisionBlockStruct& a,
     156             :                 const AliHLTMUONPairsDecisionBlockStruct& b
     157             :         )
     158             : {
     159             :         return not operator == (a, b);
     160             : }
     161             : 
     162             : #endif // ALIHLTMUONPAIRSDECISIONBLOCKSTRUCT_H

Generated by: LCOV version 1.11