82 : theAlgo_(ps.getParameter<bool>(
"peakFilter"),
83 ps.getParameter<std::
vector<double> >(
"weights"),
84 ps.getParameter<int>(
"latency"),
85 ps.getParameter<uint32_t>(
"FG_threshold"),
86 ps.getParameter<std::
vector<uint32_t> >(
"FG_HF_thresholds"),
87 ps.getParameter<uint32_t>(
"ZS_threshold"),
88 ps.getParameter<int>(
"numberOfSamples"),
89 ps.getParameter<int>(
"numberOfPresamples"),
90 ps.getParameter<int>(
"numberOfFilterPresamplesHBQIE11"),
91 ps.getParameter<int>(
"numberOfFilterPresamplesHEQIE11"),
92 ps.getParameter<int>(
"numberOfSamplesHF"),
93 ps.getParameter<int>(
"numberOfPresamplesHF"),
94 ps.getParameter<bool>(
"useTDCInMinBiasBits"),
95 ps.getParameter<uint32_t>(
"MinSignalThreshold"),
96 ps.getParameter<uint32_t>(
"PMTNoiseThreshold")),
97 inputLabel_(ps.getParameter<std::
vector<edm::
InputTag> >(
"inputLabel")),
98 inputUpgradeLabel_(ps.getParameter<std::
vector<edm::
InputTag> >(
"inputUpgradeLabel")),
99 inputTagFEDRaw_(ps.getParameter<edm::
InputTag>(
"InputTagFEDRaw")),
100 runZS_(ps.getParameter<bool>(
"RunZS")),
101 runFrontEndFormatError_(ps.getParameter<bool>(
"FrontEndFormatError")) {
102 std::vector<bool> upgrades = {
112 if (ps.
exists(
"parameters")) {
120 if (ps.
exists(
"LSConfig")) {
133 tok_hcalTopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
151 produces<HcalTrigPrimDigiCollection>();
170 for (std::vector<HcalElectronicsId>::const_iterator eId = vIds.begin(); eId != vIds.end(); eId++) {
172 if (hcalTTDetId.null())
175 int aieta =
abs(hcalTTDetId.ieta());
178 int fixedPointWeight = -1.0;
182 auto tpParam = db->getHcalTPChannelParameter(hcalTTDetId,
false);
184 fixedPointWeight = tpParam->getauxi1();
188 if (aieta <= lastHBRing) {
193 if (fixedPointWeight != -1.0) {
201 }
else if (aieta < lastHERing) {
203 if (fixedPointWeight != -1.0) {
222 float rctlsb = lutMetadata->getRctLsb();
244 <<
"\nrequested in configuration, but not found in the event."
245 <<
"\nQuit returning empty product." << std::endl;
255 <<
"\nrequested in configuration, but not found in the event."
256 <<
"\nQuit returning empty product." << std::endl;
272 <<
"\nrequested in configuration, but not found in the event."
273 <<
"\nQuit returning empty product." << std::endl;
283 <<
"\nrequested in configuration, but not found in the event."
284 <<
"\nQuit returning empty product." << std::endl;
308 outTranscoder->getHcalCompressor().get(),
316 }
else if (
legacy_ and upgrade_) {
318 outTranscoder->getHcalCompressor().get(),
330 outTranscoder->getHcalCompressor().get(),
347 if (fedHandle.
isValid() && emap !=
nullptr) {
351 <<
"\nrequested in configuration, but not found in the event."
352 <<
"\nQuit returning empty product." << std::endl;
edm::InputTag inputTagFEDRaw_
input tag for FEDRawDataCollection
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecord > tok_trigTowerGeom_
void produce(edm::Event &e, const edm::EventSetup &c) override
void runFEFormatError(const FEDRawDataCollection *rawraw, const HcalElectronicsMap *emap, HcalTrigPrimDigiCollection &result)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
HcalTrigPrimDigiProducer(const edm::ParameterSet &ps)
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbService_beginRun_
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< edm::InputTag > inputUpgradeLabel_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
HcalTriggerPrimitiveAlgo theAlgo_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
bool getData(T &iHolder) const
edm::ParameterSet LongShortCut_
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
bool overrideDBweightsAndFilterHB_
void run(const HcalTPGCoder *incoder, const HcalTPGCompressor *outcoder, const HcalDbService *conditions, HcalTrigPrimDigiCollection &result, const HcalTrigTowerGeometry *trigTowerGeometry, float rctlsb, const HcalFeatureBit *LongvrsShortCut, const Digis &...digis)
void setNumFilterPresamplesHEQIE11(int presamples)
bool overrideDBweightsAndFilterHE_
Abs< T >::type abs(const T &t)
edm::ESGetToken< CaloTPGTranscoder, CaloTPGRecord > tok_tpgTranscoder_
void runZS(HcalTrigPrimDigiCollection &tp)
edm::EDGetTokenT< QIE10DigiCollection > tok_hf_up_
edm::ESGetToken< HcalTPGCoder, HcalTPGRecord > tok_tpgCoder_
Log< level::Info, false > LogInfo
void setNCTScaleShift(int)
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > tok_lutMetadata_
edm::EDGetTokenT< QIE11DigiCollection > tok_hbhe_up_
T const * product() const
T const * product() const
T getParameter(std::string const &) const
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbService_
void setNumFilterPresamplesHBQIE11(int presamples)
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
void setWeightQIE11(int aieta, double weight)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void setRCTScaleShift(int)
std::vector< edm::InputTag > inputLabel_
input tags for HCAL digis
bool runFrontEndFormatError_
void setUpgradeFlags(bool hb, bool he, bool hf)
void overrideParameters(const edm::ParameterSet &ps)
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > tok_hcalTopo_
void setWeightsQIE11(const edm::ParameterSet &weightsQIE11)
void setPeakFinderAlgorithm(int algo)
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
void setFixSaturationFlag(bool fix_saturation)
~HcalTrigPrimDigiProducer() override