Skip to content

Commit

Permalink
Merge pull request #29159 from lwang046/Hcal-TDCconfiguration
Browse files Browse the repository at this point in the history
HCAL: Adding HB TDC packing switch
  • Loading branch information
cmsbuild authored Mar 13, 2020
2 parents a2d4be6 + 778f664 commit a57bc8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion EventFilter/HcalRawToDigi/plugins/HcalDigiToRawuHTR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class HcalDigiToRawuHTR : public edm::global::EDProducer<> {
int _verbosity;
int tdc1_;
int tdc2_;
bool packHBTDC_;
static constexpr int tdcmax_ = 49;
std::string electronicsMapLabel_;

Expand All @@ -66,6 +67,7 @@ HcalDigiToRawuHTR::HcalDigiToRawuHTR(const edm::ParameterSet& iConfig)
: _verbosity(iConfig.getUntrackedParameter<int>("Verbosity", 0)),
tdc1_(iConfig.getParameter<int>("tdc1")),
tdc2_(iConfig.getParameter<int>("tdc2")),
packHBTDC_(iConfig.getParameter<bool>("packHBTDC")),
electronicsMapLabel_(iConfig.getParameter<std::string>("ElectronicsMap")),
tok_QIE10DigiCollection_(
consumes<HcalDataFrameContainer<QIE10DataFrame> >(iConfig.getParameter<edm::InputTag>("QIE10"))),
Expand Down Expand Up @@ -152,7 +154,7 @@ void HcalDigiToRawuHTR::produce(edm::StreamID id, edm::Event& iEvent, const edm:
int presamples = qiedf.presamples();

// convert to hb qie data if hb
if (HcalDetId(detid.rawId()).subdet() == HcalSubdetector::HcalBarrel)
if (packHBTDC_ && HcalDetId(detid.rawId()).subdet() == HcalSubdetector::HcalBarrel)
qiedf = convertHB(qiedf, tdc1_, tdc2_, tdcmax_);

if (!uhtrs.exist(uhtrIndex)) {
Expand Down Expand Up @@ -283,6 +285,7 @@ void HcalDigiToRawuHTR::fillDescriptions(edm::ConfigurationDescriptions& descrip
desc.addUntracked<int>("Verbosity", 0);
desc.add<int>("tdc1", 4);
desc.add<int>("tdc2", 20);
desc.add<bool>("packHBTDC", true);
desc.add<std::string>("ElectronicsMap", "");
desc.add<edm::InputTag>("QIE10", edm::InputTag("simHcalDigis", "HFQIE10DigiCollection"));
desc.add<edm::InputTag>("QIE11", edm::InputTag("simHcalDigis", "HBHEQIE11DigiCollection"));
Expand Down

0 comments on commit a57bc8e

Please sign in to comment.