CMS 3D CMS Logo

HGCalECONDEmulatorParameters.cc
Go to the documentation of this file.
3 
4 using namespace hgcal::econd;
5 
7  : chan_surv_prob(iConfig.getParameter<double>("channelSurv")),
8  active(iConfig.getParameter<bool>("active")),
9  passthrough_mode(iConfig.getParameter<bool>("passthroughMode")),
10  expected_mode(iConfig.getParameter<bool>("expectedMode")),
11  characterisation_mode(iConfig.getParameter<bool>("characterisationMode")),
12  matching_ebo_numbers(iConfig.getParameter<bool>("matchingEBOnumbers")),
13  bo_truncated(iConfig.getParameter<bool>("bufferOverflowTruncated")),
14  enabled_erxs(iConfig.getParameter<std::vector<unsigned int> >("enabledERxs")),
15  header_marker(iConfig.getParameter<unsigned int>("headerMarker")),
16  num_channels_per_erx(iConfig.getParameter<unsigned int>("numChannelsPerERx")),
17  add_econd_crc(iConfig.getParameter<bool>("addCRC")),
18  add_idle_word(iConfig.getParameter<bool>("addIdleWord")),
19  programmable_pattern(iConfig.getParameter<unsigned int>("programmablePattern")),
20  error_prob({.bitO = iConfig.getParameter<double>("bitOError"),
21  .bitB = iConfig.getParameter<double>("bitBError"),
22  .bitE = iConfig.getParameter<double>("bitEError"),
23  .bitT = iConfig.getParameter<double>("bitTError"),
24  .bitH = iConfig.getParameter<double>("bitHError"),
25  .bitS = iConfig.getParameter<double>("bitSError")}),
26  default_totstatus(iConfig.getParameter<unsigned int>("defaultToTStatus")) {}
27 
30  desc.add<double>("channelSurv", 1.);
31  desc.add<bool>("active", true)->setComment("is the ECON-D activated?");
32  desc.add<bool>("passthroughMode", false)->setComment("ECON-D in pass-through mode?");
33  desc.add<bool>("expectedMode", false)->setComment("is an Event HDR/TRL expected to be received from the HGCROCs?");
34  desc.add<bool>("characterisationMode", false);
35  desc.add<unsigned int>("defaultToTStatus", (unsigned int)ToTStatus::AutomaticFull);
36  desc.add<bool>("matchingEBOnumbers", true)
37  ->setComment(
38  "is the transmitted E/B/O (according to mode selected by user) matching the E/B/O value in the ECON-D "
39  "L1A FIFO?");
40  desc.add<bool>("bufferOverflowTruncated", false)->setComment("is the packet truncated for buffer overflow?");
41  { // list the enabled eRxs in all ECON-Ds
42  const unsigned int max_erxs_per_econd = 12;
43  std::vector<unsigned int> default_enabled_erxs;
44  for (size_t i = 0; i < max_erxs_per_econd; ++i)
45  default_enabled_erxs.emplace_back(i);
46  desc.add<std::vector<unsigned int> >("enabledERxs", default_enabled_erxs)
47  ->setComment("list of channels to be enabled in readout");
48  }
49  desc.add<unsigned int>("headerMarker", 0x154)->setComment("9b programmable pattern; default is '0xAA' + '0b0'");
50  desc.add<unsigned int>("numChannelsPerERx", 37)->setComment("number of channels managed in each ECON-D eRx");
51  desc.add<bool>("addCRC", true)->setComment("add the ECON-D CRC word computed from the whole payload");
52  desc.add<bool>("addIdleWord", false)->setComment("add an idle word at the end of each event packet");
53  desc.add<unsigned int>("programmablePattern", 0xa5a5a5)
54  ->setComment("a 24b programmable pattern used by backend to find event packet");
55  desc.add<double>("bitOError", 0.)->setComment("probability that the bit-O error is set");
56  desc.add<double>("bitBError", 0.)->setComment("probability that the bit-B error is set");
57  desc.add<double>("bitEError", 0.)->setComment("probability that the bit-E error is set");
58  desc.add<double>("bitTError", 0.)->setComment("probability that the bit-T error is set");
59  desc.add<double>("bitHError", 0.)->setComment("probability that the bit-H error is set");
60  desc.add<double>("bitSError", 0.)->setComment("probability that the bit-S error is set");
61  return desc;
62 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static edm::ParameterSetDescription description()
EmulatorParameters(const edm::ParameterSet &)