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 12 of file STAR_2008_S7869363.cc.


Constructor & Destructor Documentation

STARRandomFilter (  )  [inline]

Definition at line 15 of file STAR_2008_S7869363.cc.

00015 { }


Member Function Documentation

int compare ( const STARRandomFilter other  )  const [inline]

Definition at line 25 of file STAR_2008_S7869363.cc.

00025                                                      {
00026       return true;
00027     }

bool operator() ( const Particle p  )  [inline]

Todo:
Use a better RNG?

Definition at line 18 of file STAR_2008_S7869363.cc.

References STARRandomFilter::_trkeff, Rivet::MeV, Particle::momentum(), and FourMomentum::pT().

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


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 31 of file STAR_2008_S7869363.cc.

Referenced by STARRandomFilter::operator()().


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