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 | 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::EDAnalyzer | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
EDAnalyzer () | |
SerialTaskQueue * | globalLuminosityBlocksQueue () |
SerialTaskQueue * | globalRunsQueue () |
ModuleDescription const & | moduleDescription () const |
std::string | workerType () const |
~EDAnalyzer () 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 | |
ESProxyIndex const * | esGetTokenIndices (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::vector< ModuleDescription const * > &modules, 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 |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
void | updateLookup (eventsetup::ESRecordsToProxyIndices 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_ |
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... | |
edm::InputTag | m_endcapDigiCollection |
secondary name given to collection of digis More... | |
edm::InputTag | m_headerCollection |
name of module/plugin/producer making headers More... | |
std::string | m_location |
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... | |
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::EDAnalyzer | |
typedef EDAnalyzer | ModuleType |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions inherited from edm::EDAnalyzer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &) |
static bool | wantsGlobalLuminosityBlocks () |
static bool | wantsGlobalRuns () |
static bool | wantsStreamLuminosityBlocks () |
static bool | wantsStreamRuns () |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
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 ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
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<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) |
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 38 of file EcalPedOffset.cc.
References m_bestPed, m_DACmax, m_DACmin, and m_RMSmax.
|
override |
Destructor.
dtor
Definition at line 67 of file EcalPedOffset.cc.
References m_pedResult, and m_pedValues.
|
overridevirtual |
! Analyze
perform the analysis
Implements edm::EDAnalyzer.
Definition at line 88 of file EcalPedOffset.cc.
References ftlUncalibratedRecHits_cfi::barrelDigis, edm::SortedCollection< T, SORT >::begin(), edm::DataFrameContainer::empty(), edm::SortedCollection< T, SORT >::end(), ftlUncalibratedRecHits_cfi::endcapDigis, edm::HandleBase::isValid(), LogDebug, m_barrelDigiCollection, m_endcapDigiCollection, m_headerCollection, m_run, EcalDCCHeaderBlock::EcalDCCEventSettings::ped_offset, and readDACs().
|
overridevirtual |
BeginRun.
begin the run
Reimplemented from edm::EDAnalyzer.
Definition at line 77 of file EcalPedOffset.cc.
References ecalElectronicsMap_, edm::EventSetup::get(), patZpeak::handle, LogDebug, and edm::ESHandle< T >::product().
|
overridevirtual |
EndJob.
perform the minimization and write results
Reimplemented from edm::EDAnalyzer.
Definition at line 223 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().
|
private |
void EcalPedOffset::makePlots | ( | ) |
create the plots of the DAC pedestal trend
Definition at line 428 of file EcalPedOffset.cc.
References ALCARECODTCalibSynchCosmicsDQM_cff::folderName, LogDebug, m_maxChi2OverNDFAllowed_, m_maxSlopeAllowed_, m_minSlopeAllowed_, m_pedValues, m_plotting, and indexGen::rootFile.
Referenced by endJob().
|
private |
Definition at line 154 of file EcalPedOffset.cc.
References ecalMGPA::adc(), edm::DataFrameContainer::begin(), EcalElectronicsId::dccId(), ecalElectronicsMap_, edm::DataFrameContainer::end(), ecalMGPA::gainId(), EcalElectronicsMapping::getElectronicsId(), EBDetId::ic(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, EcalDataFrame::MAXSAMPLES, and simplePhotonAnalyzer_cfi::sample.
Referenced by analyze().
|
private |
Definition at line 187 of file EcalPedOffset.cc.
References ecalMGPA::adc(), edm::DataFrameContainer::begin(), EcalElectronicsId::dccId(), ecalElectronicsMap_, edm::DataFrameContainer::end(), ecalMGPA::gainId(), EcalElectronicsMapping::getElectronicsId(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, EcalDataFrame::MAXSAMPLES, and simplePhotonAnalyzer_cfi::sample.
void EcalPedOffset::writeDb | ( | ) |
WriteDB.
write the m_pedResult in the DB FIXME divide into sub-tasks
Definition at line 241 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, MonPedestalOffsetsDat::setDACG1(), MonPedestalOffsetsDat::setDACG12(), MonPedestalOffsetsDat::setDACG6(), MonRunTag::setGeneralTag(), RunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunIOV::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunIOV::setRunIOV(), RunTypeDef::setRunType(), RunTag::setRunTypeDef(), 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 385 of file EcalPedOffset.cc.
References MillePedeFileConverter_cfg::fileName, intToString(), m_pedResult, m_pedValues, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by endJob().
|
private |
Definition at line 55 of file EcalPedOffset.h.
Referenced by beginRun(), and readDACs().
|
private |
secondary name given to collection of digis
Definition at line 61 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 73 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 87 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
Definition at line 71 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
Definition at line 70 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
database host name
Definition at line 76 of file EcalPedOffset.h.
|
private |
|
private |
|
private |
|
private |
|
private |
secondary name given to collection of digis
Definition at line 62 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
name of module/plugin/producer making headers
Definition at line 63 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 89 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
max chi2/ndf allowed for linearity test
Definition at line 100 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
max slope (in magnitude) allowed for linearity test
Definition at line 96 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
min slope (in magnitude) allowed for linearity test
Definition at line 98 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
Definition at line 68 of file EcalPedOffset.h.
Referenced by endJob(), writeDb(), writeXMLFiles(), and ~EcalPedOffset().
|
private |
Definition at line 67 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 94 of file EcalPedOffset.h.
Referenced by endJob(), and makePlots().
|
private |
Definition at line 72 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and readDACs().
|
private |
|
private |
name of the xml file to be saved
Definition at line 65 of file EcalPedOffset.h.
Referenced by endJob().