CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CorrPCCProducer Class Reference
Inheritance diagram for CorrPCCProducer:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CorrPCCProducer (const edm::ParameterSet &)
 
 ~CorrPCCProducer () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &iSetup) final
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void calculateCorrections (std::vector< float >, std::vector< float > &, float &)
 
void dqmEndRun (edm::Run const &runSeg, const edm::EventSetup &iSetup) final
 
void dqmEndRunProduce (const edm::Run &runSeg, const edm::EventSetup &iSetup)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, const edm::EventSetup &iSetup) final
 
void estimateType1Frac (std::vector< float >, float &)
 
void evaluateCorrectionResiduals (std::vector< float >)
 
float getMaximum (std::vector< float >)
 
void makeCorrectionTemplate ()
 
void resetBlock ()
 

Private Attributes

unsigned int approxLumiBlockSize_
 
std::vector< float > correctionScaleFactors_
 
std::vector< float > correctionTemplate_
 
TH1F * corrlumiAvg_h
 
unsigned int countLumi_
 
std::vector< float > errOnLumiByBX_
 
std::vector< float > events_
 
TFile * histoFile
 
TList * hlist
 
unsigned int iBlock = 0
 
TH1F * lumiAvg_h
 
std::map< std::pair< unsigned int, unsigned int >, unsigned int > lumiInfoCounter
 
std::map< std::pair< unsigned int, unsigned int >, LumiInfo * > lumiInfoMap
 
std::map< std::pair< unsigned int, unsigned int >, LumiInfo * >::iterator lumiInfoMapIterator
 
std::map< unsigned int, LumiInfo * > lumiInfoMapPerLS
 
edm::EDGetTokenT< LumiInfolumiInfoToken
 
std::vector< unsigned int > lumiSections
 
unsigned int maxLS = 3500
 
float mean_type1_residual
 
float mean_type1_residual_unc
 
float mean_type2_residual
 
float mean_type2_residual_unc
 
unsigned int minimumNumberOfEvents
 
unsigned int nTrain
 
float overallCorrection_
 
LumiCorrectionspccCorrections
 
std::string pccSrc_
 
float pedestal
 
float pedestal_unc
 
TGraphErrors * pedestalGraph
 
edm::Service< cond::service::PoolDBOutputServicepoolDbService
 
std::string prodInst_
 
std::vector< float > rawlumiBX_
 
TH1F * scaleFactorAvg_h
 
unsigned int thisLS
 
std::vector< float > totalLumiByBX_
 
std::vector< float > totalLumiByBXAvg_
 
float type1Frac
 
TGraphErrors * type1FracGraph
 
TH1F * type1FracHist
 
MonitorElementType1FracMon
 
TGraphErrors * type1resGraph
 
TH1F * type1resHist
 
MonitorElementType1ResMon
 
double type2_a_
 
double type2_b_
 
TGraphErrors * type2resGraph
 
TH1F * type2resHist
 
MonitorElementType2ResMon
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description


class: CorrPCCProducer.cc

description: Computes the type 1 and type 2 corrections to the luminosity type 1 - first (spillover from previous BXs real clusters) type 2 - after (comes from real activation)

authors:Sam Higginbotham (shigg.nosp@m.inb@.nosp@m.cern..nosp@m.ch) and Chris Palmer (capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch)


Definition at line 49 of file CorrPCCProducer.cc.

Constructor & Destructor Documentation

◆ CorrPCCProducer()

CorrPCCProducer::CorrPCCProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 134 of file CorrPCCProducer.cc.

134  {
135  pccSrc_ =
136  iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<std::string>("inLumiObLabel");
137  prodInst_ =
138  iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<std::string>("ProdInst");
140  iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<int>("approxLumiBlockSize");
141  type2_a_ = iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<double>("type2_a");
142  type2_b_ = iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<double>("type2_b");
143  countLumi_ = 0;
144  minimumNumberOfEvents = 1000;
145 
151 
152  resetBlock();
153 
155 
156  edm::InputTag inputPCCTag_(pccSrc_, prodInst_);
157 
158  lumiInfoToken = consumes<LumiInfo, edm::InLumi>(inputPCCTag_);
159 
160  histoFile = new TFile("CorrectionHisto.root", "RECREATE");
161 
162  type1FracGraph = new TGraphErrors();
163  type1resGraph = new TGraphErrors();
164  type2resGraph = new TGraphErrors();
165  type1FracGraph->SetName("Type1Fraction");
166  type1resGraph->SetName("Type1Res");
167  type2resGraph->SetName("Type2Res");
168  type1FracGraph->GetYaxis()->SetTitle("Type 1 Fraction");
169  type1resGraph->GetYaxis()->SetTitle("Type 1 Residual");
170  type2resGraph->GetYaxis()->SetTitle("Type 2 Residual");
171  type1FracGraph->GetXaxis()->SetTitle("Unique LS ID");
172  type1resGraph->GetXaxis()->SetTitle("Unique LS ID");
173  type2resGraph->GetXaxis()->SetTitle("Unique LS ID");
174  type1FracGraph->SetMarkerStyle(8);
175  type1resGraph->SetMarkerStyle(8);
176  type2resGraph->SetMarkerStyle(8);
177 
178  pedestalGraph = new TGraphErrors();
179  pedestalGraph->SetName("Pedestal");
180  pedestalGraph->GetYaxis()->SetTitle("pedestal value (counts) per lumi section");
181  pedestalGraph->GetXaxis()->SetTitle("Unique LS ID");
182  pedestalGraph->SetMarkerStyle(8);
183 }

References approxLumiBlockSize_, correctionScaleFactors_, correctionTemplate_, countLumi_, events_, edm::ParameterSet::getParameter(), histoFile, lumiInfoToken, makeCorrectionTemplate(), minimumNumberOfEvents, LumiConstants::numBX, pccSrc_, pedestalGraph, prodInst_, resetBlock(), totalLumiByBX_, totalLumiByBXAvg_, type1FracGraph, type1resGraph, type2_a_, type2_b_, and type2resGraph.

◆ ~CorrPCCProducer()

CorrPCCProducer::~CorrPCCProducer ( )
override

Definition at line 186 of file CorrPCCProducer.cc.

186 {}

Member Function Documentation

◆ beginLuminosityBlock()

void CorrPCCProducer::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
finalprivate

Definition at line 378 of file CorrPCCProducer.cc.

378  {
379  countLumi_++;
380 }

References countLumi_.

◆ bookHistograms()

void CorrPCCProducer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  context 
)
overrideprivatevirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 673 of file CorrPCCProducer.cc.

673  {
674  ibooker.setCurrentFolder("AlCaReco/LumiPCC/");
675  auto scope = DQMStore::IBooker::UseRunScope(ibooker);
676  Type1FracMon = ibooker.book1D("type1Fraction", "Type1Fraction;Lumisection;Type 1 Fraction", maxLS, 0, maxLS);
677  Type1ResMon = ibooker.book1D("type1Residual", "Type1Residual;Lumisection;Type 1 Residual", maxLS, 0, maxLS);
678  Type2ResMon = ibooker.book1D("type2Residual", "Type2Residual;Lumisection;Type 2 Residual", maxLS, 0, maxLS);
679 }

References dqm::implementation::IBooker::book1D(), maxLS, dqm::implementation::NavigatorBase::setCurrentFolder(), Type1FracMon, Type1ResMon, and Type2ResMon.

◆ calculateCorrections()

void CorrPCCProducer::calculateCorrections ( std::vector< float >  uncorrected,
std::vector< float > &  correctionScaleFactors_,
float &  overallCorrection_ 
)
private

Definition at line 297 of file CorrPCCProducer.cc.

299  {
300  type1Frac = 0;
301 
302  int nTrials = 4;
303 
304  for (int trial = 0; trial < nTrials; trial++) {
305  estimateType1Frac(uncorrected, type1Frac);
306  edm::LogInfo("INFO") << "type 1 fraction after iteration " << trial << " is " << type1Frac;
307  }
308 
309  //correction should never be negative
310  type1Frac = std::max(0.0, (double)type1Frac);
311 
312  std::vector<float> corrected_tmp_;
313  for (size_t i = 0; i < uncorrected.size(); i++) {
314  corrected_tmp_.push_back(uncorrected.at(i));
315  }
316 
317  //Apply all corrections
318  for (size_t i = 0; i < LumiConstants::numBX - 1; i++) {
319  // type 1 - first (spillover from previous BXs real clusters)
320  float bin_i = corrected_tmp_.at(i);
321  corrected_tmp_.at(i + 1) = corrected_tmp_.at(i + 1) - type1Frac * bin_i;
322 
323  // type 2 - after (comes from real activation)
324  bin_i = corrected_tmp_.at(i);
325  for (size_t j = i + 1; j < i + LumiConstants::numBX - 1; j++) {
326  if (j < LumiConstants::numBX) {
327  corrected_tmp_.at(j) = corrected_tmp_.at(j) - bin_i * correctionTemplate_.at(j - i);
328  } else {
329  corrected_tmp_.at(j - LumiConstants::numBX) =
330  corrected_tmp_.at(j - LumiConstants::numBX) - bin_i * correctionTemplate_.at(j - i);
331  }
332  }
333  }
334 
335  float lumiMax = getMaximum(corrected_tmp_);
336  float threshold = lumiMax * 0.2;
337 
338  //here subtract the pedestal
339  pedestal = 0.;
340  pedestal_unc = 0.;
341  int nped = 0;
342  for (size_t i = 0; i < LumiConstants::numBX; i++) {
343  if (corrected_tmp_.at(i) < threshold) {
344  pedestal += corrected_tmp_.at(i);
345  nped++;
346  }
347  }
348  if (nped > 0) {
349  pedestal_unc = sqrt(pedestal) / nped;
350  pedestal = pedestal / nped;
351  }
352  for (size_t i = 0; i < LumiConstants::numBX; i++) {
353  corrected_tmp_.at(i) = corrected_tmp_.at(i) - pedestal;
354  }
355 
356  evaluateCorrectionResiduals(corrected_tmp_);
357 
358  float integral_uncorr_clusters = 0;
359  float integral_corr_clusters = 0;
360 
361  //Calculate Per-BX correction factor and overall correction factor
362  for (size_t ibx = 0; ibx < corrected_tmp_.size(); ibx++) {
363  if (corrected_tmp_.at(ibx) > threshold) {
364  integral_uncorr_clusters += uncorrected.at(ibx);
365  integral_corr_clusters += corrected_tmp_.at(ibx);
366  }
367  if (corrected_tmp_.at(ibx) != 0.0 && uncorrected.at(ibx) != 0.0) {
368  correctionScaleFactors_.at(ibx) = corrected_tmp_.at(ibx) / uncorrected.at(ibx);
369  } else {
370  correctionScaleFactors_.at(ibx) = 0.0;
371  }
372  }
373 
374  overallCorrection_ = integral_corr_clusters / integral_uncorr_clusters;
375 }

References correctionScaleFactors_, correctionTemplate_, estimateType1Frac(), evaluateCorrectionResiduals(), getMaximum(), mps_fire::i, dqmiolumiharvest::j, SiStripPI::max, LumiConstants::numBX, overallCorrection_, pedestal, pedestal_unc, mathSSE::sqrt(), remoteMonitoring_LED_IterMethod_cfg::threshold, dtNoiseDBValidation_cfg::trial, and type1Frac.

Referenced by dqmEndRunProduce().

◆ dqmEndRun()

void CorrPCCProducer::dqmEndRun ( edm::Run const &  runSeg,
const edm::EventSetup iSetup 
)
finalprivatevirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 414 of file CorrPCCProducer.cc.

414  {
415  // TODO: why was this code not put here in the first place?
416  dqmEndRunProduce(runSeg, iSetup);
417 }

References dqmEndRunProduce().

◆ dqmEndRunProduce()

void CorrPCCProducer::dqmEndRunProduce ( const edm::Run runSeg,
const edm::EventSetup iSetup 
)
private

Definition at line 420 of file CorrPCCProducer.cc.

420  {
421  if (lumiSections.empty()) {
422  return;
423  }
424 
425  std::sort(lumiSections.begin(), lumiSections.end());
426 
427  edm::LogInfo("INFO") << "Number of Lumisections " << lumiSections.size() << " in run " << runSeg.run();
428 
429  //Determining integer number of blocks
430  float nBlocks_f = float(lumiSections.size()) / approxLumiBlockSize_;
431  unsigned int nBlocks = 1;
432  if (nBlocks_f > 1) {
433  if (nBlocks_f - lumiSections.size() / approxLumiBlockSize_ < 0.5) {
434  nBlocks = lumiSections.size() / approxLumiBlockSize_;
435  } else {
436  nBlocks = lumiSections.size() / approxLumiBlockSize_ + 1;
437  }
438  }
439 
440  float nLSPerBlock = float(lumiSections.size()) / nBlocks;
441 
442  std::vector<std::pair<unsigned int, unsigned int>> lsKeys;
443  lsKeys.clear();
444 
445  //Constructing nBlocks IOVs
446  for (unsigned iKey = 0; iKey < nBlocks; iKey++) {
447  lsKeys.push_back(std::make_pair(lumiSections[(unsigned int)(iKey * nLSPerBlock)],
448  lumiSections[(unsigned int)((iKey + 1) * nLSPerBlock) - 1]));
449  }
450 
451  lsKeys[0].first = 1;
452 
453  for (unsigned int lumiSection = 0; lumiSection < lumiSections.size(); lumiSection++) {
454  thisLS = lumiSections[lumiSection];
455 
456  std::pair<unsigned int, unsigned int> lsKey;
457 
458  bool foundKey = false;
459 
460  for (unsigned iKey = 0; iKey < nBlocks; iKey++) {
461  if ((thisLS >= lsKeys[iKey].first) && (thisLS <= lsKeys[iKey].second)) {
462  lsKey = lsKeys[iKey];
463  foundKey = true;
464  break;
465  }
466  }
467 
468  if (!foundKey) {
469  edm::LogInfo("WARNING") << "Didn't find key " << thisLS;
470  continue;
471  }
472 
473  if (lumiInfoMap.count(lsKey) == 0) {
474  lumiInfoMap[lsKey] = new LumiInfo();
475  }
476 
477  //Sum all lumi in IOV of lsKey
478  totalLumiByBX_ = lumiInfoMap[lsKey]->getInstLumiAllBX();
479  events_ = lumiInfoMap[lsKey]->getErrorLumiAllBX();
480 
481  rawlumiBX_ = lumiInfoMapPerLS[thisLS]->getInstLumiAllBX();
482  errOnLumiByBX_ = lumiInfoMapPerLS[thisLS]->getErrorLumiAllBX();
483 
484  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
487  }
488  lumiInfoMap[lsKey]->setInstLumiAllBX(totalLumiByBX_);
489  lumiInfoMap[lsKey]->setErrorLumiAllBX(events_);
490  lumiInfoCounter[lsKey]++;
491  }
492 
493  cond::Time_t thisIOV = 1;
494 
495  char* histname1 = new char[100];
496  char* histname2 = new char[100];
497  char* histname3 = new char[100];
498  char* histTitle1 = new char[100];
499  char* histTitle2 = new char[100];
500  char* histTitle3 = new char[100];
501  sprintf(histTitle1, "Type1Fraction_%d", runSeg.run());
502  sprintf(histTitle2, "Type1Res_%d", runSeg.run());
503  sprintf(histTitle3, "Type2Res_%d", runSeg.run());
504  type1FracHist = new TH1F(histTitle1, histTitle1, 1000, -0.5, 0.5);
505  type1resHist = new TH1F(histTitle2, histTitle2, 4000, -0.2, 0.2);
506  type2resHist = new TH1F(histTitle3, histTitle3, 4000, -0.2, 0.2);
507  delete[] histTitle1;
508  delete[] histTitle2;
509  delete[] histTitle3;
510 
512  totalLumiByBX_ = lumiInfoMapIterator->second->getInstLumiAllBX();
513  events_ = lumiInfoMapIterator->second->getErrorLumiAllBX();
514 
515  if (events_.empty()) {
516  continue;
517  }
518 
520  thisIOV = (cond::Time_t)(lu.value());
521 
522  sprintf(histname1,
523  "CorrectedLumiAvg_%d_%d_%d_%d",
524  runSeg.run(),
525  iBlock,
526  lumiInfoMapIterator->first.first,
527  lumiInfoMapIterator->first.second);
528  sprintf(histname2,
529  "ScaleFactorsAvg_%d_%d_%d_%d",
530  runSeg.run(),
531  iBlock,
532  lumiInfoMapIterator->first.first,
533  lumiInfoMapIterator->first.second);
534  sprintf(histname3,
535  "RawLumiAvg_%d_%d_%d_%d",
536  runSeg.run(),
537  iBlock,
538  lumiInfoMapIterator->first.first,
539  lumiInfoMapIterator->first.second);
540 
541  corrlumiAvg_h = new TH1F(histname1, "", LumiConstants::numBX, 1, LumiConstants::numBX);
542  scaleFactorAvg_h = new TH1F(histname2, "", LumiConstants::numBX, 1, LumiConstants::numBX);
543  lumiAvg_h = new TH1F(histname3, "", LumiConstants::numBX, 1, LumiConstants::numBX);
544 
545  //Averaging by the number of events
546  for (unsigned int i = 0; i < LumiConstants::numBX; i++) {
547  if (events_.at(i) != 0) {
549  } else {
550  totalLumiByBXAvg_[i] = 0.0;
551  }
552  }
553 
555 
556  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
558  if (events_.at(bx) != 0) {
559  corrlumiAvg_h->SetBinError(bx,
560  totalLumiByBXAvg_[bx] * correctionScaleFactors_[bx] / TMath::Sqrt(events_.at(bx)));
561  } else {
562  corrlumiAvg_h->SetBinError(bx, 0.0);
563  }
564 
565  scaleFactorAvg_h->SetBinContent(bx, correctionScaleFactors_[bx]);
566  lumiAvg_h->SetBinContent(bx, totalLumiByBXAvg_[bx]);
567  }
568 
569  //Writing the corrections to SQL lite file for db
576 
577  if (poolDbService.isAvailable()) {
578  poolDbService->writeOne<LumiCorrections>(pccCorrections, thisIOV, "LumiCorrectionsRcd");
579  } else {
580  throw std::runtime_error("PoolDBService required.");
581  }
582 
583  delete pccCorrections;
584 
585  histoFile->cd();
586  corrlumiAvg_h->Write();
587  scaleFactorAvg_h->Write();
588  lumiAvg_h->Write();
589 
590  delete corrlumiAvg_h;
591  delete scaleFactorAvg_h;
592  delete lumiAvg_h;
593 
594  type1FracHist->Fill(type1Frac);
597 
598  for (unsigned int ils = lumiInfoMapIterator->first.first; ils < lumiInfoMapIterator->first.second + 1; ils++) {
599  if (ils > maxLS) {
600  std::cout << "ils out of maxLS range!!" << std::endl;
601  break;
602  }
609  }
610 
611  type1FracGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, type1Frac);
612  type1resGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, mean_type1_residual);
613  type2resGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, mean_type2_residual);
617  pedestalGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, pedestal);
618  pedestalGraph->SetPointError(iBlock, approxLumiBlockSize_ / 2.0, pedestal_unc);
619 
620  edm::LogInfo("INFO")
621  << "iBlock type1Frac mean_type1_residual mean_type2_residual mean_type1_residual_unc mean_type2_residual_unc "
622  << iBlock << " " << type1Frac << " " << mean_type1_residual << " " << mean_type2_residual << " "
624 
625  type1Frac = 0.0;
626  mean_type1_residual = 0.0;
627  mean_type2_residual = 0.0;
630  pedestal = 0.;
631  pedestal_unc = 0.;
632 
633  iBlock++;
634 
635  resetBlock();
636  }
637  histoFile->cd();
638  type1FracHist->Write();
639  type1resHist->Write();
640  type2resHist->Write();
641 
642  delete type1FracHist;
643  delete type1resHist;
644  delete type2resHist;
645 
646  delete[] histname1;
647  delete[] histname2;
648  delete[] histname3;
649 
651  delete lumiInfoMapIterator->second;
652  }
653  for (unsigned int lumiSection = 0; lumiSection < lumiSections.size(); lumiSection++) {
654  thisLS = lumiSections[lumiSection];
655  delete lumiInfoMapPerLS[thisLS];
656  }
657  lumiInfoMap.clear();
658  lumiInfoMapPerLS.clear();
659  lumiSections.clear();
660  lumiInfoCounter.clear();
661 }

References approxLumiBlockSize_, l1GtPatternGenerator_cfi::bx, calculateCorrections(), correctionScaleFactors_, corrlumiAvg_h, gather_cfg::cout, errOnLumiByBX_, events_, first, dqmMemoryStats::float, histoFile, mps_fire::i, iBlock, edm::RunBase::id(), edm::Service< T >::isAvailable(), lumiAvg_h, lumiInfoCounter, lumiInfoMap, lumiInfoMapIterator, lumiInfoMapPerLS, lumiSections, maxLS, mean_type1_residual, mean_type1_residual_unc, mean_type2_residual, mean_type2_residual_unc, LumiConstants::numBX, overallCorrection_, pccCorrections, pedestal, pedestal_unc, pedestalGraph, poolDbService, rawlumiBX_, resetBlock(), edm::RunID::run(), edm::RunBase::run(), scaleFactorAvg_h, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinError(), LumiCorrections::setCorrectionsBX(), LumiCorrections::setOverallCorrection(), LumiCorrections::setType1Fraction(), LumiCorrections::setType1Residual(), LumiCorrections::setType2Residual(), jetUpdater_cfi::sort, thisLS, totalLumiByBX_, totalLumiByBXAvg_, type1Frac, type1FracGraph, type1FracHist, Type1FracMon, type1resGraph, type1resHist, Type1ResMon, type2resGraph, type2resHist, Type2ResMon, and cond::service::PoolDBOutputService::writeOne().

Referenced by dqmEndRun().

◆ endJob()

void CorrPCCProducer::endJob ( void  )
finalprivatevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 681 of file CorrPCCProducer.cc.

681  {
682  histoFile->cd();
683  type1FracGraph->Write();
684  type1resGraph->Write();
685  type2resGraph->Write();
686  pedestalGraph->Write();
687  histoFile->Write();
688  histoFile->Close();
689  delete type1FracGraph;
690  delete type1resGraph;
691  delete type2resGraph;
692  delete pedestalGraph;
693 }

References histoFile, pedestalGraph, type1FracGraph, type1resGraph, and type2resGraph.

Referenced by o2olib.O2ORunMgr::executeJob().

◆ endLuminosityBlock()

void CorrPCCProducer::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
finalprivate

Definition at line 383 of file CorrPCCProducer.cc.

383  {
384  thisLS = lumiSeg.luminosityBlock();
385 
386  edm::Handle<LumiInfo> PCCHandle;
387  lumiSeg.getByToken(lumiInfoToken, PCCHandle);
388 
389  const LumiInfo& inLumiOb = *(PCCHandle.product());
390 
391  errOnLumiByBX_ = inLumiOb.getErrorLumiAllBX();
392 
393  unsigned int totalEvents = 0;
394  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
395  totalEvents += errOnLumiByBX_[bx];
396  }
397 
398  if (totalEvents < minimumNumberOfEvents) {
399  edm::LogInfo("INFO") << "number of events in this LS is too few " << totalEvents;
400  //return;
401  } else {
402  edm::LogInfo("INFO") << "Skipping Lumisection " << thisLS;
403  }
404 
406  totalLumiByBX_ = inLumiOb.getInstLumiAllBX();
407  events_ = inLumiOb.getErrorLumiAllBX();
408  lumiInfoMapPerLS[thisLS]->setInstLumiAllBX(totalLumiByBX_);
409  lumiInfoMapPerLS[thisLS]->setErrorLumiAllBX(events_);
410  lumiSections.push_back(thisLS);
411 }

References l1GtPatternGenerator_cfi::bx, errOnLumiByBX_, events_, edm::LuminosityBlock::getByToken(), LumiInfo::getErrorLumiAllBX(), LumiInfo::getInstLumiAllBX(), lumiInfoMapPerLS, lumiInfoToken, edm::LuminosityBlockBase::luminosityBlock(), lumiSections, minimumNumberOfEvents, LumiConstants::numBX, edm::Handle< T >::product(), thisLS, and totalLumiByBX_.

◆ estimateType1Frac()

void CorrPCCProducer::estimateType1Frac ( std::vector< float >  uncorrPCCPerBX,
float &  type1Frac 
)
private

Definition at line 210 of file CorrPCCProducer.cc.

210  {
211  std::vector<float> corrected_tmp_;
212  for (size_t i = 0; i < uncorrPCCPerBX.size(); i++) {
213  corrected_tmp_.push_back(uncorrPCCPerBX.at(i));
214  }
215 
216  //Apply initial type 1 correction
217  for (size_t k = 0; k < LumiConstants::numBX - 1; k++) {
218  float bin_k = corrected_tmp_.at(k);
219  corrected_tmp_.at(k + 1) = corrected_tmp_.at(k + 1) - type1Frac * bin_k;
220  }
221 
222  //Apply type 2 correction
223  for (size_t i = 0; i < LumiConstants::numBX - 1; i++) {
224  for (size_t j = i + 1; j < i + LumiConstants::numBX - 1; j++) {
225  float bin_i = corrected_tmp_.at(i);
226  if (j < LumiConstants::numBX) {
227  corrected_tmp_.at(j) = corrected_tmp_.at(j) - bin_i * correctionTemplate_.at(j - i);
228  } else {
229  corrected_tmp_.at(j - LumiConstants::numBX) =
230  corrected_tmp_.at(j - LumiConstants::numBX) - bin_i * correctionTemplate_.at(j - i);
231  }
232  }
233  }
234 
235  //Apply additional iteration for type 1 correction
236  evaluateCorrectionResiduals(corrected_tmp_);
238 }

References correctionTemplate_, evaluateCorrectionResiduals(), mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, mean_type1_residual, LumiConstants::numBX, and type1Frac.

Referenced by calculateCorrections().

◆ evaluateCorrectionResiduals()

void CorrPCCProducer::evaluateCorrectionResiduals ( std::vector< float >  corrected_tmp_)
private

Definition at line 241 of file CorrPCCProducer.cc.

241  {
242  float lumiMax = getMaximum(corrected_tmp_);
243  float threshold = lumiMax * 0.2;
244 
247  nTrain = 0;
248  float lumi = 0;
249  std::vector<float> afterGlow;
250  TH1F type1("type1", "", 1000, -0.5, 0.5);
251  TH1F type2("type2", "", 1000, -0.5, 0.5);
252  for (size_t ibx = 2; ibx < LumiConstants::numBX - 5; ibx++) {
253  lumi = corrected_tmp_.at(ibx);
254  afterGlow.clear();
255  afterGlow.push_back(corrected_tmp_.at(ibx + 1));
256  afterGlow.push_back(corrected_tmp_.at(ibx + 2));
257 
258  //Where type 1 and type 2 residuals are computed
259  if (lumi > threshold && afterGlow[0] < threshold && afterGlow[1] < threshold) {
260  for (int index = 3; index < 6; index++) {
261  float thisAfterGlow = corrected_tmp_.at(ibx + index);
262  if (thisAfterGlow < threshold) {
263  afterGlow.push_back(thisAfterGlow);
264  } else {
265  break;
266  }
267  }
268  float thisType1 = 0;
269  float thisType2 = 0;
270  if (afterGlow.size() > 1) {
271  int nAfter = 0;
272  for (unsigned int index = 1; index < afterGlow.size(); index++) {
273  thisType2 += afterGlow[index];
274  type2.Fill(afterGlow[index] / lumi);
275  nAfter++;
276  }
277  thisType2 /= nAfter;
278  }
279  thisType1 = (afterGlow[0] - thisType2) / lumi;
280 
281  type1.Fill(thisType1);
282  nTrain += 1;
283  }
284  }
285 
286  mean_type1_residual = type1.GetMean(); //Calculate the mean value of the type 1 residual
287  mean_type2_residual = type2.GetMean(); //Calculate the mean value of the type 2 residual
288  mean_type1_residual_unc = type1.GetMeanError();
289  mean_type2_residual_unc = type2.GetMeanError();
290 
291  histoFile->cd();
292  type1.Write();
293  type2.Write();
294 }

References getMaximum(), histoFile, mean_type1_residual, mean_type1_residual_unc, mean_type2_residual, mean_type2_residual_unc, nTrain, LumiConstants::numBX, and remoteMonitoring_LED_IterMethod_cfg::threshold.

Referenced by calculateCorrections(), and estimateType1Frac().

◆ getMaximum()

float CorrPCCProducer::getMaximum ( std::vector< float >  lumi_vector)
private

Definition at line 198 of file CorrPCCProducer.cc.

198  {
199  float max_lumi = 0;
200  for (size_t i = 0; i < lumi_vector.size(); i++) {
201  if (lumi_vector.at(i) > max_lumi)
202  max_lumi = lumi_vector.at(i);
203  }
204  return max_lumi;
205 }

References mps_fire::i.

Referenced by calculateCorrections(), and evaluateCorrectionResiduals().

◆ makeCorrectionTemplate()

void CorrPCCProducer::makeCorrectionTemplate ( )
private

Definition at line 190 of file CorrPCCProducer.cc.

190  {
191  for (unsigned int bx = 1; bx < LumiConstants::numBX; bx++) {
192  correctionTemplate_.at(bx) = type2_a_ * exp(-(float(bx) - 1) * type2_b_);
193  }
194 }

References l1GtPatternGenerator_cfi::bx, correctionTemplate_, JetChargeProducer_cfi::exp, LumiConstants::numBX, type2_a_, and type2_b_.

Referenced by CorrPCCProducer().

◆ resetBlock()

void CorrPCCProducer::resetBlock ( )
private

Definition at line 664 of file CorrPCCProducer.cc.

664  {
665  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
666  totalLumiByBX_[bx] = 0;
667  totalLumiByBXAvg_[bx] = 0;
668  events_[bx] = 0;
670  }
671 }

References l1GtPatternGenerator_cfi::bx, correctionScaleFactors_, events_, LumiConstants::numBX, totalLumiByBX_, and totalLumiByBXAvg_.

Referenced by CorrPCCProducer(), and dqmEndRunProduce().

Member Data Documentation

◆ approxLumiBlockSize_

unsigned int CorrPCCProducer::approxLumiBlockSize_
private

Definition at line 118 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and dqmEndRunProduce().

◆ correctionScaleFactors_

std::vector<float> CorrPCCProducer::correctionScaleFactors_
private

◆ correctionTemplate_

std::vector<float> CorrPCCProducer::correctionTemplate_
private

◆ corrlumiAvg_h

TH1F* CorrPCCProducer::corrlumiAvg_h
private

Definition at line 93 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ countLumi_

unsigned int CorrPCCProducer::countLumi_
private

Definition at line 117 of file CorrPCCProducer.cc.

Referenced by beginLuminosityBlock(), and CorrPCCProducer().

◆ errOnLumiByBX_

std::vector<float> CorrPCCProducer::errOnLumiByBX_
private

Definition at line 75 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

◆ events_

std::vector<float> CorrPCCProducer::events_
private

◆ histoFile

TFile* CorrPCCProducer::histoFile
private

◆ hlist

TList* CorrPCCProducer::hlist
private

Definition at line 108 of file CorrPCCProducer.cc.

◆ iBlock

unsigned int CorrPCCProducer::iBlock = 0
private

Definition at line 83 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ lumiAvg_h

TH1F* CorrPCCProducer::lumiAvg_h
private

Definition at line 95 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ lumiInfoCounter

std::map<std::pair<unsigned int, unsigned int>, unsigned int> CorrPCCProducer::lumiInfoCounter
private

Definition at line 91 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ lumiInfoMap

std::map<std::pair<unsigned int, unsigned int>, LumiInfo*> CorrPCCProducer::lumiInfoMap
private

Definition at line 90 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ lumiInfoMapIterator

std::map<std::pair<unsigned int, unsigned int>, LumiInfo*>::iterator CorrPCCProducer::lumiInfoMapIterator
private

Definition at line 88 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ lumiInfoMapPerLS

std::map<unsigned int, LumiInfo*> CorrPCCProducer::lumiInfoMapPerLS
private

Definition at line 86 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

◆ lumiInfoToken

edm::EDGetTokenT<LumiInfo> CorrPCCProducer::lumiInfoToken
private

Definition at line 70 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and endLuminosityBlock().

◆ lumiSections

std::vector<unsigned int> CorrPCCProducer::lumiSections
private

Definition at line 87 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

◆ maxLS

unsigned int CorrPCCProducer::maxLS = 3500
private

Definition at line 100 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

◆ mean_type1_residual

float CorrPCCProducer::mean_type1_residual
private

◆ mean_type1_residual_unc

float CorrPCCProducer::mean_type1_residual_unc
private

Definition at line 114 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

◆ mean_type2_residual

float CorrPCCProducer::mean_type2_residual
private

Definition at line 113 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

◆ mean_type2_residual_unc

float CorrPCCProducer::mean_type2_residual_unc
private

Definition at line 115 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

◆ minimumNumberOfEvents

unsigned int CorrPCCProducer::minimumNumberOfEvents
private

Definition at line 84 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and endLuminosityBlock().

◆ nTrain

unsigned int CorrPCCProducer::nTrain
private

Definition at line 116 of file CorrPCCProducer.cc.

Referenced by evaluateCorrectionResiduals().

◆ overallCorrection_

float CorrPCCProducer::overallCorrection_
private

Definition at line 81 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

◆ pccCorrections

LumiCorrections* CorrPCCProducer::pccCorrections
private

Definition at line 128 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ pccSrc_

std::string CorrPCCProducer::pccSrc_
private

Definition at line 71 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer().

◆ pedestal

float CorrPCCProducer::pedestal
private

Definition at line 124 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

◆ pedestal_unc

float CorrPCCProducer::pedestal_unc
private

Definition at line 125 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

◆ pedestalGraph

TGraphErrors* CorrPCCProducer::pedestalGraph
private

Definition at line 126 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), dqmEndRunProduce(), and endJob().

◆ poolDbService

edm::Service<cond::service::PoolDBOutputService> CorrPCCProducer::poolDbService
private

Definition at line 130 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ prodInst_

std::string CorrPCCProducer::prodInst_
private

Definition at line 72 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer().

◆ rawlumiBX_

std::vector<float> CorrPCCProducer::rawlumiBX_
private

Definition at line 74 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ scaleFactorAvg_h

TH1F* CorrPCCProducer::scaleFactorAvg_h
private

Definition at line 94 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ thisLS

unsigned int CorrPCCProducer::thisLS
private

Definition at line 119 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

◆ totalLumiByBX_

std::vector<float> CorrPCCProducer::totalLumiByBX_
private

◆ totalLumiByBXAvg_

std::vector<float> CorrPCCProducer::totalLumiByBXAvg_
private

Definition at line 77 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), dqmEndRunProduce(), and resetBlock().

◆ type1Frac

float CorrPCCProducer::type1Frac
private

Definition at line 111 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), dqmEndRunProduce(), and estimateType1Frac().

◆ type1FracGraph

TGraphErrors* CorrPCCProducer::type1FracGraph
private

Definition at line 105 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), dqmEndRunProduce(), and endJob().

◆ type1FracHist

TH1F* CorrPCCProducer::type1FracHist
private

Definition at line 96 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ Type1FracMon

MonitorElement* CorrPCCProducer::Type1FracMon
private

Definition at line 101 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

◆ type1resGraph

TGraphErrors* CorrPCCProducer::type1resGraph
private

Definition at line 106 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), dqmEndRunProduce(), and endJob().

◆ type1resHist

TH1F* CorrPCCProducer::type1resHist
private

Definition at line 97 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ Type1ResMon

MonitorElement* CorrPCCProducer::Type1ResMon
private

Definition at line 102 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

◆ type2_a_

double CorrPCCProducer::type2_a_
private

Definition at line 121 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and makeCorrectionTemplate().

◆ type2_b_

double CorrPCCProducer::type2_b_
private

Definition at line 122 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and makeCorrectionTemplate().

◆ type2resGraph

TGraphErrors* CorrPCCProducer::type2resGraph
private

Definition at line 107 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), dqmEndRunProduce(), and endJob().

◆ type2resHist

TH1F* CorrPCCProducer::type2resHist
private

Definition at line 98 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

◆ Type2ResMon

MonitorElement* CorrPCCProducer::Type2ResMon
private

Definition at line 103 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

CorrPCCProducer::iBlock
unsigned int iBlock
Definition: CorrPCCProducer.cc:83
mps_fire.i
i
Definition: mps_fire.py:428
LumiInfo
Definition: LumiInfo.h:28
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
LumiCorrections::setType2Residual
void setType2Residual(float type2res)
Definition: LumiCorrections.h:27
edm::Handle::product
T const * product() const
Definition: Handle.h:70
CorrPCCProducer::type1resGraph
TGraphErrors * type1resGraph
Definition: CorrPCCProducer.cc:106
CorrPCCProducer::lumiInfoMapPerLS
std::map< unsigned int, LumiInfo * > lumiInfoMapPerLS
Definition: CorrPCCProducer.cc:86
LumiConstants::numBX
static const unsigned int numBX
Definition: LumiConstants.h:8
CorrPCCProducer::evaluateCorrectionResiduals
void evaluateCorrectionResiduals(std::vector< float >)
Definition: CorrPCCProducer.cc:241
edm::RunID::run
RunNumber_t run() const
Definition: RunID.h:36
CorrPCCProducer::calculateCorrections
void calculateCorrections(std::vector< float >, std::vector< float > &, float &)
Definition: CorrPCCProducer.cc:297
CorrPCCProducer::Type1FracMon
MonitorElement * Type1FracMon
Definition: CorrPCCProducer.cc:101
CorrPCCProducer::dqmEndRunProduce
void dqmEndRunProduce(const edm::Run &runSeg, const edm::EventSetup &iSetup)
Definition: CorrPCCProducer.cc:420
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CorrPCCProducer::lumiInfoToken
edm::EDGetTokenT< LumiInfo > lumiInfoToken
Definition: CorrPCCProducer.cc:70
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
CorrPCCProducer::resetBlock
void resetBlock()
Definition: CorrPCCProducer.cc:664
CorrPCCProducer::pccSrc_
std::string pccSrc_
Definition: CorrPCCProducer.cc:71
CorrPCCProducer::prodInst_
std::string prodInst_
Definition: CorrPCCProducer.cc:72
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
CorrPCCProducer::type2resGraph
TGraphErrors * type2resGraph
Definition: CorrPCCProducer.cc:107
edm::Handle
Definition: AssociativeIterator.h:50
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
CorrPCCProducer::type1resHist
TH1F * type1resHist
Definition: CorrPCCProducer.cc:97
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
edm::RunBase::run
RunNumber_t run() const
Definition: RunBase.h:40
CorrPCCProducer::lumiInfoMap
std::map< std::pair< unsigned int, unsigned int >, LumiInfo * > lumiInfoMap
Definition: CorrPCCProducer.cc:90
CorrPCCProducer::overallCorrection_
float overallCorrection_
Definition: CorrPCCProducer.cc:81
CorrPCCProducer::events_
std::vector< float > events_
Definition: CorrPCCProducer.cc:78
CorrPCCProducer::corrlumiAvg_h
TH1F * corrlumiAvg_h
Definition: CorrPCCProducer.cc:93
CorrPCCProducer::correctionTemplate_
std::vector< float > correctionTemplate_
Definition: CorrPCCProducer.cc:79
CorrPCCProducer::approxLumiBlockSize_
unsigned int approxLumiBlockSize_
Definition: CorrPCCProducer.cc:118
CorrPCCProducer::correctionScaleFactors_
std::vector< float > correctionScaleFactors_
Definition: CorrPCCProducer.cc:80
CorrPCCProducer::mean_type2_residual
float mean_type2_residual
Definition: CorrPCCProducer.cc:113
CorrPCCProducer::totalLumiByBXAvg_
std::vector< float > totalLumiByBXAvg_
Definition: CorrPCCProducer.cc:77
LumiCorrections::setCorrectionsBX
void setCorrectionsBX(std::vector< float > &correctBX)
Definition: LumiCorrections.h:28
CorrPCCProducer::type1FracHist
TH1F * type1FracHist
Definition: CorrPCCProducer.cc:96
CorrPCCProducer::errOnLumiByBX_
std::vector< float > errOnLumiByBX_
Definition: CorrPCCProducer.cc:75
CorrPCCProducer::lumiAvg_h
TH1F * lumiAvg_h
Definition: CorrPCCProducer.cc:95
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CorrPCCProducer::lumiSections
std::vector< unsigned int > lumiSections
Definition: CorrPCCProducer.cc:87
CorrPCCProducer::maxLS
unsigned int maxLS
Definition: CorrPCCProducer.cc:100
dqmdumpme.k
k
Definition: dqmdumpme.py:60
CorrPCCProducer::countLumi_
unsigned int countLumi_
Definition: CorrPCCProducer.cc:117
CorrPCCProducer::nTrain
unsigned int nTrain
Definition: CorrPCCProducer.cc:116
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
CorrPCCProducer::pccCorrections
LumiCorrections * pccCorrections
Definition: CorrPCCProducer.cc:128
CorrPCCProducer::type1FracGraph
TGraphErrors * type1FracGraph
Definition: CorrPCCProducer.cc:105
CorrPCCProducer::lumiInfoMapIterator
std::map< std::pair< unsigned int, unsigned int >, LumiInfo * >::iterator lumiInfoMapIterator
Definition: CorrPCCProducer.cc:88
CorrPCCProducer::totalLumiByBX_
std::vector< float > totalLumiByBX_
Definition: CorrPCCProducer.cc:76
CorrPCCProducer::histoFile
TFile * histoFile
Definition: CorrPCCProducer.cc:109
CorrPCCProducer::mean_type2_residual_unc
float mean_type2_residual_unc
Definition: CorrPCCProducer.cc:115
edm::ParameterSet
Definition: ParameterSet.h:47
CorrPCCProducer::mean_type1_residual
float mean_type1_residual
Definition: CorrPCCProducer.cc:112
CorrPCCProducer::pedestalGraph
TGraphErrors * pedestalGraph
Definition: CorrPCCProducer.cc:126
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
CorrPCCProducer::type2_a_
double type2_a_
Definition: CorrPCCProducer.cc:121
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
dtNoiseDBValidation_cfg.trial
trial
Definition: dtNoiseDBValidation_cfg.py:9
LumiInfo::getInstLumiAllBX
const std::vector< float > & getInstLumiAllBX() const
Definition: LumiInfo.h:93
CorrPCCProducer::makeCorrectionTemplate
void makeCorrectionTemplate()
Definition: CorrPCCProducer.cc:190
LumiCorrections::setType1Residual
void setType1Residual(float type1res)
Definition: LumiCorrections.h:26
LumiCorrections::setType1Fraction
void setType1Fraction(float type1frac)
Definition: LumiCorrections.h:25
CorrPCCProducer::minimumNumberOfEvents
unsigned int minimumNumberOfEvents
Definition: CorrPCCProducer.cc:84
CorrPCCProducer::poolDbService
edm::Service< cond::service::PoolDBOutputService > poolDbService
Definition: CorrPCCProducer.cc:130
LumiCorrections
Definition: LumiCorrections.h:22
CorrPCCProducer::pedestal_unc
float pedestal_unc
Definition: CorrPCCProducer.cc:125
LumiCorrections::setOverallCorrection
void setOverallCorrection(float overallCorrection)
Definition: LumiCorrections.h:24
CorrPCCProducer::Type1ResMon
MonitorElement * Type1ResMon
Definition: CorrPCCProducer.cc:102
CorrPCCProducer::scaleFactorAvg_h
TH1F * scaleFactorAvg_h
Definition: CorrPCCProducer.cc:94
CorrPCCProducer::pedestal
float pedestal
Definition: CorrPCCProducer.cc:124
CorrPCCProducer::type2resHist
TH1F * type2resHist
Definition: CorrPCCProducer.cc:98
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
CorrPCCProducer::estimateType1Frac
void estimateType1Frac(std::vector< float >, float &)
Definition: CorrPCCProducer.cc:210
LumiInfo::getErrorLumiAllBX
const std::vector< float > & getErrorLumiAllBX() const
Definition: LumiInfo.h:97
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
dqm::impl::MonitorElement::setBinError
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Definition: MonitorElement.cc:709
CorrPCCProducer::getMaximum
float getMaximum(std::vector< float >)
Definition: CorrPCCProducer.cc:198
dqm::implementation::IBooker::UseRunScope
UseScope< MonitorElementData::Scope::RUN > UseRunScope
Definition: DQMStore.h:464
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CorrPCCProducer::type2_b_
double type2_b_
Definition: CorrPCCProducer.cc:122
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
CorrPCCProducer::rawlumiBX_
std::vector< float > rawlumiBX_
Definition: CorrPCCProducer.cc:74
CorrPCCProducer::thisLS
unsigned int thisLS
Definition: CorrPCCProducer.cc:119
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
CorrPCCProducer::lumiInfoCounter
std::map< std::pair< unsigned int, unsigned int >, unsigned int > lumiInfoCounter
Definition: CorrPCCProducer.cc:91
lumi
Definition: LumiSectionData.h:20
edm::RunBase::id
RunID const & id() const
Definition: RunBase.h:39
edm::InputTag
Definition: InputTag.h:15
CorrPCCProducer::type1Frac
float type1Frac
Definition: CorrPCCProducer.cc:111
CorrPCCProducer::mean_type1_residual_unc
float mean_type1_residual_unc
Definition: CorrPCCProducer.cc:114
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
CorrPCCProducer::Type2ResMon
MonitorElement * Type2ResMon
Definition: CorrPCCProducer.cc:103