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 | |
EDAnalyzer () | |
std::string | workerType () const |
virtual | ~EDAnalyzer () |
Private Member Functions | |
std::string | intToString (int num) |
void | readDACs (edm::Handle< EBDigiCollection > pDigis, std::map< int, int > DACvalues) |
void | readDACs (edm::Handle< EEDigiCollection > pDigis, 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 |
typedef WorkerT< EDAnalyzer > | WorkerType |
Static Public Member Functions inherited from edm::EDAnalyzer | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDAnalyzer | |
CurrentProcessingContext const * | currentContext () const |
calculate the best DAC value to obtain a pedestal = 200
Definition at line 30 of file EcalPedOffset.h.
EcalPedOffset::EcalPedOffset | ( | const edm::ParameterSet & | ps | ) |
Constructor.
ctor
Definition at line 40 of file EcalPedOffset.cc.
References m_bestPed, m_DACmax, m_DACmin, and m_RMSmax.
|
virtual |
Destructor.
dtor
Definition at line 74 of file EcalPedOffset.cc.
References m_pedResult, and m_pedValues.
|
virtual |
! Analyze
perform the analysis
Implements edm::EDAnalyzer.
Definition at line 106 of file EcalPedOffset.cc.
References L1Comparator_cfi::FEDid, 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 91 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 275 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 515 of file EcalPedOffset.cc.
References LogDebug, m_maxChi2OverNDFAllowed_, m_maxSlopeAllowed_, m_minSlopeAllowed_, m_pedValues, m_plotting, and BuildWebpage::rootFile.
Referenced by endJob().
|
private |
Definition at line 184 of file EcalPedOffset.cc.
References ecalMGPA::adc(), ecalElectronicsMap_, L1Comparator_cfi::FEDid, ecalMGPA::gainId(), EcalElectronicsMapping::getElectronicsId(), EBDetId::ic(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, and EcalDataFrame::MAXSAMPLES.
Referenced by analyze().
|
private |
Definition at line 228 of file EcalPedOffset.cc.
References ecalMGPA::adc(), ecalElectronicsMap_, L1Comparator_cfi::FEDid, ecalMGPA::gainId(), EcalElectronicsMapping::getElectronicsId(), LogDebug, m_bestPed, m_pedValues, m_RMSmax, and EcalDataFrame::MAXSAMPLES.
void EcalPedOffset::writeDb | ( | ) |
WriteDB.
write the m_pedResult in the DB FIXME divide into sub-tasks
Definition at line 298 of file EcalPedOffset.cc.
References 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 463 of file EcalPedOffset.cc.
References convertXMLtoSQLite_cfg::fileName, intToString(), m_pedResult, and m_pedValues.
Referenced by endJob().
|
private |
Definition at line 62 of file EcalPedOffset.h.
Referenced by beginRun(), and readDACs().
|
private |
secondary name given to collection of digis
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 |
allow the creation of a new moniov if not existing in the DB by default it is false.
Definition at line 94 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
Definition at line 78 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
Definition at line 77 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and endJob().
|
private |
database host name
Definition at line 83 of file EcalPedOffset.h.
|
private |
|
private |
|
private |
|
private |
|
private |
secondary name given to collection of digis
Definition at line 69 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
name of module/plugin/producer making headers
Definition at line 70 of file EcalPedOffset.h.
Referenced by analyze().
|
private |
Definition at line 96 of file EcalPedOffset.h.
Referenced by writeDb().
|
private |
max chi2/ndf allowed for linearity test
Definition at line 107 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
max slope (in magnitude) allowed for linearity test
Definition at line 103 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
min slope (in magnitude) allowed for linearity test
Definition at line 105 of file EcalPedOffset.h.
Referenced by makePlots().
|
private |
Definition at line 75 of file EcalPedOffset.h.
Referenced by endJob(), writeDb(), writeXMLFiles(), and ~EcalPedOffset().
|
private |
Definition at line 74 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 101 of file EcalPedOffset.h.
Referenced by endJob(), and makePlots().
|
private |
Definition at line 79 of file EcalPedOffset.h.
Referenced by EcalPedOffset(), and readDACs().
|
private |
|
private |
name of the xml file to be saved
Definition at line 72 of file EcalPedOffset.h.
Referenced by endJob().