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) |
! Analyze More... | |
void | beginRun (edm::Run const &, edm::EventSetup const &eventSetup) |
BeginRun. More... | |
EcalPedOffset (const edm::ParameterSet &ps) | |
Constructor. More... | |
void | endJob (void) |
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... | |
virtual | ~EcalPedOffset () |
Destructor. More... | |
Public Member Functions inherited from edm::EDAnalyzer | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
EDAnalyzer () | |
ModuleDescription const & | moduleDescription () const |
std::string | workerType () const |
virtual | ~EDAnalyzer () |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
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 &) |
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 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.
|
virtual |
Destructor.
dtor
Definition at line 72 of file EcalPedOffset.cc.
References citk::for(), m_pedResult, and m_pedValues.
|
virtual |
! Analyze
perform the analysis
Implements edm::EDAnalyzer.
Definition at line 104 of file EcalPedOffset.cc.
References edm::HandleBase::isValid(), LogDebug, m_barrelDigiCollection, m_endcapDigiCollection, m_headerCollection, m_run, EcalDCCHeaderBlock::EcalDCCEventSettings::ped_offset, and readDACs().
|
virtual |
BeginRun.
begin the run
Reimplemented from edm::EDAnalyzer.
Definition at line 89 of file EcalPedOffset.cc.
References ecalElectronicsMap_, edm::EventSetup::get(), patZpeak::handle, LogDebug, and edm::ESHandle< class >::product().
|
virtual |
EndJob.
perform the minimization and write results
Reimplemented from edm::EDAnalyzer.
Definition at line 273 of file EcalPedOffset.cc.
References m_DACmax, m_DACmin, m_dbHostName, m_pedResult, m_pedValues, m_plotting, m_xmlFile, makePlots(), writeDb(), and writeXMLFiles().
|
private |
void EcalPedOffset::makePlots | ( | ) |
create the plots of the DAC pedestal trend
Definition at line 513 of file EcalPedOffset.cc.
References LogDebug, m_maxChi2OverNDFAllowed_, m_maxSlopeAllowed_, m_minSlopeAllowed_, m_pedValues, and m_plotting.
Referenced by endJob().
|
private |
Definition at line 182 of file EcalPedOffset.cc.
References ecalMGPA::adc(), EcalElectronicsId::dccId(), ecalElectronicsMap_, ecalMGPA::gainId(), EcalElectronicsMapping::getElectronicsId(), EBDetId::ic(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, EcalDataFrame::MAXSAMPLES, and compare_using_db::sample.
Referenced by analyze().
|
private |
Definition at line 226 of file EcalPedOffset.cc.
References ecalMGPA::adc(), EcalElectronicsId::dccId(), ecalElectronicsMap_, ecalMGPA::gainId(), EcalElectronicsMapping::getElectronicsId(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, EcalDataFrame::MAXSAMPLES, and compare_using_db::sample.
void EcalPedOffset::writeDb | ( | ) |
WriteDB.
write the m_pedResult in the DB FIXME divide into sub-tasks
Definition at line 296 of file EcalPedOffset.cc.
References alignCSCRings::e, 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, query::result, DTTTrigCorrFirst::run, MonPedestalOffsetsDat::setDACG1(), MonPedestalOffsetsDat::setDACG12(), MonPedestalOffsetsDat::setDACG6(), RunTag::setGeneralTag(), MonRunTag::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 461 of file EcalPedOffset.cc.
References MillePedeFileConverter_cfg::fileName, intToString(), m_pedResult, m_pedValues, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by endJob().
|
private |
Definition at line 60 of file EcalPedOffset.h.
Referenced by beginRun(), and readDACs().
|
private |
secondary name given to collection of digis
Definition at line 66 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 78 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 92 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
Definition at line 76 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
Definition at line 75 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
database host name
Definition at line 81 of file EcalPedOffset.h.
|
private |
|
private |
|
private |
|
private |
|
private |
secondary name given to collection of digis
Definition at line 67 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
name of module/plugin/producer making headers
Definition at line 68 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 94 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
max chi2/ndf allowed for linearity test
Definition at line 105 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
max slope (in magnitude) allowed for linearity test
Definition at line 101 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
min slope (in magnitude) allowed for linearity test
Definition at line 103 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
Definition at line 73 of file EcalPedOffset.h.
Referenced by endJob(), writeDb(), writeXMLFiles(), and ~EcalPedOffset().
|
private |
Definition at line 72 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 99 of file EcalPedOffset.h.
Referenced by endJob(), and makePlots().
|
private |
Definition at line 77 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and readDACs().
|
private |
|
private |
name of the xml file to be saved
Definition at line 70 of file EcalPedOffset.h.
Referenced by endJob().