#include <SiStripApvGainFromFileBuilder.cc>
Classes | |
struct | Summary |
Public Types | |
typedef std::map< uint32_t, float > | Gain |
Public Types inherited from edm::one::EDAnalyzerBase | |
typedef EDAnalyzerBase | ModuleType |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &) |
Static Public Member Functions inherited from edm::one::EDAnalyzerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Private Member Functions | |
void | format_summary (std::stringstream &line, Summary summary) const |
bool | gain_from_maps (uint32_t det_id, int onlineAPV_id, float &gain) |
void | gain_from_maps (uint32_t det_id, uint16_t totalAPVs, std::vector< std::pair< int, float >> &gain) const |
Gain * | get_map (std::vector< Gain *> *maps, int onlineAPV_id) |
int | online2offline (uint16_t onlineAPV_id, uint16_t totalAPVs) const |
void | output_maps (std::vector< Gain *> *maps, const char *basename) const |
void | output_summary () const |
void | read_tickmark (void) |
Private Attributes | |
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > | cablingToken_ |
const SiStripDetCabling * | detCabling_ |
bool | doGainNormalization_ |
double | dummyAPVGain_ |
std::vector< Summary > | ex_summary_ |
std::vector< Gain * > | gains_ |
double | gainThreshold_ |
std::vector< Gain * > | negative_gains_ |
std::vector< Gain * > | null_gains_ |
bool | outputMaps_ |
bool | outputSummary_ |
bool | putDummyIntoBadChannels_ |
bool | putDummyIntoOffChannels_ |
bool | putDummyIntoUncabled_ |
bool | putDummyIntoUnscanned_ |
std::vector< Summary > | summary_ |
edm::FileInPath | tfp_ |
Static Private Attributes | |
static constexpr float | k_GainNormalizationFactor = 640.f |
static constexpr float | k_InvalidGain = 999999.f |
Additional Inherited Members | |
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) |
Description: Created SiStripApvGain paylaods from tickmark height input ASCII files coming from SiStrip opto-gain scans.
Definition at line 46 of file SiStripApvGainFromFileBuilder.cc.
typedef std::map<uint32_t, float> SiStripApvGainFromFileBuilder::Gain |
Definition at line 50 of file SiStripApvGainFromFileBuilder.cc.
|
explicit |
Brief Constructor.
Definition at line 188 of file SiStripApvGainFromFileBuilder.cc.
|
override |
Brief Destructor performing the memory cleanup.
Definition at line 182 of file SiStripApvGainFromFileBuilder.cc.
References CleanUp, gains_, negative_gains_, and null_gains_.
|
overridevirtual |
Brief One dummy-event analysis to create the database record.
Implements edm::one::EDAnalyzerBase.
Definition at line 201 of file SiStripApvGainFromFileBuilder.cc.
References cond::service::PoolDBOutputService::appendOneIOV(), cond::service::PoolDBOutputService::beginOfTime(), cablingToken_, DMR_cfg::cerr, cond::service::PoolDBOutputService::createOneIOV(), cond::service::PoolDBOutputService::currentTime(), detCabling_, doGainNormalization_, dummyAPVGain_, MillePedeFileConverter_cfg::e, ex_summary_, cppFunctionSkipper::exception, f, l1tstage2_dqm_sourceclient-live_cfg::fedId, Hcal_Conditions_forGlobalTag_cff::gain, gain_from_maps(), gains_, gainThreshold_, SiStripDetCabling::getConnections(), edm::EventSetup::getData(), globals_cff::id1, globals_cff::id2, edm::Service< T >::isAvailable(), cond::service::PoolDBOutputService::isNewTagRequest(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, dqmiolumiharvest::j, k_GainNormalizationFactor, k_InvalidGain, SiStripDetInfoFileReader::kDefaultFile, LogTrace, negative_gains_, null_gains_, getGTfromDQMFile::obj, online2offline(), output_maps(), output_summary(), outputMaps_, outputSummary_, putDummyIntoBadChannels_, putDummyIntoOffChannels_, putDummyIntoUncabled_, putDummyIntoUnscanned_, isotrackApplyRegressor::range, SiStripDetInfoFileReader::read(), read_tickmark(), SQLiteCheck_cfg::reader, edmLumisInFiles::summary, and summary_.
|
static |
Brief framework fillDescription
Definition at line 623 of file SiStripApvGainFromFileBuilder.cc.
References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and k_GainNormalizationFactor.
|
private |
Brief Format the output line for the channel summary.
Definition at line 520 of file SiStripApvGainFromFileBuilder.cc.
References getInfo::conn, mps_splice::line, AlCaHLTBitMon_QueryRunRegistry::string, and edmLumisInFiles::summary.
Referenced by output_summary().
|
private |
Brief Find the gain value for a pair det_id, APV_id in the internal maps.
Definition at line 530 of file SiStripApvGainFromFileBuilder.cc.
References Hcal_Conditions_forGlobalTag_cff::gain, gains_, get_map(), genParticles_cff::map, negative_gains_, and null_gains_.
Referenced by analyze().
|
private |
Definition at line 566 of file SiStripApvGainFromFileBuilder.cc.
References Hcal_Conditions_forGlobalTag_cff::gain, gains_, mps_fire::i, k_InvalidGain, genParticles_cff::map, negative_gains_, null_gains_, online2offline(), and edm::second().
|
private |
Brief Returns the mapping among channels and gain heights for the APVs. This method searchs the mapping of detector Ids <-> gains provided. If the mapping exists for the requested APV it is returned; if not a new empty mapping is created, inserted and retruned. The methods accepts onlineIDs running from 0 to 5.
Definition at line 446 of file SiStripApvGainFromFileBuilder.cc.
References genParticles_cff::map.
Referenced by gain_from_maps(), and read_tickmark().
|
private |
Brief Convert online APV id into offline APV id.
Definition at line 619 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), and gain_from_maps().
|
private |
Brief Dumps the internal mapping on a ASCII files. This method dumps the detector id <-> gain maps into acii files separated for each APV. The basenmae of for the acii file has to be provided as a input parameter.
Definition at line 469 of file SiStripApvGainFromFileBuilder.cc.
References sistrip::APV, genParticles_cff::map, mergeVDriftHistosByStation::name, and pileupReCalc_HLTpaths::trunc.
Referenced by analyze().
|
private |
Brief Dump the exceptions summary on a ASCII file. This method dumps the online coordinate of the channels for which there was an exception for filling the database record. Exceptions are the non cabled modules, the channels that were off during the tickmark scan, the channels sending corrupted data duirng the tickmark scan. These exceptions have been solved putting a dummy gain into the DB record or putting a zero gain.
Definition at line 488 of file SiStripApvGainFromFileBuilder.cc.
References ex_summary_, format_summary(), mps_splice::line, alignCSCRings::s, edmLumisInFiles::summary, summary_, and pileupReCalc_HLTpaths::trunc.
Referenced by analyze().
|
private |
Brief Read the ASCII file containing the tickmark gains. This method reads the ASCII files that contains the tickmark heights for every APV. The heights are first translated into gains, dividing by 640, then are stored into maps to be associated to the detector ids. Maps are created for every APV index. Negative and Zero heights, yielding to a non physical gain, are stored into separate maps. Negative gain: channels sending bad data at the tickmark scan. Zero gain : channels switched off during the tickmark scan.
Definition at line 373 of file SiStripApvGainFromFileBuilder.cc.
References CleanUp, submitPVResolutionJobs::count, f, corrVsCorr::filename, edm::FileInPath::fullPath(), gains_, get_map(), LogTrace, genParticles_cff::map, negative_gains_, null_gains_, runTheMatrix::ret, and tfp_.
Referenced by analyze().
|
private |
ES token for the cabling
Definition at line 82 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Description of detector cabling.
Definition at line 94 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Normalize the tickmark for the APV gain.
Definition at line 86 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Dummy value for the APV gain.
Definition at line 85 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Brief Collection of the exceptions encountered when filling the DB. An exception occur for all the non-cabled channels ( no gain associated in the tikmark file) and for all the channels that were off ( with zero gain associated) or sending corrupted data (with negative values in the tickmark file). At the end of the job the exception summary is dumped in SiStripApvGainExceptionSummary.txt.Collection of DB filling exceptions.
Definition at line 116 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), and output_summary().
|
private |
Brief Maps [det_id <–> gains] arranged per APV indexes.Mapping channels with positive heights.
Definition at line 98 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), gain_from_maps(), read_tickmark(), and ~SiStripApvGainFromFileBuilder().
|
private |
Threshold for accepting the APV gain in the tickmark scan file.
Definition at line 84 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
staticprivate |
Definition at line 168 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), and fillDescriptions().
|
staticprivate |
Definition at line 169 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), and gain_from_maps().
|
private |
Mapping channels sending bad data.
Definition at line 99 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), gain_from_maps(), read_tickmark(), and ~SiStripApvGainFromFileBuilder().
|
private |
Mapping channels switched off during the scan.
Definition at line 100 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), gain_from_maps(), read_tickmark(), and ~SiStripApvGainFromFileBuilder().
|
private |
Flag for dumping the internal maps on ASCII files.
Definition at line 91 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Flag for dumping the summary of the exceptions during the DB filling.
Definition at line 92 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Flag for putting the dummy gain in the channels with negative gains.
Definition at line 90 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Flag for putting the dummy gain in the channels that were off during the tickmark scan.
Definition at line 89 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Flag for putting the dummy gain in the channels not actuall cabled.
Definition at line 87 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Flag for putting the dummy gain in the chennals not scanned.
Definition at line 88 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze().
|
private |
Brief Collection of the channels entered in the DB without exceptions. The channels whose APV gain has been input in the DB straight from the tickmark scan are collected in the summary vector. The summary list is dumped in the SiStripApvGainSummary.txt at the end of the job. Collection of channel with no DB filling exceptions.
Definition at line 107 of file SiStripApvGainFromFileBuilder.cc.
Referenced by analyze(), and output_summary().
|
private |
File Path for the tickmark scan with the APV gains.
Definition at line 83 of file SiStripApvGainFromFileBuilder.cc.
Referenced by read_tickmark().