CMS 3D CMS Logo

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

#include <DTLocalTriggerTPTest.h>

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

 DTLocalTriggerTPTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTLocalTriggerTPTest () 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 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 beginRun (const edm::Run &r, const edm::EventSetup &c) override
 BeginRun. More...
 
void Bookings (DQMStore::IBooker &, DQMStore::IGetter &)
 
void runClientDiagnostic (DQMStore::IBooker &, DQMStore::IGetter &) override
 Run client analysis. 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 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...
 
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>
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 Attributes

bool bookingdone
 

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< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 17 of file DTLocalTriggerTPTest.h.

Constructor & Destructor Documentation

◆ DTLocalTriggerTPTest()

DTLocalTriggerTPTest::DTLocalTriggerTPTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 33 of file DTLocalTriggerTPTest.cc.

33  {
34  setConfig(ps, "DTLocalTriggerTP");
35  baseFolderTM = "DT/11-LocalTriggerTP-TM/";
36 
37  bookingdone = false;
38 }

◆ ~DTLocalTriggerTPTest()

DTLocalTriggerTPTest::~DTLocalTriggerTPTest ( )
override

Destructor.

Definition at line 40 of file DTLocalTriggerTPTest.cc.

40 {}

Member Function Documentation

◆ beginRun()

void DTLocalTriggerTPTest::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

◆ Bookings()

void DTLocalTriggerTPTest::Bookings ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
protected

Definition at line 42 of file DTLocalTriggerTPTest.cc.

42  {
43  vector<string>::const_iterator iTr = trigSources.begin();
44  vector<string>::const_iterator trEnd = trigSources.end();
45  vector<string>::const_iterator iHw = hwSources.begin();
46  vector<string>::const_iterator hwEnd = hwSources.end();
47 
48  //Booking
49  if (parameters.getUntrackedParameter<bool>("staticBooking", true)) {
50  for (; iTr != trEnd; ++iTr) {
51  trigSource = (*iTr);
52  for (; iHw != hwEnd; ++iHw) {
53  hwSource = (*iHw);
54  // Loop over the TriggerUnits
55  for (int wh = -2; wh <= 2; ++wh) {
56  bookWheelHistos(ibooker, wh, "CorrectBXPhi");
57  bookWheelHistos(ibooker, wh, "ResidualBXPhi");
58  }
59  }
60  }
61  }
62 
63  bookingdone = true;
64 }

References dtFineDelayCorr_cfi::hwSource, and dtFineDelayCorr_cfi::hwSources.

◆ runClientDiagnostic()

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

Run client analysis.

Implements DTLocalTriggerBaseTest.

Definition at line 70 of file DTLocalTriggerTPTest.cc.

70  {
71  if (!bookingdone)
72  Bookings(ibooker, igetter);
73 
74  // Loop over Trig & Hw sources
75  for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr) {
76  trigSource = (*iTr);
77  for (vector<string>::const_iterator iHw = hwSources.begin(); iHw != hwSources.end(); ++iHw) {
78  hwSource = (*iHw);
79  // Loop over the TriggerUnits
80  for (int stat = 1; stat <= 4; ++stat) {
81  for (int wh = -2; wh <= 2; ++wh) {
82  for (int sect = 1; sect <= 12; ++sect) {
83  DTChamberId chId(wh, stat, sect);
84 
85  // Perform TM common plot analysis (Phi ones)
86  TH2F* BXvsQual = getHisto<TH2F>(igetter.get(getMEName("BXvsQual_In", "LocalTriggerPhiIn", chId)));
87  if (BXvsQual) {
88  if (BXvsQual->GetEntries() > 1) {
89  TH1D* BX = BXvsQual->ProjectionY();
90  int BXOK_bin = BX->GetMaximumBin();
91  double BXMean = BX->GetMean();
92  double BX_OK = BXvsQual->GetYaxis()->GetBinCenter(BXOK_bin);
93  delete BX;
94 
95  if (whME[wh].find(fullName("CorrectBXPhi")) == whME[wh].end()) {
96  bookWheelHistos(ibooker, wh, "ResidualBXPhi");
97  bookWheelHistos(ibooker, wh, "CorrectBXPhi");
98  }
99 
100  std::map<std::string, MonitorElement*>* innerME = &(whME[wh]);
101  innerME->find(fullName("CorrectBXPhi"))->second->setBinContent(sect, stat, BX_OK + 0.00001);
102  innerME->find(fullName("ResidualBXPhi"))
103  ->second->setBinContent(sect, stat, round(25. * (BXMean - BX_OK)) + 0.00001);
104  }
105  }
106  }
107  }
108  }
109  }
110  }
111 }

References L1TStage2uGTEmulatorClient_cff::BX, end, spr::find(), newFWLiteAna::fullName, dqm::implementation::IGetter::get(), dtFineDelayCorr_cfi::hwSource, dtFineDelayCorr_cfi::hwSources, and hgcalPlots::stat.

Member Data Documentation

◆ bookingdone

bool DTLocalTriggerTPTest::bookingdone
private

Definition at line 35 of file DTLocalTriggerTPTest.h.

DTLocalTriggerBaseTest::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
Definition: DTLocalTriggerBaseTest.cc:37
DTLocalTriggerTPTest::bookingdone
bool bookingdone
Definition: DTLocalTriggerTPTest.h:35
DTLocalTriggerBaseTest::hwSources
std::vector< std::string > hwSources
Definition: DTLocalTriggerBaseTest.h:104
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)
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
DTLocalTriggerBaseTest::whME
std::map< int, std::map< std::string, MonitorElement * > > whME
Definition: DTLocalTriggerBaseTest.h:114
end
#define end
Definition: vmac.h:39
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
DTLocalTriggerTPTest::Bookings
void Bookings(DQMStore::IBooker &, DQMStore::IGetter &)
Definition: DTLocalTriggerTPTest.cc:42
DTLocalTriggerBaseTest::setConfig
void setConfig(const edm::ParameterSet &ps, std::string name)
Set configuration variables.
Definition: DTLocalTriggerBaseTest.cc:78
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
DTLocalTriggerBaseTest::hwSource
std::string hwSource
Definition: DTLocalTriggerBaseTest.h:111
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
DTLocalTriggerBaseTest::bookWheelHistos
void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
Definition: DTLocalTriggerBaseTest.cc:211
DTLocalTriggerBaseTest::trigSource
std::string trigSource
Definition: DTLocalTriggerBaseTest.h:110
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DTLocalTriggerBaseTest::trigSources
std::vector< std::string > trigSources
Definition: DTLocalTriggerBaseTest.h:103
L1TStage2uGTEmulatorClient_cff.BX
BX
Definition: L1TStage2uGTEmulatorClient_cff.py:9
DTLocalTriggerBaseTest::baseFolderTM
std::string baseFolderTM
Definition: DTLocalTriggerBaseTest.h:109
DTChamberId
Definition: DTChamberId.h:14