|
| SiStripChannelGainFromDBMiscalibrator (const edm::ParameterSet &) |
|
| ~SiStripChannelGainFromDBMiscalibrator () override |
|
| EDAnalyzer ()=default |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () const |
|
| ~EDAnalyzerBase () override |
|
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 &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
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 & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
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) |
|
|
typedef EDAnalyzerBase | ModuleType |
|
typedef ProductLabels | Labels |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (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) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Description: Class to miscalibrate a SiStrip Channel Gain payload from Database
Implementation: Read a SiStrip Channel Gain payload from DB (either central DB or sqlite file) and apply a miscalibration (either an offset / gaussian smearing or both) returns a local sqlite file with the same since of the original payload
Definition at line 50 of file SiStripChannelGainFromDBMiscalibrator.cc.
Implements edm::one::EDAnalyzerBase.
Definition at line 116 of file SiStripChannelGainFromDBMiscalibrator.cc.
121 const auto*
const tTopo = tTopoHandle.
product();
134 std::map<sistripsummary::TrackerRegion, SiStripMiscalibrate::Smearings> mapOfSmearings;
140 bool m_doScale(thePSet.getParameter<
bool>(
"doScale"));
141 bool m_doSmear(thePSet.getParameter<
bool>(
"doSmear"));
142 double m_scaleFactor(thePSet.getParameter<
double>(
"scaleFactor"));
143 double m_smearFactor(thePSet.getParameter<
double>(
"smearFactor"));
146 params.setSmearing(m_doScale, m_doSmear, m_scaleFactor, m_smearFactor);
153 std::map<std::pair<uint32_t, int>,
float> theMap, oldPayloadMap;
155 std::vector<uint32_t> detid;
157 for (
const auto&
d : detid) {
168 for (
unsigned int j = 0;
j <
regions.size();
j++) {
169 bool checkRegion = (mapOfSmearings.count(
regions[
j]) != 0);
184 for (
int it = 0; it <
range.second -
range.first; it++) {
187 std::pair<uint32_t, int>
index = std::make_pair(
d, nAPV);
196 float smearedGain = CLHEP::RandGauss::shoot(
Gain,
params.m_smearFactor);
205 std::unique_ptr<SiStripApvGain> theAPVGains = this->
getNewObject(theMap);
208 uint32_t cachedId(0);
212 for (
const auto& element : theMap) {
213 uint32_t
DetId = element.first.first;
214 int nAPV = element.first.second;
215 float new_gain = element.second;
216 float old_gain = oldPayloadMap[std::make_pair(
DetId, nAPV)];
219 if (cachedId != 0 &&
DetId != cachedId) {
232 gain_ratio.
add(new_gain / old_gain);
233 o_gain.
add(old_gain);
234 n_gain.
add(new_gain);
243 throw std::runtime_error(
"PoolDBService required.");
References SiStripMiscalibrate::Entry::add(), cond::service::PoolDBOutputService::currentTime(), ztail::d, spr::find(), IntegrityClient_cfi::Gain, edm::EventSetup::get(), get, SiStripGain::getApvGain(), SiStripGain::getDetIds(), getNewObject(), SiStripGain::getRange(), SiStripMiscalibrate::getRegionFromString(), SiStripMiscalibrate::getRegionsFromDetId(), edm::Service< T >::isAvailable(), dqmiolumiharvest::j, m_gainType, m_parameters, m_Record, SiStripMiscalibrate::Entry::mean(), new_payload_map, old_payload_map, CalibrationSummaryClient_cfi::params, edm::ESHandle< T >::product(), FastTimerService_cff::range, ratio_map, HLT_2018_cff::region, SiStripMiscalibrate::Entry::reset(), scale_map, smear_map, AlCaHLTBitMon_QueryRunRegistry::string, and cond::service::PoolDBOutputService::writeOne().