Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
GeneratorInterface
GenFilters
src
MinimumBiasFilter.cc
Go to the documentation of this file.
1
//
2
// Original Author: Filippo Ambroglini
3
// Created: Fri Sep 29 17:10:41 CEST 2006
4
//
5
//
6
// system include files
7
8
#include "
GeneratorInterface/GenFilters/interface/MinimumBiasFilter.h
"
9
10
// user include files
11
12
13
#include "CLHEP/Random/RandFlat.h"
14
15
MinimumBiasFilter::MinimumBiasFilter
(
const
edm::ParameterSet
& iConfig):
16
theEventFraction(0)
17
{
18
theEventFraction
=iConfig.
getUntrackedParameter
<
double
>(
"EventFraction"
);
19
}
20
21
// ------------ method called on each new Event ------------
22
bool
MinimumBiasFilter::filter
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
23
{
24
using namespace
edm;
31
float
rnd = CLHEP::RandFlat::shoot(0.,1.);
32
33
if
(rnd<=
theEventFraction
)
34
return
true
;
35
36
return
false
;
37
}
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
MinimumBiasFilter::MinimumBiasFilter
MinimumBiasFilter(const edm::ParameterSet &)
Definition:
MinimumBiasFilter.cc:15
MinimumBiasFilter::filter
bool filter(edm::Event &, const edm::EventSetup &)
Definition:
MinimumBiasFilter.cc:22
iEvent
int iEvent
Definition:
GenABIO.cc:230
edm::EventSetup
Definition:
EventSetup.h:45
MinimumBiasFilter::theEventFraction
float theEventFraction
Definition:
MinimumBiasFilter.h:30
edm::ParameterSet
Definition:
ParameterSet.h:36
MinimumBiasFilter.h
edm::Event
Definition:
Event.h:64
Generated for CMSSW Reference Manual by
1.8.5