CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GEMCheckGeometry Class Reference

#include <GEMCheckGeometry.h>

Inheritance diagram for GEMCheckGeometry:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual 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 ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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

Definition at line 102 of file GEMCheckGeometry.cc.

102  {
103 
104 
105 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 107 of file GEMCheckGeometry.cc.

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

Implements DQMEDAnalyzer.

Definition at line 23 of file GEMCheckGeometry.cc.

References DQMStore::IBooker::book2D(), detailPlot_, alignCSCRings::e, edm::EventSetup::get(), cond::hash, StripTopology::localPosition(), mergeVDriftHistosByStation::name, HLT_25ns10e33_v2_cff::parameters, phi, GEMDetId::region(), HLT_25ns10e33_v2_cff::region, GEMGeometry::regions(), reco::return(), relativeConstraints::ring, MonitorElement::setBinLabel(), relativeConstraints::station, theStdPlots, indexGen::title, ecaldqm::topology(), and relativeConstraints::value.

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  for( auto region : GEMGeometry_->regions()) {
39  TString title = TString::Format("Geometry's phi distribution on Region %d ; #phi(degree); ;",region->region());
40  TString name = TString::Format("geo_phi_r%d",region->region());
41  auto temp_me = ibooker.book2D(name.Data(), title.Data(), 360000, -180., 180, 12,1,13);
42  temp_me->setBinLabel(1,"St1,La1_even",2);
43  temp_me->setBinLabel(2,"St1,La1_odd",2);
44  temp_me->setBinLabel(3,"St1,La2_even",2);
45  temp_me->setBinLabel(4,"St1,La2_odd",2);
46  temp_me->setBinLabel(5,"St2,La1_even",2);
47  temp_me->setBinLabel(6,"St2,La1_odd",2);
48  temp_me->setBinLabel(7,"St2,La2_even",2);
49  temp_me->setBinLabel(8,"St2,La2_odd",2);
50  temp_me->setBinLabel(9,"St3,La1_even",2);
51  temp_me->setBinLabel(10,"St3,La1_odd",2);
52  temp_me->setBinLabel(11,"St3,La2_even",2);
53  temp_me->setBinLabel(12,"St3,La2_odd",2);
54  theStdPlots.insert( std::map< UInt_t, MonitorElement*>::value_type(name.Hash(), temp_me ));
55  }
56 
57 
58  for( auto region : GEMGeometry_->regions())
59  for (auto station : region->stations())
60  for ( auto ring : station->rings())
61  for ( auto sch : ring->superChambers())
62  for ( auto ch : sch->chambers())
63  for ( auto roll : ch->etaPartitions()) {
64  const StripTopology* topology(&(roll->specificTopology()));
65  auto parameters(roll->specs()->parameters());
66  float nStrips(parameters[3]);
67  for( int strip = 0 ; strip <=nStrips ; strip++) {
68  LocalPoint lEdge(topology->localPosition(strip));
69  //double x = roll->toGlobal(lEdge).x();
70 
71 
72 
73  //double y = roll->toGlobal(lEdge).y();
74  //double z = roll->toGlobal(lEdge).z();
75  //double eta = roll->toGlobal(lEdge).eta();
76  double phi = roll->toGlobal(lEdge).phi().degrees();
77 
78  GEMDetId id( roll->id()) ;
79  int region_idx = id.region();
80  int station_idx = id.station();
81  int chamber_idx = id.chamber();
82  int layer_idx = id.layer();
83  //int roll_idx = id.roll();
84  int value = (station_idx-1)*4+(layer_idx-1)*2+(chamber_idx%2)+1;
85 
86  if ( region_idx ==1 ) {
87  UInt_t hash = TString("geo_phi_r1").Hash();
88  theStdPlots[hash] ->Fill( phi, value);
89  }
90  else {
91  UInt_t hash = TString("geo_phi_r-1").Hash();
92  theStdPlots[hash] ->Fill( phi, value);
93  }
94 
95  }
96  }
97 
98 
99 }
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)
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:43
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: GEMDetId.h:53
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
return(e1-e2)*(e1-e2)+dp *dp

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