CMS 3D CMS Logo

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