CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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_
 
std::string pccSrc_
 
float pedestal
 
float pedestal_unc
 
TGraphErrors * pedestalGraph
 
edm::Service
< cond::service::PoolDBOutputService
poolDbService
 
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
ProducesCollector producesCollector ()
 
- 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< Bconsumes (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 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)
 
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)
 
- 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) pedestal - is a constant noise term for low lumi period

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) , Jose Benitez (jose..nosp@m.beni.nosp@m.tez@c.nosp@m.ern..nosp@m.ch)


Definition at line 50 of file CorrPCCProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 133 of file CorrPCCProducer.cc.

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.

133  {
134  pccSrc_ =
135  iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<std::string>("inLumiObLabel");
136  prodInst_ =
137  iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<std::string>("ProdInst");
139  iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<int>("approxLumiBlockSize");
140  type2_a_ = iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<double>("type2_a");
141  type2_b_ = iConfig.getParameter<edm::ParameterSet>("CorrPCCProducerParameters").getParameter<double>("type2_b");
142  countLumi_ = 0;
143  minimumNumberOfEvents = 1000;
144 
150 
151  resetBlock();
152 
154 
155  edm::InputTag inputPCCTag_(pccSrc_, prodInst_);
156 
157  lumiInfoToken = consumes<LumiInfo, edm::InLumi>(inputPCCTag_);
158 
159  histoFile = new TFile("CorrectionHisto.root", "RECREATE");
160 
161  type1FracGraph = new TGraphErrors();
162  type1resGraph = new TGraphErrors();
163  type2resGraph = new TGraphErrors();
164  type1FracGraph->SetName("Type1Fraction");
165  type1resGraph->SetName("Type1Res");
166  type2resGraph->SetName("Type2Res");
167  type1FracGraph->GetYaxis()->SetTitle("Type 1 Fraction");
168  type1resGraph->GetYaxis()->SetTitle("Type 1 Residual");
169  type2resGraph->GetYaxis()->SetTitle("Type 2 Residual");
170  type1FracGraph->GetXaxis()->SetTitle("Unique LS ID");
171  type1resGraph->GetXaxis()->SetTitle("Unique LS ID");
172  type2resGraph->GetXaxis()->SetTitle("Unique LS ID");
173  type1FracGraph->SetMarkerStyle(8);
174  type1resGraph->SetMarkerStyle(8);
175  type2resGraph->SetMarkerStyle(8);
176 
177  pedestalGraph = new TGraphErrors();
178  pedestalGraph->SetName("Pedestal");
179  pedestalGraph->GetYaxis()->SetTitle("pedestal value (counts) per lumi section");
180  pedestalGraph->GetXaxis()->SetTitle("Unique LS ID");
181  pedestalGraph->SetMarkerStyle(8);
182 }
std::vector< float > events_
edm::EDGetTokenT< LumiInfo > lumiInfoToken
static const unsigned int numBX
Definition: LumiConstants.h:8
TGraphErrors * pedestalGraph
unsigned int countLumi_
std::string pccSrc_
unsigned int minimumNumberOfEvents
std::vector< float > totalLumiByBXAvg_
TGraphErrors * type1resGraph
std::string prodInst_
std::vector< float > correctionScaleFactors_
std::vector< float > correctionTemplate_
TGraphErrors * type2resGraph
std::vector< float > totalLumiByBX_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TGraphErrors * type1FracGraph
unsigned int approxLumiBlockSize_
void makeCorrectionTemplate()
CorrPCCProducer::~CorrPCCProducer ( )
override

Definition at line 185 of file CorrPCCProducer.cc.

185 {}

Member Function Documentation

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

Definition at line 377 of file CorrPCCProducer.cc.

References countLumi_.

377  {
378  countLumi_++;
379 }
unsigned int countLumi_
void CorrPCCProducer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  context 
)
overrideprivatevirtual

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

Definition at line 670 of file CorrPCCProducer.cc.

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

670  {
671  ibooker.setCurrentFolder("AlCaReco/LumiPCC/");
672  auto scope = DQMStore::IBooker::UseRunScope(ibooker);
673  Type1FracMon = ibooker.book1D("type1Fraction", "Type1Fraction;Lumisection;Type 1 Fraction", maxLS, 0, maxLS);
674  Type1ResMon = ibooker.book1D("type1Residual", "Type1Residual;Lumisection;Type 1 Residual", maxLS, 0, maxLS);
675  Type2ResMon = ibooker.book1D("type2Residual", "Type2Residual;Lumisection;Type 2 Residual", maxLS, 0, maxLS);
676 }
MonitorElement * Type1FracMon
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * Type1ResMon
unsigned int maxLS
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
UseScope< MonitorElementData::Scope::RUN > UseRunScope
Definition: DQMStore.h:464
MonitorElement * Type2ResMon
void CorrPCCProducer::calculateCorrections ( std::vector< float >  uncorrected,
std::vector< float > &  correctionScaleFactors_,
float &  overallCorrection_ 
)
private

Definition at line 296 of file CorrPCCProducer.cc.

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

Referenced by dqmEndRunProduce().

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

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

Definition at line 413 of file CorrPCCProducer.cc.

References dqmEndRunProduce().

413  {
414  // TODO: why was this code not put here in the first place?
415  dqmEndRunProduce(runSeg, iSetup);
416 }
void dqmEndRunProduce(const edm::Run &runSeg, const edm::EventSetup &iSetup)
void CorrPCCProducer::dqmEndRunProduce ( const edm::Run runSeg,
const edm::EventSetup iSetup 
)
private

Definition at line 419 of file CorrPCCProducer.cc.

References approxLumiBlockSize_, makePileupJSON::bx, calculateCorrections(), correctionScaleFactors_, corrlumiAvg_h, gather_cfg::cout, errOnLumiByBX_, events_, first, 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_, 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(), thisLS, totalLumiByBX_, totalLumiByBXAvg_, type1Frac, type1FracGraph, type1FracHist, Type1FracMon, type1resGraph, type1resHist, Type1ResMon, type2resGraph, type2resHist, Type2ResMon, and cond::service::PoolDBOutputService::writeOneIOV().

Referenced by dqmEndRun().

419  {
420  if (lumiSections.empty()) {
421  return;
422  }
423 
424  std::sort(lumiSections.begin(), lumiSections.end());
425 
426  edm::LogInfo("INFO") << "Number of Lumisections " << lumiSections.size() << " in run " << runSeg.run();
427 
428  //Determining integer number of blocks
429  float nBlocks_f = float(lumiSections.size()) / approxLumiBlockSize_;
430  unsigned int nBlocks = 1;
431  if (nBlocks_f > 1) {
432  if (nBlocks_f - lumiSections.size() / approxLumiBlockSize_ < 0.5) {
433  nBlocks = lumiSections.size() / approxLumiBlockSize_;
434  } else {
435  nBlocks = lumiSections.size() / approxLumiBlockSize_ + 1;
436  }
437  }
438 
439  float nLSPerBlock = float(lumiSections.size()) / nBlocks;
440 
441  std::vector<std::pair<unsigned int, unsigned int>> lsKeys;
442  lsKeys.clear();
443 
444  //Constructing nBlocks IOVs
445  for (unsigned iKey = 0; iKey < nBlocks; iKey++) {
446  lsKeys.push_back(std::make_pair(lumiSections[(unsigned int)(iKey * nLSPerBlock)],
447  lumiSections[(unsigned int)((iKey + 1) * nLSPerBlock) - 1]));
448  }
449 
450  lsKeys[0].first = 1;
451 
452  for (unsigned int lumiSection = 0; lumiSection < lumiSections.size(); lumiSection++) {
453  thisLS = lumiSections[lumiSection];
454 
455  std::pair<unsigned int, unsigned int> lsKey;
456 
457  bool foundKey = false;
458 
459  for (unsigned iKey = 0; iKey < nBlocks; iKey++) {
460  if ((thisLS >= lsKeys[iKey].first) && (thisLS <= lsKeys[iKey].second)) {
461  lsKey = lsKeys[iKey];
462  foundKey = true;
463  break;
464  }
465  }
466 
467  if (!foundKey) {
468  edm::LogInfo("WARNING") << "Didn't find key " << thisLS;
469  continue;
470  }
471 
472  if (lumiInfoMap.count(lsKey) == 0) {
473  lumiInfoMap[lsKey] = new LumiInfo();
474  }
475 
476  //Sum all lumi in IOV of lsKey
477  totalLumiByBX_ = lumiInfoMap[lsKey]->getInstLumiAllBX();
478  events_ = lumiInfoMap[lsKey]->getErrorLumiAllBX();
479 
480  rawlumiBX_ = lumiInfoMapPerLS[thisLS]->getInstLumiAllBX();
481  errOnLumiByBX_ = lumiInfoMapPerLS[thisLS]->getErrorLumiAllBX();
482 
483  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
486  }
487  lumiInfoMap[lsKey]->setInstLumiAllBX(totalLumiByBX_);
488  lumiInfoMap[lsKey]->setErrorLumiAllBX(events_);
489  lumiInfoCounter[lsKey]++;
490  }
491 
492  cond::Time_t thisIOV = 1;
493 
494  char* histname1 = new char[100];
495  char* histname2 = new char[100];
496  char* histname3 = new char[100];
497  char* histTitle1 = new char[100];
498  char* histTitle2 = new char[100];
499  char* histTitle3 = new char[100];
500  sprintf(histTitle1, "Type1Fraction_%d", runSeg.run());
501  sprintf(histTitle2, "Type1Res_%d", runSeg.run());
502  sprintf(histTitle3, "Type2Res_%d", runSeg.run());
503  type1FracHist = new TH1F(histTitle1, histTitle1, 1000, -0.5, 0.5);
504  type1resHist = new TH1F(histTitle2, histTitle2, 4000, -0.2, 0.2);
505  type2resHist = new TH1F(histTitle3, histTitle3, 4000, -0.2, 0.2);
506  delete[] histTitle1;
507  delete[] histTitle2;
508  delete[] histTitle3;
509 
511  totalLumiByBX_ = lumiInfoMapIterator->second->getInstLumiAllBX();
512  events_ = lumiInfoMapIterator->second->getErrorLumiAllBX();
513 
514  if (events_.empty()) {
515  continue;
516  }
517 
519  thisIOV = (cond::Time_t)(lu.value());
520 
521  sprintf(histname1,
522  "CorrectedLumiAvg_%d_%d_%d_%d",
523  runSeg.run(),
524  iBlock,
525  lumiInfoMapIterator->first.first,
526  lumiInfoMapIterator->first.second);
527  sprintf(histname2,
528  "ScaleFactorsAvg_%d_%d_%d_%d",
529  runSeg.run(),
530  iBlock,
531  lumiInfoMapIterator->first.first,
532  lumiInfoMapIterator->first.second);
533  sprintf(histname3,
534  "RawLumiAvg_%d_%d_%d_%d",
535  runSeg.run(),
536  iBlock,
537  lumiInfoMapIterator->first.first,
538  lumiInfoMapIterator->first.second);
539 
540  corrlumiAvg_h = new TH1F(histname1, "", LumiConstants::numBX, 1, LumiConstants::numBX);
541  scaleFactorAvg_h = new TH1F(histname2, "", LumiConstants::numBX, 1, LumiConstants::numBX);
542  lumiAvg_h = new TH1F(histname3, "", LumiConstants::numBX, 1, LumiConstants::numBX);
543 
544  //Averaging by the number of events
545  for (unsigned int i = 0; i < LumiConstants::numBX; i++) {
546  if (events_.at(i) != 0) {
548  } else {
549  totalLumiByBXAvg_[i] = 0.0;
550  }
551  }
552 
554 
555  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
556  corrlumiAvg_h->SetBinContent(bx, totalLumiByBXAvg_[bx] * correctionScaleFactors_[bx]);
557  if (events_.at(bx) != 0) {
558  corrlumiAvg_h->SetBinError(bx,
559  totalLumiByBXAvg_[bx] * correctionScaleFactors_[bx] / TMath::Sqrt(events_.at(bx)));
560  } else {
561  corrlumiAvg_h->SetBinError(bx, 0.0);
562  }
563 
564  scaleFactorAvg_h->SetBinContent(bx, correctionScaleFactors_[bx]);
565  lumiAvg_h->SetBinContent(bx, totalLumiByBXAvg_[bx]);
566  }
567 
568  //Writing the corrections to SQL lite file for db
569  LumiCorrections pccCorrections;
571  pccCorrections.setType1Fraction(type1Frac);
572  pccCorrections.setType1Residual(mean_type1_residual);
573  pccCorrections.setType2Residual(mean_type2_residual);
575 
576  if (poolDbService.isAvailable()) {
577  poolDbService->writeOneIOV(pccCorrections, thisIOV, "LumiCorrectionsRcd");
578  } else {
579  throw std::runtime_error("PoolDBService required.");
580  }
581 
582  histoFile->cd();
583  corrlumiAvg_h->Write();
584  scaleFactorAvg_h->Write();
585  lumiAvg_h->Write();
586 
587  delete corrlumiAvg_h;
588  delete scaleFactorAvg_h;
589  delete lumiAvg_h;
590 
591  type1FracHist->Fill(type1Frac);
594 
595  for (unsigned int ils = lumiInfoMapIterator->first.first; ils < lumiInfoMapIterator->first.second + 1; ils++) {
596  if (ils > maxLS) {
597  std::cout << "ils out of maxLS range!!" << std::endl;
598  break;
599  }
606  }
607 
608  type1FracGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, type1Frac);
609  type1resGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, mean_type1_residual);
610  type2resGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, mean_type2_residual);
614  pedestalGraph->SetPoint(iBlock, thisIOV + approxLumiBlockSize_ / 2.0, pedestal);
615  pedestalGraph->SetPointError(iBlock, approxLumiBlockSize_ / 2.0, pedestal_unc);
616 
617  edm::LogInfo("INFO")
618  << "iBlock type1Frac mean_type1_residual mean_type2_residual mean_type1_residual_unc mean_type2_residual_unc "
619  << iBlock << " " << type1Frac << " " << mean_type1_residual << " " << mean_type2_residual << " "
621 
622  type1Frac = 0.0;
623  mean_type1_residual = 0.0;
624  mean_type2_residual = 0.0;
626  mean_type2_residual_unc = 0;
627  pedestal = 0.;
628  pedestal_unc = 0.;
629 
630  iBlock++;
631 
632  resetBlock();
633  }
634  histoFile->cd();
635  type1FracHist->Write();
636  type1resHist->Write();
637  type2resHist->Write();
638 
639  delete type1FracHist;
640  delete type1resHist;
641  delete type2resHist;
642 
643  delete[] histname1;
644  delete[] histname2;
645  delete[] histname3;
646 
648  delete lumiInfoMapIterator->second;
649  }
650  for (unsigned int lumiSection = 0; lumiSection < lumiSections.size(); lumiSection++) {
651  thisLS = lumiSections[lumiSection];
652  delete lumiInfoMapPerLS[thisLS];
653  }
654  lumiInfoMap.clear();
655  lumiInfoMapPerLS.clear();
656  lumiSections.clear();
657  lumiInfoCounter.clear();
658 }
std::vector< float > events_
void calculateCorrections(std::vector< float >, std::vector< float > &, float &)
MonitorElement * Type1FracMon
RunID const & id() const
Definition: RunBase.h:39
std::map< std::pair< unsigned int, unsigned int >, LumiInfo * > lumiInfoMap
RunNumber_t run() const
Definition: RunBase.h:40
void setType1Fraction(float type1frac)
RunNumber_t run() const
Definition: RunID.h:36
void setOverallCorrection(float overallCorrection)
static const unsigned int numBX
Definition: LumiConstants.h:8
TGraphErrors * pedestalGraph
unsigned int iBlock
unsigned int LuminosityBlockNumber_t
MonitorElement * Type1ResMon
unsigned long long Time_t
Definition: Time.h:14
std::vector< float > totalLumiByBXAvg_
std::map< std::pair< unsigned int, unsigned int >, unsigned int > lumiInfoCounter
TGraphErrors * type1resGraph
bool isAvailable() const
Definition: Service.h:40
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
std::vector< float > correctionScaleFactors_
void setType2Residual(float type2res)
std::vector< unsigned int > lumiSections
TGraphErrors * type2resGraph
Log< level::Info, false > LogInfo
std::vector< float > rawlumiBX_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< float > totalLumiByBX_
edm::Service< cond::service::PoolDBOutputService > poolDbService
TGraphErrors * type1FracGraph
unsigned int approxLumiBlockSize_
unsigned int maxLS
tuple cout
Definition: gather_cfg.py:144
std::map< std::pair< unsigned int, unsigned int >, LumiInfo * >::iterator lumiInfoMapIterator
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setType1Residual(float type1res)
std::vector< float > errOnLumiByBX_
MonitorElement * Type2ResMon
void setCorrectionsBX(std::vector< float > &correctBX)
unsigned int thisLS
std::map< unsigned int, LumiInfo * > lumiInfoMapPerLS
void CorrPCCProducer::endJob ( void  )
finalprivatevirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 678 of file CorrPCCProducer.cc.

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

Referenced by o2olib.O2ORunMgr::executeJob().

678  {
679  histoFile->cd();
680  type1FracGraph->Write();
681  type1resGraph->Write();
682  type2resGraph->Write();
683  pedestalGraph->Write();
684  histoFile->Write();
685  histoFile->Close();
686  delete type1FracGraph;
687  delete type1resGraph;
688  delete type2resGraph;
689  delete pedestalGraph;
690 }
TGraphErrors * pedestalGraph
TGraphErrors * type1resGraph
TGraphErrors * type2resGraph
TGraphErrors * type1FracGraph
void CorrPCCProducer::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
const edm::EventSetup iSetup 
)
finalprivate

Definition at line 382 of file CorrPCCProducer.cc.

References makePileupJSON::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_.

382  {
383  thisLS = lumiSeg.luminosityBlock();
384 
385  edm::Handle<LumiInfo> PCCHandle;
386  lumiSeg.getByToken(lumiInfoToken, PCCHandle);
387 
388  const LumiInfo& inLumiOb = *(PCCHandle.product());
389 
390  errOnLumiByBX_ = inLumiOb.getErrorLumiAllBX();
391 
392  unsigned int totalEvents = 0;
393  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
394  totalEvents += errOnLumiByBX_[bx];
395  }
396 
397  if (totalEvents < minimumNumberOfEvents) {
398  edm::LogInfo("INFO") << "number of events in this LS is too few " << totalEvents;
399  //return;
400  } else {
401  edm::LogInfo("INFO") << "Skipping Lumisection " << thisLS;
402  }
403 
405  totalLumiByBX_ = inLumiOb.getInstLumiAllBX();
406  events_ = inLumiOb.getErrorLumiAllBX();
407  lumiInfoMapPerLS[thisLS]->setInstLumiAllBX(totalLumiByBX_);
408  lumiInfoMapPerLS[thisLS]->setErrorLumiAllBX(events_);
409  lumiSections.push_back(thisLS);
410 }
std::vector< float > events_
edm::EDGetTokenT< LumiInfo > lumiInfoToken
static const unsigned int numBX
Definition: LumiConstants.h:8
const std::vector< float > & getErrorLumiAllBX() const
Definition: LumiInfo.h:97
unsigned int minimumNumberOfEvents
const std::vector< float > & getInstLumiAllBX() const
Definition: LumiInfo.h:93
std::vector< unsigned int > lumiSections
Log< level::Info, false > LogInfo
T const * product() const
Definition: Handle.h:70
std::vector< float > totalLumiByBX_
std::vector< float > errOnLumiByBX_
unsigned int thisLS
std::map< unsigned int, LumiInfo * > lumiInfoMapPerLS
void CorrPCCProducer::estimateType1Frac ( std::vector< float >  uncorrPCCPerBX,
float &  type1Frac 
)
private

Definition at line 209 of file CorrPCCProducer.cc.

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

Referenced by calculateCorrections().

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

Definition at line 240 of file CorrPCCProducer.cc.

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

Referenced by calculateCorrections(), and estimateType1Frac().

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

Definition at line 197 of file CorrPCCProducer.cc.

References mps_fire::i.

Referenced by calculateCorrections(), and evaluateCorrectionResiduals().

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

Definition at line 189 of file CorrPCCProducer.cc.

References makePileupJSON::bx, correctionTemplate_, funct::exp(), LumiConstants::numBX, type2_a_, and type2_b_.

Referenced by CorrPCCProducer().

189  {
190  for (unsigned int bx = 1; bx < LumiConstants::numBX; bx++) {
191  correctionTemplate_.at(bx) = type2_a_ * exp(-(float(bx) - 1) * type2_b_);
192  }
193 }
static const unsigned int numBX
Definition: LumiConstants.h:8
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
std::vector< float > correctionTemplate_
void CorrPCCProducer::resetBlock ( )
private

Definition at line 661 of file CorrPCCProducer.cc.

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

Referenced by CorrPCCProducer(), and dqmEndRunProduce().

661  {
662  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
663  totalLumiByBX_[bx] = 0;
664  totalLumiByBXAvg_[bx] = 0;
665  events_[bx] = 0;
667  }
668 }
std::vector< float > events_
static const unsigned int numBX
Definition: LumiConstants.h:8
std::vector< float > totalLumiByBXAvg_
std::vector< float > correctionScaleFactors_
std::vector< float > totalLumiByBX_

Member Data Documentation

unsigned int CorrPCCProducer::approxLumiBlockSize_
private

Definition at line 119 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and dqmEndRunProduce().

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

Definition at line 81 of file CorrPCCProducer.cc.

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

std::vector<float> CorrPCCProducer::correctionTemplate_
private
TH1F* CorrPCCProducer::corrlumiAvg_h
private

Definition at line 94 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

unsigned int CorrPCCProducer::countLumi_
private

Definition at line 118 of file CorrPCCProducer.cc.

Referenced by beginLuminosityBlock(), and CorrPCCProducer().

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

Definition at line 76 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

std::vector<float> CorrPCCProducer::events_
private
TFile* CorrPCCProducer::histoFile
private
TList* CorrPCCProducer::hlist
private

Definition at line 109 of file CorrPCCProducer.cc.

unsigned int CorrPCCProducer::iBlock = 0
private

Definition at line 84 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

TH1F* CorrPCCProducer::lumiAvg_h
private

Definition at line 96 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 92 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 91 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 89 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 87 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

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

Definition at line 71 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and endLuminosityBlock().

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

Definition at line 88 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

unsigned int CorrPCCProducer::maxLS = 3500
private

Definition at line 101 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

float CorrPCCProducer::mean_type1_residual
private
float CorrPCCProducer::mean_type1_residual_unc
private

Definition at line 115 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

float CorrPCCProducer::mean_type2_residual
private

Definition at line 114 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

float CorrPCCProducer::mean_type2_residual_unc
private

Definition at line 116 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

unsigned int CorrPCCProducer::minimumNumberOfEvents
private

Definition at line 85 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and endLuminosityBlock().

unsigned int CorrPCCProducer::nTrain
private

Definition at line 117 of file CorrPCCProducer.cc.

Referenced by evaluateCorrectionResiduals().

float CorrPCCProducer::overallCorrection_
private

Definition at line 82 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

std::string CorrPCCProducer::pccSrc_
private

Definition at line 72 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer().

float CorrPCCProducer::pedestal
private

Definition at line 125 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

float CorrPCCProducer::pedestal_unc
private

Definition at line 126 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

TGraphErrors* CorrPCCProducer::pedestalGraph
private

Definition at line 127 of file CorrPCCProducer.cc.

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

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

Definition at line 129 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

std::string CorrPCCProducer::prodInst_
private

Definition at line 73 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer().

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

Definition at line 75 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

TH1F* CorrPCCProducer::scaleFactorAvg_h
private

Definition at line 95 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

unsigned int CorrPCCProducer::thisLS
private

Definition at line 120 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

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

Definition at line 78 of file CorrPCCProducer.cc.

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

float CorrPCCProducer::type1Frac
private

Definition at line 112 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

TGraphErrors* CorrPCCProducer::type1FracGraph
private

Definition at line 106 of file CorrPCCProducer.cc.

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

TH1F* CorrPCCProducer::type1FracHist
private

Definition at line 97 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

MonitorElement* CorrPCCProducer::Type1FracMon
private

Definition at line 102 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

TGraphErrors* CorrPCCProducer::type1resGraph
private

Definition at line 107 of file CorrPCCProducer.cc.

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

TH1F* CorrPCCProducer::type1resHist
private

Definition at line 98 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

MonitorElement* CorrPCCProducer::Type1ResMon
private

Definition at line 103 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

double CorrPCCProducer::type2_a_
private

Definition at line 122 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and makeCorrectionTemplate().

double CorrPCCProducer::type2_b_
private

Definition at line 123 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and makeCorrectionTemplate().

TGraphErrors* CorrPCCProducer::type2resGraph
private

Definition at line 108 of file CorrPCCProducer.cc.

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

TH1F* CorrPCCProducer::type2resHist
private

Definition at line 99 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

MonitorElement* CorrPCCProducer::Type2ResMon
private

Definition at line 104 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().