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
 
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)
 

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, TrackerTopologyRcdtTopoToken_
 
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
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from 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_, tTopoToken_, 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  tTopoToken_ = esConsumes<edm::Transition::EndRun>();
62  tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
63  gainToken_ = esConsumes<edm::Transition::BeginRun>();
64  qualityToken_ = esConsumes<edm::Transition::BeginRun>();
65 }
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< TrackerTopology, TrackerTopologyRcd > tTopoToken_
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_

Member Function Documentation

◆ algoComputeMPVandGain()

void SiStripGainsPCLHarvester::algoComputeMPVandGain ( const MonitorElement Charge_Vs_Index)
private

Definition at line 489 of file SiStripGainsPCLHarvester.cc.

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

Referenced by dqmEndJob().

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

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

69  {
70  using namespace edm;
71  static constexpr float defaultGainTick = 690. / 640.;
72 
73  this->checkBookAPVColls(iSetup); // check whether APV colls are booked and do so if not yet done
74 
75  const auto gainHandle = iSetup.getHandle(gainToken_);
76  if (!gainHandle.isValid()) {
77  edm::LogError("SiStripGainPCLHarvester") << "gainHandle is not valid\n";
78  exit(0);
79  }
80 
81  const auto& stripQuality = iSetup.getData(qualityToken_);
82 
83  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
84  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
85 
87  continue;
88 
89  APV->isMasked = stripQuality.IsApvBad(APV->DetId, APV->APVId);
90 
91  if (gainHandle->getNumberOfTags() != 2) {
92  edm::LogError("SiStripGainPCLHarvester") << "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";
93  fflush(stdout);
94  exit(0);
95  };
96  float newPreviousGain = gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 1), 1);
97  if (APV->PreviousGain != 1 and newPreviousGain != APV->PreviousGain)
98  edm::LogWarning("SiStripGainPCLHarvester") << "WARNING: ParticleGain in the global tag changed\n";
99  APV->PreviousGain = newPreviousGain;
100 
101  float newPreviousGainTick =
102  APV->isMasked ? defaultGainTick : gainHandle->getApvGain(APV->APVId, gainHandle->getRange(APV->DetId, 0), 0);
103  if (APV->PreviousGainTick != 1 and newPreviousGainTick != APV->PreviousGainTick) {
104  edm::LogWarning("SiStripGainPCLHarvester")
105  << "WARNING: TickMarkGain in the global tag changed\n"
106  << std::endl
107  << " APV->SubDet: " << APV->SubDet << " APV->APVId:" << APV->APVId << std::endl
108  << " APV->PreviousGainTick: " << APV->PreviousGainTick << " newPreviousGainTick: " << newPreviousGainTick
109  << std::endl;
110  }
111  APV->PreviousGainTick = newPreviousGainTick;
112  }
113 }
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:119
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 687 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_, and StripSubdetector::TOB.

Referenced by beginRun().

687  {
688  auto newBareTkGeomPtr = &es.getData(tkGeomToken_);
689  if (newBareTkGeomPtr == bareTkGeomPtr_)
690  return; // already filled APVColls, nothing changed
691 
692  if (!bareTkGeomPtr_) { // pointer not yet set: called the first time => fill the APVColls
693  auto const& Det = newBareTkGeomPtr->dets();
694 
695  unsigned int Index = 0;
696 
697  for (unsigned int i = 0; i < Det.size(); i++) {
698  DetId Detid = Det[i]->geographicalId();
699  int SubDet = Detid.subdetId();
700 
703  auto DetUnit = dynamic_cast<const StripGeomDetUnit*>(Det[i]);
704  if (!DetUnit)
705  continue;
706 
707  const StripTopology& Topo = DetUnit->specificTopology();
708  unsigned int NAPV = Topo.nstrips() / 128;
709 
710  for (unsigned int j = 0; j < NAPV; j++) {
711  auto APV = std::make_shared<stAPVGain>();
712  APV->Index = Index;
713  APV->Bin = -1;
714  APV->DetId = Detid.rawId();
715  APV->APVId = j;
716  APV->SubDet = SubDet;
717  APV->FitMPV = -1;
718  APV->FitMPVErr = -1;
719  APV->FitWidth = -1;
720  APV->FitWidthErr = -1;
721  APV->FitChi2 = -1;
722  APV->FitNorm = -1;
723  APV->FitGrade = fitgrade::NONE;
724  APV->Gain = -1;
725  APV->PreviousGain = 1;
726  APV->PreviousGainTick = 1;
727  APV->x = DetUnit->position().basicVector().x();
728  APV->y = DetUnit->position().basicVector().y();
729  APV->z = DetUnit->position().basicVector().z();
730  APV->Eta = DetUnit->position().basicVector().eta();
731  APV->Phi = DetUnit->position().basicVector().phi();
732  APV->R = DetUnit->position().basicVector().transverse();
733  APV->Thickness = DetUnit->surface().bounds().thickness();
734  APV->NEntries = 0;
735  APV->isMasked = false;
736 
737  APVsCollOrdered.push_back(APV);
738  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
739  Index++;
740  NStripAPVs++;
741  } // loop on APVs
742  } // if is Strips
743  } // loop on dets
744 
745  for (unsigned int i = 0; i < Det.size();
746  i++) { //Make two loop such that the Pixel information is added at the end --> make transition simpler
747  DetId Detid = Det[i]->geographicalId();
748  int SubDet = Detid.subdetId();
750  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*>(Det[i]);
751  if (!DetUnit)
752  continue;
753 
754  const PixelTopology& Topo = DetUnit->specificTopology();
755  unsigned int NROCRow = Topo.nrows() / (80.);
756  unsigned int NROCCol = Topo.ncolumns() / (52.);
757 
758  for (unsigned int j = 0; j < NROCRow; j++) {
759  for (unsigned int i = 0; i < NROCCol; i++) {
760  auto APV = std::make_shared<stAPVGain>();
761  APV->Index = Index;
762  APV->Bin = -1;
763  APV->DetId = Detid.rawId();
764  APV->APVId = (j << 3 | i);
765  APV->SubDet = SubDet;
766  APV->FitMPV = -1;
767  APV->FitMPVErr = -1;
768  APV->FitWidth = -1;
769  APV->FitWidthErr = -1;
770  APV->FitChi2 = -1;
771  APV->FitGrade = fitgrade::NONE;
772  APV->Gain = -1;
773  APV->PreviousGain = 1;
774  APV->PreviousGainTick = 1;
775  APV->x = DetUnit->position().basicVector().x();
776  APV->y = DetUnit->position().basicVector().y();
777  APV->z = DetUnit->position().basicVector().z();
778  APV->Eta = DetUnit->position().basicVector().eta();
779  APV->Phi = DetUnit->position().basicVector().phi();
780  APV->R = DetUnit->position().basicVector().transverse();
781  APV->Thickness = DetUnit->surface().bounds().thickness();
782  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
783  APV->NEntries = 0;
784 
785  APVsCollOrdered.push_back(APV);
786  APVsColl[(APV->DetId << 4) | APV->APVId] = APV;
787  Index++;
788  NPixelDets++;
789 
790  } // loop on ROC cols
791  } // loop on ROC rows
792  } // if Pixel
793  } // loop on Dets
794  } //if (!bareTkGeomPtr_) ...
795  bareTkGeomPtr_ = newBareTkGeomPtr;
796 }
static constexpr auto TEC
virtual int nstrips() const =0
virtual int ncolumns() const =0
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
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 116 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().

116  {
117  edm::LogInfo("SiStripGainsPCLHarvester") << "Starting harvesting statistics" << std::endl;
118 
119  std::string DQM_dir = m_DQMdir;
120 
121  std::string stag = *(std::find(dqm_tag_.begin(), dqm_tag_.end(), m_calibrationMode));
122  if (!stag.empty() && stag[0] != '_')
123  stag.insert(0, 1, '_');
124 
125  std::string cvi = DQM_dir + std::string("/Charge_Vs_Index") + stag;
126 
127  MonitorElement* Charge_Vs_Index = igetter_.get(cvi);
128 
129  if (Charge_Vs_Index == nullptr) {
130  edm::LogError("SiStripGainsPCLHarvester")
131  << "Harvesting: could not retrieve " << cvi.c_str() << ", statistics will not be summed!" << std::endl;
132  } else {
133  edm::LogInfo("SiStripGainsPCLHarvester")
134  << "Harvesting " << (Charge_Vs_Index)->getTH2S()->GetEntries() << " more clusters" << std::endl;
135  }
136 
137  algoComputeMPVandGain(Charge_Vs_Index);
138  std::unique_ptr<SiStripApvGain> theAPVGains = this->getNewObject(Charge_Vs_Index);
139 
140  // write out the APVGains record
142 
143  if (doStoreOnDB) {
144  if (poolDbService.isAvailable())
145  poolDbService->writeOneIOV(*theAPVGains, poolDbService->currentTime(), m_Record);
146  else
147  throw std::runtime_error("PoolDBService required.");
148  } else {
149  edm::LogInfo("SiStripGainsPCLHarvester") << "Will not produce payload!" << std::endl;
150  }
151 
152  //Collect the statistics for monitoring and validation
153  gainQualityMonitor(ibooker_, Charge_Vs_Index);
154 
155  if (storeGainsTree_) {
156  if (Charge_Vs_Index != nullptr) {
157  storeGainsTree(Charge_Vs_Index->getTH2S()->GetXaxis());
158  } else {
159  edm::LogError("SiStripGainsPCLHarvester")
160  << "Harvesting: could not retrieve " << cvi.c_str() << "Tree won't be stored" << std::endl;
161  }
162  }
163 }
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:680
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 946 of file SiStripGainsPCLHarvester.cc.

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

946  {
947  if (!tTopo_) {
948  tTopo_ = std::make_unique<TrackerTopology>(isetup.getData(tTopoToken_));
949  }
950 }
std::unique_ptr< TrackerTopology > tTopo_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_

◆ fillDescriptions()

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

Definition at line 939 of file SiStripGainsPCLHarvester.cc.

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

939  {
941  desc.setUnknown();
942  descriptions.addDefault(desc);
943 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ gainQualityMonitor()

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

Definition at line 166 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(), 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(), ntupleEnum::SubDet, APVGain::subdetectorId(), APVGain::subdetectorPlane(), APVGain::subdetectorSide(), APVGain::thickness(), tTopo_, VChargeHisto, and z.

Referenced by dqmEndJob().

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

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

Referenced by dqmEndJob().

828  {
829  std::unique_ptr<SiStripApvGain> obj = std::make_unique<SiStripApvGain>();
830 
831  if (!produceTagFilter(Charge_Vs_Index)) {
832  edm::LogWarning("SiStripGainsPCLHarvester")
833  << "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << std::endl;
834  return obj;
835  } else {
836  doStoreOnDB = true;
837  }
838 
839  std::vector<float> theSiStripVector;
840  unsigned int PreviousDetId = 0;
841  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
842  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
843  if (APV == nullptr) {
844  printf("Bug\n");
845  continue;
846  }
847  if (APV->SubDet <= 2)
848  continue;
849  if (APV->DetId != PreviousDetId) {
850  if (!theSiStripVector.empty()) {
851  SiStripApvGain::Range range(theSiStripVector.begin(), theSiStripVector.end());
852  if (!obj->put(PreviousDetId, range))
853  printf("Bug to put detId = %i\n", PreviousDetId);
854  }
855  theSiStripVector.clear();
856  PreviousDetId = APV->DetId;
857  }
858  theSiStripVector.push_back(APV->Gain);
859 
860  LogDebug("SiStripGainsPCLHarvester") << " DetId: " << APV->DetId << " APV: " << APV->APVId
861  << " Gain: " << APV->Gain << std::endl;
862  }
863  if (!theSiStripVector.empty()) {
864  SiStripApvGain::Range range(theSiStripVector.begin(), theSiStripVector.end());
865  if (!obj->put(PreviousDetId, range))
866  printf("Bug to put detId = %i\n", PreviousDetId);
867  }
868 
869  return obj;
870 }
bool produceTagFilter(const MonitorElement *Charge_Vs_Index)
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
double a
Definition: hdecay.h:119
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 632 of file SiStripGainsPCLHarvester.cc.

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

Referenced by algoComputeMPVandGain().

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

◆ IsGoodLandauFit()

bool SiStripGainsPCLHarvester::IsGoodLandauFit ( double *  FitResults)
private

Definition at line 677 of file SiStripGainsPCLHarvester.cc.

Referenced by algoComputeMPVandGain().

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

◆ produceTagFilter()

bool SiStripGainsPCLHarvester::produceTagFilter ( const MonitorElement Charge_Vs_Index)
private

Definition at line 799 of file SiStripGainsPCLHarvester.cc.

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

Referenced by getNewObject().

799  {
800  // The goal of this function is to check wether or not there is enough statistics
801  // to produce a meaningful tag for the DB
802 
803  if (Charge_Vs_Index == nullptr) {
804  edm::LogError("SiStripGainsPCLHarvester")
805  << "produceTagFilter -> Return false: could not retrieve the " << m_calibrationMode << " statistics.\n"
806  << "Please check if input contains " << m_calibrationMode << " data." << std::endl;
807  return false;
808  }
809 
810  float integral = (Charge_Vs_Index)->getTH2S()->Integral();
811  if ((Charge_Vs_Index)->getTH2S()->Integral(0, NStripAPVs + 1, 0, 99999) < tagCondition_NClusters) {
812  edm::LogWarning("SiStripGainsPCLHarvester")
813  << "calibrationMode -> " << m_calibrationMode << "\n"
814  << "produceTagFilter -> Return false: Statistics is too low : " << integral << std::endl;
815  return false;
816  }
817  if ((1.0 * GOOD) / (GOOD + BAD) < tagCondition_GoodFrac) {
818  edm::LogWarning("SiStripGainsPCLHarvester")
819  << "calibrationMode -> " << m_calibrationMode << "\n"
820  << "produceTagFilter -> Return false: ratio of GOOD/TOTAL is too low: " << (1.0 * GOOD) / (GOOD + BAD)
821  << std::endl;
822  return false;
823  }
824  return true;
825 }
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 872 of file SiStripGainsPCLHarvester.cc.

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

Referenced by dqmEndJob().

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

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainsPCLHarvester::tTopoToken_
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().