CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
9 
10 // user include files
11 
12 
13 #include "CLHEP/Random/RandFlat.h"
14 
16  theEventFraction(0)
17 {
18  theEventFraction=iConfig.getUntrackedParameter<double>("EventFraction");
19 }
20 
21  // ------------ method called on each new Event ------------
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 }
T getUntrackedParameter(std::string const &, T const &) const
MinimumBiasFilter(const edm::ParameterSet &)
bool filter(edm::Event &, const edm::EventSetup &)
int iEvent
Definition: GenABIO.cc:230