CMS 3D CMS Logo

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

#include <ME0DigisValidation.h>

Inheritance diagram for ME0DigisValidation:
ME0BaseValidation 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
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
bool isMatched (const int, const int, const int, const int, const int, const int)
 
 ME0DigisValidation (const edm::ParameterSet &)
 
 ~ME0DigisValidation () override
 
- Public Member Functions inherited from ME0BaseValidation
MonitorElementBookHistXY (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
 
MonitorElementBookHistZR (DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
 
 ME0BaseValidation (const edm::ParameterSet &ps)
 
 ~ME0BaseValidation () 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

edm::EDGetToken InputTagToken_Digi
 
MonitorElementme0_strip_dg_bkg_rad_tot
 
MonitorElementme0_strip_dg_bkgElePos_rad
 
MonitorElementme0_strip_dg_bkgNeutral_rad
 
MonitorElementme0_strip_dg_den_eta [2][6]
 
MonitorElementme0_strip_dg_den_eta_tot
 
MonitorElementme0_strip_dg_dphi_global_Muon [2][6]
 
MonitorElementme0_strip_dg_dphi_global_tot_Muon
 
MonitorElementme0_strip_dg_dphi_vs_phi_global_tot_Muon
 
MonitorElementme0_strip_dg_dtime_tot_Muon
 
MonitorElementme0_strip_dg_dx_local_Muon [2][6]
 
MonitorElementme0_strip_dg_dx_local_tot_Muon
 
MonitorElementme0_strip_dg_dy_local_Muon [2][6]
 
MonitorElementme0_strip_dg_dy_local_tot_Muon
 
MonitorElementme0_strip_dg_num_eta [2][6]
 
MonitorElementme0_strip_dg_num_eta_tot
 
MonitorElementme0_strip_dg_time_tot
 
MonitorElementme0_strip_dg_x_local_tot
 
MonitorElementme0_strip_dg_xy [2][6]
 
MonitorElementme0_strip_dg_xy_Muon [2][6]
 
MonitorElementme0_strip_dg_y_local_tot
 
MonitorElementme0_strip_dg_zr [2][6]
 
MonitorElementme0_strip_dg_zr_tot [2]
 
MonitorElementme0_strip_dg_zr_tot_Muon [2]
 
MonitorElementme0_strip_exp_bkg_rad_tot
 
MonitorElementme0_strip_exp_bkgElePos_rad
 
MonitorElementme0_strip_exp_bkgNeutral_rad
 
int npart
 
MonitorElementnum_evts
 
double sigma_x_
 
double sigma_y_
 

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 ME0BaseValidation
edm::EDGetToken InputTagToken_
 
std::vector< std::string > layerLabel
 
int nBinXY_
 
std::vector< double > nBinZR_
 
std::vector< double > RangeZR_
 
std::vector< std::string > regionLabel
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 10 of file ME0DigisValidation.h.

Constructor & Destructor Documentation

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

Definition at line 4 of file ME0DigisValidation.cc.

References edm::ParameterSet::getParameter(), ME0BaseValidation::InputTagToken_, InputTagToken_Digi, sigma_x_, and sigma_y_.

4  : ME0BaseValidation(cfg)
5 {
6  InputTagToken_ = consumes<edm::PSimHitContainer>(cfg.getParameter<edm::InputTag>("simInputLabel"));
7  InputTagToken_Digi = consumes<ME0DigiPreRecoCollection>(cfg.getParameter<edm::InputTag>("digiInputLabel"));
8  sigma_x_ = cfg.getParameter<double>("sigma_x");
9  sigma_y_ = cfg.getParameter<double>("sigma_y");
10 }
T getParameter(std::string const &) const
ME0BaseValidation(const edm::ParameterSet &ps)
edm::EDGetToken InputTagToken_Digi
edm::EDGetToken InputTagToken_
ME0DigisValidation::~ME0DigisValidation ( )
override

Definition at line 110 of file ME0DigisValidation.cc.

110  {
111 }

Member Function Documentation

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

Implements ME0BaseValidation.

Definition at line 114 of file ME0DigisValidation.cc.

References funct::abs(), relativeConstraints::chamber, PV3DBase< T, PVType, FrameType >::eta(), MonitorElement::Fill(), objects.autophobj::float, edm::EventSetup::get(), edm::Event::getByToken(), runTauDisplay::gp, hfClusterShapes_cfi::hits, triggerObjects_cff::id, ME0Geometry::idToDet(), ME0BaseValidation::InputTagToken_, InputTagToken_Digi, createfilelist::int, edm::HandleBase::isValid(), me0_strip_dg_bkg_rad_tot, me0_strip_dg_bkgElePos_rad, me0_strip_dg_bkgNeutral_rad, me0_strip_dg_den_eta, me0_strip_dg_den_eta_tot, me0_strip_dg_dphi_global_Muon, me0_strip_dg_dphi_global_tot_Muon, me0_strip_dg_dphi_vs_phi_global_tot_Muon, me0_strip_dg_dtime_tot_Muon, me0_strip_dg_dx_local_Muon, me0_strip_dg_dx_local_tot_Muon, me0_strip_dg_dy_local_Muon, me0_strip_dg_dy_local_tot_Muon, me0_strip_dg_num_eta, me0_strip_dg_num_eta_tot, me0_strip_dg_time_tot, me0_strip_dg_x_local_tot, me0_strip_dg_xy, me0_strip_dg_xy_Muon, me0_strip_dg_y_local_tot, me0_strip_dg_zr_tot, me0_strip_dg_zr_tot_Muon, num_evts, objects.autophobj::particleType, PV3DBase< T, PVType, FrameType >::phi(), reco::return(), sigma_x_, sigma_y_, GeomDet::surface(), spr::timeOfFlight(), Surface::toGlobal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

116 {
118  iSetup.get<MuonGeometryRecord>().get(hGeom);
119  const ME0Geometry* ME0Geometry_ =( &*hGeom);
120 
122  e.getByToken(InputTagToken_, ME0Hits);
123 
125  e.getByToken(InputTagToken_Digi, ME0Digis);
126 
127  if (!ME0Hits.isValid() | !ME0Digis.isValid() ) {
128  edm::LogError("ME0DigisValidation") << "Cannot get ME0Hits/ME0Digis by Token simInputTagToken";
129  return ;
130  }
131 
132  num_evts->Fill(1);
133  bool toBeCounted1 = true;
134 
135  for (ME0DigiPreRecoCollection::DigiRangeIterator cItr=ME0Digis->begin(); cItr!=ME0Digis->end(); cItr++) {
136  ME0DetId id = (*cItr).first;
137 
138  const GeomDet* gdet = ME0Geometry_->idToDet(id);
139  if ( gdet == nullptr) {
140  edm::LogWarning("ME0DigisValidation")<<"Getting DetId failed. Discard this gem strip hit. Maybe it comes from unmatched geometry.";
141  continue;
142  }
143  const BoundPlane & surface = gdet->surface();
144 
145  int region = (int) id.region();
146  int layer = (int) id.layer();
147  int chamber = (int) id.chamber();
148  int roll = (int) id.roll();
149 
151  for (digiItr = (*cItr ).second.first; digiItr != (*cItr ).second.second; ++digiItr)
152  {
153 
154  LocalPoint lp(digiItr->x(), digiItr->y(), 0);
155 
156  GlobalPoint gp = surface.toGlobal(lp);
157 
158  float g_r = (float) gp.perp();
159  float g_x = (float) gp.x();
160  float g_y = (float) gp.y();
161  float g_z = (float) gp.z();
162 
163  int particleType = digiItr->pdgid();
164  int isPrompt = digiItr->prompt();
165 
166  float timeOfFlight = digiItr->tof();
167 
170  me0_strip_dg_time_tot->Fill(timeOfFlight);
171 
172  // fill hist
173  int region_num = 0 ;
174  if ( region == -1 ) region_num = 0 ;
175  else if ( region == 1) region_num = 1;
176  int layer_num = layer-1;
177 
178  bool toBeCounted2 = true;
179 
180  if (isPrompt == 1 && abs(particleType) == 13) {
181 
182  me0_strip_dg_zr_tot_Muon[region_num]->Fill(g_z,g_r);
183  me0_strip_dg_xy_Muon[region_num][layer_num]->Fill(g_x,g_y);
184 
185  for (auto hits=ME0Hits->begin(); hits!=ME0Hits->end(); hits++) {
186 
187  int particleType_sh = hits->particleType();
188  int evtId_sh = hits->eventId().event();
189  int bx_sh = hits->eventId().bunchCrossing();
190  int procType_sh = hits->processType();
191 
192  if(!(abs(particleType_sh) == 13 && evtId_sh == 0 && bx_sh == 0 && procType_sh == 0)) continue;
193 
194  const ME0DetId id(hits->detUnitId());
195  int region_sh = id.region();
196  int layer_sh = id.layer();
197  int chamber_sh = id.chamber();
198  int roll_sh = id.roll();
199 
200  int region_sh_num = 0 ;
201  if ( region_sh == -1 ) region_sh_num = 0 ;
202  else if ( region_sh == 1) region_sh_num = 1;
203  int layer_sh_num = layer_sh - 1;
204 
205  LocalPoint lp_sh = hits->localPosition();
206  GlobalPoint gp_sh = ME0Geometry_->idToDet(id)->surface().toGlobal(lp_sh);
207 
208  if(toBeCounted1){
209 
210  me0_strip_dg_den_eta[region_sh_num][layer_sh_num]->Fill(fabs(gp_sh.eta()));
211  me0_strip_dg_den_eta_tot->Fill(fabs(gp_sh.eta()));
212  }
213 
214  if(!(region == region_sh && layer == layer_sh && chamber == chamber_sh && roll == roll_sh)) continue;
215 
216  float dx_loc = lp_sh.x()-lp.x();
217  float dy_loc = lp_sh.y()-lp.y();
218  float dphi_glob = gp_sh.phi()-gp.phi();
219  float deta_glob = gp_sh.eta()-gp.eta();
220 
221  if(!(fabs(dphi_glob) < 3*sigma_x_ && fabs(deta_glob) < 3*sigma_y_)) continue;
222 
223  float timeOfFlight_sh = hits->tof();
224  const LocalPoint centralLP(0., 0., 0.);
225  const GlobalPoint centralGP(ME0Geometry_->idToDet(id)->surface().toGlobal(centralLP));
226  float centralTOF(centralGP.mag() / 29.98); //speed of light
227  float timeOfFlight_sh_corr = timeOfFlight_sh - centralTOF;
228 
229  me0_strip_dg_dx_local_Muon[region_num][layer_num]->Fill(dx_loc);
230  me0_strip_dg_dy_local_Muon[region_num][layer_num]->Fill(dy_loc);
231  me0_strip_dg_dphi_global_Muon[region_num][layer_num]->Fill(dphi_glob);
232 
236 
238  me0_strip_dg_dtime_tot_Muon->Fill(timeOfFlight - timeOfFlight_sh_corr);
239 
240  if(toBeCounted2){
241 
242  me0_strip_dg_num_eta[region_num][layer_num]->Fill(fabs(gp_sh.eta()));
243  me0_strip_dg_num_eta_tot->Fill(fabs(gp_sh.eta()));
244 
245  }
246  toBeCounted2 = false;
247 
248  }//loop SH
249 
250  toBeCounted1 = false;
251 
252  }
253  else {
254  me0_strip_dg_zr_tot[region_num]->Fill(g_z,g_r);
255  me0_strip_dg_xy[region_num][layer_num]->Fill(g_x,g_y);
256  }
257 
258  if ((abs(particleType) == 11 || abs(particleType) == 22 || abs(particleType) == 2112) && isPrompt == 0)
259  me0_strip_dg_bkg_rad_tot->Fill(fabs(gp.perp()));
260  if ((abs(particleType) == 11) && isPrompt == 0)
261  me0_strip_dg_bkgElePos_rad->Fill(fabs(gp.perp()));
262  if ((abs(particleType) == 22 || abs(particleType) == 2112) && isPrompt == 0)
263  me0_strip_dg_bkgNeutral_rad->Fill(fabs(gp.perp()));
264 
265  }//loop DG
266  }
267 
268 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
MonitorElement * me0_strip_dg_num_eta[2][6]
MonitorElement * me0_strip_dg_den_eta_tot
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
MonitorElement * me0_strip_dg_num_eta_tot
MonitorElement * me0_strip_dg_x_local_tot
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
MonitorElement * me0_strip_dg_dphi_global_Muon[2][6]
MonitorElement * me0_strip_dg_y_local_tot
void Fill(long long x)
MonitorElement * num_evts
MonitorElement * me0_strip_dg_zr_tot_Muon[2]
MonitorElement * me0_strip_dg_dtime_tot_Muon
MonitorElement * me0_strip_dg_xy[2][6]
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * me0_strip_dg_dphi_global_tot_Muon
MonitorElement * me0_strip_dg_xy_Muon[2][6]
MonitorElement * me0_strip_dg_dy_local_tot_Muon
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * me0_strip_dg_dy_local_Muon[2][6]
MonitorElement * me0_strip_dg_bkgNeutral_rad
MonitorElement * me0_strip_dg_dx_local_tot_Muon
edm::EDGetToken InputTagToken_Digi
const T & get() const
Definition: EventSetup.h:59
std::vector< ME0DigiPreReco >::const_iterator const_iterator
const GeomDet * idToDet(DetId) const override
Definition: ME0Geometry.cc:42
MonitorElement * me0_strip_dg_time_tot
edm::EDGetToken InputTagToken_
return(e1-e2)*(e1-e2)+dp *dp
T eta() const
Definition: PV3DBase.h:76
MonitorElement * me0_strip_dg_bkg_rad_tot
MonitorElement * me0_strip_dg_den_eta[2][6]
MonitorElement * me0_strip_dg_bkgElePos_rad
MonitorElement * me0_strip_dg_dphi_vs_phi_global_tot_Muon
T x() const
Definition: PV3DBase.h:62
MonitorElement * me0_strip_dg_zr_tot[2]
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)
Definition: CaloSimInfo.cc:17
MonitorElement * me0_strip_dg_dx_local_Muon[2][6]
void ME0DigisValidation::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  Run,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 12 of file ME0DigisValidation.cc.

References create_public_pileup_plots::bins, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), ME0BaseValidation::BookHistXY(), ME0BaseValidation::BookHistZR(), MillePedeFileConverter_cfg::e, MonitorElement::getTH1F(), mps_fire::i, ME0BaseValidation::layerLabel, LogDebug, M_PI, me0_strip_dg_bkg_rad_tot, me0_strip_dg_bkgElePos_rad, me0_strip_dg_bkgNeutral_rad, me0_strip_dg_den_eta, me0_strip_dg_den_eta_tot, me0_strip_dg_dphi_global_Muon, me0_strip_dg_dphi_global_tot_Muon, me0_strip_dg_dphi_vs_phi_global_tot_Muon, me0_strip_dg_dtime_tot_Muon, me0_strip_dg_dx_local_Muon, me0_strip_dg_dx_local_tot_Muon, me0_strip_dg_dy_local_Muon, me0_strip_dg_dy_local_tot_Muon, me0_strip_dg_num_eta, me0_strip_dg_num_eta_tot, me0_strip_dg_time_tot, me0_strip_dg_x_local_tot, me0_strip_dg_xy, me0_strip_dg_xy_Muon, me0_strip_dg_y_local_tot, me0_strip_dg_zr_tot, me0_strip_dg_zr_tot_Muon, me0_strip_exp_bkg_rad_tot, me0_strip_exp_bkgElePos_rad, me0_strip_exp_bkgNeutral_rad, num_evts, ME0BaseValidation::regionLabel, MonitorElement::setBinContent(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

12  {
13 
14  LogDebug("MuonME0DigisValidation")<<"Info: Loading Geometry information\n";
15  ibooker.setCurrentFolder("MuonME0DigisV/ME0DigisTask");
16 
17  unsigned int nregion = 2;
18 
19  edm::LogInfo("MuonME0DigisValidation")<<"+++ Info : # of region: "<<nregion<<std::endl;
20 
21  LogDebug("MuonME0DigisValidation")<<"+++ Info : finish to get geometry information from ES.\n";
22 
23  num_evts = ibooker.book1D( "num_evts", "Number of events; ; Number of events", 1, 0, 2);
24 
25  me0_strip_dg_x_local_tot = ibooker.book1D( "me0_strip_dg_x_local_tot", "Local X; X_{local} [cm]; Entries", 60, -30.0, +30.0);
26  me0_strip_dg_y_local_tot = ibooker.book1D( "me0_strip_dg_y_local_tot", "Local Y; Y_{local} [cm]; Entries", 100, -50.0, +50.0);
27  me0_strip_dg_time_tot = ibooker.book1D( "me0_strip_dg_time_tot", "ToF; ToF [ns]; Entries", 400, -200, +200);
28 
29  me0_strip_dg_dx_local_tot_Muon = ibooker.book1D( "me0_strip_dg_dx_local_tot", "Local DeltaX; #Delta X_{local} [cm]; Entries", 50, -0.1, +0.1);
30  me0_strip_dg_dy_local_tot_Muon = ibooker.book1D( "me0_strip_dg_dy_local_tot", "Local DeltaY; #Delta Y_{local} [cm]; Entries", 500, -10.0, +10.0);
31  me0_strip_dg_dphi_global_tot_Muon = ibooker.book1D( "me0_strip_dg_dphi_global_tot", "Global DeltaPhi; #Delta #phi_{global} [rad]; Entries", 50, -0.01, +0.01);
32  me0_strip_dg_dtime_tot_Muon = ibooker.book1D( "me0_strip_dg_dtime_tot", "DeltaToF; #Delta ToF [ns]; Entries", 50, -5, +5);
33 
34  me0_strip_dg_dphi_vs_phi_global_tot_Muon = ibooker.book2D( "me0_strip_dg_dphi_vs_phi_global_tot", "Global DeltaPhi vs. Phi; #phi_{global} [rad]; #Delta #phi_{global} [rad]", 72,-M_PI,+M_PI,50,-0.01,+0.01);
35 
36  me0_strip_dg_den_eta_tot = ibooker.book1D( "me0_strip_dg_den_eta_tot", "Denominator; #eta; Entries", 12, 1.8, 3.0);
37  me0_strip_dg_num_eta_tot = ibooker.book1D( "me0_strip_dg_num_eta_tot", "Numerator; #eta; Entries", 12, 1.8, 3.0);
38 
39  float bins[] = {62.3, 70.0, 77.7, 87.1, 96.4, 108.2, 119.9, 134.7, 149.5};
40  int binnum = sizeof(bins)/sizeof(float) - 1;
41 
42  me0_strip_dg_bkg_rad_tot = ibooker.book1D( "me0_strip_dg_bkg_radius_tot", "Total neutron background; Radius [cm]; Entries", binnum, bins);
43  me0_strip_dg_bkgElePos_rad = ibooker.book1D( "me0_strip_dg_bkgElePos_radius", "Neutron background: electrons+positrons; Radius [cm]; Entries", binnum, bins);
44  me0_strip_dg_bkgNeutral_rad = ibooker.book1D( "me0_strip_dg_bkgNeutral_radius", "Neutron background: gammas+neutrons; Radius [cm]; Entries", binnum, bins);
45 
46  me0_strip_exp_bkg_rad_tot = ibooker.book1D( "me0_strip_exp_bkg_radius_tot", "Total expected neutron background; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
47  me0_strip_exp_bkgElePos_rad = ibooker.book1D( "me0_strip_exp_bkgElePos_radius", "Expected neutron background: electrons+positrons; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
48  me0_strip_exp_bkgNeutral_rad = ibooker.book1D( "me0_strip_exp_bkgNeutral_radius", "Expected neutron background: gammas+neutrons; Radius [cm]; Hit Rate [Hz/cm^{2}]", binnum, bins);
49 
50  std::vector<double> neuBkg, eleBkg;
51  neuBkg.push_back(899644.0); neuBkg.push_back(-30841.0); neuBkg.push_back(441.28);
52  neuBkg.push_back(-3.3405); neuBkg.push_back(0.0140588); neuBkg.push_back(-3.11473e-05); neuBkg.push_back(2.83736e-08);
53  eleBkg.push_back(4.68590e+05); eleBkg.push_back(-1.63834e+04); eleBkg.push_back(2.35700e+02);
54  eleBkg.push_back(-1.77706e+00); eleBkg.push_back(7.39960e-03); eleBkg.push_back(-1.61448e-05); eleBkg.push_back(1.44368e-08);
55 
56  for(int i = 1; i < me0_strip_exp_bkgNeutral_rad->getTH1F()->GetSize(); i++){
57 
58  double pos = me0_strip_exp_bkgNeutral_rad->getTH1F()->GetBinCenter(i);
59  double neutral = 0;
60  double charged = 0;
61 
62  double pos_helper = 1.0;
63  for(int j = 0; j < 7; ++j) {
64 
65  neutral += neuBkg[j]*pos_helper;
66  charged += eleBkg[j]*pos_helper;
67  pos_helper *= pos;
68 
69  }
70 
73  me0_strip_exp_bkg_rad_tot->setBinContent(i, neutral+charged);
74 
75  }
76 
77  for( unsigned int region_num = 0 ; region_num < nregion ; region_num++ ) {
78  me0_strip_dg_zr_tot[region_num] = BookHistZR(ibooker,"me0_strip_dg_tot","Digi",region_num);
79  me0_strip_dg_zr_tot_Muon[region_num] = BookHistZR(ibooker,"me0_strip_dg_tot_Muon","Digi Muon",region_num);
80  for( unsigned int layer_num = 0 ; layer_num < 6 ; layer_num++) {
81 
82  std::string hist_name_for_dx_local = std::string("me0_strip_dg_dx_local")+regionLabel[region_num]+"_l"+layerLabel[layer_num];
83  std::string hist_name_for_dy_local = std::string("me0_strip_dg_dy_local")+regionLabel[region_num]+"_l"+layerLabel[layer_num];
84  std::string hist_name_for_dphi_global = std::string("me0_strip_dg_dphi_global")+regionLabel[region_num]+"_l"+layerLabel[layer_num];
85 
86  std::string hist_name_for_den_eta = std::string("me0_strip_dg_den_eta")+regionLabel[region_num]+"_l"+layerLabel[layer_num];
87  std::string hist_name_for_num_eta = std::string("me0_strip_dg_num_eta")+regionLabel[region_num]+"_l"+layerLabel[layer_num];
88 
89  std::string hist_label_for_dx_local = "Local DeltaX: region"+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" ; #Delta X_{local} [cm]; Entries";
90  std::string hist_label_for_dy_local = "Local DeltaY: region"+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" ; #Delta Y_{local} [cm]; Entries";
91  std::string hist_label_for_dphi_global = "Global DeltaPhi: region"+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" ; #Delta #phi_{global} [rad]; Entries";
92 
93  std::string hist_label_for_den_eta = "Denominator: region"+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" ; #eta; Entries";
94  std::string hist_label_for_num_eta = "Numerator: region"+regionLabel[region_num]+" layer "+layerLabel[layer_num]+" ; #eta; Entries";
95 
96  me0_strip_dg_xy[region_num][layer_num] = BookHistXY(ibooker,"me0_strip_dg","Digi",region_num,layer_num);
97  me0_strip_dg_xy_Muon[region_num][layer_num] = BookHistXY(ibooker,"me0_strip_dg_Muon","Digi Muon",region_num,layer_num);
98 
99  me0_strip_dg_dx_local_Muon[region_num][layer_num] = ibooker.book1D( hist_name_for_dx_local.c_str(), hist_label_for_dx_local.c_str(), 50, -0.1, +0.1);
100  me0_strip_dg_dy_local_Muon[region_num][layer_num] = ibooker.book1D( hist_name_for_dy_local.c_str(), hist_label_for_dy_local.c_str(), 500, -10.0, +10.0);
101  me0_strip_dg_dphi_global_Muon[region_num][layer_num] = ibooker.book1D( hist_name_for_dphi_global.c_str(), hist_label_for_dphi_global.c_str(), 50, -0.01, +0.01);
102 
103  me0_strip_dg_den_eta[region_num][layer_num] = ibooker.book1D( hist_name_for_den_eta, hist_label_for_den_eta, 12, 1.8, 3.0);
104  me0_strip_dg_num_eta[region_num][layer_num] = ibooker.book1D( hist_name_for_num_eta, hist_label_for_num_eta, 12, 1.8, 3.0);
105 
106  }
107  }
108 }
#define LogDebug(id)
MonitorElement * BookHistZR(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
MonitorElement * me0_strip_dg_num_eta[2][6]
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * me0_strip_dg_den_eta_tot
MonitorElement * me0_strip_exp_bkgElePos_rad
TH1F * getTH1F() const
std::vector< std::string > layerLabel
MonitorElement * me0_strip_dg_num_eta_tot
MonitorElement * me0_strip_dg_x_local_tot
MonitorElement * me0_strip_dg_dphi_global_Muon[2][6]
MonitorElement * me0_strip_dg_y_local_tot
MonitorElement * BookHistXY(DQMStore::IBooker &, const char *name, const char *label, unsigned int region_num, unsigned int layer_num=99)
MonitorElement * num_evts
MonitorElement * me0_strip_dg_zr_tot_Muon[2]
MonitorElement * me0_strip_dg_dtime_tot_Muon
MonitorElement * me0_strip_dg_xy[2][6]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
MonitorElement * me0_strip_dg_dphi_global_tot_Muon
MonitorElement * me0_strip_dg_xy_Muon[2][6]
MonitorElement * me0_strip_dg_dy_local_tot_Muon
std::vector< std::string > regionLabel
MonitorElement * me0_strip_dg_dy_local_Muon[2][6]
#define M_PI
MonitorElement * me0_strip_dg_bkgNeutral_rad
MonitorElement * me0_strip_exp_bkgNeutral_rad
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * me0_strip_dg_dx_local_tot_Muon
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * me0_strip_dg_time_tot
MonitorElement * me0_strip_dg_bkg_rad_tot
MonitorElement * me0_strip_dg_den_eta[2][6]
MonitorElement * me0_strip_dg_bkgElePos_rad
MonitorElement * me0_strip_exp_bkg_rad_tot
MonitorElement * me0_strip_dg_dphi_vs_phi_global_tot_Muon
MonitorElement * me0_strip_dg_zr_tot[2]
MonitorElement * me0_strip_dg_dx_local_Muon[2][6]
bool ME0DigisValidation::isMatched ( const int  ,
const int  ,
const int  ,
const int  ,
const int  ,
const int   
)

Member Data Documentation

edm::EDGetToken ME0DigisValidation::InputTagToken_Digi
private

Definition at line 53 of file ME0DigisValidation.h.

Referenced by analyze(), and ME0DigisValidation().

MonitorElement* ME0DigisValidation::me0_strip_dg_bkg_rad_tot
private

Definition at line 46 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_bkgElePos_rad
private

Definition at line 47 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_bkgNeutral_rad
private

Definition at line 48 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_den_eta[2][6]
private

Definition at line 40 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_den_eta_tot
private

Definition at line 43 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dphi_global_Muon[2][6]
private

Definition at line 29 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dphi_global_tot_Muon
private

Definition at line 35 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dphi_vs_phi_global_tot_Muon
private

Definition at line 36 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dtime_tot_Muon
private

Definition at line 37 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dx_local_Muon[2][6]
private

Definition at line 27 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dx_local_tot_Muon
private

Definition at line 31 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dy_local_Muon[2][6]
private

Definition at line 28 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_dy_local_tot_Muon
private

Definition at line 32 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_num_eta[2][6]
private

Definition at line 41 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_num_eta_tot
private

Definition at line 44 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_time_tot
private

Definition at line 38 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_x_local_tot
private

Definition at line 33 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_xy[2][6]
private

Definition at line 21 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_xy_Muon[2][6]
private

Definition at line 22 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_y_local_tot
private

Definition at line 34 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_zr[2][6]
private

Definition at line 23 of file ME0DigisValidation.h.

MonitorElement* ME0DigisValidation::me0_strip_dg_zr_tot[2]
private

Definition at line 24 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_dg_zr_tot_Muon[2]
private

Definition at line 25 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_exp_bkg_rad_tot
private

Definition at line 49 of file ME0DigisValidation.h.

Referenced by bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_exp_bkgElePos_rad
private

Definition at line 50 of file ME0DigisValidation.h.

Referenced by bookHistograms().

MonitorElement* ME0DigisValidation::me0_strip_exp_bkgNeutral_rad
private

Definition at line 51 of file ME0DigisValidation.h.

Referenced by bookHistograms().

int ME0DigisValidation::npart
private

Definition at line 56 of file ME0DigisValidation.h.

MonitorElement* ME0DigisValidation::num_evts
private

Definition at line 20 of file ME0DigisValidation.h.

Referenced by analyze(), and bookHistograms().

double ME0DigisValidation::sigma_x_
private

Definition at line 54 of file ME0DigisValidation.h.

Referenced by analyze(), and ME0DigisValidation().

double ME0DigisValidation::sigma_y_
private

Definition at line 54 of file ME0DigisValidation.h.

Referenced by analyze(), and ME0DigisValidation().