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
 
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
 
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
 
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
 
edm::ESHandle< DTMtimemTime
 
const DTMtimemTimeMap_
 
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 46 of file DTRunConditionVarClient.h.

Constructor & Destructor Documentation

◆ DTRunConditionVarClient()

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

Constructor.

Definition at line 34 of file DTRunConditionVarClient.cc.

34  {
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 edm::ParameterSet::getUntrackedParameter(), dtRunConditionVarClient_cfi::maxGoodT0, dtRunConditionVarClient_cfi::maxGoodT0Sigma, dtRunConditionVarClient_cfi::maxGoodVDriftDev, dtRunConditionVarClient_cfi::maxGoodVDriftSigma, dtRunConditionVarClient_cfi::maxRangeT0, dtRunConditionVarClient_cfi::maxRangeVDrift, dtRunConditionVarClient_cfi::minBadT0, dtRunConditionVarClient_cfi::minBadT0Sigma, dtRunConditionVarClient_cfi::minBadVDriftDev, dtRunConditionVarClient_cfi::minBadVDriftSigma, dtRunConditionVarClient_cfi::minRangeT0, dtRunConditionVarClient_cfi::minRangeVDrift, and cmsHarvester::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  context.get<DTMtimeRcd>().get(mTime);
65  mTimeMap_ = &*mTime;
66 }

References edm::EventSetup::get(), edm::get(), and LogTrace.

◆ 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 273 of file DTRunConditionVarClient.cc.

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

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

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 73 of file DTRunConditionVarClient.cc.

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

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), HcalObjRepresent::Fill(), dqm::impl::MonitorElement::getEntries(), dqm::impl::MonitorElement::getMean(), dqm::impl::MonitorElement::getRMS(), edm::max(), dtRunConditionVarClient_cfi::maxGoodT0, dtRunConditionVarClient_cfi::maxGoodT0Sigma, dtRunConditionVarClient_cfi::maxGoodVDriftDev, dtRunConditionVarClient_cfi::maxGoodVDriftSigma, dtRunConditionVarClient_cfi::maxRangeT0, dtRunConditionVarClient_cfi::maxRangeVDrift, edm::min(), dtRunConditionVarClient_cfi::minBadT0, dtRunConditionVarClient_cfi::minBadT0Sigma, dtRunConditionVarClient_cfi::minBadVDriftDev, dtRunConditionVarClient_cfi::minBadVDriftSigma, dtRunConditionVarClient_cfi::minRangeT0, dtRunConditionVarClient_cfi::minRangeVDrift, fileinputsource_cfi::sec, dqm::impl::MonitorElement::setAxisRange(), dqm::implementation::NavigatorBase::setCurrentFolder(), edm_modernize_messagelogger::stat, and makeMuonMisalignmentScenario::wheel.

◆ 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 68 of file DTRunConditionVarClient.cc.

71  {}

◆ getChamberHistos()

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

Definition at line 333 of file DTRunConditionVarClient.cc.

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

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.

◆ percDevVDrift()

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

Definition at line 248 of file DTRunConditionVarClient.cc.

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

References DTVelocityUnits::cm_per_ns, and Exception.

◆ varQuality()

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

Definition at line 235 of file DTRunConditionVarClient.cc.

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

References trigObjTnPSource_cfi::var.

Member Data Documentation

◆ allwheelHistos

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

Definition at line 111 of file DTRunConditionVarClient.h.

◆ bookingdone

bool DTRunConditionVarClient::bookingdone
private

Definition at line 103 of file DTRunConditionVarClient.h.

◆ glbT0Summary

MonitorElement* DTRunConditionVarClient::glbT0Summary
private

Definition at line 106 of file DTRunConditionVarClient.h.

◆ glbVDriftSummary

MonitorElement* DTRunConditionVarClient::glbVDriftSummary
private

Definition at line 105 of file DTRunConditionVarClient.h.

◆ maxGoodT0

float DTRunConditionVarClient::maxGoodT0
private

Definition at line 92 of file DTRunConditionVarClient.h.

◆ maxGoodT0Sigma

float DTRunConditionVarClient::maxGoodT0Sigma
private

Definition at line 97 of file DTRunConditionVarClient.h.

◆ maxGoodVDriftDev

float DTRunConditionVarClient::maxGoodVDriftDev
private

Definition at line 90 of file DTRunConditionVarClient.h.

◆ maxGoodVDriftSigma

float DTRunConditionVarClient::maxGoodVDriftSigma
private

Definition at line 95 of file DTRunConditionVarClient.h.

◆ maxRangeT0

float DTRunConditionVarClient::maxRangeT0
private

Definition at line 88 of file DTRunConditionVarClient.h.

◆ maxRangeVDrift

float DTRunConditionVarClient::maxRangeVDrift
private

Definition at line 86 of file DTRunConditionVarClient.h.

◆ minBadT0

float DTRunConditionVarClient::minBadT0
private

Definition at line 93 of file DTRunConditionVarClient.h.

◆ minBadT0Sigma

float DTRunConditionVarClient::minBadT0Sigma
private

Definition at line 98 of file DTRunConditionVarClient.h.

◆ minBadVDriftDev

float DTRunConditionVarClient::minBadVDriftDev
private

Definition at line 91 of file DTRunConditionVarClient.h.

◆ minBadVDriftSigma

float DTRunConditionVarClient::minBadVDriftSigma
private

Definition at line 96 of file DTRunConditionVarClient.h.

◆ minRangeT0

float DTRunConditionVarClient::minRangeT0
private

Definition at line 87 of file DTRunConditionVarClient.h.

◆ minRangeVDrift

float DTRunConditionVarClient::minRangeVDrift
private

Definition at line 85 of file DTRunConditionVarClient.h.

◆ mTime

edm::ESHandle<DTMtime> DTRunConditionVarClient::mTime
private

Definition at line 100 of file DTRunConditionVarClient.h.

◆ mTimeMap_

const DTMtime* DTRunConditionVarClient::mTimeMap_
private

Definition at line 101 of file DTRunConditionVarClient.h.

◆ nevents

int DTRunConditionVarClient::nevents
private

Definition at line 83 of file DTRunConditionVarClient.h.

◆ summaryHistos

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

Definition at line 110 of file DTRunConditionVarClient.h.

◆ wheelHistos

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

Definition at line 108 of file DTRunConditionVarClient.h.

◆ wheelRingHistos

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

Definition at line 109 of file DTRunConditionVarClient.h.

DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTRunConditionVarClient::maxGoodT0Sigma
float maxGoodT0Sigma
Definition: DTRunConditionVarClient.h:97
DTRunConditionVarClient::maxRangeT0
float maxRangeT0
Definition: DTRunConditionVarClient.h:88
DTRunConditionVarClient::bookingdone
bool bookingdone
Definition: DTRunConditionVarClient.h:103
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:111
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTRunConditionVarClient::minBadT0Sigma
float minBadT0Sigma
Definition: DTRunConditionVarClient.h:98
DTRunConditionVarClient::varQuality
float varQuality(float var, float maxGood, float minBad)
Definition: DTRunConditionVarClient.cc:235
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DTRunConditionVarClient::minRangeVDrift
float minRangeVDrift
Definition: DTRunConditionVarClient.h:85
DTRunConditionVarClient::glbVDriftSummary
MonitorElement * glbVDriftSummary
Definition: DTRunConditionVarClient.h:105
DTRunConditionVarClient::maxGoodVDriftDev
float maxGoodVDriftDev
Definition: DTRunConditionVarClient.h:90
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
DTRunConditionVarClient::minBadT0
float minBadT0
Definition: DTRunConditionVarClient.h:93
DTRunConditionVarClient::summaryHistos
std::map< std::string, MonitorElement * > summaryHistos
Definition: DTRunConditionVarClient.h:110
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
DTRunConditionVarClient::maxGoodVDriftSigma
float maxGoodVDriftSigma
Definition: DTRunConditionVarClient.h:95
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:109
DTRunConditionVarClient::minBadVDriftSigma
float minBadVDriftSigma
Definition: DTRunConditionVarClient.h:96
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DTRunConditionVarClient::minRangeT0
float minRangeT0
Definition: DTRunConditionVarClient.h:87
DTRunConditionVarClient::percDevVDrift
void percDevVDrift(DTChamberId indexCh, float meanVD, float sigmaVD, float &devVD, float &errdevVD)
Definition: DTRunConditionVarClient.cc:248
DTRunConditionVarClient::nevents
int nevents
Definition: DTRunConditionVarClient.h:83
DTRunConditionVarClient::getChamberHistos
MonitorElement * getChamberHistos(DQMStore::IGetter &, const DTChamberId &, std::string)
Definition: DTRunConditionVarClient.cc:333
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
DTRunConditionVarClient::mTime
edm::ESHandle< DTMtime > mTime
Definition: DTRunConditionVarClient.h:100
DTRunConditionVarClient::mTimeMap_
const DTMtime * mTimeMap_
Definition: DTRunConditionVarClient.h:101
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:562
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:794
dqm::impl::MonitorElement::getEntries
virtual double getEntries() const
get # of entries
Definition: MonitorElement.cc:628
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:86
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:273
get
#define get
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:87
DTRunConditionVarClient::glbT0Summary
MonitorElement * glbT0Summary
Definition: DTRunConditionVarClient.h:106
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::wheelHistos
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
Definition: DTRunConditionVarClient.h:108
DTRunConditionVarClient::minBadVDriftDev
float minBadVDriftDev
Definition: DTRunConditionVarClient.h:91
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:549
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:92
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
DTMtimeRcd
Definition: DTMtimeRcd.h:5