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")),
99 inputTagFEDRaw_(ps.getParameter<
edm::
InputTag>(
"InputTagFEDRaw")),
100 runZS_(ps.getParameter<
bool>(
"RunZS")),
101 runFrontEndFormatError_(ps.getParameter<
bool>(
"FrontEndFormatError")) {
102 std::vector<bool> upgrades = {
104 upgrade_ = std::any_of(std::begin(upgrades), std::end(upgrades), [](
bool a) {
return a; });
105 legacy_ = std::any_of(std::begin(upgrades), std::end(upgrades), [](
bool a) {
return !
a; });
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;
182 auto tpParam =
db->getHcalTPChannelParameter(hcalTTDetId,
false);
184 fixedPointWeight = tpParam->getauxi1();
188 if (aieta <= lastHBRing) {
193 if (fixedPointWeight != -1) {
201 }
else if (aieta < lastHERing) {
203 if (fixedPointWeight != -1) {
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;
347 if (fedHandle.
isValid() && emap !=
nullptr) {
351 <<
"\nrequested in configuration, but not found in the event." 352 <<
"\nQuit returning empty product." << std::endl;
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
edm::InputTag inputTagFEDRaw_
input tag for FEDRawDataCollection
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)
T getParameter(std::string const &) const
HcalTrigPrimDigiProducer(const edm::ParameterSet &ps)
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbService_beginRun_
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
std::vector< edm::InputTag > inputUpgradeLabel_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
T const * product() const
HcalTriggerPrimitiveAlgo theAlgo_
const HcalElectronicsMap * getHcalMapping() const
edm::EDGetTokenT< HFDigiCollection > tok_hf_
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet LongShortCut_
bool overrideDBweightsAndFilterHB_
T const * product() const
void setWeightQIE11(int aieta, int weight)
std::shared_ptr< const HcalTPGCompressor > getHcalCompressor() const
void setNumFilterPresamplesHEQIE11(int presamples)
bool overrideDBweightsAndFilterHE_
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
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 run(const HcalTPGCoder *incoder, const HcalTPGCompressor *outcoder, const HcalDbService *conditions, HcalTrigPrimDigiCollection &result, const HcalTrigTowerGeometry *trigTowerGeometry, float rctlsb, const HcalFeatureBit *LongvrsShortCut, const Digis &... digis)
void setNCTScaleShift(int)
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > tok_lutMetadata_
edm::EDGetTokenT< QIE11DigiCollection > tok_hbhe_up_
edm::ESGetToken< HcalDbService, HcalDbRecord > tok_dbService_
void setNumFilterPresamplesHBQIE11(int presamples)
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
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