CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SiStripGainsPCLHarvester Class Reference

#include <SiStripGainsPCLHarvester.h>

Inheritance diagram for SiStripGainsPCLHarvester:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginRun (edm::Run const &run, edm::EventSetup const &isetup) override
 
void endRun (edm::Run const &run, edm::EventSetup const &isetup) override
 
 SiStripGainsPCLHarvester (const edm::ParameterSet &ps)
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void algoComputeMPVandGain (const MonitorElement *Charge_Vs_Index)
 
virtual void checkBookAPVColls (const edm::EventSetup &setup)
 
void dqmEndJob (DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
 
void gainQualityMonitor (DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
 
std::unique_ptr< SiStripApvGaingetNewObject (const MonitorElement *Charge_Vs_Index)
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400, bool gaussianConvolution=false)
 
bool IsGoodLandauFit (double *FitResults)
 
bool produceTagFilter (const MonitorElement *Charge_Vs_Index)
 
int statCollectionFromMode (const char *tag) const
 
void storeGainsTree (const TAxis *chVsIdxXaxis) const
 

Private Attributes

std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
 
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
 
unsigned int BAD
 
const TrackerGeometrybareTkGeomPtr_ = nullptr
 
int CalibrationLevel
 
bool doChargeMonitorPerPlane
 
bool doStoreOnDB
 
std::vector< std::string > dqm_tag_
 
bool fit_dataDrivenRange_ = false
 
bool fit_gaussianConvolution_ = false
 
bool fit_gaussianConvolutionTOBL56_ = false
 
edm::ESGetToken< SiStripGain, SiStripGainRcdgainToken_
 
unsigned int GOOD
 
std::string m_calibrationMode
 
std::string m_DQMdir
 
std::string m_Record
 
unsigned int MASKED
 
double MinNrEntries
 
int NPixelDets
 
int NStripAPVs
 
edm::ESGetToken< SiStripQuality, SiStripQualityRcdqualityToken_
 
bool storeGainsTree_
 
double tagCondition_GoodFrac
 
double tagCondition_NClusters
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
std::unique_ptr< TrackerTopologytTopo_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoTokenBR_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoTokenER_
 
std::vector< std::string > VChargeHisto
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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 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 DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: Harvests output of SiStripGainsPCLWorker and creates histograms and Gains Payload

Definition at line 50 of file SiStripGainsPCLHarvester.h.

Constructor & Destructor Documentation

◆ SiStripGainsPCLHarvester()

SiStripGainsPCLHarvester::SiStripGainsPCLHarvester ( const edm::ParameterSet ps)
explicit

Definition at line 34 of file SiStripGainsPCLHarvester.cc.

References CalibrationLevel, doChargeMonitorPerPlane, dqm_tag_, fit_dataDrivenRange_, fit_gaussianConvolution_, fit_gaussianConvolutionTOBL56_, gainToken_, edm::ParameterSet::getUntrackedParameter(), m_calibrationMode, m_DQMdir, m_Record, MinNrEntries, qualityToken_, storeGainsTree_, AlCaHLTBitMon_QueryRunRegistry::string, tagCondition_GoodFrac, tagCondition_NClusters, tkGeomToken_, tTopoTokenBR_, tTopoTokenER_, and VChargeHisto.

35  : doStoreOnDB(false), GOOD(0), BAD(0), MASKED(0), NStripAPVs(0), NPixelDets(0) {
36  m_Record = ps.getUntrackedParameter<std::string>("Record", "SiStripApvGainRcd");
37  CalibrationLevel = ps.getUntrackedParameter<int>("CalibrationLevel", 0);
38  MinNrEntries = ps.getUntrackedParameter<double>("minNrEntries", 20);
39  m_DQMdir = ps.getUntrackedParameter<std::string>("DQMdir", "AlCaReco/SiStripGains");
40  m_calibrationMode = ps.getUntrackedParameter<std::string>("calibrationMode", "StdBunch");
41  tagCondition_NClusters = ps.getUntrackedParameter<double>("NClustersForTagProd", 2E8);
42  tagCondition_GoodFrac = ps.getUntrackedParameter<double>("GoodFracForTagProd", 0.95);
43  doChargeMonitorPerPlane = ps.getUntrackedParameter<bool>("doChargeMonitorPerPlane", false);
44  VChargeHisto = ps.getUntrackedParameter<std::vector<std::string>>("ChargeHisto");
45  fit_gaussianConvolution_ = ps.getUntrackedParameter<bool>("FitGaussianConvolution", false);
46  fit_gaussianConvolutionTOBL56_ = ps.getUntrackedParameter<bool>("FitGaussianConvolutionTOBL5L6", false);
47  fit_dataDrivenRange_ = ps.getUntrackedParameter<bool>("FitDataDrivenRange", false);
48  storeGainsTree_ = ps.getUntrackedParameter<bool>("StoreGainsTree", false);
49 
50  //Set the monitoring element tag and store
51  dqm_tag_.reserve(7);
52  dqm_tag_.clear();
53  dqm_tag_.push_back("StdBunch"); // statistic collection from Standard Collision Bunch @ 3.8 T
54  dqm_tag_.push_back("StdBunch0T"); // statistic collection from Standard Collision Bunch @ 0 T
55  dqm_tag_.push_back("AagBunch"); // statistic collection from First Collision After Abort Gap @ 3.8 T
56  dqm_tag_.push_back("AagBunch0T"); // statistic collection from First Collision After Abort Gap @ 0 T
57  dqm_tag_.push_back("IsoMuon"); // statistic collection from Isolated Muon @ 3.8 T
58  dqm_tag_.push_back("IsoMuon0T"); // statistic collection from Isolated Muon @ 0 T
59  dqm_tag_.push_back("Harvest"); // statistic collection: Harvest
60 
61  tTopoTokenBR_ = esConsumes<edm::Transition::BeginRun>();
62  tTopoTokenER_ = esConsumes<edm::Transition::EndRun>();
63  tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
64  gainToken_ = esConsumes<edm::Transition::BeginRun>();
65  qualityToken_ = esConsumes<edm::Transition::BeginRun>();
66 }
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoTokenBR_
std::vector< std::string > dqm_tag_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
std::vector< std::string > VChargeHisto
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoTokenER_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_

Member Function Documentation

◆ algoComputeMPVandGain()

void SiStripGainsPCLHarvester::algoComputeMPVandGain ( const MonitorElement Charge_Vs_Index)
private

Definition at line 490 of file SiStripGainsPCLHarvester.cc.

References A, sistrip::APV, APVsColl, cms::cuda::assert(), B, BAD, CalibrationLevel, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), ntuplemaker::fill, fit_dataDrivenRange_, fit_gaussianConvolution_, fit_gaussianConvolutionTOBL56_, getPeakOfLandau(), GOOD, Exhume::I, mps_fire::i, IsGoodLandauFit(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_calibrationMode, MASKED, mps_setup::stdout, StripSubdetector::TOB, and tTopo_.

Referenced by dqmEndJob().

490  {
491  unsigned int I = 0;
492  TH1D* Proj = nullptr;
493  static constexpr double DEF_F = -9999.;
494  double FitResults[6] = {DEF_F, DEF_F, DEF_F, DEF_F, DEF_F, DEF_F};
495  double MPVmean = 300;
496 
497  if (Charge_Vs_Index == nullptr) {
498  edm::LogError("SiStripGainsPCLHarvester")
499  << "Harvesting: could not execute algoComputeMPVandGain method because " << m_calibrationMode
500  << " statistics cannot be retrieved.\n"
501  << "Please check if input contains " << m_calibrationMode << " data." << std::endl;
502  return;
503  }
504 
505  TH2S* chvsidx = (Charge_Vs_Index)->getTH2S();
506 
507  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
508  printf("Fitting Charge Distribution :");
509  int TreeStep = APVsColl.size() / 50;
510 
511  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++, I++) {
512  if (I % TreeStep == 0) {
513  printf(".");
514  fflush(stdout);
515  }
516  std::shared_ptr<stAPVGain> APV = it->second;
517  if (APV->Bin < 0)
518  APV->Bin = chvsidx->GetXaxis()->FindBin(APV->Index);
519 
520  if (APV->isMasked) {
521  APV->Gain = APV->PreviousGain;
522  MASKED++;
523  continue;
524  }
525 
526  Proj = chvsidx->ProjectionY(
527  "", chvsidx->GetXaxis()->FindBin(APV->Index), chvsidx->GetXaxis()->FindBin(APV->Index), "e");
528  if (!Proj)
529  continue;
530 
531  if (CalibrationLevel == 0) {
532  } else if (CalibrationLevel == 1) {
533  int SecondAPVId = APV->APVId;
534  if (SecondAPVId % 2 == 0) {
535  SecondAPVId = SecondAPVId + 1;
536  } else {
537  SecondAPVId = SecondAPVId - 1;
538  }
539  std::shared_ptr<stAPVGain> APV2 = APVsColl[(APV->DetId << 4) | SecondAPVId];
540  if (APV2->Bin < 0)
541  APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
542  TH1D* Proj2 = chvsidx->ProjectionY("", APV2->Bin, APV2->Bin, "e");
543  if (Proj2) {
544  Proj->Add(Proj2, 1);
545  delete Proj2;
546  }
547  } else if (CalibrationLevel == 2) {
548  for (unsigned int i = 0; i < 16; i++) { //loop up to 6APV for Strip and up to 16 for Pixels
549  auto tmpit = APVsColl.find((APV->DetId << 4) | i);
550  if (tmpit == APVsColl.end())
551  continue;
552  std::shared_ptr<stAPVGain> APV2 = tmpit->second;
553  if (APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)
554  continue;
555  if (APV2->Bin < 0)
556  APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index);
557  TH1D* Proj2 = chvsidx->ProjectionY("", APV2->Bin, APV2->Bin, "e");
558  if (Proj2) {
559  Proj->Add(Proj2, 1);
560  delete Proj2;
561  }
562  }
563  } else {
564  CalibrationLevel = 0;
565  printf("Unknown Calibration Level, will assume %i\n", CalibrationLevel);
566  }
567 
568  std::pair<double, double> fitRange{50., 5400.};
569  if (fit_dataDrivenRange_) {
570  fitRange = findFitRange(Proj);
571  }
572 
573  const bool isTOBL5L6 =
574  (DetId{APV->DetId}.subdetId() == StripSubdetector::TOB) && (tTopo_->tobLayer(APV->DetId) > 4);
575  getPeakOfLandau(Proj,
576  FitResults,
577  fitRange.first,
578  fitRange.second,
580 
581  // throw if the fit results are not set
582  assert(FitResults[0] != DEF_F);
583 
584  APV->FitMPV = FitResults[0];
585  APV->FitMPVErr = FitResults[1];
586  APV->FitWidth = FitResults[2];
587  APV->FitWidthErr = FitResults[3];
588  APV->FitChi2 = FitResults[4];
589  APV->FitNorm = FitResults[5];
590  APV->NEntries = Proj->GetEntries();
591 
592  // fall back to legacy fit in case of very low chi2 probability
593  if (APV->FitChi2 <= 0.1) {
594  edm::LogInfo("SiStripGainsPCLHarvester")
595  << "fit failed on this APV:" << APV->DetId << ":" << APV->APVId << " !" << std::endl;
596 
597  std::fill(FitResults, FitResults + 6, 0);
598  fitRange = std::make_pair(50., 5400.);
599 
600  APV->FitGrade = fitgrade::B;
601 
602  getPeakOfLandau(Proj, FitResults, fitRange.first, fitRange.second, false);
603 
604  APV->FitMPV = FitResults[0];
605  APV->FitMPVErr = FitResults[1];
606  APV->FitWidth = FitResults[2];
607  APV->FitWidthErr = FitResults[3];
608  APV->FitChi2 = FitResults[4];
609  APV->FitNorm = FitResults[5];
610  APV->NEntries = Proj->GetEntries();
611  } else {
612  APV->FitGrade = fitgrade::A;
613  }
614 
615  if (IsGoodLandauFit(FitResults)) {
616  APV->Gain = APV->FitMPV / MPVmean;
617  if (APV->SubDet > 2)
618  GOOD++;
619  } else {
620  APV->Gain = APV->PreviousGain;
621  if (APV->SubDet > 2)
622  BAD++;
623  }
624  if (APV->Gain <= 0)
625  APV->Gain = 1;
626 
627  delete Proj;
628  }
629  printf("\n");
630 }
Definition: APVGainStruct.h:7
Log< level::Error, false > LogError
assert(be >=bs)
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400, bool gaussianConvolution=false)
const std::complex< double > I
Definition: I.h:8
static constexpr auto TOB
std::unique_ptr< TrackerTopology > tTopo_
Log< level::Info, false > LogInfo
Definition: DetId.h:17
bool IsGoodLandauFit(double *FitResults)
Definition: APVGainStruct.h:7
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl

◆ beginRun()

void SiStripGainsPCLHarvester::beginRun ( edm::Run const &  run,
edm::EventSetup const &  isetup 
)
override

Definition at line 70 of file SiStripGainsPCLHarvester.cc.

References a, sistrip::APV, APVsCollOrdered, checkBookAPVColls(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), beamvalidation::exit(), gainToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, qualityToken_, and mps_setup::stdout.

70  {
71  using namespace edm;
72  static constexpr float defaultGainTick = 690. / 640.;
73 
74  this->checkBookAPVColls(iSetup); // check whether APV colls are booked and do so if not yet done
75 
76  const auto gainHandle = iSetup.getHandle(gainToken_);
77  if (!gainHandle.isValid()) {
78  edm::LogError("SiStripGainPCLHarvester") << "gainHandle is not valid\n";
79  exit(0);
80  }
81 
82  const auto& stripQuality = iSetup.getData(qualityToken_);
83 
84  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
85  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
86 
88  continue;
89 
90  APV->isMasked = stripQuality.IsApvBad(APV->DetId, APV->APVId);
91 
92  if (gainHandle->getNumberOfTags() != 2) {
93  edm::LogError("SiStripGainPCLHarvester") << "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";
94  fflush(stdout);
95  exit(0);
96  };
97  float newPreviousGain = gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 1), 1);
98  if (APV->PreviousGain != 1 and newPreviousGain != APV->PreviousGain)
99  edm::LogWarning("SiStripGainPCLHarvester") << "WARNING: ParticleGain in the global tag changed\n";
100  APV->PreviousGain = newPreviousGain;
101 
102  float newPreviousGainTick =
103  APV->isMasked ? defaultGainTick : gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 0), 0);
104  if (APV->PreviousGainTick != 1 and newPreviousGainTick != APV->PreviousGainTick) {
105  edm::LogWarning("SiStripGainPCLHarvester")
106  << "WARNING: TickMarkGain in the global tag changed\n"
107  << std::endl
108  << " APV->SubDet: " << APV->SubDet << " APV->APVId:" << APV->APVId << std::endl
109  << " APV->PreviousGainTick: " << APV->PreviousGainTick << " newPreviousGainTick: " << newPreviousGainTick
110  << std::endl;
111  }
112  APV->PreviousGainTick = newPreviousGainTick;
113  }
114 }
Log< level::Error, false > LogError
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
virtual void checkBookAPVColls(const edm::EventSetup &setup)
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
HLT enums.
double a
Definition: hdecay.h:121
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
Log< level::Warning, false > LogWarning
def exit(msg="")

◆ checkBookAPVColls()

void SiStripGainsPCLHarvester::checkBookAPVColls ( const edm::EventSetup setup)
privatevirtual

Definition at line 688 of file SiStripGainsPCLHarvester.cc.

References sistrip::APV, APVsColl, APVsCollOrdered, bareTkGeomPtr_, edm::EventSetup::getData(), mps_fire::i, dqmiolumiharvest::j, PixelTopology::ncolumns(), NONE, NPixelDets, PixelTopology::nrows(), NStripAPVs, StripTopology::nstrips(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), ntupleEnum::SubDet, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, tkGeomToken_, StripSubdetector::TOB, and tTopoTokenBR_.

Referenced by beginRun().

688  {
689  auto newBareTkGeomPtr = &es.getData(tkGeomToken_);
690  auto bareTkTopoPtr = &es.getData(tTopoTokenBR_);
691  if (newBareTkGeomPtr == bareTkGeomPtr_)
692  return; // already filled APVColls, nothing changed
693 
694  if (!bareTkGeomPtr_) { // pointer not yet set: called the first time => fill the APVColls
695  auto const& Det = newBareTkGeomPtr->dets();
696 
697  unsigned int Index = 0;
698 
699  for (unsigned int i = 0; i < Det.size(); i++) {
700  DetId Detid = Det[i]->geographicalId();
701  int SubDet = Detid.subdetId();
702 
705  auto DetUnit = dynamic_cast<const StripGeomDetUnit*>(Det[i]);
706  if (!DetUnit)
707  continue;
708 
709  const StripTopology& Topo = DetUnit->specificTopology();
710  unsigned int NAPV = Topo.nstrips() / 128;
711 
712  for (unsigned int j = 0; j < NAPV; j++) {
713  auto APV = std::make_shared<stAPVGain>();
714  APV->Index = Index;
715  APV->Bin = -1;
716  APV->DetId = Detid.rawId();
717  APV->Side = 0;
718 
719  if (SubDet == StripSubdetector::TID) {
720  APV->Side = bareTkTopoPtr->tidSide(Detid);
721  } else if (SubDet == StripSubdetector::TEC) {
722  APV->Side = bareTkTopoPtr->tecSide(Detid);
723  }
724 
725  APV->APVId = j;
726  APV->SubDet = SubDet;
727  APV->FitMPV = -1;
728  APV->FitMPVErr = -1;
729  APV->FitWidth = -1;
730  APV->FitWidthErr = -1;
731  APV->FitChi2 = -1;
732  APV->FitNorm = -1;
733  APV->FitGrade = fitgrade::NONE;
734  APV->Gain = -1;
735  APV->PreviousGain = 1;
736  APV->PreviousGainTick = 1;
737  APV->x = DetUnit->position().basicVector().x();
738  APV->y = DetUnit->position().basicVector().y();
739  APV->z = DetUnit->position().basicVector().z();
740  APV->Eta = DetUnit->position().basicVector().eta();
741  APV->Phi = DetUnit->position().basicVector().phi();
742  APV->R = DetUnit->position().basicVector().transverse();
743  APV->Thickness = DetUnit->surface().bounds().thickness();
744  APV->NEntries = 0;
745  APV->isMasked = false;
746 
747  APVsCollOrdered.push_back(APV);
748  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
749  Index++;
750  NStripAPVs++;
751  } // loop on APVs
752  } // if is Strips
753  } // loop on dets
754 
755  for (unsigned int i = 0; i < Det.size();
756  i++) { //Make two loop such that the Pixel information is added at the end --> make transition simpler
757  DetId Detid = Det[i]->geographicalId();
758  int SubDet = Detid.subdetId();
760  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*>(Det[i]);
761  if (!DetUnit)
762  continue;
763 
764  const PixelTopology& Topo = DetUnit->specificTopology();
765  unsigned int NROCRow = Topo.nrows() / (80.);
766  unsigned int NROCCol = Topo.ncolumns() / (52.);
767 
768  for (unsigned int j = 0; j < NROCRow; j++) {
769  for (unsigned int i = 0; i < NROCCol; i++) {
770  auto APV = std::make_shared<stAPVGain>();
771  APV->Index = Index;
772  APV->Bin = -1;
773  APV->DetId = Detid.rawId();
774  APV->Side = 0;
775  APV->APVId = (j << 3 | i);
776  APV->SubDet = SubDet;
777  APV->FitMPV = -1;
778  APV->FitMPVErr = -1;
779  APV->FitWidth = -1;
780  APV->FitWidthErr = -1;
781  APV->FitChi2 = -1;
782  APV->FitGrade = fitgrade::NONE;
783  APV->Gain = -1;
784  APV->PreviousGain = 1;
785  APV->PreviousGainTick = 1;
786  APV->x = DetUnit->position().basicVector().x();
787  APV->y = DetUnit->position().basicVector().y();
788  APV->z = DetUnit->position().basicVector().z();
789  APV->Eta = DetUnit->position().basicVector().eta();
790  APV->Phi = DetUnit->position().basicVector().phi();
791  APV->R = DetUnit->position().basicVector().transverse();
792  APV->Thickness = DetUnit->surface().bounds().thickness();
793  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
794  APV->NEntries = 0;
795 
796  APVsCollOrdered.push_back(APV);
797  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
798  Index++;
799  NPixelDets++;
800 
801  } // loop on ROC cols
802  } // loop on ROC rows
803  } // if Pixel
804  } // loop on Dets
805  } //if (!bareTkGeomPtr_) ...
806  bareTkGeomPtr_ = newBareTkGeomPtr;
807 }
static constexpr auto TEC
virtual int nstrips() const =0
virtual int ncolumns() const =0
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoTokenBR_
virtual int nrows() const =0
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const TrackerGeometry * bareTkGeomPtr_
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: TkAlStyle.h:43
static constexpr auto TID
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl

◆ dqmEndJob()

void SiStripGainsPCLHarvester::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 117 of file SiStripGainsPCLHarvester.cc.

References algoComputeMPVandGain(), cond::service::PoolDBOutputService::currentTime(), doStoreOnDB, dqm_tag_, spr::find(), gainQualityMonitor(), dqm::implementation::IGetter::get(), getNewObject(), dqm::legacy::MonitorElement::getTH2S(), edm::Service< T >::isAvailable(), m_calibrationMode, m_DQMdir, m_Record, storeGainsTree(), storeGainsTree_, AlCaHLTBitMon_QueryRunRegistry::string, and cond::service::PoolDBOutputService::writeOneIOV().

117  {
118  edm::LogInfo("SiStripGainsPCLHarvester") << "Starting harvesting statistics" << std::endl;
119 
120  std::string DQM_dir = m_DQMdir;
121 
122  std::string stag = *(std::find(dqm_tag_.begin(), dqm_tag_.end(), m_calibrationMode));
123  if (!stag.empty() && stag[0] != '_')
124  stag.insert(0, 1, '_');
125 
126  std::string cvi = DQM_dir + std::string("/Charge_Vs_Index") + stag;
127 
128  MonitorElement* Charge_Vs_Index = igetter_.get(cvi);
129 
130  if (Charge_Vs_Index == nullptr) {
131  edm::LogError("SiStripGainsPCLHarvester")
132  << "Harvesting: could not retrieve " << cvi.c_str() << ", statistics will not be summed!" << std::endl;
133  } else {
134  edm::LogInfo("SiStripGainsPCLHarvester")
135  << "Harvesting " << (Charge_Vs_Index)->getTH2S()->GetEntries() << " more clusters" << std::endl;
136  }
137 
138  algoComputeMPVandGain(Charge_Vs_Index);
139  std::unique_ptr<SiStripApvGain> theAPVGains = this->getNewObject(Charge_Vs_Index);
140 
141  // write out the APVGains record
143 
144  if (doStoreOnDB) {
145  if (poolDbService.isAvailable())
146  poolDbService->writeOneIOV(*theAPVGains, poolDbService->currentTime(), m_Record);
147  else
148  throw std::runtime_error("PoolDBService required.");
149  } else {
150  edm::LogInfo("SiStripGainsPCLHarvester") << "Will not produce payload!" << std::endl;
151  }
152 
153  //Collect the statistics for monitoring and validation
154  gainQualityMonitor(ibooker_, Charge_Vs_Index);
155 
156  if (storeGainsTree_) {
157  if (Charge_Vs_Index != nullptr) {
158  storeGainsTree(Charge_Vs_Index->getTH2S()->GetXaxis());
159  } else {
160  edm::LogError("SiStripGainsPCLHarvester")
161  << "Harvesting: could not retrieve " << cvi.c_str() << "Tree won't be stored" << std::endl;
162  }
163  }
164 }
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
void storeGainsTree(const TAxis *chVsIdxXaxis) const
std::vector< std::string > dqm_tag_
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void algoComputeMPVandGain(const MonitorElement *Charge_Vs_Index)
void gainQualityMonitor(DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
Log< level::Info, false > LogInfo
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
bool isAvailable() const
Definition: Service.h:40
virtual TH2S * getTH2S() const

◆ endRun()

void SiStripGainsPCLHarvester::endRun ( edm::Run const &  run,
edm::EventSetup const &  isetup 
)
override

Definition at line 957 of file SiStripGainsPCLHarvester.cc.

References edm::EventSetup::getData(), tTopo_, and tTopoTokenER_.

957  {
958  if (!tTopo_) {
959  tTopo_ = std::make_unique<TrackerTopology>(isetup.getData(tTopoTokenER_));
960  }
961 }
std::unique_ptr< TrackerTopology > tTopo_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoTokenER_

◆ fillDescriptions()

void SiStripGainsPCLHarvester::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 950 of file SiStripGainsPCLHarvester.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

950  {
952  desc.setUnknown();
953  descriptions.addDefault(desc);
954 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ gainQualityMonitor()

void SiStripGainsPCLHarvester::gainQualityMonitor ( DQMStore::IBooker ibooker_,
const MonitorElement Charge_Vs_Index 
) const
private

Definition at line 167 of file SiStripGainsPCLHarvester.cc.

References a, sistrip::APV, APVsCollOrdered, newFWLiteAna::bin, dqm::implementation::IBooker::book1DD(), dqm::implementation::IBooker::book2DD(), doChargeMonitorPerPlane, MillePedeFileConverter_cfg::e, APVGain::FetchMonitor(), dqm::impl::MonitorElement::Fill(), dqmdumpme::first, IntegrityClient_cfi::Gain, h, mps_fire::i, APVGain::monHnames(), beam_dqm_sourceclient-live_cfg::monitor, VtxSmearedParameters_cfi::Phi, dttmaxenums::R, edm::second(), dqm::implementation::NavigatorBase::setCurrentFolder(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::side(), ntupleEnum::SubDet, APVGain::subdetectorId(), APVGain::subdetectorPlane(), APVGain::subdetectorSide(), APVGain::thickness(), tTopo_, VChargeHisto, and z.

Referenced by dqmEndJob().

168  {
169  ibooker_.setCurrentFolder("AlCaReco/SiStripGainsHarvesting/");
170 
171  std::vector<APVGain::APVmon> new_charge_histos;
172  std::vector<std::pair<std::string, std::string>> cnames =
174  for (unsigned int i = 0; i < cnames.size(); i++) {
175  MonitorElement* monitor = ibooker_.book1DD((cnames[i]).first, (cnames[i]).second.c_str(), 100, 0., 1000.);
176  int thick = APVGain::thickness((cnames[i]).first);
177  int id = APVGain::subdetectorId((cnames[i]).first);
178  int side = APVGain::subdetectorSide((cnames[i]).first);
179  int plane = APVGain::subdetectorPlane((cnames[i]).first);
180  new_charge_histos.push_back(APVGain::APVmon(thick, id, side, plane, monitor));
181  }
182 
183  int MPVbin = 300;
184  float MPVmin = 0.;
185  float MPVmax = 600.;
186 
187  MonitorElement* MPV_Vs_EtaTIB =
188  ibooker_.book2DD("MPVvsEtaTIB", "MPV vs Eta TIB", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
189  MonitorElement* MPV_Vs_EtaTID =
190  ibooker_.book2DD("MPVvsEtaTID", "MPV vs Eta TID", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
191  MonitorElement* MPV_Vs_EtaTOB =
192  ibooker_.book2DD("MPVvsEtaTOB", "MPV vs Eta TOB", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
193  MonitorElement* MPV_Vs_EtaTEC =
194  ibooker_.book2DD("MPVvsEtaTEC", "MPV vs Eta TEC", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
195  MonitorElement* MPV_Vs_EtaTECthin =
196  ibooker_.book2DD("MPVvsEtaTEC1", "MPV vs Eta TEC-thin", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
197  MonitorElement* MPV_Vs_EtaTECthick =
198  ibooker_.book2DD("MPVvsEtaTEC2", "MPV vs Eta TEC-thick", 50, -3.0, 3.0, MPVbin, MPVmin, MPVmax);
199 
200  MonitorElement* MPV_Vs_PhiTIB =
201  ibooker_.book2DD("MPVvsPhiTIB", "MPV vs Phi TIB", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
202  MonitorElement* MPV_Vs_PhiTID =
203  ibooker_.book2DD("MPVvsPhiTID", "MPV vs Phi TID", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
204  MonitorElement* MPV_Vs_PhiTOB =
205  ibooker_.book2DD("MPVvsPhiTOB", "MPV vs Phi TOB", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
206  MonitorElement* MPV_Vs_PhiTEC =
207  ibooker_.book2DD("MPVvsPhiTEC", "MPV vs Phi TEC", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
208  MonitorElement* MPV_Vs_PhiTECthin =
209  ibooker_.book2DD("MPVvsPhiTEC1", "MPV vs Phi TEC-thin ", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
210  MonitorElement* MPV_Vs_PhiTECthick =
211  ibooker_.book2DD("MPVvsPhiTEC2", "MPV vs Phi TEC-thick", 50, -3.4, 3.4, MPVbin, MPVmin, MPVmax);
212 
213  MonitorElement* NoMPVfit = ibooker_.book2DD("NoMPVfit", "Modules with bad Landau Fit", 350, -350, 350, 240, 0, 120);
214  MonitorElement* NoMPVmasked = ibooker_.book2DD("NoMPVmasked", "Masked Modules", 350, -350, 350, 240, 0, 120);
215 
216  MonitorElement* Gains = ibooker_.book1DD("Gains", "Gains", 300, 0, 2);
217  MonitorElement* MPVs = ibooker_.book1DD("MPVs", "MPVs", MPVbin, MPVmin, MPVmax);
218  MonitorElement* MPVs320 = ibooker_.book1DD("MPV_320", "MPV 320 thickness", MPVbin, MPVmin, MPVmax);
219  MonitorElement* MPVs500 = ibooker_.book1DD("MPV_500", "MPV 500 thickness", MPVbin, MPVmin, MPVmax);
220  MonitorElement* MPVsTIB = ibooker_.book1DD("MPV_TIB", "MPV TIB", MPVbin, MPVmin, MPVmax);
221  MonitorElement* MPVsTID = ibooker_.book1DD("MPV_TID", "MPV TID", MPVbin, MPVmin, MPVmax);
222  MonitorElement* MPVsTIDP = ibooker_.book1DD("MPV_TIDP", "MPV TIDP", MPVbin, MPVmin, MPVmax);
223  MonitorElement* MPVsTIDM = ibooker_.book1DD("MPV_TIDM", "MPV TIDM", MPVbin, MPVmin, MPVmax);
224  MonitorElement* MPVsTOB = ibooker_.book1DD("MPV_TOB", "MPV TOB", MPVbin, MPVmin, MPVmax);
225  MonitorElement* MPVsTEC = ibooker_.book1DD("MPV_TEC", "MPV TEC", MPVbin, MPVmin, MPVmax);
226  MonitorElement* MPVsTECP = ibooker_.book1DD("MPV_TECP", "MPV TECP", MPVbin, MPVmin, MPVmax);
227  MonitorElement* MPVsTECM = ibooker_.book1DD("MPV_TECM", "MPV TECM", MPVbin, MPVmin, MPVmax);
228  MonitorElement* MPVsTECthin = ibooker_.book1DD("MPV_TEC1", "MPV TEC thin", MPVbin, MPVmin, MPVmax);
229  MonitorElement* MPVsTECthick = ibooker_.book1DD("MPV_TEC2", "MPV TEC thick", MPVbin, MPVmin, MPVmax);
230  MonitorElement* MPVsTECP1 = ibooker_.book1DD("MPV_TECP1", "MPV TECP thin ", MPVbin, MPVmin, MPVmax);
231  MonitorElement* MPVsTECP2 = ibooker_.book1DD("MPV_TECP2", "MPV TECP thick", MPVbin, MPVmin, MPVmax);
232  MonitorElement* MPVsTECM1 = ibooker_.book1DD("MPV_TECM1", "MPV TECM thin", MPVbin, MPVmin, MPVmax);
233  MonitorElement* MPVsTECM2 = ibooker_.book1DD("MPV_TECM2", "MPV TECM thick", MPVbin, MPVmin, MPVmax);
234 
235  MonitorElement* MPVError = ibooker_.book1DD("MPVError", "MPV Error", 150, 0, 150);
236  MonitorElement* MPVErrorVsMPV = ibooker_.book2DD("MPVErrorVsMPV", "MPV Error vs MPV", 300, 0, 600, 150, 0, 150);
237  MonitorElement* MPVErrorVsEta = ibooker_.book2DD("MPVErrorVsEta", "MPV Error vs Eta", 50, -3.0, 3.0, 150, 0, 150);
238  MonitorElement* MPVErrorVsPhi = ibooker_.book2DD("MPVErrorVsPhi", "MPV Error vs Phi", 50, -3.4, 3.4, 150, 0, 150);
239  MonitorElement* MPVErrorVsN = ibooker_.book2DD("MPVErrorVsN", "MPV Error vs N", 500, 0, 1000, 150, 0, 150);
240 
241  MonitorElement* DiffWRTPrevGainTIB = ibooker_.book1DD("DiffWRTPrevGainTIB", "Diff w.r.t. PrevGain TIB", 250, 0, 2);
242  MonitorElement* DiffWRTPrevGainTID = ibooker_.book1DD("DiffWRTPrevGainTID", "Diff w.r.t. PrevGain TID", 250, 0, 2);
243  MonitorElement* DiffWRTPrevGainTOB = ibooker_.book1DD("DiffWRTPrevGainTOB", "Diff w.r.t. PrevGain TOB", 250, 0, 2);
244  MonitorElement* DiffWRTPrevGainTEC = ibooker_.book1DD("DiffWRTPrevGainTEC", "Diff w.r.t. PrevGain TEC", 250, 0, 2);
245 
246  MonitorElement* GainVsPrevGainTIB =
247  ibooker_.book2DD("GainVsPrevGainTIB", "Gain vs PrevGain TIB", 100, 0, 2, 100, 0, 2);
248  MonitorElement* GainVsPrevGainTID =
249  ibooker_.book2DD("GainVsPrevGainTID", "Gain vs PrevGain TID", 100, 0, 2, 100, 0, 2);
250  MonitorElement* GainVsPrevGainTOB =
251  ibooker_.book2DD("GainVsPrevGainTOB", "Gain vs PrevGain TOB", 100, 0, 2, 100, 0, 2);
252  MonitorElement* GainVsPrevGainTEC =
253  ibooker_.book2DD("GainVsPrevGainTEC", "Gain vs PrevGain TEC", 100, 0, 2, 100, 0, 2);
254 
255  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
256  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
257  if (APV == nullptr)
258  continue;
259 
260  unsigned int Index = APV->Index;
261  unsigned int SubDet = APV->SubDet;
262  unsigned int DetId = APV->DetId;
263  float z = APV->z;
264  float Eta = APV->Eta;
265  float R = APV->R;
266  float Phi = APV->Phi;
267  float Thickness = APV->Thickness;
268  double FitMPV = APV->FitMPV;
269  double FitMPVErr = APV->FitMPVErr;
270  double Gain = APV->Gain;
271  double NEntries = APV->NEntries;
272  double PreviousGain = APV->PreviousGain;
273 
274  if (SubDet < 3)
275  continue; // avoid to loop over Pixel det id
276 
277  if (Gain != 1.) {
278  std::vector<MonitorElement*> charge_histos = APVGain::FetchMonitor(new_charge_histos, DetId, tTopo_.get());
279 
280  if (!Charge_Vs_Index)
281  continue;
282  TH2S* chvsidx = (Charge_Vs_Index)->getTH2S();
283  int bin = chvsidx->GetXaxis()->FindBin(Index);
284  TH1D* Proj = chvsidx->ProjectionY("proj", bin, bin);
285  for (int binId = 0; binId < Proj->GetXaxis()->GetNbins(); binId++) {
286  double new_charge = Proj->GetXaxis()->GetBinCenter(binId) / Gain;
287  if (Proj->GetBinContent(binId) != 0.) {
288  for (unsigned int h = 0; h < charge_histos.size(); h++) {
289  TH1D* chisto = (charge_histos[h])->getTH1D();
290  for (int e = 0; e < Proj->GetBinContent(binId); e++)
291  chisto->Fill(new_charge);
292  }
293  }
294  }
295  }
296 
297  if (FitMPV <= 0.) { // No fit of MPV
298  if (APV->isMasked)
299  NoMPVmasked->Fill(z, R);
300  else
301  NoMPVfit->Fill(z, R);
302 
303  } else { // Fit of MPV
304  if (FitMPV > 0.)
305  Gains->Fill(Gain);
306 
307  MPVs->Fill(FitMPV);
308  if (Thickness < 0.04)
309  MPVs320->Fill(FitMPV);
310  if (Thickness > 0.04)
311  MPVs500->Fill(FitMPV);
312 
313  MPVError->Fill(FitMPVErr);
314  MPVErrorVsMPV->Fill(FitMPV, FitMPVErr);
315  MPVErrorVsEta->Fill(Eta, FitMPVErr);
316  MPVErrorVsPhi->Fill(Phi, FitMPVErr);
317  MPVErrorVsN->Fill(NEntries, FitMPVErr);
318 
319  if (SubDet == 3) {
320  MPV_Vs_EtaTIB->Fill(Eta, FitMPV);
321  MPV_Vs_PhiTIB->Fill(Phi, FitMPV);
322  MPVsTIB->Fill(FitMPV);
323 
324  } else if (SubDet == 4) {
325  MPV_Vs_EtaTID->Fill(Eta, FitMPV);
326  MPV_Vs_PhiTID->Fill(Phi, FitMPV);
327  MPVsTID->Fill(FitMPV);
328  if (Eta < 0.)
329  MPVsTIDM->Fill(FitMPV);
330  if (Eta > 0.)
331  MPVsTIDP->Fill(FitMPV);
332 
333  } else if (SubDet == 5) {
334  MPV_Vs_EtaTOB->Fill(Eta, FitMPV);
335  MPV_Vs_PhiTOB->Fill(Phi, FitMPV);
336  MPVsTOB->Fill(FitMPV);
337 
338  } else if (SubDet == 6) {
339  MPV_Vs_EtaTEC->Fill(Eta, FitMPV);
340  MPV_Vs_PhiTEC->Fill(Phi, FitMPV);
341  MPVsTEC->Fill(FitMPV);
342  if (Eta < 0.)
343  MPVsTECM->Fill(FitMPV);
344  if (Eta > 0.)
345  MPVsTECP->Fill(FitMPV);
346  if (Thickness < 0.04) {
347  MPV_Vs_EtaTECthin->Fill(Eta, FitMPV);
348  MPV_Vs_PhiTECthin->Fill(Phi, FitMPV);
349  MPVsTECthin->Fill(FitMPV);
350  if (Eta > 0.)
351  MPVsTECP1->Fill(FitMPV);
352  if (Eta < 0.)
353  MPVsTECM1->Fill(FitMPV);
354  }
355  if (Thickness > 0.04) {
356  MPV_Vs_EtaTECthick->Fill(Eta, FitMPV);
357  MPV_Vs_PhiTECthick->Fill(Phi, FitMPV);
358  MPVsTECthick->Fill(FitMPV);
359  if (Eta > 0.)
360  MPVsTECP2->Fill(FitMPV);
361  if (Eta < 0.)
362  MPVsTECM2->Fill(FitMPV);
363  }
364  }
365  }
366 
367  if (SubDet == 3 && PreviousGain != 0.)
368  DiffWRTPrevGainTIB->Fill(Gain / PreviousGain);
369  else if (SubDet == 4 && PreviousGain != 0.)
370  DiffWRTPrevGainTID->Fill(Gain / PreviousGain);
371  else if (SubDet == 5 && PreviousGain != 0.)
372  DiffWRTPrevGainTOB->Fill(Gain / PreviousGain);
373  else if (SubDet == 6 && PreviousGain != 0.)
374  DiffWRTPrevGainTEC->Fill(Gain / PreviousGain);
375 
376  if (SubDet == 3)
377  GainVsPrevGainTIB->Fill(PreviousGain, Gain);
378  else if (SubDet == 4)
379  GainVsPrevGainTID->Fill(PreviousGain, Gain);
380  else if (SubDet == 5)
381  GainVsPrevGainTOB->Fill(PreviousGain, Gain);
382  else if (SubDet == 6)
383  GainVsPrevGainTEC->Fill(PreviousGain, Gain);
384  }
385 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
int subdetectorPlane(uint32_t, const TrackerTopology *)
void Fill(long long x)
U second(std::pair< T, U > const &p)
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
std::vector< std::string > VChargeHisto
std::unique_ptr< TrackerTopology > tTopo_
Definition: DetId.h:17
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=nullptr)
int subdetectorSide(uint32_t, const TrackerTopology *)
int thickness(uint32_t)
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:347
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
double a
Definition: hdecay.h:121
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
int subdetectorId(uint32_t)

◆ getNewObject()

std::unique_ptr< SiStripApvGain > SiStripGainsPCLHarvester::getNewObject ( const MonitorElement Charge_Vs_Index)
private

Definition at line 839 of file SiStripGainsPCLHarvester.cc.

References a, sistrip::APV, APVsCollOrdered, doStoreOnDB, LogDebug, getGTfromDQMFile::obj, produceTagFilter(), and FastTimerService_cff::range.

Referenced by dqmEndJob().

839  {
840  std::unique_ptr<SiStripApvGain> obj = std::make_unique<SiStripApvGain>();
841 
842  if (!produceTagFilter(Charge_Vs_Index)) {
843  edm::LogWarning("SiStripGainsPCLHarvester")
844  << "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << std::endl;
845  return obj;
846  } else {
847  doStoreOnDB = true;
848  }
849 
850  std::vector<float> theSiStripVector;
851  unsigned int PreviousDetId = 0;
852  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
853  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
854  if (APV == nullptr) {
855  printf("Bug\n");
856  continue;
857  }
858  if (APV->SubDet <= 2)
859  continue;
860  if (APV->DetId != PreviousDetId) {
861  if (!theSiStripVector.empty()) {
862  SiStripApvGain::Range range(theSiStripVector.begin(), theSiStripVector.end());
863  if (!obj->put(PreviousDetId, range))
864  printf("Bug to put detId = %i\n", PreviousDetId);
865  }
866  theSiStripVector.clear();
867  PreviousDetId = APV->DetId;
868  }
869  theSiStripVector.push_back(APV->Gain);
870 
871  LogDebug("SiStripGainsPCLHarvester") << " DetId: " << APV->DetId << " APV: " << APV->APVId
872  << " Gain: " << APV->Gain << std::endl;
873  }
874  if (!theSiStripVector.empty()) {
875  SiStripApvGain::Range range(theSiStripVector.begin(), theSiStripVector.end());
876  if (!obj->put(PreviousDetId, range))
877  printf("Bug to put detId = %i\n", PreviousDetId);
878  }
879 
880  return obj;
881 }
bool produceTagFilter(const MonitorElement *Charge_Vs_Index)
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
double a
Definition: hdecay.h:121
Log< level::Warning, false > LogWarning
#define LogDebug(id)

◆ getPeakOfLandau()

void SiStripGainsPCLHarvester::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 50,
double  HighRange = 5400,
bool  gaussianConvolution = false 
)
private

Definition at line 633 of file SiStripGainsPCLHarvester.cc.

References personalPlayback::fp, MinNrEntries, and pfDeepBoostedJetPreprocessParams_cfi::sv.

Referenced by algoComputeMPVandGain().

634  {
635  // undo defaults (checked for assertion)
636  FitResults[0] = -0.5; //MPV
637  FitResults[1] = 0; //MPV error
638  FitResults[2] = -0.5; //Width
639  FitResults[3] = 0; //Width error
640  FitResults[4] = -0.5; //Fit Chi2/NDF
641  FitResults[5] = 0; //Normalization
642 
643  if (InputHisto->GetEntries() < MinNrEntries)
644  return;
645 
646  if (gaussianConvolution) {
647  // perform fit with landau convoluted with a gaussian
648  Double_t fr[2] = {LowRange, HighRange};
649  Double_t sv[4] = {25., 300., InputHisto->Integral(), 40.};
650  Double_t pllo[4] = {0.5, 100., 1.0, 0.4};
651  Double_t plhi[4] = {100., 500., 1.e7, 100.};
652  Double_t fp[4], fpe[4];
653  Double_t chisqr;
654  Int_t ndf;
655  auto fitsnr = langaufit(dynamic_cast<TH1D*>(InputHisto), fr, sv, pllo, plhi, fp, fpe, &chisqr, &ndf);
656  FitResults[0] = fitsnr->GetMaximumX(); //MPV
657  FitResults[1] = fpe[1]; //MPV error // FIXME add error propagation
658  FitResults[2] = fp[0]; //Width
659  FitResults[3] = fpe[0]; //Width error
660  FitResults[4] = chisqr / ndf; //Fit Chi2/NDF
661  FitResults[5] = fp[2];
662  } else {
663  // perform fit with standard landau
664  TF1 MyLandau("MyLandau", "landau", LowRange, HighRange);
665  MyLandau.SetParameter(1, 300);
666  InputHisto->Fit(&MyLandau, "0QR WW");
667  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
668  FitResults[0] = MyLandau.GetParameter(1); //MPV
669  FitResults[1] = MyLandau.GetParError(1); //MPV error
670  FitResults[2] = MyLandau.GetParameter(2); //Width
671  FitResults[3] = MyLandau.GetParError(2); //Width error
672  FitResults[4] = MyLandau.GetChisquare() / MyLandau.GetNDF(); //Fit Chi2/NDF
673  FitResults[5] = MyLandau.GetParameter(0);
674  }
675 }

◆ IsGoodLandauFit()

bool SiStripGainsPCLHarvester::IsGoodLandauFit ( double *  FitResults)
private

Definition at line 678 of file SiStripGainsPCLHarvester.cc.

Referenced by algoComputeMPVandGain().

678  {
679  if (FitResults[0] <= 0)
680  return false;
681  // if(FitResults[1] > MaxMPVError )return false;
682  // if(FitResults[4] > MaxChi2OverNDF)return false;
683  return true;
684 }

◆ produceTagFilter()

bool SiStripGainsPCLHarvester::produceTagFilter ( const MonitorElement Charge_Vs_Index)
private

Definition at line 810 of file SiStripGainsPCLHarvester.cc.

References BAD, GOOD, funct::integral(), m_calibrationMode, NStripAPVs, tagCondition_GoodFrac, and tagCondition_NClusters.

Referenced by getNewObject().

810  {
811  // The goal of this function is to check wether or not there is enough statistics
812  // to produce a meaningful tag for the DB
813 
814  if (Charge_Vs_Index == nullptr) {
815  edm::LogError("SiStripGainsPCLHarvester")
816  << "produceTagFilter -> Return false: could not retrieve the " << m_calibrationMode << " statistics.\n"
817  << "Please check if input contains " << m_calibrationMode << " data." << std::endl;
818  return false;
819  }
820 
821  float integral = (Charge_Vs_Index)->getTH2S()->Integral();
822  if ((Charge_Vs_Index)->getTH2S()->Integral(0, NStripAPVs + 1, 0, 99999) < tagCondition_NClusters) {
823  edm::LogWarning("SiStripGainsPCLHarvester")
824  << "calibrationMode -> " << m_calibrationMode << "\n"
825  << "produceTagFilter -> Return false: Statistics is too low : " << integral << std::endl;
826  return false;
827  }
828  if ((1.0 * GOOD) / (GOOD + BAD) < tagCondition_GoodFrac) {
829  edm::LogWarning("SiStripGainsPCLHarvester")
830  << "calibrationMode -> " << m_calibrationMode << "\n"
831  << "produceTagFilter -> Return false: ratio of GOOD/TOTAL is too low: " << (1.0 * GOOD) / (GOOD + BAD)
832  << std::endl;
833  return false;
834  }
835  return true;
836 }
Log< level::Error, false > LogError
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:70
Log< level::Warning, false > LogWarning

◆ statCollectionFromMode()

int SiStripGainsPCLHarvester::statCollectionFromMode ( const char *  tag) const
private

◆ storeGainsTree()

void SiStripGainsPCLHarvester::storeGainsTree ( const TAxis *  chVsIdxXaxis) const
private

Definition at line 883 of file SiStripGainsPCLHarvester.cc.

References APVsCollOrdered, AlignmentPI::t_x, AlignmentPI::t_y, and AlignmentPI::t_z.

Referenced by dqmEndJob().

883  {
884  unsigned int t_Index, t_Bin, t_DetId;
885  unsigned char t_APVId, t_SubDet;
886  float t_x, t_y, t_z, t_Eta, t_R, t_Phi, t_Thickness;
887  float t_FitMPV, t_FitMPVErr, t_FitWidth, t_FitWidthErr, t_FitChi2NDF, t_FitNorm, t_FitGrade;
888  double t_Gain, t_PrevGain, t_PrevGainTick, t_NEntries;
889  bool t_isMasked;
890  auto tree = edm::Service<TFileService>()->make<TTree>("APVGain", "APVGain");
891  tree->Branch("Index", &t_Index, "Index/i");
892  tree->Branch("Bin", &t_Bin, "Bin/i");
893  tree->Branch("DetId", &t_DetId, "DetId/i");
894  tree->Branch("APVId", &t_APVId, "APVId/b");
895  tree->Branch("SubDet", &t_SubDet, "SubDet/b");
896  tree->Branch("x", &t_x, "x/F");
897  tree->Branch("y", &t_y, "y/F");
898  tree->Branch("z", &t_z, "z/F");
899  tree->Branch("Eta", &t_Eta, "Eta/F");
900  tree->Branch("R", &t_R, "R/F");
901  tree->Branch("Phi", &t_Phi, "Phi/F");
902  tree->Branch("Thickness", &t_Thickness, "Thickness/F");
903  tree->Branch("FitMPV", &t_FitMPV, "FitMPV/F");
904  tree->Branch("FitMPVErr", &t_FitMPVErr, "FitMPVErr/F");
905  tree->Branch("FitWidth", &t_FitWidth, "FitWidth/F");
906  tree->Branch("FitWidthErr", &t_FitWidthErr, "FitWidthErr/F");
907  tree->Branch("FitChi2NDF", &t_FitChi2NDF, "FitChi2NDF/F");
908  tree->Branch("FitNorm", &t_FitNorm, "FitNorm/F");
909  tree->Branch("FitGrade", &t_FitGrade, "FitGrade/F");
910  tree->Branch("Gain", &t_Gain, "Gain/D");
911  tree->Branch("PrevGain", &t_PrevGain, "PrevGain/D");
912  tree->Branch("PrevGainTick", &t_PrevGainTick, "PrevGainTick/D");
913  tree->Branch("NEntries", &t_NEntries, "NEntries/D");
914  tree->Branch("isMasked", &t_isMasked, "isMasked/O");
915 
916  for (const auto& iAPV : APVsCollOrdered) {
917  if (iAPV) {
918  t_Index = iAPV->Index;
919  t_Bin = chVsIdxXaxis->FindBin(iAPV->Index);
920  t_DetId = iAPV->DetId;
921  t_APVId = iAPV->APVId;
922  t_SubDet = iAPV->SubDet;
923  t_x = iAPV->x;
924  t_y = iAPV->y;
925  t_z = iAPV->z;
926  t_Eta = iAPV->Eta;
927  t_R = iAPV->R;
928  t_Phi = iAPV->Phi;
929  t_Thickness = iAPV->Thickness;
930  t_FitMPV = iAPV->FitMPV;
931  t_FitMPVErr = iAPV->FitMPVErr;
932  t_FitWidth = iAPV->FitWidth;
933  t_FitWidthErr = iAPV->FitWidthErr;
934  t_FitChi2NDF = iAPV->FitChi2;
935  t_FitNorm = iAPV->FitNorm;
936  t_FitGrade = iAPV->FitGrade;
937  t_Gain = iAPV->Gain;
938  t_PrevGain = iAPV->PreviousGain;
939  t_PrevGainTick = iAPV->PreviousGainTick;
940  t_NEntries = iAPV->NEntries;
941  t_isMasked = iAPV->isMasked;
942 
943  tree->Fill();
944  }
945  }
946 }
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: tree.py:1

Member Data Documentation

◆ APVsColl

std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > SiStripGainsPCLHarvester::APVsColl
private

Definition at line 103 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and checkBookAPVColls().

◆ APVsCollOrdered

std::vector<std::shared_ptr<stAPVGain> > SiStripGainsPCLHarvester::APVsCollOrdered
private

◆ BAD

unsigned int SiStripGainsPCLHarvester::BAD
private

Definition at line 79 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and produceTagFilter().

◆ bareTkGeomPtr_

const TrackerGeometry* SiStripGainsPCLHarvester::bareTkGeomPtr_ = nullptr
private

Definition at line 99 of file SiStripGainsPCLHarvester.h.

Referenced by checkBookAPVColls().

◆ CalibrationLevel

int SiStripGainsPCLHarvester::CalibrationLevel
private

Definition at line 97 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and SiStripGainsPCLHarvester().

◆ doChargeMonitorPerPlane

bool SiStripGainsPCLHarvester::doChargeMonitorPerPlane
private

Charge monitor per detector plane

Definition at line 76 of file SiStripGainsPCLHarvester.h.

Referenced by gainQualityMonitor(), and SiStripGainsPCLHarvester().

◆ doStoreOnDB

bool SiStripGainsPCLHarvester::doStoreOnDB
private

Definition at line 75 of file SiStripGainsPCLHarvester.h.

Referenced by dqmEndJob(), and getNewObject().

◆ dqm_tag_

std::vector<std::string> SiStripGainsPCLHarvester::dqm_tag_
private

Definition at line 95 of file SiStripGainsPCLHarvester.h.

Referenced by dqmEndJob(), and SiStripGainsPCLHarvester().

◆ fit_dataDrivenRange_

bool SiStripGainsPCLHarvester::fit_dataDrivenRange_ = false
private

Definition at line 113 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and SiStripGainsPCLHarvester().

◆ fit_gaussianConvolution_

bool SiStripGainsPCLHarvester::fit_gaussianConvolution_ = false
private

Definition at line 111 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and SiStripGainsPCLHarvester().

◆ fit_gaussianConvolutionTOBL56_

bool SiStripGainsPCLHarvester::fit_gaussianConvolutionTOBL56_ = false
private

Definition at line 112 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and SiStripGainsPCLHarvester().

◆ gainToken_

edm::ESGetToken<SiStripGain, SiStripGainRcd> SiStripGainsPCLHarvester::gainToken_
private

Definition at line 107 of file SiStripGainsPCLHarvester.h.

Referenced by beginRun(), and SiStripGainsPCLHarvester().

◆ GOOD

unsigned int SiStripGainsPCLHarvester::GOOD
private

Definition at line 78 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), and produceTagFilter().

◆ m_calibrationMode

std::string SiStripGainsPCLHarvester::m_calibrationMode
private

Type of statistics for the calibration

Definition at line 92 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), dqmEndJob(), produceTagFilter(), and SiStripGainsPCLHarvester().

◆ m_DQMdir

std::string SiStripGainsPCLHarvester::m_DQMdir
private

DQM folder hosting the charge statistics and the monitor plots

Definition at line 91 of file SiStripGainsPCLHarvester.h.

Referenced by dqmEndJob(), and SiStripGainsPCLHarvester().

◆ m_Record

std::string SiStripGainsPCLHarvester::m_Record
private

Definition at line 89 of file SiStripGainsPCLHarvester.h.

Referenced by dqmEndJob(), and SiStripGainsPCLHarvester().

◆ MASKED

unsigned int SiStripGainsPCLHarvester::MASKED
private

Definition at line 80 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain().

◆ MinNrEntries

double SiStripGainsPCLHarvester::MinNrEntries
private

Definition at line 87 of file SiStripGainsPCLHarvester.h.

Referenced by getPeakOfLandau(), and SiStripGainsPCLHarvester().

◆ NPixelDets

int SiStripGainsPCLHarvester::NPixelDets
private

Definition at line 86 of file SiStripGainsPCLHarvester.h.

Referenced by checkBookAPVColls().

◆ NStripAPVs

int SiStripGainsPCLHarvester::NStripAPVs
private

Definition at line 85 of file SiStripGainsPCLHarvester.h.

Referenced by checkBookAPVColls(), and produceTagFilter().

◆ qualityToken_

edm::ESGetToken<SiStripQuality, SiStripQualityRcd> SiStripGainsPCLHarvester::qualityToken_
private

Definition at line 108 of file SiStripGainsPCLHarvester.h.

Referenced by beginRun(), and SiStripGainsPCLHarvester().

◆ storeGainsTree_

bool SiStripGainsPCLHarvester::storeGainsTree_
private

Definition at line 77 of file SiStripGainsPCLHarvester.h.

Referenced by dqmEndJob(), and SiStripGainsPCLHarvester().

◆ tagCondition_GoodFrac

double SiStripGainsPCLHarvester::tagCondition_GoodFrac
private

Definition at line 83 of file SiStripGainsPCLHarvester.h.

Referenced by produceTagFilter(), and SiStripGainsPCLHarvester().

◆ tagCondition_NClusters

double SiStripGainsPCLHarvester::tagCondition_NClusters
private

Definition at line 82 of file SiStripGainsPCLHarvester.h.

Referenced by produceTagFilter(), and SiStripGainsPCLHarvester().

◆ tkGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripGainsPCLHarvester::tkGeomToken_
private

Definition at line 106 of file SiStripGainsPCLHarvester.h.

Referenced by checkBookAPVColls(), and SiStripGainsPCLHarvester().

◆ tTopo_

std::unique_ptr<TrackerTopology> SiStripGainsPCLHarvester::tTopo_
private

Definition at line 100 of file SiStripGainsPCLHarvester.h.

Referenced by algoComputeMPVandGain(), endRun(), and gainQualityMonitor().

◆ tTopoTokenBR_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainsPCLHarvester::tTopoTokenBR_
private

Definition at line 105 of file SiStripGainsPCLHarvester.h.

Referenced by checkBookAPVColls(), and SiStripGainsPCLHarvester().

◆ tTopoTokenER_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainsPCLHarvester::tTopoTokenER_
private

Definition at line 105 of file SiStripGainsPCLHarvester.h.

Referenced by endRun(), and SiStripGainsPCLHarvester().

◆ VChargeHisto

std::vector<std::string> SiStripGainsPCLHarvester::VChargeHisto
private

Charge monitor plots to be output

Definition at line 93 of file SiStripGainsPCLHarvester.h.

Referenced by gainQualityMonitor(), and SiStripGainsPCLHarvester().