calculate the best DAC value to obtain a pedestal = 200 More...
#include <EcalPedOffset.h>
Public Member Functions | |
void | analyze (edm::Event const &event, edm::EventSetup const &eventSetup) override |
! Analyze More... | |
void | beginRun (edm::Run const &, edm::EventSetup const &eventSetup) override |
BeginRun. More... | |
EcalPedOffset (const edm::ParameterSet &ps) | |
Constructor. More... | |
void | endJob (void) override |
EndJob. More... | |
void | endRun (edm::Run const &, edm::EventSetup const &) override |
EndRun. More... | |
void | makePlots () |
create the plots of the DAC pedestal trend More... | |
void | writeDb () |
WriteDB. More... | |
void | writeXMLFiles (std::string fileName) |
write the results into xml format More... | |
~EcalPedOffset () override | |
Destructor. More... | |
Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns > | |
EDAnalyzer ()=default | |
EDAnalyzer (const EDAnalyzer &)=delete | |
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
SerialTaskQueue * | globalRunsQueue () final |
const EDAnalyzer & | operator= (const EDAnalyzer &)=delete |
bool | wantsGlobalLuminosityBlocks () const noexcept final |
bool | wantsGlobalRuns () const noexcept final |
bool | wantsInputProcessBlocks () const noexcept final |
bool | wantsProcessBlocks () const noexcept final |
Public Member Functions inherited from edm::one::EDAnalyzerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
EDAnalyzerBase () | |
ModuleDescription const & | moduleDescription () const |
bool | wantsStreamLuminosityBlocks () const noexcept |
bool | wantsStreamRuns () const noexcept |
~EDAnalyzerBase () override | |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ESResolverIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
std::vector< ESResolverIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
void | updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) |
virtual | ~EDConsumerBase () noexcept(false) |
Private Member Functions | |
std::string | intToString (int num) |
void | readDACs (const edm::Handle< EBDigiCollection > &pDigis, const std::map< int, int > &DACvalues) |
void | readDACs (const edm::Handle< EEDigiCollection > &pDigis, const std::map< int, int > &DACvalues) |
Private Attributes | |
const EcalElectronicsMapping * | ecalElectronicsMap_ |
const edm::InputTag | m_barrelDigiCollection |
secondary name given to collection of digis More... | |
int | m_bestPed |
bool | m_create_moniov |
int | m_DACmax |
int | m_DACmin |
std::string | m_dbHostName |
database host name More... | |
int | m_dbHostPort |
database More... | |
std::string | m_dbName |
database name More... | |
std::string | m_dbPassword |
database user password More... | |
std::string | m_dbUserName |
database user name More... | |
const edm::EDGetTokenT< EBDigiCollection > | m_ebDigiToken |
const edm::EDGetTokenT< EEDigiCollection > | m_eeDigiToken |
const edm::InputTag | m_endcapDigiCollection |
secondary name given to collection of digis More... | |
const edm::InputTag | m_headerCollection |
name of module/plugin/producer making headers More... | |
std::string | m_location |
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > | m_mappingToken |
double | m_maxChi2OverNDFAllowed_ |
max chi2/ndf allowed for linearity test More... | |
double | m_maxSlopeAllowed_ |
max slope (in magnitude) allowed for linearity test More... | |
double | m_minSlopeAllowed_ |
min slope (in magnitude) allowed for linearity test More... | |
std::map< int, TPedResult * > | m_pedResult |
std::map< int, TPedValues * > | m_pedValues |
std::string | m_plotting |
the root file where to store the detail plots More... | |
const edm::EDGetTokenT< EcalRawDataCollection > | m_rawDataToken |
double | m_RMSmax |
int | m_run |
run number More... | |
std::string | m_xmlFile |
name of the xml file to be saved More... | |
Additional Inherited Members | |
Public Types inherited from edm::one::EDAnalyzerBase | |
typedef EDAnalyzerBase | ModuleType |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions inherited from edm::one::EDAnalyzerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
template<BranchType B = InEvent> | |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
template<Transition Tr = Transition::Event> | |
constexpr auto | esConsumes () |
template<Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag tag) |
template<Transition Tr = Transition::Event> | |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
Used with EventSetupRecord::doGet. More... | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
void | resetItemsToGetFrom (BranchType iType) |
calculate the best DAC value to obtain a pedestal = 200
Definition at line 28 of file EcalPedOffset.h.
EcalPedOffset::EcalPedOffset | ( | const edm::ParameterSet & | ps | ) |
Constructor.
ctor
Definition at line 31 of file EcalPedOffset.cc.
References m_bestPed, m_DACmax, m_DACmin, and m_RMSmax.
|
override |
Destructor.
dtor
Definition at line 64 of file EcalPedOffset.cc.
References cms::cuda::for(), m_pedResult, and m_pedValues.
|
overridevirtual |
! Analyze
perform the analysis
Implements edm::one::EDAnalyzerBase.
Definition at line 90 of file EcalPedOffset.cc.
References mtdUncalibratedRecHits_cfi::barrelDigis, edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), mtdUncalibratedRecHits_cfi::endcapDigis, LogDebug, m_barrelDigiCollection, m_ebDigiToken, m_eeDigiToken, m_endcapDigiCollection, m_rawDataToken, m_run, EcalDCCHeaderBlock::EcalDCCEventSettings::ped_offset, and readDACs().
|
override |
BeginRun.
begin the run
Definition at line 74 of file EcalPedOffset.cc.
References ecalElectronicsMap_, options_cfi::eventSetup, LogDebug, and m_mappingToken.
|
overridevirtual |
EndJob.
perform the minimization and write results
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 225 of file EcalPedOffset.cc.
References m_DACmax, m_DACmin, m_dbHostName, m_pedResult, m_pedValues, m_plotting, m_xmlFile, makePlots(), writeDb(), and writeXMLFiles().
Referenced by o2olib.O2ORunMgr::executeJob().
|
override |
|
private |
Definition at line 459 of file EcalPedOffset.cc.
References EgammaValidation_cff::num.
Referenced by writeXMLFiles().
void EcalPedOffset::makePlots | ( | ) |
create the plots of the DAC pedestal trend
Definition at line 430 of file EcalPedOffset.cc.
References ALCARECODTCalibSynchCosmicsDQM_cff::folderName, LogDebug, m_maxChi2OverNDFAllowed_, m_maxSlopeAllowed_, m_minSlopeAllowed_, m_pedValues, and m_plotting.
Referenced by endJob().
|
private |
Definition at line 156 of file EcalPedOffset.cc.
References gpuClustering::adc, edm::DataFrameContainer::begin(), EcalElectronicsId::dccId(), hcalRecHitTable_cff::detId, ecalElectronicsMap_, edm::DataFrameContainer::end(), ecalLiteDTU::gainId(), EcalElectronicsMapping::getElectronicsId(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, EcalDataFrame::MAXSAMPLES, and ecalGpuTask_cfi::sample.
Referenced by analyze().
|
private |
Definition at line 189 of file EcalPedOffset.cc.
References gpuClustering::adc, edm::DataFrameContainer::begin(), EcalElectronicsId::dccId(), hcalRecHitTable_cff::detId, ecalElectronicsMap_, edm::DataFrameContainer::end(), ecalLiteDTU::gainId(), EcalElectronicsMapping::getElectronicsId(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, EcalDataFrame::MAXSAMPLES, and ecalGpuTask_cfi::sample.
void EcalPedOffset::writeDb | ( | ) |
WriteDB.
write the m_pedResult in the DB FIXME divide into sub-tasks
Definition at line 243 of file EcalPedOffset.cc.
References MillePedeFileConverter_cfg::e, runTauDisplay::eid, PixelSLinkDataInputSource_cfi::fedid, EcalCondDBInterface::fetchMonRunIOV(), EcalCondDBInterface::fetchRunIOV(), EcalCondDBInterface::getEcalLogicID(), RunIOV::getRunTag(), EcalCondDBInterface::insertDataSet(), LogDebug, m_create_moniov, m_dbHostName, m_dbHostPort, m_dbName, m_dbPassword, m_dbUserName, m_location, m_pedResult, m_pedValues, m_run, mps_fire::result, writedatasetfile::run, test_db_connect::runtag, MonPedestalOffsetsDat::setDACG1(), MonPedestalOffsetsDat::setDACG12(), MonPedestalOffsetsDat::setDACG6(), MonRunTag::setGeneralTag(), LocationDef::setLocation(), MonVersionDef::setMonitoringVersion(), MonRunIOV::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunIOV::setRunIOV(), RunTypeDef::setRunType(), MonRunIOV::setSubRunNumber(), MonRunIOV::setSubRunStart(), MonPedestalOffsetsDat::setTaskStatus(), and Tm::setToCurrentGMTime().
Referenced by endJob().
void EcalPedOffset::writeXMLFiles | ( | std::string | fileName | ) |
write the results into xml format
write the m_pedResults to XML files
Definition at line 387 of file EcalPedOffset.cc.
References MillePedeFileConverter_cfg::fileName, intToString(), m_pedResult, m_pedValues, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by endJob().
|
private |
Definition at line 58 of file EcalPedOffset.h.
Referenced by beginRun(), and readDACs().
|
private |
secondary name given to collection of digis
Definition at line 64 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 81 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and readDACs().
|
private |
allow the creation of a new moniov if not existing in the DB by default it is false.
Definition at line 95 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
Definition at line 79 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
Definition at line 78 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
database host name
Definition at line 84 of file EcalPedOffset.h.
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 69 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 70 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
secondary name given to collection of digis
Definition at line 65 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
name of module/plugin/producer making headers
Definition at line 66 of file EcalPedOffset.h.
|
private |
Definition at line 97 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
Definition at line 71 of file EcalPedOffset.h.
Referenced by beginRun().
|
private |
max chi2/ndf allowed for linearity test
Definition at line 108 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
max slope (in magnitude) allowed for linearity test
Definition at line 104 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
min slope (in magnitude) allowed for linearity test
Definition at line 106 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
Definition at line 76 of file EcalPedOffset.h.
Referenced by endJob(), writeDb(), writeXMLFiles(), and ~EcalPedOffset().
|
private |
Definition at line 75 of file EcalPedOffset.h.
Referenced by endJob(), makePlots(), readDACs(), writeDb(), writeXMLFiles(), and ~EcalPedOffset().
|
private |
the root file where to store the detail plots
Definition at line 102 of file EcalPedOffset.h.
Referenced by endJob(), and makePlots().
|
private |
Definition at line 68 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 80 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and readDACs().
|
private |
|
private |
name of the xml file to be saved
Definition at line 73 of file EcalPedOffset.h.
Referenced by endJob().