CMS 3D CMS Logo

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)
26  edm::ParameterSet p0 = pset.getParameter<edm::ParameterSet>("input");
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 }
operator<<
std::ostream & operator<<(std::ostream &os, const MixingModuleConfig &c)
Definition: MixingModuleConfig.cc:9
MixingInputConfig::ioot_
int ioot_
Definition: MixingModuleConfig.h:66
MixingModuleConfig::minb_
int minb_
Definition: MixingModuleConfig.h:87
MixingModuleConfig::configs_
std::vector< MixingInputConfig > configs_
Definition: MixingModuleConfig.h:85
MixingModuleConfig.h
MixingInputConfig::dpfv_
std::vector< int > dpfv_
Definition: MixingModuleConfig.h:63
MixingInputConfig::read
void read(edm::ParameterSet &pset)
Definition: MixingModuleConfig.cc:30
MixingModuleConfig::maxb_
int maxb_
Definition: MixingModuleConfig.h:88
mix_2012_lumiLevel_15_20_50ns_PoissonOOTPU_cfi.OOT_type
OOT_type
manage out-of-time pileup setting this to True means that the out-of-time pileup will have a differen...
Definition: mix_2012_lumiLevel_15_20_50ns_PoissonOOTPU_cfi.py:59
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
MixingInputConfig::an_
double an_
Definition: MixingModuleConfig.h:61
MixingModuleConfig::bs_
int bs_
Definition: MixingModuleConfig.h:89
MixingModuleConfig::read
void read(edm::ParameterSet &pset)
Definition: MixingModuleConfig.cc:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
MixingModuleConfig
Definition: MixingModuleConfig.h:71
MixingModuleConfig::MixingModuleConfig
MixingModuleConfig()
Definition: MixingModuleConfig.cc:6
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
MixingInputConfig::dp_
std::vector< double > dp_
Definition: MixingModuleConfig.h:64
MixingInputConfig::moot_
int moot_
Definition: MixingModuleConfig.h:65
MixingInputConfig::MixingInputConfig
MixingInputConfig()
Definition: MixingModuleConfig.cc:7
MixingInputConfig::itype
const int itype() const
Definition: MixingModuleConfig.h:19
ParameterSet.h
MixingInputConfig
Definition: MixingModuleConfig.h:14
MixingInputConfig::t_
int t_
Definition: MixingModuleConfig.h:60
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27