rivet is hosted by Hepforge, IPPP Durham
STARRandomFilter Class Reference

List of all members.

Public Member Functions

 STARRandomFilter ()
bool operator() (const Particle &p)
int compare (const STARRandomFilter &other) const

Static Private Attributes

static const double _trkeff [12] = {0,0,0.38,0.72,0.78,0.81,0.82,0.84,0.85,0.86,0.87,0.88}

Detailed Description

Definition at line 9 of file STAR_2008_S7869363.cc.


Constructor & Destructor Documentation

STARRandomFilter ( ) [inline]

Definition at line 12 of file STAR_2008_S7869363.cc.

{ }

Member Function Documentation

int compare ( const STARRandomFilter other) const [inline]

Definition at line 22 of file STAR_2008_S7869363.cc.

                                                     {
      return true;
    }
bool operator() ( const Particle p) [inline]
Todo:
Use a better RNG?

Definition at line 15 of file STAR_2008_S7869363.cc.

References STARRandomFilter::_trkeff, Rivet::MeV, and ParticleBase::pT().

                                       {
      /// @todo Use a better RNG?
      size_t idx = int(floor(p.pT()/MeV/50));
      if (idx > 11) idx = 11;
      return (rand()/static_cast<double>(RAND_MAX) > _trkeff[idx]);
    }

Member Data Documentation

const double _trkeff = {0,0,0.38,0.72,0.78,0.81,0.82,0.84,0.85,0.86,0.87,0.88} [static, private]

Definition at line 28 of file STAR_2008_S7869363.cc.

Referenced by STARRandomFilter::operator()().


The documentation for this class was generated from the following file: