CMS 3D CMS Logo

GEMCheckGeometry.cc
Go to the documentation of this file.
9 
10 #include <iomanip>
11 
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 }
19 
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 }
88 
90 
GEMCheckGeometry::GE11PhiStep_
double GE11PhiStep_
Definition: GEMCheckGeometry.h:24
Handle.h
GEMCheckGeometry.h
ESHandle.h
edm::Run
Definition: Run.h:45
cond::hash
Definition: Time.h:19
relativeConstraints.station
station
Definition: relativeConstraints.py:67
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
StripTopology.h
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
GEMCheckGeometry::GE11PhiBegin_
double GE11PhiBegin_
Definition: GEMCheckGeometry.h:23
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
ecaldqm::topology
const CaloTopology * topology(nullptr)
edm::ESHandle< GEMGeometry >
Point3DBase< float, LocalTag >
GEMCheckGeometry::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: GEMCheckGeometry.cc:20
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
GEMEtaPartitionSpecs.h
edm::ParameterSet
Definition: ParameterSet.h:36
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
GEMCheckGeometry::GEMCheckGeometry
GEMCheckGeometry(const edm::ParameterSet &gc)
Definition: GEMCheckGeometry.cc:12
GEMCheckGeometry::analyze
void analyze(const edm::Event &e, const edm::EventSetup &) override
Definition: GEMCheckGeometry.cc:91
value
Definition: value.py:1
dqm::impl::MonitorElement::setBinLabel
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)
Definition: MonitorElement.cc:771
GEMGeometry::regions
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:30
edm::EventSetup
Definition: EventSetup.h:57
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
get
#define get
InputTag.h
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
GEMCheckGeometry::~GEMCheckGeometry
~GEMCheckGeometry() override
Definition: GEMCheckGeometry.cc:89
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
GEMGeometry.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
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
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
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::eventsetup::NoProxyException
Definition: NoProxyException.h:31
GEMGeometry
Definition: GEMGeometry.h:24
GEMCheckGeometry::detailPlot_
bool detailPlot_
Definition: GEMCheckGeometry.h:27
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
StripTopology
Definition: StripTopology.h:11
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
Run