CMS 3D CMS Logo

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

#include <MuonRecoOneHLT.h>

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 MuonRecoOneHLT (const edm::ParameterSet &)
 Constructor. More...
 
 ~MuonRecoOneHLT () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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 () noexcept(false) 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

GenericTriggerEventFlag_DoubleMuonEventFlag
 
GenericTriggerEventFlag_SingleMuonEventFlag
 
int chi2Bin
 
float chi2Max
 
float chi2Min
 
std::vector< MonitorElement * > chi2OvDFGlbTrack
 
MonitorElementchi2OvDFStaTrack
 
MonitorElementchi2OvDFTight
 
MonitorElementchi2OvDFTrack
 
std::vector< std::string > doublemuonExpr_
 
int etaBin
 
std::vector< MonitorElement * > etaGlbTrack
 
float etaMax
 
float etaMin
 
MonitorElementetaStaTrack
 
MonitorElementetaTight
 
MonitorElementetaTrack
 
std::string metname
 
MonitorElementmuReco
 
edm::ParameterSet parameters
 
int phiBin
 
std::vector< MonitorElement * > phiGlbTrack
 
float phiMax
 
float phiMin
 
MonitorElementphiStaTrack
 
MonitorElementphiTight
 
MonitorElementphiTrack
 
int ptBin
 
std::vector< MonitorElement * > ptGlbTrack
 
float ptMax
 
float ptMin
 
MonitorElementptStaTrack
 
MonitorElementptTight
 
MonitorElementptTrack
 
std::vector< std::string > singlemuonExpr_
 
edm::EDGetTokenT< reco::BeamSpottheBeamSpotLabel_
 
edm::EDGetTokenT< reco::MuonCollectiontheMuonCollectionLabel_
 
MuonServiceProxytheService
 
edm::EDGetTokenT< edm::TriggerResultstheTriggerResultsLabel_
 
edm::EDGetTokenT< reco::VertexCollectiontheVertexLabel_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- 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::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 44 of file MuonRecoOneHLT.h.

Constructor & Destructor Documentation

MuonRecoOneHLT::MuonRecoOneHLT ( const edm::ParameterSet pSet)

Constructor.

Definition at line 13 of file MuonRecoOneHLT.cc.

References muonRecoAnalyzer_cfi::chi2Bin, muonRecoAnalyzer_cfi::chi2Max, muonRecoAnalyzer_cfi::chi2Min, muonRecoAnalyzer_cfi::etaBin, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, BeamMonitor_cff::phiBin, AlignmentTrackSelector_cfi::phiMax, AlignmentTrackSelector_cfi::phiMin, muonRecoAnalyzer_cfi::ptBin, AlignmentTrackSelector_cfi::ptMax, and ptMin.

14  { //, MuonServiceProxy *theService) :MuonAnalyzerBase(theService) {
15  parameters = pSet;
16 
17  // the services
18  theService = new MuonServiceProxy(parameters.getParameter<ParameterSet>("ServiceParameters"));
19 
20  ParameterSet muonparms = parameters.getParameter<edm::ParameterSet>("SingleMuonTrigger");
21  ParameterSet dimuonparms = parameters.getParameter<edm::ParameterSet>("DoubleMuonTrigger");
24 
25  // Trigger Expresions in case de connection to the DB fails
26  singlemuonExpr_ = muonparms.getParameter<std::vector<std::string> >("hltPaths");
27  doublemuonExpr_ = dimuonparms.getParameter<std::vector<std::string> >("hltPaths");
28 
29  theMuonCollectionLabel_ = consumes<reco::MuonCollection>(parameters.getParameter<edm::InputTag>("MuonCollection"));
30  theVertexLabel_ = consumes<reco::VertexCollection>(parameters.getParameter<edm::InputTag>("VertexLabel"));
31  theBeamSpotLabel_ = mayConsume<reco::BeamSpot>(parameters.getParameter<edm::InputTag>("BeamSpotLabel"));
32  theTriggerResultsLabel_ = consumes<TriggerResults>(parameters.getParameter<InputTag>("TriggerResultsLabel"));
33 
34  // Parameters
35  etaBin = parameters.getParameter<int>("etaBin");
36  etaMin = parameters.getParameter<double>("etaMin");
37  etaMax = parameters.getParameter<double>("etaMax");
38  ptBin = parameters.getParameter<int>("ptBin");
39  ptMin = parameters.getParameter<double>("ptMin");
40  ptMax = parameters.getParameter<double>("ptMax");
41  chi2Bin = parameters.getParameter<int>("chi2Bin");
42  chi2Min = parameters.getParameter<double>("chi2Min");
43  chi2Max = parameters.getParameter<double>("chi2Max");
44  phiBin = parameters.getParameter<int>("phiBin");
45  phiMin = parameters.getParameter<double>("phiMin");
46  phiMax = parameters.getParameter<double>("phiMax");
47 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::TriggerResults > theTriggerResultsLabel_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
GenericTriggerEventFlag * _DoubleMuonEventFlag
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
GenericTriggerEventFlag * _SingleMuonEventFlag
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::vector< std::string > doublemuonExpr_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< std::string > singlemuonExpr_
edm::EDGetTokenT< reco::MuonCollection > theMuonCollectionLabel_
MuonServiceProxy * theService
MuonRecoOneHLT::~MuonRecoOneHLT ( )
override

Destructor.

Definition at line 48 of file MuonRecoOneHLT.cc.

48  {
49  delete theService;
50  delete _SingleMuonEventFlag;
51  delete _DoubleMuonEventFlag;
52 }
GenericTriggerEventFlag * _DoubleMuonEventFlag
GenericTriggerEventFlag * _SingleMuonEventFlag
MuonServiceProxy * theService

Member Function Documentation

void MuonRecoOneHLT::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 129 of file MuonRecoOneHLT.cc.

References edm::HLTGlobalStatus::accept(), reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), gather_cfg::cout, relativeConstraints::error, edm::Event::getByToken(), mps_fire::i, muon::isTightMuon(), edm::HandleBase::isValid(), LogTrace, metname, PDWG_BPHSkim_cff::muons, reco::BeamSpot::position(), position, reco::BeamSpot::sigmaZ(), edm::TriggerNames::size(), susybsm::HSCParticleType::standAloneMuon, HLT_2018_cff::track, edm::TriggerNames::triggerName(), L1TEGammaOffline_cfi::triggerNames, edm::Event::triggerNames(), triggerResults, bphysicsOniaDQM_cfi::vertex, and badGlobalMuonTaggersAOD_cff::vtx.

129  {
130  theService->update(iSetup);
131 
132  // =================================================================================
133  // Look for the Primary Vertex (and use the BeamSpot instead, if you can't find it):
134  reco::Vertex::Point posVtx;
135  reco::Vertex::Error errVtx;
136  unsigned int theIndexOfThePrimaryVertex = 999.;
137 
139  iEvent.getByToken(theVertexLabel_, vertex);
140  if (vertex.isValid()) {
141  for (unsigned int ind = 0; ind < vertex->size(); ++ind) {
142  if ((*vertex)[ind].isValid() && !((*vertex)[ind].isFake())) {
143  theIndexOfThePrimaryVertex = ind;
144  break;
145  }
146  }
147  }
148 
149  if (theIndexOfThePrimaryVertex < 100) {
150  posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).position();
151  errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).error();
152  } else {
153  LogInfo("RecoMuonValidator") << "reco::PrimaryVertex not found, use BeamSpot position instead\n";
154 
155  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
156  iEvent.getByToken(theBeamSpotLabel_, recoBeamSpotHandle);
157  const reco::BeamSpot& bs = *recoBeamSpotHandle;
158 
159  posVtx = bs.position();
160  errVtx(0, 0) = bs.BeamWidthX();
161  errVtx(1, 1) = bs.BeamWidthY();
162  errVtx(2, 2) = bs.sigmaZ();
163  }
164 
165  const reco::Vertex vtx(posVtx, errVtx);
166 
167  // ==========================================================
168  // READ DATA:
170  iEvent.getByToken(theMuonCollectionLabel_, muons);
171 
173  iEvent.getByToken(theTriggerResultsLabel_, triggerResults);
174 
175  // check if muon collection is valid
176  if (!muons.isValid())
177  return;
178 
179  // Pick the leading lepton.
180  std::map<float, const reco::Muon*> muonMap;
181  for (reco::MuonCollection::const_iterator recoMu = muons->begin(); recoMu != muons->end(); ++recoMu) {
182  muonMap[recoMu->pt()] = &*recoMu;
183  }
184  std::vector<const reco::Muon*> LeadingMuon;
185  for (std::map<float, const reco::Muon*>::reverse_iterator rit = muonMap.rbegin(); rit != muonMap.rend(); ++rit) {
186  LeadingMuon.push_back((*rit).second);
187  }
188 
189  // Pick Trigger information.
190  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
191  const unsigned int nTrig(triggerNames.size());
192  bool _trig_SingleMu = false;
193  bool _trig_DoubleMu = false;
194  for (unsigned int i = 0; i < nTrig; ++i) {
195  if (triggerNames.triggerName(i).find(singlemuonExpr_[0].substr(0, singlemuonExpr_[0].rfind("_v") + 2)) !=
196  std::string::npos &&
197  triggerResults->accept(i))
198  _trig_SingleMu = true;
199  if (triggerNames.triggerName(i).find(doublemuonExpr_[0].substr(0, doublemuonExpr_[0].rfind("_v") + 2)) !=
200  std::string::npos &&
201  triggerResults->accept(i))
202  _trig_DoubleMu = true;
203  }
204 #ifdef DEBUG
205  cout << "[MuonRecoOneHLT] Trigger Fired ? " << (_trig_SingleMu || _trig_DoubleMu) << endl;
206 #endif
207 
208  if (!_trig_SingleMu && !_trig_DoubleMu)
209  return;
210  if (LeadingMuon.empty())
211  return;
212  // if (_MuonEventFlag->on() && !(_MuonEventFlag->accept(iEvent,iSetup))) return;
213 
214  // Check if Muon is Global
215  if ((*LeadingMuon[0]).isGlobalMuon()) {
216  LogTrace(metname) << "[MuonRecoOneHLT] The mu is global - filling the histos";
217  if ((*LeadingMuon[0]).isTrackerMuon() && (*LeadingMuon[0]).isStandAloneMuon())
218  muReco->Fill(1);
219  if (!((*LeadingMuon[0]).isTrackerMuon()) && (*LeadingMuon[0]).isStandAloneMuon())
220  muReco->Fill(2);
221  if (!(*LeadingMuon[0]).isStandAloneMuon())
222  LogTrace(metname) << "[MuonRecoOneHLT] ERROR: the mu is global but not standalone!";
223 
224  // get the track combinig the information from both the Tracker and the Spectrometer
225  reco::TrackRef recoCombinedGlbTrack = (*LeadingMuon[0]).combinedMuon();
226  // get the track using only the tracker data
227  reco::TrackRef recoTkGlbTrack = (*LeadingMuon[0]).track();
228  // get the track using only the mu spectrometer data
229  reco::TrackRef recoStaGlbTrack = (*LeadingMuon[0]).standAloneMuon();
230 
231  etaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta());
232  etaGlbTrack[1]->Fill(recoTkGlbTrack->eta());
233  etaGlbTrack[2]->Fill(recoStaGlbTrack->eta());
234 
235  phiGlbTrack[0]->Fill(recoCombinedGlbTrack->phi());
236  phiGlbTrack[1]->Fill(recoTkGlbTrack->phi());
237  phiGlbTrack[2]->Fill(recoStaGlbTrack->phi());
238 
239  chi2OvDFGlbTrack[0]->Fill(recoCombinedGlbTrack->normalizedChi2());
240  chi2OvDFGlbTrack[1]->Fill(recoTkGlbTrack->normalizedChi2());
241  chi2OvDFGlbTrack[2]->Fill(recoStaGlbTrack->normalizedChi2());
242 
243  ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
244  ptGlbTrack[1]->Fill(recoTkGlbTrack->pt());
245  ptGlbTrack[2]->Fill(recoStaGlbTrack->pt());
246  }
247  // Check if Muon is Tight
248  if (muon::isTightMuon((*LeadingMuon[0]), vtx)) {
249  LogTrace(metname) << "[MuonRecoOneHLT] The mu is tracker only - filling the histos";
250 
251  reco::TrackRef recoCombinedGlbTrack = (*LeadingMuon[0]).combinedMuon();
252 
253  etaTight->Fill(recoCombinedGlbTrack->eta());
254  phiTight->Fill(recoCombinedGlbTrack->phi());
255  chi2OvDFTight->Fill(recoCombinedGlbTrack->normalizedChi2());
256  ptTight->Fill(recoCombinedGlbTrack->pt());
257  }
258 
259  // Check if Muon is Tracker but NOT Global
260  if ((*LeadingMuon[0]).isTrackerMuon() && !((*LeadingMuon[0]).isGlobalMuon())) {
261  LogTrace(metname) << "[MuonRecoOneHLT] The mu is tracker only - filling the histos";
262  if ((*LeadingMuon[0]).isStandAloneMuon())
263  muReco->Fill(3);
264  if (!((*LeadingMuon[0]).isStandAloneMuon()))
265  muReco->Fill(4);
266 
267  // get the track using only the tracker data
268  reco::TrackRef recoTrack = (*LeadingMuon[0]).track();
269 
270  etaTrack->Fill(recoTrack->eta());
271  phiTrack->Fill(recoTrack->phi());
272  chi2OvDFTrack->Fill(recoTrack->normalizedChi2());
273  ptTrack->Fill(recoTrack->pt());
274  }
275 
276  // Check if Muon is STA but NOT Global
277  if ((*LeadingMuon[0]).isStandAloneMuon() && !((*LeadingMuon[0]).isGlobalMuon())) {
278  LogTrace(metname) << "[MuonRecoOneHLT] The mu is STA only - filling the histos";
279  if (!((*LeadingMuon[0]).isTrackerMuon()))
280  muReco->Fill(5);
281 
282  // get the track using only the mu spectrometer data
283  reco::TrackRef recoStaTrack = (*LeadingMuon[0]).standAloneMuon();
284 
285  etaStaTrack->Fill(recoStaTrack->eta());
286  phiStaTrack->Fill(recoStaTrack->phi());
287  chi2OvDFStaTrack->Fill(recoStaTrack->normalizedChi2());
288  ptStaTrack->Fill(recoStaTrack->pt());
289  }
290  // Check if Muon is Only CaloMuon
291  if ((*LeadingMuon[0]).isCaloMuon() && !((*LeadingMuon[0]).isGlobalMuon()) && !((*LeadingMuon[0]).isTrackerMuon()) &&
292  !((*LeadingMuon[0]).isStandAloneMuon()))
293  muReco->Fill(6);
294 }
edm::EDGetTokenT< edm::TriggerResults > theTriggerResultsLabel_
MonitorElement * phiTight
MonitorElement * ptTrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
MonitorElement * chi2OvDFTrack
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_
bool accept() const
Has at least one path accepted the event?
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:43
Strings::size_type size() const
Definition: TriggerNames.cc:31
MonitorElement * etaTight
MonitorElement * etaStaTrack
std::string metname
std::vector< std::string > doublemuonExpr_
void Fill(long long x)
MonitorElement * chi2OvDFStaTrack
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:82
std::vector< MonitorElement * > phiGlbTrack
static std::string const triggerResults
Definition: EdmProvDump.cc:45
MonitorElement * ptStaTrack
std::vector< std::string > singlemuonExpr_
std::vector< MonitorElement * > ptGlbTrack
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * etaTrack
#define LogTrace(id)
std::vector< MonitorElement * > etaGlbTrack
MonitorElement * phiTrack
edm::EDGetTokenT< reco::MuonCollection > theMuonCollectionLabel_
MonitorElement * ptTight
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
double sigmaZ() const
sigma z
Definition: BeamSpot.h:76
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:84
MuonServiceProxy * theService
static int position[264][3]
Definition: ReadPGInfo.cc:289
MonitorElement * phiStaTrack
const Point & position() const
position
Definition: BeamSpot.h:59
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
MonitorElement * muReco
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:265
MonitorElement * chi2OvDFTight
std::vector< MonitorElement * > chi2OvDFGlbTrack
void MuonRecoOneHLT::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 53 of file MuonRecoOneHLT.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), muonRecoAnalyzer_cfi::chi2Bin, muonRecoAnalyzer_cfi::chi2Max, muonRecoAnalyzer_cfi::chi2Min, gather_cfg::cout, muonRecoAnalyzer_cfi::etaBin, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, BeamMonitor_cff::phiBin, AlignmentTrackSelector_cfi::phiMax, AlignmentTrackSelector_cfi::phiMin, muonRecoAnalyzer_cfi::ptBin, AlignmentTrackSelector_cfi::ptMax, ptMin, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

53  {
54 #ifdef DEBUG
55  cout << "[MuonRecoOneHLT] beginRun " << endl;
56  cout << "[MuonRecoOneHLT] Is MuonEventFlag On? " << _SingleMuonEventFlag->on() << endl;
57 #endif
58 
59  ibooker.cd();
60  ibooker.setCurrentFolder("Muons/MuonRecoOneHLT");
61 
62  muReco = ibooker.book1D("Muon_Reco", "Muon Reconstructed Tracks", 6, 1, 7);
63  muReco->setBinLabel(1, "glb+tk+sta");
64  muReco->setBinLabel(2, "glb+sta");
65  muReco->setBinLabel(3, "tk+sta");
66  muReco->setBinLabel(4, "tk");
67  muReco->setBinLabel(5, "sta");
68  muReco->setBinLabel(6, "calo");
69 
70  // monitoring of eta parameter
71  std::string histname = "GlbMuon_";
72  etaGlbTrack.push_back(ibooker.book1D(histname + "Glb_eta", "#eta_{GLB}", etaBin, etaMin, etaMax));
73  etaGlbTrack.push_back(ibooker.book1D(histname + "Tk_eta", "#eta_{TKfromGLB}", etaBin, etaMin, etaMax));
74  etaGlbTrack.push_back(ibooker.book1D(histname + "Sta_eta", "#eta_{STAfromGLB}", etaBin, etaMin, etaMax));
75  etaTight = ibooker.book1D("TightMuon_eta", "#eta_{GLB}", etaBin, etaMin, etaMax);
76  etaTrack = ibooker.book1D("TkMuon_eta", "#eta_{TK}", etaBin, etaMin, etaMax);
77  etaStaTrack = ibooker.book1D("StaMuon_eta", "#eta_{STA}", etaBin, etaMin, etaMax);
78 
79  // monitoring of phi paramater
80  phiGlbTrack.push_back(ibooker.book1D(histname + "Glb_phi", "#phi_{GLB}", phiBin, phiMin, phiMax));
81  phiGlbTrack[0]->setAxisTitle("rad");
82  phiGlbTrack.push_back(ibooker.book1D(histname + "Tk_phi", "#phi_{TKfromGLB}", phiBin, phiMin, phiMax));
83  phiGlbTrack[1]->setAxisTitle("rad");
84  phiGlbTrack.push_back(ibooker.book1D(histname + "Sta_phi", "#phi_{STAfromGLB}", phiBin, phiMin, phiMax));
85  phiGlbTrack[2]->setAxisTitle("rad");
86  phiTight = ibooker.book1D("TightMuon_phi", "#phi_{GLB}", phiBin, phiMin, phiMax);
87  phiTrack = ibooker.book1D("TkMuon_phi", "#phi_{TK}", phiBin, phiMin, phiMax);
88  phiTrack->setAxisTitle("rad");
89  phiStaTrack = ibooker.book1D("StaMuon_phi", "#phi_{STA}", phiBin, phiMin, phiMax);
90  phiStaTrack->setAxisTitle("rad");
91 
92  // monitoring of the chi2 parameter
93  chi2OvDFGlbTrack.push_back(
94  ibooker.book1D(histname + "Glb_chi2OverDf", "#chi_{2}OverDF_{GLB}", chi2Bin, chi2Min, chi2Max));
95  chi2OvDFGlbTrack.push_back(
96  ibooker.book1D(histname + "Tk_chi2OverDf", "#chi_{2}OverDF_{TKfromGLB}", phiBin, chi2Min, chi2Max));
97  chi2OvDFGlbTrack.push_back(
98  ibooker.book1D(histname + "Sta_chi2OverDf", "#chi_{2}OverDF_{STAfromGLB}", chi2Bin, chi2Min, chi2Max));
99  chi2OvDFTight = ibooker.book1D("TightMuon_chi2OverDf", "#chi_{2}OverDF_{GLB}", chi2Bin, chi2Min, chi2Max);
100  chi2OvDFTrack = ibooker.book1D("TkMuon_chi2OverDf", "#chi_{2}OverDF_{TK}", chi2Bin, chi2Min, chi2Max);
101  chi2OvDFStaTrack = ibooker.book1D("StaMuon_chi2OverDf", "#chi_{2}OverDF_{STA}", chi2Bin, chi2Min, chi2Max);
102 
103  // monitoring of the transverse momentum
104  ptGlbTrack.push_back(ibooker.book1D(histname + "Glb_pt", "pt_{GLB}", ptBin, ptMin, ptMax));
105  ptGlbTrack[0]->setAxisTitle("GeV");
106  ptGlbTrack.push_back(ibooker.book1D(histname + "Tk_pt", "pt_{TKfromGLB}", ptBin, ptMin, ptMax));
107  ptGlbTrack[1]->setAxisTitle("GeV");
108  ptGlbTrack.push_back(ibooker.book1D(histname + "Sta_pt", "pt_{STAfromGLB}", ptBin, ptMin, ptMax));
109  ptGlbTrack[2]->setAxisTitle("GeV");
110  ptTight = ibooker.book1D("TightMuon_pt", "pt_{GLB}", ptBin, ptMin, ptMax);
111  ptTight->setAxisTitle("GeV");
112  ptTrack = ibooker.book1D("TkMuon_pt", "pt_{TK}", ptBin, ptMin, ptMax);
113  ptTrack->setAxisTitle("GeV");
114  ptStaTrack = ibooker.book1D("StaMuon_pt", "pt_{STA}", ptBin, ptMin, ptMax);
115  ptStaTrack->setAxisTitle("GeV");
116 
117  if (_SingleMuonEventFlag->on())
118  _SingleMuonEventFlag->initRun(iRun, iSetup);
119  if (_DoubleMuonEventFlag->on())
120  _DoubleMuonEventFlag->initRun(iRun, iSetup);
121 
122  if (_SingleMuonEventFlag->on() &&
123  _SingleMuonEventFlag->expressionsFromDB(_SingleMuonEventFlag->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
125  if (_DoubleMuonEventFlag->on() &&
126  _DoubleMuonEventFlag->expressionsFromDB(_DoubleMuonEventFlag->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
128 }
MonitorElement * phiTight
MonitorElement * ptTrack
GenericTriggerEventFlag * _DoubleMuonEventFlag
MonitorElement * chi2OvDFTrack
GenericTriggerEventFlag * _SingleMuonEventFlag
MonitorElement * etaTight
MonitorElement * etaStaTrack
std::vector< std::string > expressionsFromDB(const std::string &key, const edm::EventSetup &setup)
Reads and returns logical expressions from DB.
MonitorElement * chi2OvDFStaTrack
std::vector< MonitorElement * > phiGlbTrack
MonitorElement * ptStaTrack
std::vector< std::string > singlemuonExpr_
std::vector< MonitorElement * > ptGlbTrack
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)
MonitorElement * etaTrack
std::vector< MonitorElement * > etaGlbTrack
MonitorElement * phiTrack
MonitorElement * ptTight
MonitorElement * phiStaTrack
void initRun(const edm::Run &run, const edm::EventSetup &setup)
To be called from beginRun() methods.
MonitorElement * muReco
MonitorElement * chi2OvDFTight
std::vector< MonitorElement * > chi2OvDFGlbTrack
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

GenericTriggerEventFlag* MuonRecoOneHLT::_DoubleMuonEventFlag
private

Definition at line 72 of file MuonRecoOneHLT.h.

GenericTriggerEventFlag* MuonRecoOneHLT::_SingleMuonEventFlag
private

Definition at line 71 of file MuonRecoOneHLT.h.

int MuonRecoOneHLT::chi2Bin
private

Definition at line 87 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::chi2Max
private

Definition at line 89 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::chi2Min
private

Definition at line 88 of file MuonRecoOneHLT.h.

std::vector<MonitorElement*> MuonRecoOneHLT::chi2OvDFGlbTrack
private

Definition at line 97 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::chi2OvDFStaTrack
private

Definition at line 114 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::chi2OvDFTight
private

Definition at line 103 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::chi2OvDFTrack
private

Definition at line 109 of file MuonRecoOneHLT.h.

std::vector<std::string> MuonRecoOneHLT::doublemuonExpr_
private

Definition at line 70 of file MuonRecoOneHLT.h.

int MuonRecoOneHLT::etaBin
private

Definition at line 79 of file MuonRecoOneHLT.h.

std::vector<MonitorElement*> MuonRecoOneHLT::etaGlbTrack
private

Definition at line 95 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::etaMax
private

Definition at line 81 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::etaMin
private

Definition at line 80 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::etaStaTrack
private

Definition at line 112 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::etaTight
private

Definition at line 101 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::etaTrack
private

Definition at line 107 of file MuonRecoOneHLT.h.

std::string MuonRecoOneHLT::metname
private

Definition at line 61 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::muReco
private

Definition at line 92 of file MuonRecoOneHLT.h.

edm::ParameterSet MuonRecoOneHLT::parameters
private
int MuonRecoOneHLT::phiBin
private

Definition at line 83 of file MuonRecoOneHLT.h.

std::vector<MonitorElement*> MuonRecoOneHLT::phiGlbTrack
private

Definition at line 96 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::phiMax
private

Definition at line 85 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::phiMin
private

Definition at line 84 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::phiStaTrack
private

Definition at line 113 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::phiTight
private

Definition at line 102 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::phiTrack
private

Definition at line 108 of file MuonRecoOneHLT.h.

int MuonRecoOneHLT::ptBin
private

Definition at line 75 of file MuonRecoOneHLT.h.

std::vector<MonitorElement*> MuonRecoOneHLT::ptGlbTrack
private

Definition at line 98 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::ptMax
private

Definition at line 77 of file MuonRecoOneHLT.h.

float MuonRecoOneHLT::ptMin
private

Definition at line 76 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::ptStaTrack
private

Definition at line 115 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::ptTight
private

Definition at line 104 of file MuonRecoOneHLT.h.

MonitorElement* MuonRecoOneHLT::ptTrack
private

Definition at line 110 of file MuonRecoOneHLT.h.

std::vector<std::string> MuonRecoOneHLT::singlemuonExpr_
private

Definition at line 69 of file MuonRecoOneHLT.h.

edm::EDGetTokenT<reco::BeamSpot> MuonRecoOneHLT::theBeamSpotLabel_
private

Definition at line 66 of file MuonRecoOneHLT.h.

edm::EDGetTokenT<reco::MuonCollection> MuonRecoOneHLT::theMuonCollectionLabel_
private

Definition at line 64 of file MuonRecoOneHLT.h.

MuonServiceProxy* MuonRecoOneHLT::theService
private

Definition at line 58 of file MuonRecoOneHLT.h.

edm::EDGetTokenT<edm::TriggerResults> MuonRecoOneHLT::theTriggerResultsLabel_
private

Definition at line 67 of file MuonRecoOneHLT.h.

edm::EDGetTokenT<reco::VertexCollection> MuonRecoOneHLT::theVertexLabel_
private

Definition at line 65 of file MuonRecoOneHLT.h.