CMS 3D CMS Logo

GEMCheckGeometry.cc
Go to the documentation of this file.
6 
7 #include <iomanip>
8 
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 }
17 
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);
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 }
82 
84 
GEMCheckGeometry::GE11PhiStep_
double GE11PhiStep_
Definition: GEMCheckGeometry.h:26
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
Handle.h
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
GEMCheckGeometry.h
edm::Run
Definition: Run.h:45
cond::hash
Definition: Time.h:19
relativeConstraints.station
station
Definition: relativeConstraints.py:67
StripTopology::localPosition
virtual LocalPoint localPosition(float strip) const =0
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
GEMCheckGeometry::GE11PhiBegin_
double GE11PhiBegin_
Definition: GEMCheckGeometry.h:25
GEMCheckGeometry::geomToken_
edm::ESGetToken< GEMGeometry, MuonGeometryRecord > geomToken_
Definition: GEMCheckGeometry.h:30
Point3DBase< float, LocalTag >
GEMCheckGeometry::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: GEMCheckGeometry.cc:18
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
GEMEtaPartitionSpecs.h
edm::ParameterSet
Definition: ParameterSet.h:47
GEMCheckGeometry::theStdPlots
std::map< UInt_t, MonitorElement * > theStdPlots
Definition: GEMCheckGeometry.h:23
GEMCheckGeometry::maxPhi_
double maxPhi_
Definition: GEMCheckGeometry.h:28
GEMDetId
Definition: GEMDetId.h:18
GEMCheckGeometry::minPhi_
double minPhi_
Definition: GEMCheckGeometry.h:27
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88267
GEMCheckGeometry::GEMCheckGeometry
GEMCheckGeometry(const edm::ParameterSet &gc)
Definition: GEMCheckGeometry.cc:9
GEMCheckGeometry::analyze
void analyze(const edm::Event &e, const edm::EventSetup &) override
Definition: GEMCheckGeometry.cc:85
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:58
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
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
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
GEMCheckGeometry::~GEMCheckGeometry
~GEMCheckGeometry() override
Definition: GEMCheckGeometry.cc:83
DDAxes::phi
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
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
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
GEMGeometry
Definition: GEMGeometry.h:24
GEMCheckGeometry::detailPlot_
bool detailPlot_
Definition: GEMCheckGeometry.h:29
edm::Event
Definition: Event.h:73
StripTopology
Definition: StripTopology.h:11
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
Run