Linear Collider Forum



Home » Analysis and Reconstruction » Tracking & Vertexing » MarlinTPC flagwords
Re: MarlinTPC flagwords [message #2205 is a reply to message #2089] Fri, 03 February 2012 11:40 Go to previous message
rosemann
Messages: 41
Registered: March 2009
Location: hamburg.de
I redid it, and it's similar to the original version. Here the example for the pulseflag (it's also in the marlintpc namespace):
  namespace pulseflag
  {
    int const MULTIPLE_PULSE_CANDIDATE_BIT = 1;
    int const ANOMALOUS_SHAPE_BIT          = 1 << 1;
    int const OVERFLOW_BIN_BIT             = 1 << 2;
    int const UNDERFLOW_BIN_BIT            = 1 << 3;
    int const WAS_SPLIT_BIT                = 1 << 4;

    inline void setMultiplePulseCandidate(int& i)
    {
      i |= MULTIPLE_PULSE_CANDIDATE_BIT;
    }
    inline void setAnomalousShape(int& j)
    {
      j |= ANOMALOUS_SHAPE_BIT;
    }
    inline void setOverflow(int& k)
    {
      k |= OVERFLOW_BIN_BIT;
    }
    inline void setUnderflow(int& m)
    {
      m |= UNDERFLOW_BIN_BIT;
    }
    inline void setSplit(int& n)
    {
      n |= WAS_SPLIT_BIT;
    }

    inline bool const isMultiplePulseCandidate(int i)
    {
      return i & MULTIPLE_PULSE_CANDIDATE_BIT;
    }
    inline bool const isAnomalousShape(int j)
    {
      return j & ANOMALOUS_SHAPE_BIT;
    }
    inline bool const isOverflow(int k)
    {
      return k & OVERFLOW_BIN_BIT;
    }
    inline bool const isUnderflow(int m)
    {
      return m & UNDERFLOW_BIN_BIT;
    }
    inline bool const isSplit(int n)
    {
      return n & WAS_SPLIT_BIT;
    }
  }


BTW: I removed the mysterious and superfluous "hitflag::EMPTY_CHANNEL" bit (there is also a "dead" and a "noisy" channel flag) and introduced the helpful "hitflag::IS_NEXT_TO_DEAD_CHANNEL" bit.

Example code is as of rev2967 in the PulseFinder and the RowBasedHitFinder.

Cheers,
Christoph


When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir A.C. Doyle in Sign of Four)
 
Read Message
Read Message
Read Message
Previous Topic:Problem with PerEventIPFitterProcessor
Next Topic:Questions/remarks on pathfinder
Goto Forum:
  


Current Time: Thu Oct 18 13:56:09 Pacific Daylight Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software