CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DTRunConditionVarClient Class Reference

#include <DTRunConditionVarClient.h>

Inheritance diagram for DTRunConditionVarClient:
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 (const edm::Run &r, const edm::EventSetup &c) override
 
 DTRunConditionVarClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTRunConditionVarClient () override
 Destructor. More...
 
- 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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void bookWheelHistos (DQMStore::IBooker &, std::string histoType, std::string subfolder, int wh, int nbins, float min, float max, bool isVDCorr=false, bool makeRings=false)
 book the report summary More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 DQM Client Diagnostic. More...
 
void percDevVDrift (DTChamberId indexCh, float meanVD, float sigmaVD, float &devVD, float &errdevVD)
 
float varQuality (float var, float maxGood, float minBad)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Private Member Functions

MonitorElementgetChamberHistos (DQMStore::IGetter &, const DTChamberId &, std::string)
 

Private Attributes

std::map< std::string, MonitorElement * > allwheelHistos
 
bool bookingdone
 
MonitorElementglbT0Summary
 
MonitorElementglbVDriftSummary
 
float maxGoodT0
 
float maxGoodT0Sigma
 
float maxGoodVDriftDev
 
float maxGoodVDriftSigma
 
float maxRangeT0
 
float maxRangeVDrift
 
float minBadT0
 
float minBadT0Sigma
 
float minBadVDriftDev
 
float minBadVDriftSigma
 
float minRangeT0
 
float minRangeVDrift
 
const DTMtimemTimeMap_
 
edm::ESGetToken< DTMtime, DTMtimeRcdmTimeMapToken_
 
int nevents
 
std::map< std::string, MonitorElement * > summaryHistos
 
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
 
std::map< int, std::map< int, std::map< std::string, MonitorElement * > > > wheelRingHistos
 

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
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected 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:

Author
: Paolo Bellan, Antonio Branca $date : 23/09/2011 15:42:04 CET $

Modification:

threadsafe version (//-) oct/nov 2014 - WATWanAbdullah -ncpp-um-my

Definition at line 47 of file DTRunConditionVarClient.h.

Constructor & Destructor Documentation

◆ DTRunConditionVarClient()

DTRunConditionVarClient::DTRunConditionVarClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 33 of file DTRunConditionVarClient.cc.

34  : mTimeMapToken_(esConsumes<edm::Transition::BeginRun>()) {
35  LogVerbatim("DTDQM|DTMonitorClient|DTRunConditionVarClient") << "DTRunConditionVarClient: Constructor called";
36 
37  minRangeVDrift = pSet.getUntrackedParameter<double>("minRangeVDrift");
38  maxRangeVDrift = pSet.getUntrackedParameter<double>("maxRangeVDrift");
39  minRangeT0 = pSet.getUntrackedParameter<double>("minRangeT0");
40  maxRangeT0 = pSet.getUntrackedParameter<double>("maxRangeT0");
41 
42  maxGoodVDriftDev = pSet.getUntrackedParameter<double>("maxGoodVDriftDev");
43  minBadVDriftDev = pSet.getUntrackedParameter<double>("minBadVDriftDev");
44  maxGoodT0 = pSet.getUntrackedParameter<double>("maxGoodT0");
45  minBadT0 = pSet.getUntrackedParameter<double>("minBadT0");
46 
47  maxGoodVDriftSigma = pSet.getUntrackedParameter<double>("maxGoodVDriftSigma");
48  minBadVDriftSigma = pSet.getUntrackedParameter<double>("minBadVDriftSigma");
49  maxGoodT0Sigma = pSet.getUntrackedParameter<double>("maxGoodT0Sigma");
50  minBadT0Sigma = pSet.getUntrackedParameter<double>("minBadT0Sigma");
51 
52  nevents = 0;
53 
54  bookingdone = false;
55 }

References bookingdone, edm::ParameterSet::getUntrackedParameter(), maxGoodT0, maxGoodT0Sigma, maxGoodVDriftDev, maxGoodVDriftSigma, maxRangeT0, maxRangeVDrift, minBadT0, minBadT0Sigma, minBadVDriftDev, minBadVDriftSigma, minRangeT0, minRangeVDrift, and nevents.

◆ ~DTRunConditionVarClient()

DTRunConditionVarClient::~DTRunConditionVarClient ( )
override

Destructor.

Definition at line 57 of file DTRunConditionVarClient.cc.

57  {
58  LogVerbatim("DTDQM|DTMonitorClient|DTRunConditionVarClient") << "DTRunConditionVarClient: Destructor called";
59 }

Member Function Documentation

◆ beginRun()

void DTRunConditionVarClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
override

Definition at line 61 of file DTRunConditionVarClient.cc.

61  {
62  LogTrace("DTDQM|DTMonitorClient|DTResolutionAnalysisTest") << "[DTRunConditionVarClient]: BeginRun";
63  // Get the map of vdrift from the setup
64  mTimeMap_ = &context.getData(mTimeMapToken_);
65 }

References visDQMUpload::context, LogTrace, mTimeMap_, and mTimeMapToken_.

◆ bookWheelHistos()

void DTRunConditionVarClient::bookWheelHistos ( DQMStore::IBooker ,
std::string  histoType,
std::string  subfolder,
int  wh,
int  nbins,
float  min,
float  max,
bool  isVDCorr = false,
bool  makeRings = false 
)
protected

book the report summary

Definition at line 272 of file DTRunConditionVarClient.cc.

280  {
281  stringstream wheel;
282  wheel << wh;
283 
284  string folder = "DT/02-Segments/" + subfolder;
285 
286  ibooker.setCurrentFolder(folder);
287 
288  string histoName;
289  string histoLabel;
290 
291  if (makeRings) {
292  ibooker.setCurrentFolder(folder + "/Wheel" + wheel.str());
293  for (int st = 1; st <= 4; st++) {
294  stringstream station;
295  station << st;
296 
297  histoName = histoType + "_W" + wheel.str() + "_MB" + station.str();
298  histoLabel = histoType;
299 
300  (wheelRingHistos[wh][st])[histoType] = ibooker.book1D(histoName, histoLabel, nbins, min, max);
301  }
302  } else {
303  histoName = histoType + "_W" + wheel.str();
304  histoLabel = histoType;
305 
306  (wheelHistos[wh])[histoType] = ibooker.book1D(histoName, histoLabel, nbins, min, max);
307  }
308 
309  ibooker.setCurrentFolder(folder);
310 
311  if (isVDCorr) {
312  histoLabel = "Summary of corrections to VDrift DB values";
313  histoName = "CorrTo" + histoType + "Summary_W" + wheel.str();
314  } else {
315  histoLabel = histoType + "Summary";
316  histoName = histoType + "Summary_W" + wheel.str();
317  }
318 
319  MonitorElement* me = ibooker.book2D(histoName, histoLabel, 12, 1, 13, 4, 1, 5);
320 
321  me->setBinLabel(1, "MB1", 2);
322  me->setBinLabel(2, "MB2", 2);
323  me->setBinLabel(3, "MB3", 2);
324  me->setBinLabel(4, "MB4", 2);
325  me->setAxisTitle("Sector", 1);
326 
327  (wheelHistos[wh])[histoType + "Summary"] = me;
328 
329  return;
330 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), printsummarytable::folder, fftjetimagerecorder_cfi::histoLabel, HltBtagPostValidation_cff::histoName, SiStripPI::max, hlt_dqm_clientPB-live_cfg::me, min(), LaserClient_cfi::nbins, dqm::implementation::NavigatorBase::setCurrentFolder(), relativeConstraints::station, makeMuonMisalignmentScenario::wheel, wheelHistos, and wheelRingHistos.

Referenced by dqmEndJob().

◆ dqmEndJob()

void DTRunConditionVarClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 72 of file DTRunConditionVarClient.cc.

72  {
73  LogVerbatim("DTDQM|DTMonitorClient|DTRunConditionVarClient") << "DTRunConditionVarClient: end job";
74 
75  ibooker.setCurrentFolder("DT/02-Segments");
76 
78  ibooker.book2D("VDriftGlbSummary", "# of MBs with good mean and good sigma of vDrift", 12, 1, 13, 5, -2, 3);
79  glbT0Summary = ibooker.book2D("T0GlbSummary", "# of MBs with good mean and good sigma of t0", 12, 1, 13, 5, -2, 3);
80 
81  ibooker.setCurrentFolder("DT/02-Segments/02-MeanVDrift");
82 
83  summaryHistos["MeanVDriftGlbSummary"] =
84  ibooker.book2D("MeanVDriftGlbSummary", "mean VDrift average per sector", 12, 1., 13., 5, -2., 3.);
85  allwheelHistos["allMeanVDrift"] =
86  ibooker.book1D("VDriftMeanAllWheels", "mean VDrift for all chambers", 60, 0.0048, 0.006);
87 
88  ibooker.setCurrentFolder("DT/02-Segments/02-SigmaVDrift");
89 
90  summaryHistos["SigmaVDriftGlbSummary"] =
91  ibooker.book2D("SigmaVDriftGlbSummary", "# of Chambers with good sigma VDrift", 12, 1., 13., 5, -2., 3.);
92  allwheelHistos["allSigmaVDrift"] =
93  ibooker.book1D("VDriftSigmaAllWheels", "sigma VDrift for all chambers", 30, 0., 0.0006);
94 
95  ibooker.setCurrentFolder("DT/02-Segments/03-MeanT0");
96 
97  summaryHistos["MeanT0GlbSummary"] =
98  ibooker.book2D("MeanT0GlbSummary", "mean T0 average per sector", 12, 1., 13., 5, -2., 3.);
99  allwheelHistos["allMeanT0"] = ibooker.book1D("T0MeanAllWheels", "mean T0 for all chambers", 100, -25., 25.);
100 
101  ibooker.setCurrentFolder("DT/02-Segments/03-SigmaT0");
102 
103  summaryHistos["SigmaT0GlbSummary"] =
104  ibooker.book2D("SigmaT0GlbSummary", "# of Chambers with good sigma T0", 12, 1., 13., 5, -2., 3.);
105  allwheelHistos["allSigmaT0"] = ibooker.book1D("T0SigmaAllWheels", "sigma T0 for all chambers", 50, 0, 25);
106 
107  for (int wh = -2; wh <= 2; wh++) {
108  bookWheelHistos(ibooker, "MeanVDrift", "02-MeanVDrift", wh, 60, 0.0048, 0.006, true);
109  bookWheelHistos(ibooker, "SigmaVDrift", "02-SigmaVDrift", wh, 30, 0., 0.0006);
110  bookWheelHistos(ibooker, "MeanT0", "03-MeanT0", wh, 100, -25., 25., false, true);
111  bookWheelHistos(ibooker, "SigmaT0", "03-SigmaT0", wh, 50, 0, 25, false, true);
112  }
113 
114  for (int wheel = -2; wheel <= 2; wheel++) {
115  for (int sec = 1; sec <= 14; sec++) {
116  for (int stat = 1; stat <= 4; stat++) {
117  if ((sec == 13 || sec == 14) && stat != 4)
118  continue;
119 
120  // Get the ME produced by DTRunConditionVar Source
121  MonitorElement* VDriftME = getChamberHistos(igetter, DTChamberId(wheel, stat, sec), "VDrift_FromSegm");
122  MonitorElement* T0ME = getChamberHistos(igetter, DTChamberId(wheel, stat, sec), "T0_FromSegm");
123 
124  if (!VDriftME || !T0ME) {
125  edm::LogWarning("DTRunConditionVarClient") << "ME not available" << std::endl;
126  return;
127  }
128 
129  // Get the means per chamber
130  float vDriftMean = VDriftME->getMean();
131  T0ME->setAxisRange(-15, 15);
132  float t0Mean = T0ME->getMean();
133 
134  // Get the sigma per chamber
135  float vDriftSigma = VDriftME->getRMS();
136  float t0Sigma = T0ME->getRMS();
137 
138  if (VDriftME->getEntries() != 0) {
139  allwheelHistos["allMeanVDrift"]->Fill(vDriftMean);
140  allwheelHistos["allSigmaVDrift"]->Fill(vDriftSigma);
141 
142  (wheelHistos[wheel])["MeanVDrift"]->Fill(vDriftMean);
143  (wheelHistos[wheel])["SigmaVDrift"]->Fill(vDriftSigma);
144  }
145 
146  if (T0ME->getEntries() != 0) {
147  allwheelHistos["allMeanT0"]->Fill(t0Mean);
148  allwheelHistos["allSigmaT0"]->Fill(t0Sigma);
149 
150  (wheelRingHistos[wheel][stat])["MeanT0"]->Fill(t0Mean);
151  (wheelRingHistos[wheel][stat])["SigmaT0"]->Fill(t0Sigma);
152  }
153 
154  DTChamberId indexCh(wheel, stat, sec);
155 
156  float vDriftDev(0.), errvDriftDev(0.);
157  percDevVDrift(indexCh, vDriftMean, vDriftSigma, vDriftDev, errvDriftDev);
158 
159  int sec_ = sec;
160  if (sec == 13 || sec == 14)
161  sec_ = (sec == 13) ? 4 : 10;
162 
163  float fillvDriftDev = max(min(vDriftDev, maxRangeVDrift), minRangeVDrift);
164  float fillT0Mean = max(min(t0Mean, maxRangeT0), minRangeT0);
165 
166  float vDriftDevQ = varQuality(fabs(vDriftDev), maxGoodVDriftDev, minBadVDriftDev);
167  float t0MeanQ = varQuality(fabs(t0Mean), maxGoodT0, minBadT0);
168 
169  float vDriftSigmQ = varQuality(vDriftSigma, maxGoodVDriftSigma, minBadVDriftSigma);
170  float t0SigmQ = varQuality(t0Sigma, maxGoodT0Sigma, minBadT0Sigma);
171 
172  if (sec == 13 || sec == 14) {
173  float binVDriftDev = (wheelHistos[wheel])["MeanVDriftSummary"]->getBinContent(sec_, stat);
174  binVDriftDev = (fabs(binVDriftDev) > fabs(fillvDriftDev)) ? binVDriftDev : fillvDriftDev;
175  (wheelHistos[wheel])["MeanVDriftSummary"]->setBinContent(sec_, stat, binVDriftDev);
176 
177  float binT0MeanVal = (wheelHistos[wheel])["MeanT0Summary"]->getBinContent(sec_, stat);
178  binT0MeanVal = (fabs(binT0MeanVal) > fabs(fillT0Mean)) ? binT0MeanVal : fillT0Mean;
179  (wheelHistos[wheel])["MeanT0Summary"]->setBinContent(sec_, stat, binT0MeanVal);
180 
181  float binVDriftSigmVal = (wheelHistos[wheel])["SigmaVDriftSummary"]->getBinContent(sec_, stat);
182  binVDriftSigmVal = (binVDriftSigmVal > 0. && binVDriftSigmVal < vDriftSigmQ) ? binVDriftSigmVal : vDriftSigmQ;
183  (wheelHistos[wheel])["SigmaVDriftSummary"]->setBinContent(sec_, stat, binVDriftSigmVal);
184 
185  float binT0SigmVal = (wheelHistos[wheel])["SigmaT0Summary"]->getBinContent(sec_, stat);
186  binT0SigmVal = (binT0SigmVal > 0. && binT0SigmVal < t0SigmQ) ? binT0SigmVal : t0SigmQ;
187  (wheelHistos[wheel])["SigmaT0Summary"]->setBinContent(sec_, stat, binT0SigmVal);
188 
189  } else {
190  (wheelHistos[wheel])["MeanVDriftSummary"]->setBinContent(sec_, stat, fillvDriftDev);
191  (wheelHistos[wheel])["MeanT0Summary"]->setBinContent(sec_, stat, fillT0Mean);
192  (wheelHistos[wheel])["SigmaVDriftSummary"]->setBinContent(sec_, stat, vDriftSigmQ);
193  (wheelHistos[wheel])["SigmaT0Summary"]->setBinContent(sec_, stat, t0SigmQ);
194  }
195 
196  double weight = 1 / 4.;
197  if ((sec_ == 4 || sec_ == 10) && stat == 4)
198  weight = 1 / 8.;
199 
200  if (vDriftDevQ > 0.85 && vDriftSigmQ > 0.85) {
202  summaryHistos["MeanVDriftGlbSummary"]->Fill(sec_, wheel, weight);
203  summaryHistos["SigmaVDriftGlbSummary"]->Fill(sec_, wheel, weight);
204 
205  } else {
206  if (vDriftDevQ > 0.85 && vDriftSigmQ < 0.85) {
207  summaryHistos["MeanVDriftGlbSummary"]->Fill(sec_, wheel, weight);
208  }
209  if (vDriftDevQ < 0.85 && vDriftSigmQ > 0.85) {
210  summaryHistos["SigmaVDriftGlbSummary"]->Fill(sec_, wheel, weight);
211  }
212  }
213 
214  if (t0MeanQ > 0.85 && t0SigmQ > 0.85) {
215  glbT0Summary->Fill(sec_, wheel, weight);
216  summaryHistos["MeanT0GlbSummary"]->Fill(sec_, wheel, weight);
217  summaryHistos["SigmaT0GlbSummary"]->Fill(sec_, wheel, weight);
218  } else {
219  if (t0MeanQ > 0.85 && t0SigmQ < 0.85) {
220  summaryHistos["MeanT0GlbSummary"]->Fill(sec_, wheel, weight);
221  }
222  if (t0MeanQ < 0.85 && t0SigmQ > 0.85) {
223  summaryHistos["SigmaT0GlbSummary"]->Fill(sec_, wheel, weight);
224  }
225  }
226 
227  } // end loop on stations
228  } // end loop on sectors
229  } //end loop on wheels
230 
231  return;
232 }

References allwheelHistos, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), bookWheelHistos(), dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), getChamberHistos(), dqm::impl::MonitorElement::getEntries(), dqm::impl::MonitorElement::getMean(), dqm::impl::MonitorElement::getRMS(), glbT0Summary, glbVDriftSummary, SiStripPI::max, maxGoodT0, maxGoodT0Sigma, maxGoodVDriftDev, maxGoodVDriftSigma, maxRangeT0, maxRangeVDrift, min(), minBadT0, minBadT0Sigma, minBadVDriftDev, minBadVDriftSigma, minRangeT0, minRangeVDrift, percDevVDrift(), fileinputsource_cfi::sec, dqm::impl::MonitorElement::setAxisRange(), dqm::implementation::NavigatorBase::setCurrentFolder(), edm_modernize_messagelogger::stat, summaryHistos, varQuality(), makeMuonMisalignmentScenario::wheel, wheelHistos, and wheelRingHistos.

◆ dqmEndLuminosityBlock()

void DTRunConditionVarClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

DQM Client Diagnostic.

Reimplemented from DQMEDHarvester.

Definition at line 67 of file DTRunConditionVarClient.cc.

70  {}

◆ getChamberHistos()

DTRunConditionVarClient::MonitorElement * DTRunConditionVarClient::getChamberHistos ( DQMStore::IGetter ,
const DTChamberId ,
std::string   
)
private

Definition at line 332 of file DTRunConditionVarClient.cc.

334  {
335  int wh = dtCh.wheel();
336  int sc = dtCh.sector();
337  int st = dtCh.station();
338  stringstream wheel;
339  wheel << wh;
340  stringstream station;
341  station << st;
342  stringstream sector;
343  sector << sc;
344 
345  string folder = "DT/02-Segments/Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str();
346  string histoTag = "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
347  string MEpath = folder + "/" + histoType + histoTag;
348 
349  igetter.setCurrentFolder(folder);
350 
351  LogTrace("DTDQM|DTMonitorModule|DTRunConditionVar") << "[DTRunConditionVar]: getting ME from " << folder << endl;
352 
353  MonitorElement* ME = igetter.get(MEpath);
354 
355  return ME;
356 }

References printsummarytable::folder, dqm::implementation::IGetter::get(), dtResolutionTest_cfi::histoTag, LogTrace, DTChamberId::sector(), dqm::implementation::NavigatorBase::setCurrentFolder(), DTChamberId::station(), relativeConstraints::station, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndJob().

◆ percDevVDrift()

void DTRunConditionVarClient::percDevVDrift ( DTChamberId  indexCh,
float  meanVD,
float  sigmaVD,
float &  devVD,
float &  errdevVD 
)
protected

Definition at line 247 of file DTRunConditionVarClient.cc.

248  {
249  DTSuperLayerId indexSLPhi1(indexCh, 1);
250  DTSuperLayerId indexSLPhi2(indexCh, 3);
251 
252  float vDriftPhi1(0.), vDriftPhi2(0.);
253  float ResPhi1(0.), ResPhi2(0.);
254  int status1 = mTimeMap_->get(indexSLPhi1, vDriftPhi1, ResPhi1, DTVelocityUnits::cm_per_ns);
255  int status2 = mTimeMap_->get(indexSLPhi2, vDriftPhi2, ResPhi2, DTVelocityUnits::cm_per_ns);
256 
257  if (status1 != 0 || status2 != 0) {
258  DTSuperLayerId sl = (status1 != 0) ? indexSLPhi1 : indexSLPhi2;
259  throw cms::Exception("DTRunConditionVarClient") << "Could not find vDrift entry in DB for" << sl << endl;
260  }
261 
262  float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
263 
264  devVD = (meanVD - vDriftMed) / vDriftMed;
265  devVD = devVD < 1. ? devVD : 1.;
266 
267  errdevVD = sigmaVD / vDriftMed;
268 
269  return;
270 }

References DTVelocityUnits::cm_per_ns, Exception, DTMtime::get(), and mTimeMap_.

Referenced by dqmEndJob().

◆ varQuality()

float DTRunConditionVarClient::varQuality ( float  var,
float  maxGood,
float  minBad 
)
protected

Definition at line 234 of file DTRunConditionVarClient.cc.

234  {
235  float qual(0);
236  if (var <= maxGood) {
237  qual = 1.;
238  } else if (var > maxGood && var < minBad) {
239  qual = 0.9;
240  } else if (var >= minBad) {
241  qual = 0.1;
242  }
243 
244  return qual;
245 }

References trigObjTnPSource_cfi::var.

Referenced by dqmEndJob().

Member Data Documentation

◆ allwheelHistos

std::map<std::string, MonitorElement*> DTRunConditionVarClient::allwheelHistos
private

Definition at line 112 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob().

◆ bookingdone

bool DTRunConditionVarClient::bookingdone
private

Definition at line 104 of file DTRunConditionVarClient.h.

Referenced by DTRunConditionVarClient().

◆ glbT0Summary

MonitorElement* DTRunConditionVarClient::glbT0Summary
private

Definition at line 107 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob().

◆ glbVDriftSummary

MonitorElement* DTRunConditionVarClient::glbVDriftSummary
private

Definition at line 106 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob().

◆ maxGoodT0

float DTRunConditionVarClient::maxGoodT0
private

Definition at line 93 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ maxGoodT0Sigma

float DTRunConditionVarClient::maxGoodT0Sigma
private

Definition at line 98 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ maxGoodVDriftDev

float DTRunConditionVarClient::maxGoodVDriftDev
private

Definition at line 91 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ maxGoodVDriftSigma

float DTRunConditionVarClient::maxGoodVDriftSigma
private

Definition at line 96 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ maxRangeT0

float DTRunConditionVarClient::maxRangeT0
private

Definition at line 89 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ maxRangeVDrift

float DTRunConditionVarClient::maxRangeVDrift
private

Definition at line 87 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ minBadT0

float DTRunConditionVarClient::minBadT0
private

Definition at line 94 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ minBadT0Sigma

float DTRunConditionVarClient::minBadT0Sigma
private

Definition at line 99 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ minBadVDriftDev

float DTRunConditionVarClient::minBadVDriftDev
private

Definition at line 92 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ minBadVDriftSigma

float DTRunConditionVarClient::minBadVDriftSigma
private

Definition at line 97 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ minRangeT0

float DTRunConditionVarClient::minRangeT0
private

Definition at line 88 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ minRangeVDrift

float DTRunConditionVarClient::minRangeVDrift
private

Definition at line 86 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob(), and DTRunConditionVarClient().

◆ mTimeMap_

const DTMtime* DTRunConditionVarClient::mTimeMap_
private

Definition at line 102 of file DTRunConditionVarClient.h.

Referenced by beginRun(), and percDevVDrift().

◆ mTimeMapToken_

edm::ESGetToken<DTMtime, DTMtimeRcd> DTRunConditionVarClient::mTimeMapToken_
private

Definition at line 101 of file DTRunConditionVarClient.h.

Referenced by beginRun().

◆ nevents

int DTRunConditionVarClient::nevents
private

Definition at line 84 of file DTRunConditionVarClient.h.

Referenced by DTRunConditionVarClient().

◆ summaryHistos

std::map<std::string, MonitorElement*> DTRunConditionVarClient::summaryHistos
private

Definition at line 111 of file DTRunConditionVarClient.h.

Referenced by dqmEndJob().

◆ wheelHistos

std::map<int, std::map<std::string, MonitorElement*> > DTRunConditionVarClient::wheelHistos
private

Definition at line 109 of file DTRunConditionVarClient.h.

Referenced by bookWheelHistos(), and dqmEndJob().

◆ wheelRingHistos

std::map<int, std::map<int, std::map<std::string, MonitorElement*> > > DTRunConditionVarClient::wheelRingHistos
private

Definition at line 110 of file DTRunConditionVarClient.h.

Referenced by bookWheelHistos(), and dqmEndJob().

DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTRunConditionVarClient::maxGoodT0Sigma
float maxGoodT0Sigma
Definition: DTRunConditionVarClient.h:98
DTRunConditionVarClient::maxRangeT0
float maxRangeT0
Definition: DTRunConditionVarClient.h:89
DTRunConditionVarClient::bookingdone
bool bookingdone
Definition: DTRunConditionVarClient.h:104
min
T min(T a, T b)
Definition: MathUtil.h:58
printsummarytable.folder
folder
Definition: printsummarytable.py:7
DTRunConditionVarClient::allwheelHistos
std::map< std::string, MonitorElement * > allwheelHistos
Definition: DTRunConditionVarClient.h:112
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTRunConditionVarClient::minBadT0Sigma
float minBadT0Sigma
Definition: DTRunConditionVarClient.h:99
DTRunConditionVarClient::varQuality
float varQuality(float var, float maxGood, float minBad)
Definition: DTRunConditionVarClient.cc:234
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DTRunConditionVarClient::minRangeVDrift
float minRangeVDrift
Definition: DTRunConditionVarClient.h:86
DTRunConditionVarClient::glbVDriftSummary
MonitorElement * glbVDriftSummary
Definition: DTRunConditionVarClient.h:106
DTRunConditionVarClient::maxGoodVDriftDev
float maxGoodVDriftDev
Definition: DTRunConditionVarClient.h:91
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
DTRunConditionVarClient::minBadT0
float minBadT0
Definition: DTRunConditionVarClient.h:94
DTRunConditionVarClient::summaryHistos
std::map< std::string, MonitorElement * > summaryHistos
Definition: DTRunConditionVarClient.h:111
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
DTRunConditionVarClient::maxGoodVDriftSigma
float maxGoodVDriftSigma
Definition: DTRunConditionVarClient.h:96
visDQMUpload.context
context
Definition: visDQMUpload.py:37
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
DTRunConditionVarClient::wheelRingHistos
std::map< int, std::map< int, std::map< std::string, MonitorElement * > > > wheelRingHistos
Definition: DTRunConditionVarClient.h:110
DTRunConditionVarClient::minBadVDriftSigma
float minBadVDriftSigma
Definition: DTRunConditionVarClient.h:97
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DTRunConditionVarClient::minRangeT0
float minRangeT0
Definition: DTRunConditionVarClient.h:88
DTRunConditionVarClient::percDevVDrift
void percDevVDrift(DTChamberId indexCh, float meanVD, float sigmaVD, float &devVD, float &errdevVD)
Definition: DTRunConditionVarClient.cc:247
DTRunConditionVarClient::nevents
int nevents
Definition: DTRunConditionVarClient.h:84
DTRunConditionVarClient::getChamberHistos
MonitorElement * getChamberHistos(DQMStore::IGetter &, const DTChamberId &, std::string)
Definition: DTRunConditionVarClient.cc:332
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
DTRunConditionVarClient::mTimeMap_
const DTMtime * mTimeMap_
Definition: DTRunConditionVarClient.h:102
dqm::impl::MonitorElement::getRMS
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:553
dqm::impl::MonitorElement::setAxisRange
virtual void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:785
dqm::impl::MonitorElement::getEntries
virtual double getEntries() const
get # of entries
Definition: MonitorElement.cc:619
DTVelocityUnits::cm_per_ns
Definition: DTVelocityUnits.h:32
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
ME
dqm::harvesting::MonitorElement ME
Definition: TrackingDQMClientHeavyIons.cc:20
DTRunConditionVarClient::maxRangeVDrift
float maxRangeVDrift
Definition: DTRunConditionVarClient.h:87
dtResolutionTest_cfi.histoTag
histoTag
Definition: dtResolutionTest_cfi.py:21
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTRunConditionVarClient::bookWheelHistos
void bookWheelHistos(DQMStore::IBooker &, std::string histoType, std::string subfolder, int wh, int nbins, float min, float max, bool isVDCorr=false, bool makeRings=false)
book the report summary
Definition: DTRunConditionVarClient.cc:272
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:94
DTRunConditionVarClient::glbT0Summary
MonitorElement * glbT0Summary
Definition: DTRunConditionVarClient.h:107
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
Exception
Definition: hltDiff.cc:245
ME
Definition: ME.h:11
DTRunConditionVarClient::mTimeMapToken_
edm::ESGetToken< DTMtime, DTMtimeRcd > mTimeMapToken_
Definition: DTRunConditionVarClient.h:101
DTRunConditionVarClient::wheelHistos
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
Definition: DTRunConditionVarClient.h:109
DTRunConditionVarClient::minBadVDriftDev
float minBadVDriftDev
Definition: DTRunConditionVarClient.h:92
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
dqm::impl::MonitorElement::getMean
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:540
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
edm_modernize_messagelogger.stat
stat
Definition: edm_modernize_messagelogger.py:27
fftjetimagerecorder_cfi.histoLabel
histoLabel
Definition: fftjetimagerecorder_cfi.py:12
DTMtime::get
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
Definition: DTMtime.cc:56
DTRunConditionVarClient::maxGoodT0
float maxGoodT0
Definition: DTRunConditionVarClient.h:93
weight
Definition: weight.py:1
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98