CMS 3D CMS Logo

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

#include <GEMCheckGeometry.h>

Inheritance diagram for GEMCheckGeometry:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

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 one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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
 

Detailed Description

Definition at line 13 of file GEMCheckGeometry.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file GEMCheckGeometry.cc.

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

13 {
14 
15  GE11PhiBegin_ = gc.getUntrackedParameter< double >("GE11PhiBegin",-5.) ;
16  GE11PhiStep_ = gc.getUntrackedParameter< double >("GE11PhiStep",10) ;
17  minPhi_ = gc.getUntrackedParameter< double >("minPhi",-180.);
18  maxPhi_ = gc.getUntrackedParameter< double >("maxPhi",+180.);
19  detailPlot_ = gc.getParameter< bool >("detailPlot");
20 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
GEMCheckGeometry::~GEMCheckGeometry ( )
override

Definition at line 101 of file GEMCheckGeometry.cc.

101  {
102 
103 
104 }

Member Function Documentation

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

Definition at line 106 of file GEMCheckGeometry.cc.

106  {
107 
108 
109 }
void GEMCheckGeometry::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  Run,
edm::EventSetup const &  iSetup 
)
override

Definition at line 23 of file GEMCheckGeometry.cc.

References DQMStore::IBooker::book2D(), detailPlot_, MillePedeFileConverter_cfg::e, edm::EventSetup::get(), cond::hash, triggerObjects_cff::id, StripTopology::localPosition(), LogDebug, dataset::name, phi, GEMGeometry::regions(), mathSSE::return(), relativeConstraints::ring, MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), relativeConstraints::station, digitizers_cfi::strip, theStdPlots, fftjetcommon_cfi::title, and ecaldqm::topology().

23  {
24 
25  if ( !detailPlot_ ) return ;
26  const GEMGeometry* GEMGeometry_;
27 
28  try{
30  iSetup.get<MuonGeometryRecord>().get(hGeom);
31  GEMGeometry_=&*hGeom;
32  }
34  edm::LogError("MuonGEMGeometry") << "+++ Error : GEM geometry is unavailable on event loop. +++\n";
35  return;
36  }
37 
38  ibooker.setCurrentFolder("MuonGEMDigisV/GEMDigisTask");
39  LogDebug("GEMCheckGeometry")<<"ibooker set current folder\n";
40 
41  for( auto region : GEMGeometry_->regions()) {
42  TString title = TString::Format("Geometry's phi distribution on Region %d ; #phi(degree); ;",region->region());
43  TString name = TString::Format("geo_phi_r%d",region->region());
44  auto temp_me = ibooker.book2D(name.Data(), title.Data(), 360000, -180., 180, 12,1,13);
45  temp_me->setBinLabel(1,"St1,La1_even",2);
46  temp_me->setBinLabel(2,"St1,La1_odd",2);
47  temp_me->setBinLabel(3,"St1,La2_even",2);
48  temp_me->setBinLabel(4,"St1,La2_odd",2);
49  temp_me->setBinLabel(5,"St2,La1_even",2);
50  temp_me->setBinLabel(6,"St2,La1_odd",2);
51  temp_me->setBinLabel(7,"St2,La2_even",2);
52  temp_me->setBinLabel(8,"St2,La2_odd",2);
53  theStdPlots.insert( std::map< UInt_t, MonitorElement*>::value_type(name.Hash(), temp_me ));
54  }
55 
56 
57  for( auto region : GEMGeometry_->regions())
58  for (auto station : region->stations())
59  for ( auto ring : station->rings())
60  for ( auto sch : ring->superChambers())
61  for ( auto ch : sch->chambers())
62  for ( auto roll : ch->etaPartitions()) {
63  const StripTopology* topology(&(roll->specificTopology()));
64  auto parameters(roll->specs()->parameters());
65  float nStrips(parameters[3]);
66  for( int strip = 0 ; strip <=nStrips ; strip++) {
67  LocalPoint lEdge(topology->localPosition(strip));
68  //double x = roll->toGlobal(lEdge).x();
69 
70 
71 
72  //double y = roll->toGlobal(lEdge).y();
73  //double z = roll->toGlobal(lEdge).z();
74  //double eta = roll->toGlobal(lEdge).eta();
75  double phi = roll->toGlobal(lEdge).phi().degrees();
76 
77  GEMDetId id( roll->id()) ;
78  int region_idx = id.region();
79  int station_idx = id.station();
80  int chamber_idx = id.chamber();
81  int layer_idx = id.layer();
82  //int roll_idx = id.roll();
83  int value = (station_idx-1)*4+(layer_idx-1)*2+(chamber_idx%2)+1;
84 
85  if ( region_idx ==1 ) {
86  UInt_t hash = TString("geo_phi_r1").Hash();
87  theStdPlots[hash] ->Fill( phi, value);
88  }
89  else {
90  UInt_t hash = TString("geo_phi_r-1").Hash();
91  theStdPlots[hash] ->Fill( phi, value);
92  }
93 
94  }
95  }
96 
97 
98 }
#define LogDebug(id)
std::map< UInt_t, MonitorElement * > theStdPlots
CaloTopology const * topology(0)
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)
return((rh^lh)&mask)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:43
Definition: value.py:1
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109

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().

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().