CMS 3D CMS Logo

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

#include <DTLocalTriggerSynchTest.h>

Inheritance diagram for DTLocalTriggerSynchTest:
DTLocalTriggerBaseTest 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

 DTLocalTriggerSynchTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTLocalTriggerSynchTest () override
 Destructor. More...
 
- Public Member Functions inherited from DTLocalTriggerBaseTest
 DTLocalTriggerBaseTest ()
 Constructor. More...
 
 ~DTLocalTriggerBaseTest () 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::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 beginRun (const edm::Run &run, const edm::EventSetup &c) override
 begin Run More...
 
void bookChambHistos (DQMStore::IBooker &, DTChamberId chambId, std::string htype, std::string subfolder="")
 Book the new MEs (for each chamber) More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 Perform client diagnostic in online. More...
 
float getFloatFromME (DQMStore::IGetter &, DTChamberId chId, std::string meType)
 Get float MEs. More...
 
void makeRatioME (TH1F *numerator, TH1F *denominator, MonitorElement *result)
 Compute efficiency plots. More...
 
void runClientDiagnostic (DQMStore::IBooker &, DQMStore::IGetter &) override
 DQM Client Diagnostic. More...
 
- Protected Member Functions inherited from DTLocalTriggerBaseTest
void beginRun (edm::Run const &run, edm::EventSetup const &context) override
 BeginRun. More...
 
void bookCmsHistos (DQMStore::IBooker &, std::string hTag, std::string folder="", bool isGlb=false)
 Book the new MEs (CMS summary) More...
 
void bookSectorHistos (DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="")
 Book the new MEs (for each sector) More...
 
void bookWheelHistos (DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
 Book the new MEs (for each wheel) More...
 
std::string category ()
 Get message logger name. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &context) override
 Perform client diagnostic in offline. More...
 
std::string fullName (std::string htype)
 Create fullname from histo partial name. More...
 
template<class T >
TgetHisto (MonitorElement *me)
 Convert ME to Histogram fo type T. More...
 
std::string getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid)
 Get the ME name (by chamber) More...
 
std::string getMEName (std::string histoTag, std::string subfolder, int wh)
 Get the ME name (by wheel) More...
 
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms. More...
 
void setConfig (const edm::ParameterSet &ps, std::string name)
 Set configuration variables. More...
 
std::string & topFolder ()
 Get top folder name. More...
 
- 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 Attributes

bool bookingdone
 
double bxTime
 
std::map< uint32_t, std::map< std::string, MonitorElement * > > chambME
 
std::string denHistoTag
 
int minEntries
 
int nBXHigh
 
int nBXLow
 
std::string numHistoTag
 
bool rangeInBX
 
std::string ratioHistoTag
 
DTTPGParameters wPhaseMap
 
bool writeDB
 

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 DTLocalTriggerBaseTest
std::string baseFolderTM
 
std::map< std::string, MonitorElement * > cmsME
 
std::string hwSource
 
std::vector< std::string > hwSources
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
unsigned int nLumiSegs
 
edm::ParameterSet parameters
 
int prescaleFactor
 
int run
 
bool runOnline
 
std::map< int, std::map< std::string, MonitorElement * > > secME
 
std::string sourceFolder
 
std::string testName
 
std::string trigSource
 
std::vector< std::string > trigSources
 
std::map< int, std::map< std::string, MonitorElement * > > whME
 
- 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

Definition at line 20 of file DTLocalTriggerSynchTest.h.

Constructor & Destructor Documentation

◆ DTLocalTriggerSynchTest()

DTLocalTriggerSynchTest::DTLocalTriggerSynchTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 40 of file DTLocalTriggerSynchTest.cc.

40  {
41  setConfig(ps, "DTLocalTriggerSynch");
42  baseFolderTM = "DT/90-LocalTriggerSynch/";
43 
44  bookingdone = false;
45 }

◆ ~DTLocalTriggerSynchTest()

DTLocalTriggerSynchTest::~DTLocalTriggerSynchTest ( )
override

Destructor.

Definition at line 47 of file DTLocalTriggerSynchTest.cc.

47 {}

Member Function Documentation

◆ beginRun()

void DTLocalTriggerSynchTest::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
overrideprotected

◆ bookChambHistos()

void DTLocalTriggerSynchTest::bookChambHistos ( DQMStore::IBooker ,
DTChamberId  chambId,
std::string  htype,
std::string  subfolder = "" 
)
protected

Book the new MEs (for each chamber)

Definition at line 232 of file DTLocalTriggerSynchTest.cc.

235  {
236  stringstream wheel;
237  wheel << chambId.wheel();
238  stringstream station;
239  station << chambId.station();
240  stringstream sector;
241  sector << chambId.sector();
242 
243  string fullType = fullName(htype);
244  string HistoName = fullType + "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
245 
246  string folder = topFolder() + "Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str();
247  if (!subfolder.empty()) {
248  folder += "7" + subfolder;
249  }
250 
251  ibooker.setCurrentFolder(folder);
252 
253  LogPrint(category()) << "[" << testName << "Test]: booking " << folder << "/" << HistoName;
254 
255  uint32_t indexChId = chambId.rawId();
256  float min = rangeInBX ? 0 : nBXLow * bxTime;
257  float max = rangeInBX ? bxTime : nBXHigh * bxTime;
258  int nbins = static_cast<int>(ceil(rangeInBX ? bxTime : (nBXHigh - nBXLow) * bxTime));
259 
260  chambME[indexChId][fullType] =
261  ibooker.book1D(HistoName.c_str(), "All/HH ratio vs Muon Arrival Time", nbins, min, max);
262 }

References dqm::implementation::IBooker::book1D(), hgcalDigitizer_cfi::bxTime, taus_updatedMVAIds_cff::category, reco::ceil(), printsummarytable::folder, newFWLiteAna::fullName, edm::max(), edm::min(), LaserClient_cfi::nbins, dtLocalTriggerSynchTest_cfi::nBXHigh, dtLocalTriggerSynchTest_cfi::nBXLow, DetId::rawId(), DTChamberId::sector(), dqm::implementation::NavigatorBase::setCurrentFolder(), DTChamberId::station(), relativeConstraints::station, L1TBPTX_cfi::testName, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

◆ dqmEndJob()

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

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 145 of file DTLocalTriggerSynchTest.cc.

145  {
146  DTLocalTriggerBaseTest::dqmEndJob(ibooker, igetter);
147 
148  if (parameters.getParameter<bool>("writeDB")) {
149  LogVerbatim(category()) << "[" << testName << "Test]: writeDB flag set to true. Producing peak position database."
150  << endl;
151 
152  DTTPGParameters* delayMap = new DTTPGParameters();
153  hwSource = "TM";
154  std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
155  std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
156  for (; chambIt != chambEnd; ++chambIt) {
157  DTChamberId chId = (*chambIt)->id();
158  float fineDelay = 0;
159  int coarseDelay = static_cast<int>(
160  (getFloatFromME(igetter, chId, "tTrig_SL1") + getFloatFromME(igetter, chId, "tTrig_SL3")) * 0.5 / bxTime);
161 
162  bool fineDiff = parameters.getParameter<bool>("fineParamDiff");
163  bool coarseDiff = parameters.getParameter<bool>("coarseParamDiff");
164 
165  TH1F* ratioH = getHisto<TH1F>(igetter.get(getMEName(ratioHistoTag, "", chId)));
166  if (ratioH->GetEntries() > minEntries) {
167  TF1* fitF = ratioH->GetFunction("mypol8");
168  if (fitF) {
169  fineDelay = fitF->GetMaximumX(0, bxTime);
170  }
171  } else {
172  LogInfo(category()) << "[" << testName << "Test]: Ratio histogram for chamber " << chId
173  << " is empty. Worst Phase value set to 0." << endl;
174  }
175 
176  if (fineDiff || coarseDiff) {
177  float wFine;
178  int wCoarse;
179  wPhaseMap.get(chId, wCoarse, wFine, DTTimeUnits::ns);
180  if (fineDiff) {
181  fineDelay = wFine - fineDelay;
182  }
183  if (coarseDiff) {
184  coarseDelay = wCoarse - coarseDelay;
185  }
186  }
187  delayMap->set(chId, coarseDelay, fineDelay, DTTimeUnits::ns);
188  }
189 
190  std::vector<std::pair<DTTPGParametersId, DTTPGParametersData> >::const_iterator dbIt = delayMap->begin();
191  std::vector<std::pair<DTTPGParametersId, DTTPGParametersData> >::const_iterator dbEnd = delayMap->end();
192  for (; dbIt != dbEnd; ++dbIt) {
193  LogVerbatim(category()) << "[" << testName << "Test]: DB entry for Wh " << (*dbIt).first.wheelId << " Sec "
194  << (*dbIt).first.sectorId << " St " << (*dbIt).first.stationId << " has coarse "
195  << (*dbIt).second.nClock << " and phase " << (*dbIt).second.tPhase << std::endl;
196  }
197 
198  string delayRecord = "DTTPGParametersRcd";
199  DTCalibDBUtils::writeToDB(delayRecord, delayMap);
200  }
201 }

References DTTPGParameters::begin(), hgcalDigitizer_cfi::bxTime, taus_updatedMVAIds_cff::category, DTLocalTriggerBaseTest::dqmEndJob(), L1DTConfigParams_cff::DTTPGParameters, DTTPGParameters::end(), dqm::implementation::IGetter::get(), dtFineDelayCorr_cfi::hwSource, dtFineDelayCorr_cfi::minEntries, DTTimeUnits::ns, dtLocalTriggerSynchTest_cfi::ratioHistoTag, DTTPGParameters::set(), L1TBPTX_cfi::testName, tools::TF1, and DTCalibDBUtils::writeToDB().

◆ dqmEndLuminosityBlock()

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

Perform client diagnostic in online.

Reimplemented from DTLocalTriggerBaseTest.

Definition at line 62 of file DTLocalTriggerSynchTest.cc.

65  {
66  if (bookingdone)
67  return;
68 
69  vector<string>::const_iterator iTr = trigSources.begin();
70  vector<string>::const_iterator trEnd = trigSources.end();
71  vector<string>::const_iterator iHw = hwSources.begin();
72  vector<string>::const_iterator hwEnd = hwSources.end();
73 
74  //Booking
75  if (parameters.getUntrackedParameter<bool>("staticBooking", true)) {
76  for (; iTr != trEnd; ++iTr) {
77  trigSource = (*iTr);
78  for (; iHw != hwEnd; ++iHw) {
79  hwSource = (*iHw);
80  std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
81  std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
82  for (; chambIt != chambEnd; ++chambIt) {
83  DTChamberId chId = ((*chambIt)->id());
84  bookChambHistos(ibooker, chId, ratioHistoTag);
85  }
86  }
87  }
88  }
89 
90  LogVerbatim(category()) << "[" << testName << "Test]: book Histograms" << endl;
91 
92  if (parameters.getParameter<bool>("fineParamDiff")) {
93  ESHandle<DTTPGParameters> wPhaseHandle;
94  c.get<DTTPGParametersRcd>().get(wPhaseHandle);
95  wPhaseMap = (*wPhaseHandle);
96  }
97 
98  bookingdone = true;
99 }

References HltBtagPostValidation_cff::c, taus_updatedMVAIds_cff::category, edm::get(), dtFineDelayCorr_cfi::hwSource, dtFineDelayCorr_cfi::hwSources, dtLocalTriggerSynchTest_cfi::ratioHistoTag, and L1TBPTX_cfi::testName.

◆ getFloatFromME()

float DTLocalTriggerSynchTest::getFloatFromME ( DQMStore::IGetter igetter,
DTChamberId  chId,
std::string  meType 
)
protected

Get float MEs.

Definition at line 208 of file DTLocalTriggerSynchTest.cc.

208  {
209  stringstream wheel;
210  wheel << chId.wheel();
211  stringstream station;
212  station << chId.station();
213  stringstream sector;
214  sector << chId.sector();
215 
216  string folderName = topFolder() + "Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str() + "/";
217 
218  string histoname =
219  sourceFolder + folderName + meType + "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
220 
221  MonitorElement* me = igetter.get(histoname);
222  if (me) {
223  return me->getFloatValue();
224  } else {
225  LogProblem(category()) << "[" << testName << "Test]: " << histoname << " is not a valid ME. 0 returned"
226  << std::endl;
227  }
228 
229  return 0;
230 }

References taus_updatedMVAIds_cff::category, ALCARECODTCalibSynchCosmicsDQM_cff::folderName, dqm::implementation::IGetter::get(), hlt_dqm_clientPB-live_cfg::me, DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, L1TBPTX_cfi::testName, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

◆ makeRatioME()

void DTLocalTriggerSynchTest::makeRatioME ( TH1F *  numerator,
TH1F *  denominator,
MonitorElement result 
)
protected

Compute efficiency plots.

Definition at line 203 of file DTLocalTriggerSynchTest.cc.

203  {
204  TH1F* efficiency = result->getTH1F();
205  efficiency->Divide(numerator, denominator, 1, 1, "");
206 }

References HLTTauDQMOffline_cfi::denominator, L1TObjectsTimingClient_cff::efficiency, HLTTauDQMOffline_cfi::numerator, and mps_fire::result.

◆ runClientDiagnostic()

void DTLocalTriggerSynchTest::runClientDiagnostic ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

DQM Client Diagnostic.

Implements DTLocalTriggerBaseTest.

Definition at line 101 of file DTLocalTriggerSynchTest.cc.

101  {
102  // Loop over Trig & Hw sources
103  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr) {
104  trigSource = (*iTr);
105  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw) {
106  hwSource = (*iHw);
107  std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
108  std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
109  for (; chambIt != chambEnd; ++chambIt) {
110  DTChamberId chId = (*chambIt)->id();
111  uint32_t indexCh = chId.rawId();
112 
113  // Perform peak finding
114 
115  TH1F* numH = getHisto<TH1F>(igetter.get(getMEName(numHistoTag, "", chId)));
116  TH1F* denH = getHisto<TH1F>(igetter.get(getMEName(denHistoTag, "", chId)));
117 
118  if (numH && denH && numH->GetEntries() > minEntries && denH->GetEntries() > minEntries) {
119  std::map<std::string, MonitorElement*> innerME = chambME[indexCh];
120  MonitorElement* ratioH = innerME.find(fullName(ratioHistoTag))->second;
121  makeRatioME(numH, denH, ratioH);
122  try {
123  //Need our own copy to avoid threading problems
124  TF1 mypol8("mypol8", "pol8");
125  getHisto<TH1F>(ratioH)->Fit(&mypol8, "CQO");
126  } catch (cms::Exception& iException) {
127  edm::LogPrint(category()) << "[" << testName << "Test]: Error fitting " << ratioH->getName()
128  << " returned 0" << endl;
129  }
130  } else {
131  if (!numH || !denH) {
132  LogPrint(category()) << "[" << testName
133  << "Test]: At least one of the required Histograms was not found for chamber " << chId
134  << ". Peaks not computed" << endl;
135  } else {
136  LogPrint(category()) << "[" << testName << "Test]: Number of plots entries for " << chId
137  << " is less than minEntries=" << minEntries << ". Peaks not computed" << endl;
138  }
139  }
140  }
141  }
142  }
143 }

References taus_updatedMVAIds_cff::category, dtLocalTriggerSynchTest_cfi::denHistoTag, newFWLiteAna::fullName, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getName(), dtFineDelayCorr_cfi::hwSource, dtFineDelayCorr_cfi::hwSources, dtFineDelayCorr_cfi::minEntries, dtLocalTriggerSynchTest_cfi::numHistoTag, dtLocalTriggerSynchTest_cfi::ratioHistoTag, DetId::rawId(), L1TBPTX_cfi::testName, and tools::TF1.

Member Data Documentation

◆ bookingdone

bool DTLocalTriggerSynchTest::bookingdone
private

Definition at line 67 of file DTLocalTriggerSynchTest.h.

◆ bxTime

double DTLocalTriggerSynchTest::bxTime
private

Definition at line 59 of file DTLocalTriggerSynchTest.h.

◆ chambME

std::map<uint32_t, std::map<std::string, MonitorElement *> > DTLocalTriggerSynchTest::chambME
private

Definition at line 55 of file DTLocalTriggerSynchTest.h.

◆ denHistoTag

std::string DTLocalTriggerSynchTest::denHistoTag
private

Definition at line 57 of file DTLocalTriggerSynchTest.h.

◆ minEntries

int DTLocalTriggerSynchTest::minEntries
private

Definition at line 63 of file DTLocalTriggerSynchTest.h.

◆ nBXHigh

int DTLocalTriggerSynchTest::nBXHigh
private

Definition at line 62 of file DTLocalTriggerSynchTest.h.

◆ nBXLow

int DTLocalTriggerSynchTest::nBXLow
private

Definition at line 61 of file DTLocalTriggerSynchTest.h.

◆ numHistoTag

std::string DTLocalTriggerSynchTest::numHistoTag
private

Definition at line 56 of file DTLocalTriggerSynchTest.h.

◆ rangeInBX

bool DTLocalTriggerSynchTest::rangeInBX
private

Definition at line 60 of file DTLocalTriggerSynchTest.h.

◆ ratioHistoTag

std::string DTLocalTriggerSynchTest::ratioHistoTag
private

Definition at line 58 of file DTLocalTriggerSynchTest.h.

◆ wPhaseMap

DTTPGParameters DTLocalTriggerSynchTest::wPhaseMap
private

Definition at line 65 of file DTLocalTriggerSynchTest.h.

◆ writeDB

bool DTLocalTriggerSynchTest::writeDB
private

Definition at line 64 of file DTLocalTriggerSynchTest.h.

DTLocalTriggerSynchTest::ratioHistoTag
std::string ratioHistoTag
Definition: DTLocalTriggerSynchTest.h:58
DTTPGParameters::set
int set(int wheelId, int stationId, int sectorId, int nc, float ph, DTTimeUnits::type unit)
Definition: DTTPGParameters.cc:123
DTLocalTriggerBaseTest::sourceFolder
std::string sourceFolder
Definition: DTLocalTriggerBaseTest.h:106
DTLocalTriggerSynchTest::rangeInBX
bool rangeInBX
Definition: DTLocalTriggerSynchTest.h:60
DTLocalTriggerBaseTest::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: DTLocalTriggerBaseTest.cc:65
DTLocalTriggerBaseTest::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
Definition: DTLocalTriggerBaseTest.cc:37
DTLocalTriggerSynchTest::denHistoTag
std::string denHistoTag
Definition: DTLocalTriggerSynchTest.h:57
min
T min(T a, T b)
Definition: MathUtil.h:58
printsummarytable.folder
folder
Definition: printsummarytable.py:7
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTLocalTriggerSynchTest::bxTime
double bxTime
Definition: DTLocalTriggerSynchTest.h:59
DTLocalTriggerBaseTest::hwSources
std::vector< std::string > hwSources
Definition: DTLocalTriggerBaseTest.h:104
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
DTLocalTriggerBaseTest::fullName
std::string fullName(std::string htype)
Create fullname from histo partial name.
Definition: DTLocalTriggerBaseTest.cc:99
DTLocalTriggerBaseTest::getMEName
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
DTLocalTriggerSynchTest::bookingdone
bool bookingdone
Definition: DTLocalTriggerSynchTest.h:67
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
L1TObjectsTimingClient_cff.efficiency
efficiency
Definition: L1TObjectsTimingClient_cff.py:10
tools.TF1
TF1
Definition: tools.py:23
DTLocalTriggerSynchTest::numHistoTag
std::string numHistoTag
Definition: DTLocalTriggerSynchTest.h:56
DTTPGParameters::get
int get(int wheelId, int stationId, int sectorId, int &nc, float &ph, DTTimeUnits::type unit) const
get content
Definition: DTTPGParameters.cc:68
DTLocalTriggerBaseTest::setConfig
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
Definition: DTLocalTriggerBaseTest.cc:78
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
edm::LogProblem
Log< level::Error, true > LogProblem
Definition: MessageLogger.h:131
DTGeometry::chambers
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
DTLocalTriggerBaseTest::run
int run
Definition: DTLocalTriggerBaseTest.h:101
DTTimeUnits::ns
Definition: DTTimeUnits.h:32
edm::ESHandle
Definition: DTSurvey.h:22
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
DTLocalTriggerSynchTest::nBXHigh
int nBXHigh
Definition: DTLocalTriggerSynchTest.h:62
DTLocalTriggerSynchTest::getFloatFromME
float getFloatFromME(DQMStore::IGetter &, DTChamberId chId, std::string meType)
Get float MEs.
Definition: DTLocalTriggerSynchTest.cc:208
DTTPGParametersRcd
Definition: DTTPGParametersRcd.h:5
DTTPGParameters
Definition: DTTPGParameters.h:62
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
DTTPGParameters::begin
const_iterator begin() const
Definition: DTTPGParameters.cc:166
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTLocalTriggerSynchTest::chambME
std::map< uint32_t, std::map< std::string, MonitorElement * > > chambME
Definition: DTLocalTriggerSynchTest.h:55
cscdqm::HistoName
std::string HistoName
Definition: CSCDQM_HistoDef.h:32
HLTTauDQMOffline_cfi.numerator
numerator
Definition: HLTTauDQMOffline_cfi.py:179
DTLocalTriggerBaseTest::hwSource
std::string hwSource
Definition: DTLocalTriggerBaseTest.h:111
DTLocalTriggerBaseTest::muonGeom
edm::ESHandle< DTGeometry > muonGeom
Definition: DTLocalTriggerBaseTest.h:112
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
DTLocalTriggerBaseTest::trigSource
std::string trigSource
Definition: DTLocalTriggerBaseTest.h:110
ALCARECODTCalibSynchCosmicsDQM_cff.folderName
folderName
Definition: ALCARECODTCalibSynchCosmicsDQM_cff.py:9
DTLocalTriggerSynchTest::makeRatioME
void makeRatioME(TH1F *numerator, TH1F *denominator, MonitorElement *result)
Compute efficiency plots.
Definition: DTLocalTriggerSynchTest.cc:203
DTLocalTriggerBaseTest::topFolder
std::string & topFolder()
Get top folder name.
Definition: DTLocalTriggerBaseTest.h:93
DTLocalTriggerSynchTest::bookChambHistos
void bookChambHistos(DQMStore::IBooker &, DTChamberId chambId, std::string htype, std::string subfolder="")
Book the new MEs (for each chamber)
Definition: DTLocalTriggerSynchTest.cc:232
HLTTauDQMOffline_cfi.denominator
denominator
Definition: HLTTauDQMOffline_cfi.py:180
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DTLocalTriggerBaseTest::trigSources
std::vector< std::string > trigSources
Definition: DTLocalTriggerBaseTest.h:103
DTTPGParameters::end
const_iterator end() const
Definition: DTTPGParameters.cc:168
DTLocalTriggerSynchTest::wPhaseMap
DTTPGParameters wPhaseMap
Definition: DTLocalTriggerSynchTest.h:65
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
DTLocalTriggerBaseTest::parameters
edm::ParameterSet parameters
Definition: DTLocalTriggerBaseTest.h:107
L1DTConfigParams_cff.DTTPGParameters
DTTPGParameters
Definition: L1DTConfigParams_cff.py:12
dqm::impl::MonitorElement::getName
const std::string & getName() const
get name of ME
Definition: MonitorElement.h:250
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DTLocalTriggerBaseTest::category
std::string category()
Get message logger name.
Definition: DTLocalTriggerBaseTest.h:96
mps_fire.result
result
Definition: mps_fire.py:311
cms::Exception
Definition: Exception.h:70
DTLocalTriggerBaseTest::baseFolderTM
std::string baseFolderTM
Definition: DTLocalTriggerBaseTest.h:109
DTChamberId
Definition: DTChamberId.h:14
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
DTLocalTriggerSynchTest::minEntries
int minEntries
Definition: DTLocalTriggerSynchTest.h:63
DTLocalTriggerBaseTest::testName
std::string testName
Definition: DTLocalTriggerBaseTest.h:102
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
DTLocalTriggerSynchTest::nBXLow
int nBXLow
Definition: DTLocalTriggerSynchTest.h:61
DTCalibDBUtils::writeToDB
static void writeToDB(std::string record, T *payload)
Definition: DTCalibDBUtils.h:28
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42