CMS 3D CMS Logo

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

#include <GEMCheckGeometry.h>

Inheritance diagram for GEMCheckGeometry:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 GEMCheckGeometry (const edm::ParameterSet &gc)
 
 ~GEMCheckGeometry () 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 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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

bool detailPlot_
 
double GE11PhiBegin_
 
double GE11PhiStep_
 
double maxPhi_
 
double minPhi_
 
std::map< UInt_t, MonitorElement * > the_st_dphi
 
std::map< UInt_t, MonitorElement * > theStdPlots
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 13 of file GEMCheckGeometry.h.

Constructor & Destructor Documentation

◆ GEMCheckGeometry()

GEMCheckGeometry::GEMCheckGeometry ( const edm::ParameterSet gc)
explicit

Definition at line 12 of file GEMCheckGeometry.cc.

12  {
13  GE11PhiBegin_ = gc.getUntrackedParameter<double>("GE11PhiBegin", -5.);
14  GE11PhiStep_ = gc.getUntrackedParameter<double>("GE11PhiStep", 10);
15  minPhi_ = gc.getUntrackedParameter<double>("minPhi", -180.);
16  maxPhi_ = gc.getUntrackedParameter<double>("maxPhi", +180.);
17  detailPlot_ = gc.getParameter<bool>("detailPlot");
18 }

References detailPlot_, GE11PhiBegin_, GE11PhiStep_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), maxPhi_, and minPhi_.

◆ ~GEMCheckGeometry()

GEMCheckGeometry::~GEMCheckGeometry ( )
override

Definition at line 89 of file GEMCheckGeometry.cc.

89 {}

Member Function Documentation

◆ analyze()

void GEMCheckGeometry::analyze ( const edm::Event e,
const edm::EventSetup  
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 91 of file GEMCheckGeometry.cc.

91 {}

◆ bookHistograms()

void GEMCheckGeometry::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  Run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 20 of file GEMCheckGeometry.cc.

20  {
21  if (!detailPlot_)
22  return;
23  const GEMGeometry *GEMGeometry_;
24 
25  try {
27  iSetup.get<MuonGeometryRecord>().get(hGeom);
28  GEMGeometry_ = &*hGeom;
30  edm::LogError("MuonGEMGeometry") << "+++ Error : GEM geometry is unavailable on event loop. +++\n";
31  return;
32  }
33 
34  ibooker.setCurrentFolder("MuonGEMDigisV/GEMDigisTask");
35  LogDebug("GEMCheckGeometry") << "ibooker set current folder\n";
36 
37  for (auto region : GEMGeometry_->regions()) {
38  TString title = TString::Format("Geometry's phi distribution on Region %d ; #phi(degree); ;", region->region());
39  TString name = TString::Format("geo_phi_r%d", region->region());
40  auto temp_me = ibooker.book2D(name.Data(), title.Data(), 360000, -180., 180, 12, 1, 13);
41  temp_me->setBinLabel(1, "St1,La1_even", 2);
42  temp_me->setBinLabel(2, "St1,La1_odd", 2);
43  temp_me->setBinLabel(3, "St1,La2_even", 2);
44  temp_me->setBinLabel(4, "St1,La2_odd", 2);
45  temp_me->setBinLabel(5, "St2,La1_even", 2);
46  temp_me->setBinLabel(6, "St2,La1_odd", 2);
47  temp_me->setBinLabel(7, "St2,La2_even", 2);
48  temp_me->setBinLabel(8, "St2,La2_odd", 2);
50  }
51 
52  for (auto region : GEMGeometry_->regions()) {
53  for (auto station : region->stations()) {
54  for (auto ring : station->rings()) {
55  for (auto sch : ring->superChambers()) {
56  for (auto ch : sch->chambers()) {
57  for (auto roll : ch->etaPartitions()) {
58  const StripTopology *topology(&(roll->specificTopology()));
59  auto parameters(roll->specs()->parameters());
60  float nStrips(parameters[3]);
61  for (int strip = 0; strip <= nStrips; strip++) {
62  LocalPoint lEdge(topology->localPosition(strip));
63 
64  double phi = roll->toGlobal(lEdge).phi().degrees();
65 
66  GEMDetId id(roll->id());
67  int region_idx = id.region();
68  int station_idx = id.station();
69  int chamber_idx = id.chamber();
70  int layer_idx = id.layer();
71  int value = (station_idx - 1) * 4 + (layer_idx - 1) * 2 + (chamber_idx % 2) + 1;
72 
73  if (region_idx == 1) {
74  UInt_t hash = TString("geo_phi_r1").Hash();
75  theStdPlots[hash]->Fill(phi, value);
76  } else {
77  UInt_t hash = TString("geo_phi_r-1").Hash();
78  theStdPlots[hash]->Fill(phi, value);
79  }
80  }
81  }
82  }
83  }
84  }
85  }
86  }
87 }

References dqm::implementation::IBooker::book2D(), detailPlot_, MillePedeFileConverter_cfg::e, edm::EventSetup::get(), get, cond::hash, triggerObjects_cff::id, LogDebug, Skims_PA_cff::name, me0TriggerPseudoDigis_cff::nStrips, phi, HLT_2018_cff::region, GEMGeometry::regions(), relativeConstraints::ring, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), relativeConstraints::station, digitizers_cfi::strip, theStdPlots, overlapproblemtsosanalyzer_cfi::title, and ecaldqm::topology().

Member Data Documentation

◆ detailPlot_

bool GEMCheckGeometry::detailPlot_
private

Definition at line 27 of file GEMCheckGeometry.h.

Referenced by bookHistograms(), and GEMCheckGeometry().

◆ GE11PhiBegin_

double GEMCheckGeometry::GE11PhiBegin_
private

Definition at line 23 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

◆ GE11PhiStep_

double GEMCheckGeometry::GE11PhiStep_
private

Definition at line 24 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

◆ maxPhi_

double GEMCheckGeometry::maxPhi_
private

Definition at line 26 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

◆ minPhi_

double GEMCheckGeometry::minPhi_
private

Definition at line 25 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

◆ the_st_dphi

std::map<UInt_t, MonitorElement*> GEMCheckGeometry::the_st_dphi
private

Definition at line 22 of file GEMCheckGeometry.h.

◆ theStdPlots

std::map<UInt_t, MonitorElement*> GEMCheckGeometry::theStdPlots
private

Definition at line 21 of file GEMCheckGeometry.h.

Referenced by bookHistograms().

GEMCheckGeometry::GE11PhiStep_
double GE11PhiStep_
Definition: GEMCheckGeometry.h:24
cond::hash
Definition: Time.h:19
relativeConstraints.station
station
Definition: relativeConstraints.py:67
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
GEMCheckGeometry::GE11PhiBegin_
double GE11PhiBegin_
Definition: GEMCheckGeometry.h:23
ecaldqm::topology
const CaloTopology * topology(nullptr)
edm::ESHandle< GEMGeometry >
Point3DBase< float, LocalTag >
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::LogError
Definition: MessageLogger.h:183
GEMCheckGeometry::theStdPlots
std::map< UInt_t, MonitorElement * > theStdPlots
Definition: GEMCheckGeometry.h:21
GEMCheckGeometry::maxPhi_
double maxPhi_
Definition: GEMCheckGeometry.h:26
GEMDetId
Definition: GEMDetId.h:17
GEMCheckGeometry::minPhi_
double minPhi_
Definition: GEMCheckGeometry.h:25
value
Definition: value.py:1
GEMGeometry::regions
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:30
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
get
#define get
me0TriggerPseudoDigis_cff.nStrips
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
Definition: me0TriggerPseudoDigis_cff.py:26
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::eventsetup::NoProxyException
Definition: NoProxyException.h:31
GEMGeometry
Definition: GEMGeometry.h:24
GEMCheckGeometry::detailPlot_
bool detailPlot_
Definition: GEMCheckGeometry.h:27
StripTopology
Definition: StripTopology.h:11
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37