StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StJetMaker
tracks
StjTrackCutRandomAccept.h
1
// -*- mode:c++ -*-
2
3
//
4
// Pibero Djawotho <pibero@tamu.edu>
5
// Texas A&M
6
// 3 Dec 2012
7
//
8
9
#ifndef STJ_TRACK_CUT_RANDOM_ACCEPT_H
10
#define STJ_TRACK_CUT_RANDOM_ACCEPT_H
11
12
#include <cassert>
13
#include "TRandom3.h"
14
#include "StjTrackCut.h"
15
16
class
StjTrackCutRandomAccept
:
public
StjTrackCut
{
17
public
:
18
StjTrackCutRandomAccept
(
double
fraction = 1) : _fraction(fraction), _random(0)
19
{
20
assert(_fraction >= 0 && _fraction <= 1);
21
}
22
23
bool
operator()(
const
StjTrack
&
track
)
const
24
{
25
return
_random.Rndm() >= _fraction;
26
}
27
28
private
:
29
double
_fraction;
30
mutable
TRandom3 _random;
31
32
ClassDef(
StjTrackCutRandomAccept
,0)
33
};
34
35
#endif // STJ_TRACK_CUT_RANDOM_ACCEPT_H
track
Definition:
MapTableTest.C:38
StjTrackCut
Definition:
StjTrackCut.h:11
StjTrack
Definition:
StjTrackList.h:12
StjTrackCutRandomAccept
Definition:
StjTrackCutRandomAccept.h:16
Generated by
1.8.5