CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 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
 

Private Attributes

bool detailPlot_
 
double GE11PhiBegin_
 
double GE11PhiStep_
 
edm::ESGetToken< GEMGeometry,
MuonGeometryRecord
geomToken_
 
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 >
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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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 15 of file GEMCheckGeometry.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file GEMCheckGeometry.cc.

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

9  {
10  GE11PhiBegin_ = gc.getUntrackedParameter<double>("GE11PhiBegin", -5.);
11  GE11PhiStep_ = gc.getUntrackedParameter<double>("GE11PhiStep", 10);
12  minPhi_ = gc.getUntrackedParameter<double>("minPhi", -180.);
13  maxPhi_ = gc.getUntrackedParameter<double>("maxPhi", +180.);
14  detailPlot_ = gc.getParameter<bool>("detailPlot");
15  geomToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
16 }
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMCheckGeometry::~GEMCheckGeometry ( )
override

Definition at line 83 of file GEMCheckGeometry.cc.

83 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 85 of file GEMCheckGeometry.cc.

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

Implements DQMEDAnalyzer.

Definition at line 18 of file GEMCheckGeometry.cc.

References dqm::implementation::IBooker::book2D(), detailPlot_, geomToken_, edm::EventSetup::getData(), cond::hash, gpuClustering::id, StripTopology::localPosition(), LogDebug, mergeVDriftHistosByStation::name, me0TriggerPseudoDigis_cff::nStrips, phi, HLT_FULL_cff::region, GEMGeometry::regions(), relativeConstraints::ring, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), relativeConstraints::station, digitizers_cfi::strip, theStdPlots, runGCPTkAlMap::title, and relativeConstraints::value.

18  {
19  if (!detailPlot_)
20  return;
21 
22  const GEMGeometry *GEMGeometry_ = &iSetup.getData(geomToken_);
23  if (!GEMGeometry_) {
24  edm::LogError("MuonGEMGeometry") << "+++ Error : GEM geometry is unavailable on event loop. +++\n";
25  return;
26  }
27 
28  ibooker.setCurrentFolder("MuonGEMDigisV/GEMDigisTask");
29  LogDebug("GEMCheckGeometry") << "ibooker set current folder\n";
30 
31  for (auto region : GEMGeometry_->regions()) {
32  TString title = TString::Format("Geometry's phi distribution on Region %d ; #phi(degree); ;", region->region());
33  TString name = TString::Format("geo_phi_r%d", region->region());
34  auto temp_me = ibooker.book2D(name.Data(), title.Data(), 360000, -180., 180, 12, 1, 13);
35  temp_me->setBinLabel(1, "St1,La1_even", 2);
36  temp_me->setBinLabel(2, "St1,La1_odd", 2);
37  temp_me->setBinLabel(3, "St1,La2_even", 2);
38  temp_me->setBinLabel(4, "St1,La2_odd", 2);
39  temp_me->setBinLabel(5, "St2,La1_even", 2);
40  temp_me->setBinLabel(6, "St2,La1_odd", 2);
41  temp_me->setBinLabel(7, "St2,La2_even", 2);
42  temp_me->setBinLabel(8, "St2,La2_odd", 2);
43  theStdPlots.insert(std::map<UInt_t, MonitorElement *>::value_type(name.Hash(), temp_me));
44  }
45 
46  for (auto region : GEMGeometry_->regions()) {
47  for (auto station : region->stations()) {
48  for (auto ring : station->rings()) {
49  for (auto sch : ring->superChambers()) {
50  for (auto ch : sch->chambers()) {
51  for (auto roll : ch->etaPartitions()) {
52  const StripTopology *topology(&(roll->specificTopology()));
53  auto parameters(roll->specs()->parameters());
54  float nStrips(parameters[3]);
55  for (int strip = 0; strip <= nStrips; strip++) {
56  LocalPoint lEdge(topology->localPosition(strip));
57 
58  double phi = roll->toGlobal(lEdge).phi().degrees();
59 
60  GEMDetId id(roll->id());
61  int region_idx = id.region();
62  int station_idx = id.station();
63  int chamber_idx = id.chamber();
64  int layer_idx = id.layer();
65  int value = (station_idx - 1) * 4 + (layer_idx - 1) * 2 + (chamber_idx % 2) + 1;
66 
67  if (region_idx == 1) {
68  UInt_t hash = TString("geo_phi_r1").Hash();
69  theStdPlots[hash]->Fill(phi, value);
70  } else {
71  UInt_t hash = TString("geo_phi_r-1").Hash();
72  theStdPlots[hash]->Fill(phi, value);
73  }
74  }
75  }
76  }
77  }
78  }
79  }
80  }
81 }
std::map< UInt_t, MonitorElement * > theStdPlots
uint16_t *__restrict__ id
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
Log< level::Error, false > LogError
tuple nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:30
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
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
#define LogDebug(id)

Member Data Documentation

bool GEMCheckGeometry::detailPlot_
private

Definition at line 29 of file GEMCheckGeometry.h.

Referenced by bookHistograms(), and GEMCheckGeometry().

double GEMCheckGeometry::GE11PhiBegin_
private

Definition at line 25 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

double GEMCheckGeometry::GE11PhiStep_
private

Definition at line 26 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

edm::ESGetToken<GEMGeometry, MuonGeometryRecord> GEMCheckGeometry::geomToken_
private

Definition at line 30 of file GEMCheckGeometry.h.

Referenced by bookHistograms(), and GEMCheckGeometry().

double GEMCheckGeometry::maxPhi_
private

Definition at line 28 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

double GEMCheckGeometry::minPhi_
private

Definition at line 27 of file GEMCheckGeometry.h.

Referenced by GEMCheckGeometry().

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

Definition at line 24 of file GEMCheckGeometry.h.

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

Definition at line 23 of file GEMCheckGeometry.h.

Referenced by bookHistograms().