|
|
Go to the documentation of this file.
90 std::unique_ptr<EcalTrigPrimFunctionalAlgo>
algo_;
140 : barrelOnly_(iConfig.getParameter<
bool>(
"BarrelOnly")),
141 tcpFormat_(iConfig.getParameter<
bool>(
"TcpOutput")),
142 debug_(iConfig.getParameter<
bool>(
"Debug")),
143 famos_(iConfig.getParameter<
bool>(
"Famos")),
144 tpInfoPrintout_(iConfig.getParameter<
bool>(
"TPinfoPrintout")),
168 binOfMaximum_(iConfig.getParameter<
int>(
"binOfMaximum")),
169 fillBinOfMaximumFromHistory_(-1 == binOfMaximum_),
172 produces<EcalTrigPrimDigiCollection>();
174 produces<EcalTrigPrimDigiCollection>(
"formatTCP");
186 if (not iFillFromHistory) {
192 const std::string kModuleName{
"ecalUnsuppressedDigis"};
193 for (
auto it = iHistory.
rbegin(), itEnd = iHistory.
rend(); it != itEnd; ++it) {
198 if (not iFillFromHistory) {
201 <<
") is different from the one found in ProductRegistration(=" << psetBinOfMax
205 edm::LogInfo(
"EcalTPG") <<
"EcalTrigPrimProducer is using binOfMaximum "
206 "found in ProductRegistry : "
214 edm::LogWarning(
"EcalTPG") <<
"Could not find product registry of EBDigiCollection (label "
215 "ecalUnsuppressedDigis), had to set the following parameters by "
216 "Hand: binOfMaximum="
228 algo_ = std::make_unique<EcalTrigPrimFunctionalAlgo>(
233 algo_ = std::make_unique<EcalTrigPrimFunctionalAlgo>(
262 algo_->setPointers(ecaltpLin,
268 ecaltpgOddWeightGroup,
284 algo_->setPointers2(ecaltpgFgEBGroup,
288 ecaltpgFineGrainTowerEE,
319 edm::LogWarning(
"EcalTPG") <<
" Couldnt find Barrel dataframes with producer " <<
labels.module <<
" and label "
320 <<
labels.productInstance <<
"!!!";
327 edm::LogWarning(
"EcalTPG") <<
" Couldnt find Endcap dataframes with producer " <<
labels.module <<
" and label "
328 <<
labels.productInstance <<
"!!!";
334 throw cms::Exception(
" ProductNotFound") <<
"No EBDataFrames(EEDataFrames) with producer " <<
labels.module
335 <<
" and label " <<
labels.productInstance <<
" found in input!!\n";
339 LogDebug(
"EcalTPG") <<
" =================> Treating event " <<
e.id() <<
", Number of EBDataFrames "
340 << ebDigis.
product()->
size() <<
", Number of EEDataFrames " <<
eeDigis.product()->size();
342 LogDebug(
"EcalTPG") <<
" =================> Treating event " <<
e.id() <<
", Number of EBDataFrames "
345 auto pOut = std::make_unique<EcalTrigPrimDigiCollection>();
346 auto pOutTcp = std::make_unique<EcalTrigPrimDigiCollection>();
354 algo_->run(ebdc, *pOut, *pOutTcp);
359 algo_->run(eedc, *pOut, *pOutTcp);
362 edm::LogInfo(
"produce") <<
"For Barrel + Endcap, " << pOut->size() <<
" TP Digis were produced";
366 for (
unsigned int i = 0;
i < pOut->size(); ++
i) {
368 for (
int isam = 0; isam < (*pOut)[
i].size(); ++isam) {
369 if ((*pOut)[
i][isam].raw())
373 LogDebug(
"EcalTPG") <<
" For tower " << (((*pOut)[
i])).id() <<
", TP is " << (*pOut)[
i];
376 LogDebug(
"EcalTPG") <<
"\n =================> For Barrel , " << pOut->size()
377 <<
" TP Digis were produced (including zero ones)";
379 LogDebug(
"EcalTPG") <<
"\n =================> For Barrel + Endcap, " << pOut->size()
380 <<
" TP Digis were produced (including zero ones)";
391 desc.add<
bool>(
"BarrelOnly",
false);
392 desc.add<
bool>(
"TcpOutput",
false);
393 desc.add<
bool>(
"Debug",
false);
394 desc.add<
bool>(
"Famos",
false);
399 "A value of -1 will make the module lookup the value of 'binOfMaximum' "
400 "from the module 'ecalUnsuppressedDigis' from the process history. "
401 "Allowed values are -1 and from 1-10.");
404 desc.add<
int>(
"binOfMaximum", -1)->setComment(
kComment);
405 desc.add<
bool>(
"TPinfoPrintout",
false);
edm::EDGetTokenT< EEDigiCollection > tokenEE_
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcd > tokenEcalTPGStripStatus_
edm::ESGetToken< EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd > tokenEcalTPGCrystalStatus_
const_reverse_iterator rend() const
static int findBinOfMaximum(bool iFillFromHistory, int iPSetValue, edm::ProcessHistory const &iHistory)
T const * product() const
edm::ESGetToken< EcalTPGPedestals, EcalTPGPedestalsRcd > tokenEcalTPGPedestals_
edm::ESGetToken< EcalTPGFineGrainStripEE, EcalTPGFineGrainStripEERcd > tokenEcalTPGFineGrainStripEE_
const_reverse_iterator rbegin() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< EBDigiCollection > tokenEB_
edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcd > tokenEcalTPGLutIdMap_
Log< level::Info, false > LogInfo
Log< level::Warning, false > LogWarning
edm::ESGetToken< EcalTPGSpike, EcalTPGSpikeRcd > tokenEcalTPGSpike_
edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcd > tokenEcalTPGLutGroup_
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
std::unique_ptr< EcalTrigPrimFunctionalAlgo > algo_
#define DEFINE_FWK_MODULE(type)
unsigned long long cacheID_
edm::ESGetToken< EcalTPGLinearizationConst, EcalTPGLinearizationConstRcd > tokenEcalTPGLinearization_
edm::ESGetToken< EcalTPGWeightGroup, EcalTPGWeightGroupRcd > tokenEcalTPGWeightGroup_
edm::ESGetToken< EcalTPGFineGrainTowerEE, EcalTPGFineGrainTowerEERcd > tokenEcalTPGFineGrainTowerEE_
bool fillBinOfMaximumFromHistory_
void endRun(const edm::Run &, const edm::EventSetup &) override
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
edm::ESGetToken< EcalTPGTPMode, EcalTPGTPModeRcd > tokenEcalTPGTPMode_
edm::ESGetToken< EcalTPGSlidingWindow, EcalTPGSlidingWindowRcd > tokenEcalTPGSlidingWindow_
static std::string topLevelPSet(std::string const &iName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)
edm::ESGetToken< EcalTPGFineGrainEBIdMap, EcalTPGFineGrainEBIdMapRcd > tokenEcalTPGFineGrainEBIdMap_
static const char *const kComment
edm::ESGetToken< EcalTPGWeightIdMap, EcalTPGWeightIdMapRcd > tokenEcalTPGWeightIdMap_
ParameterSet const & getParameterSet(ParameterSetID const &id)
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecord > tokenEndcapGeom_
edm::ESGetToken< EcalTPGOddWeightIdMap, EcalTPGOddWeightIdMapRcd > tokenEcalTPGOddWeightIdMap_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > tokenETTMap_
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > tokenEcalTPGTowerStatus_
void produce(edm::Event &e, const edm::EventSetup &c) override
unsigned long long cacheIdentifier() const
~EcalTrigPrimProducer() override
EcalTrigPrimProducer(const edm::ParameterSet &conf)
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > tokenEcalMapping_
edm::ESGetToken< EcalTPGOddWeightGroup, EcalTPGOddWeightGroupRcd > tokenEcalTPGOddWeightGroup_
void addDefault(ParameterSetDescription const &psetDescription)
unsigned long long getRecords(edm::EventSetup const &setup)
edm::ESGetToken< EcalTPGFineGrainEBGroup, EcalTPGFineGrainEBGroupRcd > tokenEcalTPGFineGrainEBGroup_