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< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename 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 () noexcept
 
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...
 
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)

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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 132 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.

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

184 {}

Member Function Documentation

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

Definition at line 376 of file CorrPCCProducer.cc.

References countLumi_.

376  {
377  countLumi_++;
378 }
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 669 of file CorrPCCProducer.cc.

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

669  {
670  ibooker.setCurrentFolder("AlCaReco/LumiPCC/");
671  auto scope = DQMStore::IBooker::UseRunScope(ibooker);
672  Type1FracMon = ibooker.book1D("type1Fraction", "Type1Fraction;Lumisection;Type 1 Fraction", maxLS, 0, maxLS);
673  Type1ResMon = ibooker.book1D("type1Residual", "Type1Residual;Lumisection;Type 1 Residual", maxLS, 0, maxLS);
674  Type2ResMon = ibooker.book1D("type2Residual", "Type2Residual;Lumisection;Type 2 Residual", maxLS, 0, maxLS);
675 }
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 295 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().

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

References dqmEndRunProduce().

412  {
413  // TODO: why was this code not put here in the first place?
414  dqmEndRunProduce(runSeg, iSetup);
415 }
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 418 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().

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

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

Referenced by o2olib.O2ORunMgr::executeJob().

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

Definition at line 381 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_.

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

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

Referenced by calculateCorrections().

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

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

References mps_fire::i.

Referenced by calculateCorrections(), and evaluateCorrectionResiduals().

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

Definition at line 188 of file CorrPCCProducer.cc.

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

Referenced by CorrPCCProducer().

188  {
189  for (unsigned int bx = 1; bx < LumiConstants::numBX; bx++) {
190  correctionTemplate_.at(bx) = type2_a_ * exp(-(float(bx) - 1) * type2_b_);
191  }
192 }
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 660 of file CorrPCCProducer.cc.

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

Referenced by CorrPCCProducer(), and dqmEndRunProduce().

660  {
661  for (unsigned int bx = 0; bx < LumiConstants::numBX; bx++) {
662  totalLumiByBX_[bx] = 0;
663  totalLumiByBXAvg_[bx] = 0;
664  events_[bx] = 0;
666  }
667 }
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 118 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and dqmEndRunProduce().

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

Definition at line 80 of file CorrPCCProducer.cc.

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

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

Definition at line 93 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

unsigned int CorrPCCProducer::countLumi_
private

Definition at line 117 of file CorrPCCProducer.cc.

Referenced by beginLuminosityBlock(), and CorrPCCProducer().

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

Definition at line 75 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 108 of file CorrPCCProducer.cc.

unsigned int CorrPCCProducer::iBlock = 0
private

Definition at line 83 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

TH1F* CorrPCCProducer::lumiAvg_h
private

Definition at line 95 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 91 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 90 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 88 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

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

Definition at line 86 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

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

Definition at line 70 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and endLuminosityBlock().

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

Definition at line 87 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

unsigned int CorrPCCProducer::maxLS = 3500
private

Definition at line 100 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 114 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

float CorrPCCProducer::mean_type2_residual
private

Definition at line 113 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

float CorrPCCProducer::mean_type2_residual_unc
private

Definition at line 115 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and evaluateCorrectionResiduals().

unsigned int CorrPCCProducer::minimumNumberOfEvents
private

Definition at line 84 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and endLuminosityBlock().

unsigned int CorrPCCProducer::nTrain
private

Definition at line 116 of file CorrPCCProducer.cc.

Referenced by evaluateCorrectionResiduals().

float CorrPCCProducer::overallCorrection_
private

Definition at line 81 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

std::string CorrPCCProducer::pccSrc_
private

Definition at line 71 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer().

float CorrPCCProducer::pedestal
private

Definition at line 124 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

float CorrPCCProducer::pedestal_unc
private

Definition at line 125 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

TGraphErrors* CorrPCCProducer::pedestalGraph
private

Definition at line 126 of file CorrPCCProducer.cc.

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

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

Definition at line 128 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

std::string CorrPCCProducer::prodInst_
private

Definition at line 72 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer().

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

Definition at line 74 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

TH1F* CorrPCCProducer::scaleFactorAvg_h
private

Definition at line 94 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

unsigned int CorrPCCProducer::thisLS
private

Definition at line 119 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce(), and endLuminosityBlock().

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

Definition at line 77 of file CorrPCCProducer.cc.

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

float CorrPCCProducer::type1Frac
private

Definition at line 111 of file CorrPCCProducer.cc.

Referenced by calculateCorrections(), and dqmEndRunProduce().

TGraphErrors* CorrPCCProducer::type1FracGraph
private

Definition at line 105 of file CorrPCCProducer.cc.

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

TH1F* CorrPCCProducer::type1FracHist
private

Definition at line 96 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

MonitorElement* CorrPCCProducer::Type1FracMon
private

Definition at line 101 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

TGraphErrors* CorrPCCProducer::type1resGraph
private

Definition at line 106 of file CorrPCCProducer.cc.

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

TH1F* CorrPCCProducer::type1resHist
private

Definition at line 97 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

MonitorElement* CorrPCCProducer::Type1ResMon
private

Definition at line 102 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().

double CorrPCCProducer::type2_a_
private

Definition at line 121 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and makeCorrectionTemplate().

double CorrPCCProducer::type2_b_
private

Definition at line 122 of file CorrPCCProducer.cc.

Referenced by CorrPCCProducer(), and makeCorrectionTemplate().

TGraphErrors* CorrPCCProducer::type2resGraph
private

Definition at line 107 of file CorrPCCProducer.cc.

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

TH1F* CorrPCCProducer::type2resHist
private

Definition at line 98 of file CorrPCCProducer.cc.

Referenced by dqmEndRunProduce().

MonitorElement* CorrPCCProducer::Type2ResMon
private

Definition at line 103 of file CorrPCCProducer.cc.

Referenced by bookHistograms(), and dqmEndRunProduce().