85 : theAlgo_(ps.getParameter<
bool>(
"peakFilter"),
86 ps.getParameter<
std::
vector<double> >(
"weights"),
87 ps.getParameter<
int>(
"latency"),
88 ps.getParameter<uint32_t>(
"FG_threshold"),
89 ps.getParameter<
std::
vector<uint32_t> >(
"FG_HF_thresholds"),
90 ps.getParameter<uint32_t>(
"ZS_threshold"),
91 ps.getParameter<
int>(
"numberOfSamples"),
92 ps.getParameter<
int>(
"numberOfPresamples"),
93 ps.getParameter<
int>(
"numberOfFilterPresamplesHBQIE11"),
94 ps.getParameter<
int>(
"numberOfFilterPresamplesHEQIE11"),
95 ps.getParameter<
int>(
"numberOfSamplesHF"),
96 ps.getParameter<
int>(
"numberOfPresamplesHF"),
97 ps.getParameter<
bool>(
"useTDCInMinBiasBits"),
98 ps.getParameter<uint32_t>(
"MinSignalThreshold"),
99 ps.getParameter<uint32_t>(
"PMTNoiseThreshold")),
102 inputTagFEDRaw_(ps.getParameter<
edm::
InputTag>(
"InputTagFEDRaw")),
103 runZS_(ps.getParameter<
bool>(
"RunZS")),
104 runFrontEndFormatError_(ps.getParameter<
bool>(
"FrontEndFormatError")) {
105 std::vector<bool> upgrades = {
107 upgrade_ = std::any_of(std::begin(upgrades), std::end(upgrades), [](
bool a) {
return a; });
108 legacy_ = std::any_of(std::begin(upgrades), std::end(upgrades), [](
bool a) {
return !
a; });
119 if (ps.
exists(
"parameters")) {
127 if (ps.
exists(
"LSConfig")) {
140 tok_hcalTopo_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
158 produces<HcalTrigPrimDigiCollection>();
177 for (std::vector<HcalElectronicsId>::const_iterator eId = vIds.begin(); eId != vIds.end(); eId++) {
179 if (hcalTTDetId.null())
182 int aieta =
abs(hcalTTDetId.ieta());
184 if (aieta >= lastHERing)
188 int fixedPointWeight = 255;
191 int codedVetoThreshold = 0;
197 auto tpParam =
db->getHcalTPChannelParameter(hcalTTDetId,
false);
202 fixedPointWeight = tpParam->getauxi1();
203 codedVetoThreshold = tpParam->getauxi2();
208 if (aieta <= lastHBRing) {
216 }
else if (aieta < lastHERing) {
257 <<
"\nrequested in configuration, but not found in the event." 258 <<
"\nQuit returning empty product." << std::endl;
268 <<
"\nrequested in configuration, but not found in the event." 269 <<
"\nQuit returning empty product." << std::endl;
285 <<
"\nrequested in configuration, but not found in the event." 286 <<
"\nQuit returning empty product." << std::endl;
296 <<
"\nrequested in configuration, but not found in the event." 297 <<
"\nQuit returning empty product." << std::endl;
360 if (fedHandle.
isValid() && emap !=
nullptr) {
364 <<
"\nrequested in configuration, but not found in the event." 365 <<
"\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
void setCodedVetoThresholds(const edm::ParameterSet &codedVetoThresholds)
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 setCodedVetoThreshold(int aieta, int codedVetoThreshold)
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_
bool overrideDBvetoThresholdsHE_
edm::EDGetTokenT< QIE11DigiCollection > tok_hbhe_up_
bool overrideDBvetoThresholdsHB_
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