CMS 3D CMS Logo

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

#include <GEMRecHitsValidation.h>

Inheritance diagram for GEMRecHitsValidation:
GEMBaseValidation DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &) override
 
MonitorElementBookHist1D (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num, const unsigned int Nbin, const Float_t xMin, const Float_t xMax)
 
MonitorElementBookHist1D (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, const unsigned int Nbin, const Float_t xMin, const Float_t xMax)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 GEMRecHitsValidation (const edm::ParameterSet &)
 
 ~GEMRecHitsValidation () override
 
- Public Member Functions inherited from GEMBaseValidation
MonitorElementBookHistXY (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num=99)
 
MonitorElementBookHistZR (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num=99)
 
 GEMBaseValidation (const edm::ParameterSet &ps)
 
MonitorElementgetDCEta (DQMStore::IBooker &, const GEMStation *, TString, TString)
 
MonitorElementgetSimpleZR (DQMStore::IBooker &, TString, TString)
 
std::string getStationLabel (int i)
 
std::string getSuffixName (int region, int station, int layer)
 
std::string getSuffixName (int region, int station)
 
std::string getSuffixName (int region)
 
std::string getSuffixTitle (int region, int station, int layer)
 
std::string getSuffixTitle (int region, int station)
 
std::string getSuffixTitle (int region)
 
const GEMGeometryinitGeometry (const edm::EventSetup &)
 
unsigned int nPart ()
 
unsigned int nRegion ()
 
unsigned int nStation ()
 
unsigned int nStationForLabel ()
 
void setNStationForLabel (unsigned int number)
 
 ~GEMBaseValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

bool detailPlot_
 
MonitorElementgem_cls [2][3][2]
 
MonitorElementgem_cls_tot
 
MonitorElementgem_pullX [2][3][2]
 
MonitorElementgem_pullY [2][3][2]
 
MonitorElementgem_region_pullX [2]
 
MonitorElementgem_region_pullY [2]
 
MonitorElementgem_rh_xy [2][3][2]
 
MonitorElementgem_rh_zr [2][3][2]
 
edm::EDGetToken InputTagToken_
 
edm::EDGetToken InputTagToken_RH
 
int nBinXY_
 
std::unordered_map< UInt_t, MonitorElement * > recHits_dcEta
 
std::unordered_map< UInt_t, MonitorElement * > recHits_simple_zr
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
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)
 
- Protected Attributes inherited from GEMBaseValidation
int nBinXY_
 
std::vector< double > nBinZR_
 
std::vector< double > RangeZR_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 9 of file GEMRecHitsValidation.h.

Constructor & Destructor Documentation

GEMRecHitsValidation::GEMRecHitsValidation ( const edm::ParameterSet cfg)
explicit

Definition at line 9 of file GEMRecHitsValidation.cc.

References detailPlot_, edm::ParameterSet::getParameter(), InputTagToken_, and InputTagToken_RH.

9  : GEMBaseValidation(cfg)
10 {
11  InputTagToken_ = consumes<edm::PSimHitContainer>(cfg.getParameter<edm::InputTag>("simInputLabel"));
12  InputTagToken_RH = consumes<GEMRecHitCollection>(cfg.getParameter<edm::InputTag>("recHitsInputLabel"));
13  detailPlot_ = cfg.getParameter<bool>("detailPlot");
14 }
T getParameter(std::string const &) const
edm::EDGetToken InputTagToken_
GEMBaseValidation(const edm::ParameterSet &ps)
edm::EDGetToken InputTagToken_RH
GEMRecHitsValidation::~GEMRecHitsValidation ( )
override

Definition at line 93 of file GEMRecHitsValidation.cc.

93  {
94 }

Member Function Documentation

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

Implements GEMBaseValidation.

Definition at line 96 of file GEMRecHitsValidation.cc.

References funct::abs(), relativeConstraints::chamber, gather_cfg::cout, detailPlot_, GEMGeometry::etaPartition(), MonitorElement::Fill(), spr::find(), gem_cls, gem_cls_tot, gem_pullX, gem_pullY, gem_region_pullX, gem_region_pullY, gem_rh_xy, gem_rh_zr, gemRecHits_cfi::gemRecHits, edm::Event::getByToken(), hfClusterShapes_cfi::hits, mps_fire::i, triggerObjects_cff::id, GEMGeometry::idToDet(), GEMBaseValidation::initGeometry(), InputTagToken_, InputTagToken_RH, edm::HandleBase::isValid(), LogDebug, objects.autophobj::particleType, PV3DBase< T, PVType, FrameType >::perp(), rpcPointValidation_cfi::recHit, recHits_dcEta, recHits_simple_zr, reco::return(), relativeConstraints::station, digitizers_cfi::strip, GeomDet::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

98 {
99  const GEMGeometry* GEMGeometry_ = initGeometry(iSetup);
100  if ( GEMGeometry_ == nullptr) return;
101 
104  e.getByToken( this->InputTagToken_, gemSimHits);
105  e.getByToken( this->InputTagToken_RH,gemRecHits);
106  if (!gemRecHits.isValid()) {
107  edm::LogError("GEMRecHitsValidation") << "Cannot get strips by Token RecHits Token.\n";
108  return ;
109  }
110 
111  for (edm::PSimHitContainer::const_iterator hits = gemSimHits->begin(); hits!=gemSimHits->end(); ++hits) {
112 
113  const GEMDetId id(hits->detUnitId());
114 
115  Int_t sh_region = id.region();
116  //Int_t sh_ring = id.ring();
117  Int_t sh_roll = id.roll();
118  Int_t sh_station = id.station();
119  Int_t sh_layer = id.layer();
120  Int_t sh_chamber = id.chamber();
121 
122  if ( GEMGeometry_->idToDet(hits->detUnitId()) == nullptr) {
123  std::cout<<"simHit did not matched with GEMGeometry."<<std::endl;
124  continue;
125  }
126 
127  if (!(abs(hits-> particleType()) == 13)) continue;
128 
129  //const LocalPoint p0(0., 0., 0.);
130  //const GlobalPoint Gp0(GEMGeometry_->idToDet(hits->detUnitId())->surface().toGlobal(p0));
131  const LocalPoint hitLP(hits->localPosition());
132 
133  const LocalPoint hitEP(hits->entryPoint());
134  Int_t sh_strip = GEMGeometry_->etaPartition(hits->detUnitId())->strip(hitEP);
135 
136  //const GlobalPoint hitGP(GEMGeometry_->idToDet(hits->detUnitId())->surface().toGlobal(hitLP));
137  //Float_t sh_l_r = hitLP.perp();
138  Float_t sh_l_x = hitLP.x();
139  Float_t sh_l_y = hitLP.y();
140  //Float_t sh_l_z = hitLP.z();
141 
142 
143  for (GEMRecHitCollection::const_iterator recHit = gemRecHits->begin(); recHit != gemRecHits->end(); ++recHit){
144  Float_t rh_l_x = recHit->localPosition().x();
145  Float_t rh_l_xErr = recHit->localPositionError().xx();
146  Float_t rh_l_y = recHit->localPosition().y();
147  Float_t rh_l_yErr = recHit->localPositionError().yy();
148  //Int_t detId = (Short_t) (*recHit).gemId();
149  //Int_t bx = recHit->BunchX();
150  Int_t clusterSize = recHit->clusterSize();
151  Int_t firstClusterStrip = recHit->firstClusterStrip();
152 
153  GEMDetId id((*recHit).gemId());
154 
155  Short_t rh_region = (Short_t) id.region();
156  //Int_t rh_ring = (Short_t) id.ring();
157  Short_t rh_station = (Short_t) id.station();
158  Short_t rh_layer = (Short_t) id.layer();
159  Short_t rh_chamber = (Short_t) id.chamber();
160  Short_t rh_roll = (Short_t) id.roll();
161 
162  LocalPoint recHitLP = recHit->localPosition();
163  if ( GEMGeometry_->idToDet((*recHit).gemId()) == nullptr) {
164  std::cout<<"This gem recHit did not matched with GEMGeometry."<<std::endl;
165  continue;
166  }
167  GlobalPoint recHitGP = GEMGeometry_->idToDet((*recHit).gemId())->surface().toGlobal(recHitLP);
168 
169  Float_t rh_g_R = recHitGP.perp();
170  //Float_t rh_g_Eta = recHitGP.eta();
171  //Float_t rh_g_Phi = recHitGP.phi();
172  Float_t rh_g_X = recHitGP.x();
173  Float_t rh_g_Y = recHitGP.y();
174  Float_t rh_g_Z = recHitGP.z();
175  Float_t rh_pullX = (Float_t)(rh_l_x - sh_l_x)/(rh_l_xErr);
176  Float_t rh_pullY = (Float_t)(rh_l_y - sh_l_y)/(rh_l_yErr);
177 
178  std::vector<int> stripsFired;
179  for(int i = firstClusterStrip; i < (firstClusterStrip + clusterSize); i++){
180  stripsFired.push_back(i);
181  }
182 
183  const bool cond1( sh_region == rh_region and sh_layer == rh_layer and sh_station == rh_station);
184  const bool cond2(sh_chamber == rh_chamber and sh_roll == rh_roll);
185  const bool cond3(std::find(stripsFired.begin(), stripsFired.end(), (sh_strip + 1)) != stripsFired.end());
186 
187  if(cond1 and cond2 and cond3){
188  LogDebug("GEMRecHitsValidation")<< " Region : " << rh_region << "\t Station : " << rh_station
189  << "\t Layer : "<< rh_layer << "\n Radius: " << rh_g_R << "\t X : " << rh_g_X << "\t Y : "<< rh_g_Y << "\t Z : " << rh_g_Z << std::endl;
190 
191  int region_num=0 ;
192  if ( rh_region ==-1 ) region_num = 0 ;
193  else if ( rh_region==1) region_num = 1;
194  int layer_num = rh_layer-1;
195  int binX = (rh_chamber-1)*2+layer_num;
196  int binY = rh_roll;
197  int station_num = rh_station -1;
198 
199  // Fill normal plots.
200  TString histname_suffix = TString::Format("_r%d",rh_region);
201  TString simple_zr_histname = TString::Format("rh_simple_zr%s",histname_suffix.Data());
202  LogDebug("GEMRecHitsValidation")<< " simpleZR!\n";
203  recHits_simple_zr[simple_zr_histname.Hash()]->Fill( fabs(rh_g_Z), rh_g_R);
204 
205 
206  histname_suffix = TString::Format("_r%d_st%d",rh_region, rh_station);
207  TString dcEta_histname = TString::Format("rh_dcEta%s",histname_suffix.Data());
208  LogDebug("GEMRecHitsValidation")<< " dcEta\n";
209  recHits_dcEta[dcEta_histname.Hash()]->Fill( binX, binY);
210 
211  gem_cls_tot->Fill(clusterSize);
212  gem_region_pullX[region_num]->Fill(rh_pullX);
213  gem_region_pullY[region_num]->Fill(rh_pullY);
214  LogDebug("GEMRecHitsValidation")<< " Begin detailPlot!\n";
215 
216  if(detailPlot_){
217  gem_cls[region_num][station_num][layer_num]->Fill(clusterSize);
218  gem_pullX[region_num][station_num][layer_num]->Fill(rh_pullX);
219  gem_pullY[region_num][station_num][layer_num]->Fill(rh_pullY);
220  gem_rh_zr[region_num][station_num][layer_num]->Fill(rh_g_Z ,rh_g_R);
221  gem_rh_xy[region_num][station_num][layer_num]->Fill(rh_g_X ,rh_g_Y);
222  }
223  }
224  } //End loop on RecHits
225  } //End loop on SimHits
226 
227 }
#define LogDebug(id)
MonitorElement * gem_pullX[2][3][2]
T perp() const
Definition: PV3DBase.h:72
std::unordered_map< UInt_t, MonitorElement * > recHits_dcEta
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
std::unordered_map< UInt_t, MonitorElement * > recHits_simple_zr
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
T y() const
Definition: PV3DBase.h:63
MonitorElement * gem_region_pullY[2]
MonitorElement * gem_rh_xy[2][3][2]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
MonitorElement * gem_rh_zr[2][3][2]
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:99
const GEMGeometry * initGeometry(const edm::EventSetup &)
MonitorElement * gem_cls[2][3][2]
void Fill(long long x)
MonitorElement * gem_cls_tot
edm::EDGetToken InputTagToken_
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:74
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:38
return(e1-e2)*(e1-e2)+dp *dp
MonitorElement * gem_pullY[2][3][2]
MonitorElement * gem_region_pullX[2]
T x() const
Definition: PV3DBase.h:62
edm::EDGetToken InputTagToken_RH
MonitorElement * GEMRecHitsValidation::BookHist1D ( DQMStore::IBooker ibooker,
const char *  name,
const char *  label,
unsigned int  region_num,
unsigned int  station_num,
unsigned int  layer_num,
const unsigned int  Nbin,
const Float_t  xMin,
const Float_t  xMax 
)

Definition at line 16 of file GEMRecHitsValidation.cc.

References DQMStore::IBooker::book1D(), GEMBaseValidation::getSuffixName(), GEMBaseValidation::getSuffixTitle(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by bookHistograms().

16  {
17  string hist_name = name+getSuffixName( region_num, station_num+1, layer_num+1);
18  string hist_label = label+string(" : ")+getSuffixTitle( region_num, station_num+1, layer_num+1);
19  return ibooker.book1D( hist_name, hist_label,Nbin,xMin,xMax );
20 }
std::string getSuffixTitle(int region, int station, int layer)
std::string getSuffixName(int region, int station, int layer)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * GEMRecHitsValidation::BookHist1D ( DQMStore::IBooker ibooker,
const char *  name,
const char *  label,
unsigned int  region_num,
const unsigned int  Nbin,
const Float_t  xMin,
const Float_t  xMax 
)

Definition at line 22 of file GEMRecHitsValidation.cc.

References DQMStore::IBooker::book1D(), GEMBaseValidation::getSuffixName(), and AlCaHLTBitMon_QueryRunRegistry::string.

22  {
23  string hist_name = name+getSuffixName( region_num);
24  string hist_label = label+string(" : ")+getSuffixName( region_num ) ;
25  return ibooker.book1D( hist_name, hist_label,Nbin,xMin,xMax );
26 }
std::string getSuffixName(int region, int station, int layer)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void GEMRecHitsValidation::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  Run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 28 of file GEMRecHitsValidation.cc.

References DQMStore::IBooker::book1D(), BookHist1D(), GEMBaseValidation::BookHistXY(), GEMBaseValidation::BookHistZR(), detailPlot_, gem_cls, gem_cls_tot, gem_pullX, gem_pullY, gem_region_pullX, gem_region_pullY, gem_rh_xy, gem_rh_zr, GEMBaseValidation::getDCEta(), GEMBaseValidation::getSimpleZR(), GEMBaseValidation::getSuffixName(), GEMBaseValidation::getSuffixTitle(), training_settings::idx, GEMBaseValidation::initGeometry(), diffTwoXMLs::label, LogDebug, GEMBaseValidation::nRegion(), GEMBaseValidation::nStation(), recHits_dcEta, recHits_simple_zr, GEMGeometry::regions(), reco::return(), DQMStore::IBooker::setCurrentFolder(), and relativeConstraints::station.

28  {
29  const GEMGeometry* GEMGeometry_ = initGeometry(iSetup);
30  if ( GEMGeometry_ == nullptr) return ;
31 
32  LogDebug("GEMRecHitsValidation")<<"Geometry is acquired from MuonGeometryRecord\n";
33  ibooker.setCurrentFolder("MuonGEMRecHitsV/GEMRecHitsTask");
34  LogDebug("GEMRecHitsValidation")<<"ibooker set current folder\n";
35 
36 
37  gem_cls_tot = ibooker.book1D("gem_cls_tot","ClusterSize Distribution",11,-0.5,10.5);
38  for( auto& region : GEMGeometry_->regions() ){
39  int re = region->region();
40  TString title_suffix = getSuffixTitle( re) ;
41  TString histname_suffix = getSuffixName( re);
42  TString simpleZR_title = TString::Format("ZR Occupancy%s; |Z|(cm) ; R(cm)",title_suffix.Data());
43  TString simpleZR_histname = TString::Format("rh_simple_zr%s",histname_suffix.Data());
44  auto* simpleZR = getSimpleZR(ibooker, simpleZR_title, simpleZR_histname);
45  if( simpleZR != nullptr) {
46  recHits_simple_zr[simpleZR_histname.Hash() ] = simpleZR;
47  }
48 
49  for( auto& station : region->stations()) {
50  int station_num = station->station();
51  TString title_suffix2 = title_suffix + TString::Format(" Station%d", station_num);
52  TString histname_suffix2 = histname_suffix + TString::Format("_st%d", station_num);
53 
54  TString dcEta_title = TString::Format("Occupancy for detector component %s;;#eta-partition",title_suffix2.Data());
55  TString dcEta_histname = TString::Format("rh_dcEta%s",histname_suffix2.Data());
56  auto* dcEta = getDCEta( ibooker, station, dcEta_title, dcEta_histname);
57  if ( dcEta != nullptr) {
58  recHits_dcEta[ dcEta_histname.Hash() ] = dcEta;
59  }
60  int idx = 0 ;
61  for(unsigned int sCh = 1 ; sCh <= station->superChambers().size() ; sCh++ ) {
62  for( unsigned int Ch =1 ; Ch<=2 ; Ch++) {
63  idx++;
64  TString label = TString::Format("ch%d_la%d",sCh, Ch);
65  recHits_dcEta[ dcEta_histname.Hash() ]->setBinLabel(idx, label.Data());
66  }
67  }
68  }
69  }
70 
71  for( unsigned int region_num = 0 ; region_num <nRegion() ; region_num++ ) {
72  gem_region_pullX[region_num] = BookHist1D(ibooker,"pullX","Pull Of X",region_num,100,-50,50);
73  gem_region_pullY[region_num] = BookHist1D(ibooker,"pullY","Pull Of Y",region_num,100,-50,50);
74  }
75 
76  if(detailPlot_){
77  for( unsigned int region_num = 0 ; region_num <nRegion() ; region_num++ ) {
78  for( int layer_num = 0 ; layer_num < 2 ; layer_num++) {
79  for( unsigned int station_num = 0 ; station_num < nStation() ; station_num++) {
80  gem_cls[region_num][station_num][layer_num] = BookHist1D(ibooker,"cls","ClusterSize Distribution",region_num,station_num,layer_num,11,-0.5,10.5);
81  gem_pullX[region_num][station_num][layer_num] = BookHist1D(ibooker,"pullX","Pull Of X",region_num,station_num,layer_num,100,-50,50);
82  gem_pullY[region_num][station_num][layer_num] = BookHist1D(ibooker,"pullY","Pull Of Y",region_num,station_num,layer_num,100,-50,50);
83  gem_rh_zr[region_num][station_num][layer_num] = BookHistZR(ibooker,"rh","RecHits",region_num,station_num,layer_num);
84  gem_rh_xy[region_num][station_num][layer_num] = BookHistXY(ibooker,"rh","RecHits",region_num,station_num,layer_num);
85  }
86  }
87  }
88  }
89  LogDebug("GEMRecHitsValidation")<<"Booking End.\n";
90 }
#define LogDebug(id)
unsigned int nRegion()
MonitorElement * gem_pullX[2][3][2]
unsigned int nStation()
std::unordered_map< UInt_t, MonitorElement * > recHits_dcEta
MonitorElement * BookHistZR(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num=99)
std::unordered_map< UInt_t, MonitorElement * > recHits_simple_zr
MonitorElement * gem_region_pullY[2]
MonitorElement * getSimpleZR(DQMStore::IBooker &, TString, TString)
MonitorElement * BookHistXY(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num=99)
MonitorElement * gem_rh_xy[2][3][2]
std::string getSuffixTitle(int region, int station, int layer)
MonitorElement * gem_rh_zr[2][3][2]
const GEMGeometry * initGeometry(const edm::EventSetup &)
MonitorElement * gem_cls[2][3][2]
std::string getSuffixName(int region, int station, int layer)
MonitorElement * gem_cls_tot
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:43
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * BookHist1D(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int station_num, unsigned int layer_num, const unsigned int Nbin, const Float_t xMin, const Float_t xMax)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * getDCEta(DQMStore::IBooker &, const GEMStation *, TString, TString)
return(e1-e2)*(e1-e2)+dp *dp
MonitorElement * gem_pullY[2][3][2]
MonitorElement * gem_region_pullX[2]

Member Data Documentation

bool GEMRecHitsValidation::detailPlot_
private

Definition at line 38 of file GEMRecHitsValidation.h.

Referenced by analyze(), bookHistograms(), and GEMRecHitsValidation().

MonitorElement* GEMRecHitsValidation::gem_cls[2][3][2]
private

Definition at line 24 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_cls_tot
private

Definition at line 30 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_pullX[2][3][2]
private

Definition at line 25 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_pullY[2][3][2]
private

Definition at line 26 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_region_pullX[2]
private

Definition at line 33 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_region_pullY[2]
private

Definition at line 34 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_rh_xy[2][3][2]
private

Definition at line 22 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* GEMRecHitsValidation::gem_rh_zr[2][3][2]
private

Definition at line 23 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetToken GEMRecHitsValidation::InputTagToken_
private

Definition at line 36 of file GEMRecHitsValidation.h.

Referenced by analyze(), and GEMRecHitsValidation().

edm::EDGetToken GEMRecHitsValidation::InputTagToken_RH
private

Definition at line 36 of file GEMRecHitsValidation.h.

Referenced by analyze(), and GEMRecHitsValidation().

int GEMRecHitsValidation::nBinXY_
private

Definition at line 37 of file GEMRecHitsValidation.h.

std::unordered_map< UInt_t , MonitorElement* > GEMRecHitsValidation::recHits_dcEta
private

Definition at line 31 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().

std::unordered_map< UInt_t , MonitorElement* > GEMRecHitsValidation::recHits_simple_zr
private

Definition at line 32 of file GEMRecHitsValidation.h.

Referenced by analyze(), and bookHistograms().