CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
ME0BaseValidation Class Referenceabstract

#include <ME0BaseValidation.h>

Inheritance diagram for ME0BaseValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator > ME0DigisValidation ME0HitsValidation ME0RecHitsValidation ME0SegmentsValidation

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &) override=0
 
MonitorElementBookHistXY (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
 
MonitorElementBookHistZR (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
 
 ME0BaseValidation (const edm::ParameterSet &ps)
 
 ~ME0BaseValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)=0
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Attributes

edm::ESGetToken< ME0Geometry, MuonGeometryRecordgeomToken_
 
edm::EDGetToken InputTagToken_
 
std::vector< std::string > layerLabel
 
int nBinXY_
 
std::vector< double > nBinZR_
 
std::vector< double > RangeZR_
 
std::vector< std::string > regionLabel
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Detailed Description

Definition at line 20 of file ME0BaseValidation.h.

Constructor & Destructor Documentation

◆ ME0BaseValidation()

ME0BaseValidation::ME0BaseValidation ( const edm::ParameterSet ps)
explicit

Definition at line 5 of file ME0BaseValidation.cc.

5  {
6  nBinZR_ = ps.getUntrackedParameter<std::vector<double>>("nBinGlobalZR");
7  RangeZR_ = ps.getUntrackedParameter<std::vector<double>>("RangeGlobalZR");
8  nBinXY_ = ps.getUntrackedParameter<int>("nBinGlobalXY", 160);
9 
10  regionLabel.push_back("-1");
11  regionLabel.push_back("1");
12 
13  layerLabel.push_back("1");
14  layerLabel.push_back("2");
15  layerLabel.push_back("3");
16  layerLabel.push_back("4");
17  layerLabel.push_back("5");
18  layerLabel.push_back("6");
19  geomToken_ = esConsumes<ME0Geometry, MuonGeometryRecord>();
20 }

References edm::ParameterSet::getUntrackedParameter().

◆ ~ME0BaseValidation()

ME0BaseValidation::~ME0BaseValidation ( )
override

Definition at line 22 of file ME0BaseValidation.cc.

22 {}

Member Function Documentation

◆ analyze()

void ME0BaseValidation::analyze ( const edm::Event e,
const edm::EventSetup  
)
overridepure virtual

◆ BookHistXY()

ME0BaseValidation::MonitorElement * ME0BaseValidation::BookHistXY ( DQMStore::IBooker ibooker,
const char *  name,
const char *  label,
unsigned int  region_num,
unsigned int  layer_num = 99 
)

Definition at line 56 of file ME0BaseValidation.cc.

57  {
58  string hist_name, hist_label;
59  if (layer_num == 0 || layer_num == 1 || layer_num == 2 || layer_num == 3 || layer_num == 4 || layer_num == 5 ||
60  layer_num == 6) {
61  hist_name = name + string("_xy_r") + regionLabel[region_num] + "_l" + layerLabel[layer_num];
62  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " layer " + layerLabel[layer_num] +
63  " " + " ; globalX [cm]; globalY[cm]";
64  } else {
65  hist_name = name + string("_xy_r") + regionLabel[region_num];
66  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " ; globalX [cm]; globalY[cm]";
67  }
68  return ibooker.book2D(hist_name, hist_label, nBinXY_, -160, 160, nBinXY_, -160, 160);
69 }

References dqm::implementation::IBooker::book2D(), label, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ME0HitsValidation::bookHistograms(), ME0RecHitsValidation::bookHistograms(), ME0SegmentsValidation::bookHistograms(), and ME0DigisValidation::bookHistograms().

◆ BookHistZR()

ME0BaseValidation::MonitorElement * ME0BaseValidation::BookHistZR ( DQMStore::IBooker ibooker,
const char *  name,
const char *  label,
unsigned int  region_num,
unsigned int  layer_num = 99 
)

Definition at line 24 of file ME0BaseValidation.cc.

25  {
26  string hist_name, hist_label;
27  if (layer_num == 0 || layer_num == 1 || layer_num == 2 || layer_num == 3 || layer_num == 4 || layer_num == 5 ||
28  layer_num == 6) {
29  hist_name = name + string("_zr_r") + regionLabel[region_num] + "_l" + layerLabel[layer_num];
30  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " layer " + layerLabel[layer_num] +
31  " " + " ; globalZ [cm]; globalR[cm]";
32  } else {
33  hist_name = name + string("_zr_r") + regionLabel[region_num];
34  hist_label = label + string(" occupancy : region") + regionLabel[region_num] + " ; globalZ [cm]; globalR[cm]";
35  }
36  int xbin = (int)nBinZR_[0];
37  int ybin = (int)nBinZR_[1];
38  double xmin = 0;
39  double xmax = 0;
40  double ymin = 0;
41  double ymax = 0;
42  ymin = RangeZR_[RangeZR_.size() / 2 + 0];
43  ;
44  ymax = RangeZR_[RangeZR_.size() / 2 + 1];
45  ;
46  if (region_num == 0) {
47  xmin = -RangeZR_[1];
48  xmax = -RangeZR_[0];
49  } else {
50  xmin = RangeZR_[0];
51  xmax = RangeZR_[1];
52  }
53  return ibooker.book2D(hist_name, hist_label, xbin, xmin, xmax, ybin, ymin, ymax);
54 }

References dqm::implementation::IBooker::book2D(), createfilelist::int, label, Skims_PA_cff::name, AlCaHLTBitMon_QueryRunRegistry::string, TrackerOfflineValidation_Dqm_cff::xmax, TrackerOfflineValidation_Dqm_cff::xmin, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.

Referenced by ME0HitsValidation::bookHistograms(), ME0RecHitsValidation::bookHistograms(), ME0SegmentsValidation::bookHistograms(), and ME0DigisValidation::bookHistograms().

Member Data Documentation

◆ geomToken_

edm::ESGetToken<ME0Geometry, MuonGeometryRecord> ME0BaseValidation::geomToken_
protected

◆ InputTagToken_

edm::EDGetToken ME0BaseValidation::InputTagToken_
protected

◆ layerLabel

std::vector<std::string> ME0BaseValidation::layerLabel
protected

◆ nBinXY_

int ME0BaseValidation::nBinXY_
protected

Definition at line 36 of file ME0BaseValidation.h.

◆ nBinZR_

std::vector<double> ME0BaseValidation::nBinZR_
protected

Definition at line 33 of file ME0BaseValidation.h.

◆ RangeZR_

std::vector<double> ME0BaseValidation::RangeZR_
protected

Definition at line 34 of file ME0BaseValidation.h.

◆ regionLabel

std::vector<std::string> ME0BaseValidation::regionLabel
protected
ME0BaseValidation::regionLabel
std::vector< std::string > regionLabel
Definition: ME0BaseValidation.h:31
ME0BaseValidation::nBinZR_
std::vector< double > nBinZR_
Definition: ME0BaseValidation.h:33
ME0BaseValidation::layerLabel
std::vector< std::string > layerLabel
Definition: ME0BaseValidation.h:32
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
ME0BaseValidation::RangeZR_
std::vector< double > RangeZR_
Definition: ME0BaseValidation.h:34
createfilelist.int
int
Definition: createfilelist.py:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
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
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ME0BaseValidation::nBinXY_
int nBinXY_
Definition: ME0BaseValidation.h:36
ME0BaseValidation::geomToken_
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > geomToken_
Definition: ME0BaseValidation.h:37
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
label
const char * label
Definition: PFTauDecayModeTools.cc:11