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::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 endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) 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::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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::vector< ModuleDescription const * > &modules, 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)
 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>
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)
 
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
 

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

book the report summary

Definition at line 272 of file DTRunConditionVarClient.cc.

279  {
280  stringstream wheel;
281  wheel << wh;
282 
283  string folder = "DT/02-Segments/" + subfolder;
284 
285  ibooker.setCurrentFolder(folder);
286 
287  string histoName = histoType + "_W" + wheel.str();
288  string histoLabel = histoType;
289 
290  (wheelHistos[wh])[histoType] = ibooker.book1D(histoName, histoLabel, nbins, min, max);
291 
292  if (isVDCorr) {
293  histoLabel = "Summary of corrections to VDrift DB values";
294  histoName = "CorrTo" + histoType + "Summary_W" + wheel.str();
295  } else {
296  histoLabel = histoType + "Summary";
297  histoName = histoType + "Summary_W" + wheel.str();
298  }
299 
300  MonitorElement* me = ibooker.book2D(histoName, histoLabel, 12, 1, 13, 4, 1, 5);
301 
302  me->setBinLabel(1, "MB1", 2);
303  me->setBinLabel(2, "MB2", 2);
304  me->setBinLabel(3, "MB3", 2);
305  me->setBinLabel(4, "MB4", 2);
306  me->setAxisTitle("Sector", 1);
307 
308  (wheelHistos[wh])[histoType + "Summary"] = me;
309 
310  return;
311 }

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(), 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 alla 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.);
112  bookWheelHistos(ibooker, "SigmaT0", "03-SigmaT0", wh, 50, 0, 25);
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  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  (wheelHistos[wheel])["MeanT0"]->Fill(t0Mean);
151  (wheelHistos[wheel])["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 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::implementation::NavigatorBase::setCurrentFolder(), hgcalPlots::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 313 of file DTRunConditionVarClient.cc.

315  {
316  int wh = dtCh.wheel();
317  int sc = dtCh.sector();
318  int st = dtCh.station();
319  stringstream wheel;
320  wheel << wh;
321  stringstream station;
322  station << st;
323  stringstream sector;
324  sector << sc;
325 
326  string folder = "DT/02-Segments/Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str();
327  string histoTag = "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
328  string MEpath = folder + "/" + histoType + histoTag;
329 
330  igetter.setCurrentFolder(folder);
331 
332  LogTrace("DTDQM|DTMonitorModule|DTRunConditionVar") << "[DTRunConditionVar]: getting ME from " << folder << endl;
333 
334  MonitorElement* ME = igetter.get(MEpath);
335 
336  return ME;
337 }

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 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, and Exception.

◆ 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.

Member Data Documentation

◆ allwheelHistos

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

Definition at line 109 of file DTRunConditionVarClient.h.

◆ bookingdone

bool DTRunConditionVarClient::bookingdone
private

Definition at line 102 of file DTRunConditionVarClient.h.

◆ glbT0Summary

MonitorElement* DTRunConditionVarClient::glbT0Summary
private

Definition at line 105 of file DTRunConditionVarClient.h.

◆ glbVDriftSummary

MonitorElement* DTRunConditionVarClient::glbVDriftSummary
private

Definition at line 104 of file DTRunConditionVarClient.h.

◆ maxGoodT0

float DTRunConditionVarClient::maxGoodT0
private

Definition at line 91 of file DTRunConditionVarClient.h.

◆ maxGoodT0Sigma

float DTRunConditionVarClient::maxGoodT0Sigma
private

Definition at line 96 of file DTRunConditionVarClient.h.

◆ maxGoodVDriftDev

float DTRunConditionVarClient::maxGoodVDriftDev
private

Definition at line 89 of file DTRunConditionVarClient.h.

◆ maxGoodVDriftSigma

float DTRunConditionVarClient::maxGoodVDriftSigma
private

Definition at line 94 of file DTRunConditionVarClient.h.

◆ maxRangeT0

float DTRunConditionVarClient::maxRangeT0
private

Definition at line 87 of file DTRunConditionVarClient.h.

◆ maxRangeVDrift

float DTRunConditionVarClient::maxRangeVDrift
private

Definition at line 85 of file DTRunConditionVarClient.h.

◆ minBadT0

float DTRunConditionVarClient::minBadT0
private

Definition at line 92 of file DTRunConditionVarClient.h.

◆ minBadT0Sigma

float DTRunConditionVarClient::minBadT0Sigma
private

Definition at line 97 of file DTRunConditionVarClient.h.

◆ minBadVDriftDev

float DTRunConditionVarClient::minBadVDriftDev
private

Definition at line 90 of file DTRunConditionVarClient.h.

◆ minBadVDriftSigma

float DTRunConditionVarClient::minBadVDriftSigma
private

Definition at line 95 of file DTRunConditionVarClient.h.

◆ minRangeT0

float DTRunConditionVarClient::minRangeT0
private

Definition at line 86 of file DTRunConditionVarClient.h.

◆ minRangeVDrift

float DTRunConditionVarClient::minRangeVDrift
private

Definition at line 84 of file DTRunConditionVarClient.h.

◆ mTime

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

Definition at line 99 of file DTRunConditionVarClient.h.

◆ mTimeMap_

const DTMtime* DTRunConditionVarClient::mTimeMap_
private

Definition at line 100 of file DTRunConditionVarClient.h.

◆ nevents

int DTRunConditionVarClient::nevents
private

Definition at line 82 of file DTRunConditionVarClient.h.

◆ summaryHistos

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

Definition at line 108 of file DTRunConditionVarClient.h.

◆ wheelHistos

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

Definition at line 107 of file DTRunConditionVarClient.h.

DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTRunConditionVarClient::maxGoodT0Sigma
float maxGoodT0Sigma
Definition: DTRunConditionVarClient.h:96
DTRunConditionVarClient::maxRangeT0
float maxRangeT0
Definition: DTRunConditionVarClient.h:87
DTRunConditionVarClient::bookingdone
bool bookingdone
Definition: DTRunConditionVarClient.h:102
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:109
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTRunConditionVarClient::minBadT0Sigma
float minBadT0Sigma
Definition: DTRunConditionVarClient.h:97
DTRunConditionVarClient::varQuality
float varQuality(float var, float maxGood, float minBad)
Definition: DTRunConditionVarClient.cc:234
DTRunConditionVarClient::minRangeVDrift
float minRangeVDrift
Definition: DTRunConditionVarClient.h:84
DTRunConditionVarClient::glbVDriftSummary
MonitorElement * glbVDriftSummary
Definition: DTRunConditionVarClient.h:104
DTRunConditionVarClient::maxGoodVDriftDev
float maxGoodVDriftDev
Definition: DTRunConditionVarClient.h:89
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
DTRunConditionVarClient::minBadT0
float minBadT0
Definition: DTRunConditionVarClient.h:92
DTRunConditionVarClient::summaryHistos
std::map< std::string, MonitorElement * > summaryHistos
Definition: DTRunConditionVarClient.h:108
DTRunConditionVarClient::maxGoodVDriftSigma
float maxGoodVDriftSigma
Definition: DTRunConditionVarClient.h:94
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
DTRunConditionVarClient::minBadVDriftSigma
float minBadVDriftSigma
Definition: DTRunConditionVarClient.h:95
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DTRunConditionVarClient::minRangeT0
float minRangeT0
Definition: DTRunConditionVarClient.h:86
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:82
DTRunConditionVarClient::getChamberHistos
MonitorElement * getChamberHistos(DQMStore::IGetter &, const DTChamberId &, std::string)
Definition: DTRunConditionVarClient.cc:313
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
DTRunConditionVarClient::mTime
edm::ESHandle< DTMtime > mTime
Definition: DTRunConditionVarClient.h:99
DTRunConditionVarClient::mTimeMap_
const DTMtime * mTimeMap_
Definition: DTRunConditionVarClient.h:100
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
DTRunConditionVarClient::bookWheelHistos
void bookWheelHistos(DQMStore::IBooker &, std::string histoType, std::string subfolder, int wh, int nbins, float min, float max, bool isVDCorr=false)
book the report summary
Definition: DTRunConditionVarClient.cc:272
dqm::impl::MonitorElement::getEntries
virtual double getEntries() const
get # of entries
Definition: MonitorElement.cc:628
edm::LogWarning
Definition: MessageLogger.h:141
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:85
dtResolutionTest_cfi.histoTag
histoTag
Definition: dtResolutionTest_cfi.py:21
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
edm::LogVerbatim
Definition: MessageLogger.h:297
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:105
Exception
Definition: hltDiff.cc:246
ME
Definition: ME.h:11
DTRunConditionVarClient::wheelHistos
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
Definition: DTRunConditionVarClient.h:107
DTRunConditionVarClient::minBadVDriftDev
float minBadVDriftDev
Definition: DTRunConditionVarClient.h:90
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:671
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
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:91
weight
Definition: weight.py:1
DTMtimeRcd
Definition: DTMtimeRcd.h:5