CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MixingModuleConfig.cc
Go to the documentation of this file.
3 
4 #include <sstream>
5 
7  configs_.resize(4);
8 }
10 
11 std::ostream& operator<< ( std::ostream& os, const MixingModuleConfig & c) {
12  std::stringstream ss;
13  os <<c.bunchSpace()<<"\n"<<c.config();
14  return os;
15 }
16 std::ostream& operator<< ( std::ostream& os, const MixingInputConfig & c) {
17  std::stringstream ss;
18  os <<c.type();
19  return os;
20 }
21 
23 
24  bs_=pset.getParameter<int>("bunchspace");
25  minb_=(pset.getParameter<int>("minBunch")*25)/pset.getParameter<int>("bunchspace");
26  maxb_=(pset.getParameter<int>("maxBunch")*25)/pset.getParameter<int>("bunchspace");
27 
28  //FIXME. not covering all possible cases (not used anyways)
30  configs_[0].read(p0);
31 }
32 
33 
35  t_=itype(pset.getParameter<std::string>("type"));
36  an_=0;
37  // ia_=0;
38  dpfv_.clear();
39  dp_.clear();
40  moot_=0;
41  ioot_=0;
42 
43  switch(t_){
44  case 1:
45  an_=pset.getParameter<double>("averageNumber");
46  break;
47  case 2:
48  an_=pset.getParameter<double>("averageNumber");
49  break;
50  case 3:
51  //not supposed to be valid
52  case 4:
53  dpfv_=pset.getParameter<edm::ParameterSet>("nbPileupEvents").getParameter<std::vector<int> >("probFunctionVariable");
54  dp_=pset.getParameter<edm::ParameterSet>("nbPileupEvents").getParameter<std::vector<double> >("probValue");
55  break;
56  }
57 
58  if (pset.getUntrackedParameter<bool>("manage_OOT"))
59  {
60  std::string OOT_type = pset.getUntrackedParameter<std::string>("OOT_type");
61 
62  if(OOT_type == "Poisson" || OOT_type == "poisson")
63  moot_=2;
64  else if (OOT_type == "Fixed" || OOT_type == "fixed") {
65  moot_=1;
66  ioot_=pset.getUntrackedParameter<int>("intFixed_OOT", -1);
67  }
68  }
69 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void read(edm::ParameterSet &pset)
const int & bunchSpace() const
std::vector< double > dp_
std::vector< int > dpfv_
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
const int itype() const
void read(edm::ParameterSet &pset)
std::string type() const
std::vector< MixingInputConfig > configs_
const MixingInputConfig & config(unsigned int i=0) const