CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes
DiDispStaMuonMonitor Class Reference

#include <DiDispStaMuonMonitor.h>

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

Classes

struct  DiDispStaMuonME
 
struct  MEbinning
 

Public Member Functions

 DiDispStaMuonMonitor (const edm::ParameterSet &)
 
 ~DiDispStaMuonMonitor () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 

Protected Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void bookME (DQMStore::IBooker &, DiDispStaMuonME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
 
void bookME (DQMStore::IBooker &, DiDispStaMuonME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX)
 
void bookME (DQMStore::IBooker &, DiDispStaMuonME &me, const std::string &histname, const std::string &histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax, bool bookDen)
 
void bookME (DQMStore::IBooker &, DiDispStaMuonME &me, const std::string &histname, const std::string &histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax)
 
void bookME (DQMStore::IBooker &, DiDispStaMuonME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY)
 
void setTitle (DiDispStaMuonME &me, const std::string &titleX, const std::string &titleY, bool bookDen)
 

Static Private Member Functions

static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Private Attributes

std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
std::string folderName_
 
std::string histoSuffix_
 
MEbinning ls_binning_
 
MEbinning muonDxy_binning_
 
DiDispStaMuonME muonDxyME_
 
MEbinning muonEta_binning_
 
DiDispStaMuonME muonEtaME_
 
MEbinning muonPhi_binning_
 
DiDispStaMuonME muonPhiME_
 
MEbinning muonPt_binning_
 
std::vector< double > muonPt_variable_binning_
 
DiDispStaMuonME muonPtME_
 
DiDispStaMuonME muonPtME_variableBinning_
 
DiDispStaMuonME muonPtNoDxyCutME_
 
DiDispStaMuonME muonPtVsLS_
 
StringCutObjectSelector< reco::Track, true > muonSelectionDxy_
 
StringCutObjectSelector< reco::Track, true > muonSelectionGeneral_
 
StringCutObjectSelector< reco::Track, true > muonSelectionPt_
 
edm::EDGetTokenT< reco::TrackCollectionmuonToken_
 
unsigned int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
DiDispStaMuonME subMuonDxyME_
 
DiDispStaMuonME subMuonEtaME_
 
DiDispStaMuonME subMuonPhiME_
 
DiDispStaMuonME subMuonPtME_
 
DiDispStaMuonME subMuonPtME_variableBinning_
 

Detailed Description

Definition at line 40 of file DiDispStaMuonMonitor.h.

Constructor & Destructor Documentation

DiDispStaMuonMonitor::DiDispStaMuonMonitor ( const edm::ParameterSet iConfig)

Definition at line 7 of file DiDispStaMuonMonitor.cc.

References DiDispStaMuonMonitor::DiDispStaMuonME::denominator, muonDxyME_, muonEtaME_, muonPhiME_, muonPtME_, muonPtME_variableBinning_, muonPtNoDxyCutME_, muonPtVsLS_, DiDispStaMuonMonitor::DiDispStaMuonME::numerator, subMuonDxyME_, subMuonEtaME_, subMuonPhiME_, subMuonPtME_, subMuonPtME_variableBinning_, and ~DiDispStaMuonMonitor().

7  :
8  folderName_ ( iConfig.getParameter<std::string>("FolderName") )
9  , muonToken_ ( consumes<reco::TrackCollection> (iConfig.getParameter<edm::InputTag>("muons") ) )
10  , muonPt_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("muonPtBinning") )
11  , muonPt_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonPtPSet") ) )
12  , muonEta_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonEtaPSet") ) )
13  , muonPhi_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonPhiPSet") ) )
14  , muonDxy_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("muonDxyPSet") ) )
15  , ls_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("lsPSet") ) )
16  , num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"),consumesCollector(), *this))
17  , den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"),consumesCollector(), *this))
18  , muonSelectionGeneral_ ( iConfig.getParameter<edm::ParameterSet>("muonSelection").getParameter<std::string>("general") )
19  , muonSelectionPt_ ( iConfig.getParameter<edm::ParameterSet>("muonSelection").getParameter<std::string>("pt") )
20  , muonSelectionDxy_ ( iConfig.getParameter<edm::ParameterSet>("muonSelection").getParameter<std::string>("dxy") )
21  , nmuons_ ( iConfig.getParameter<unsigned int>("nmuons" ) )
22 {
23 
24  muonPtME_.numerator = nullptr;
25  muonPtME_.denominator = nullptr;
26  muonPtNoDxyCutME_.numerator = nullptr;
30  muonPtVsLS_.numerator = nullptr;
31  muonPtVsLS_.denominator = nullptr;
32  muonEtaME_.numerator = nullptr;
33  muonEtaME_.denominator = nullptr;
34  muonPhiME_.numerator = nullptr;
35  muonPhiME_.denominator = nullptr;
36  muonDxyME_.numerator = nullptr;
37  muonDxyME_.denominator = nullptr;
38 
39 
40  subMuonPtME_.numerator = nullptr;
41  subMuonPtME_.denominator = nullptr;
44  subMuonEtaME_.numerator = nullptr;
45  subMuonEtaME_.denominator = nullptr;
46  subMuonPhiME_.numerator = nullptr;
47  subMuonPhiME_.denominator = nullptr;
48  subMuonDxyME_.numerator = nullptr;
49  subMuonDxyME_.denominator = nullptr;
50 
51 
52 }
DiDispStaMuonME subMuonPtME_
T getParameter(std::string const &) const
DiDispStaMuonME subMuonEtaME_
std::vector< double > muonPt_variable_binning_
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
DiDispStaMuonME muonPtNoDxyCutME_
DiDispStaMuonME muonPhiME_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
StringCutObjectSelector< reco::Track, true > muonSelectionGeneral_
DiDispStaMuonME subMuonDxyME_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
StringCutObjectSelector< reco::Track, true > muonSelectionPt_
DiDispStaMuonME muonEtaME_
DiDispStaMuonME muonPtVsLS_
DiDispStaMuonME subMuonPtME_variableBinning_
edm::EDGetTokenT< reco::TrackCollection > muonToken_
DiDispStaMuonME muonDxyME_
DiDispStaMuonME subMuonPhiME_
StringCutObjectSelector< reco::Track, true > muonSelectionDxy_
DiDispStaMuonME muonPtME_variableBinning_
DiDispStaMuonMonitor::~DiDispStaMuonMonitor ( )
overridedefault

Referenced by DiDispStaMuonMonitor().

Member Function Documentation

void DiDispStaMuonMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 207 of file DiDispStaMuonMonitor.cc.

References den_genTriggerEventFlag_, DiDispStaMuonMonitor::DiDispStaMuonME::denominator, PVValHelper::dxy, PVValHelper::eta, MonitorElement::Fill(), edm::Event::getByToken(), mps_fire::i, edm::EventBase::id(), eostools::ls(), edm::EventID::luminosityBlock(), funct::m, muonDxyME_, muonEtaME_, muonPhiME_, muonPtME_, muonPtME_variableBinning_, muonPtNoDxyCutME_, muonPtVsLS_, extraflags_cff::muons, muonSelectionDxy_, muonSelectionGeneral_, muonSelectionPt_, muonToken_, nmuons_, num_genTriggerEventFlag_, DiDispStaMuonMonitor::DiDispStaMuonME::numerator, phi, EnergyCorrector::pt, reco::TrackBase::pt(), subMuonDxyME_, subMuonEtaME_, subMuonPhiME_, subMuonPtME_, and subMuonPtME_variableBinning_.

207  {
208 
209  // Filter out events if Trigger Filtering is requested
210  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
211 
212  int ls = iEvent.id().luminosityBlock();
213 
215  iEvent.getByToken( muonToken_, DSAHandle );
216  if ((unsigned int)(DSAHandle->size()) < nmuons_ ) return;
217  std::vector<edm::Ptr<reco::Track>> dsaMuonPtrs_{};// = DSAHandle->ptrs();
218  for (size_t i(0); i!=DSAHandle->size(); ++i) {
219  dsaMuonPtrs_.emplace_back(DSAHandle, i);
220  }
221  std::vector<edm::Ptr<reco::Track>> muons{}, muonsCutOnPt{}, muonsCutOnDxy{}, muonsCutOnPtAndDxy{};
222 
223  // general selection
224  auto selectGeneral_([this](edm::Ptr<reco::Track> const& m)->bool {return muonSelectionGeneral_(*m);});
225  std::copy_if(dsaMuonPtrs_.begin(), dsaMuonPtrs_.end(), back_inserter(muons), selectGeneral_);
226  if ((unsigned int)(muons.size()) < nmuons_ ) return;
227 
228  // sort by pt
229  auto ptSorter_ = [](edm::Ptr<reco::Track> const& lhs, edm::Ptr<reco::Track> const& rhs)->bool {return lhs->pt() > rhs->pt();};
230  std::sort(muons.begin(), muons.end(), ptSorter_);
231 
232  // cut on pt
233  auto selectOnPt_([this](edm::Ptr<reco::Track> const& m)->bool {return muonSelectionPt_(*m);});
234  std::copy_if(muons.begin(), muons.end(), back_inserter(muonsCutOnPt), selectOnPt_);
235  // cut on dxy
236  auto selectOnDxy_([this](edm::Ptr<reco::Track> const& m)->bool {return muonSelectionDxy_(*m);});
237  std::copy_if(muons.begin(), muons.end(), back_inserter(muonsCutOnDxy), selectOnDxy_);
238  // cut on pt and dxy
239  auto selectOnPtAndDxy_([this](edm::Ptr<reco::Track> const& m)->bool {return muonSelectionPt_(*m) && muonSelectionDxy_(*m);});
240  std::copy_if(muons.begin(), muons.end(), back_inserter(muonsCutOnPtAndDxy), selectOnPtAndDxy_);
241 
242  std::sort(muonsCutOnPt.begin(), muonsCutOnPt.end(), ptSorter_);
243  std::sort(muonsCutOnDxy.begin(), muonsCutOnDxy.end(), ptSorter_);
244  std::sort(muonsCutOnPtAndDxy.begin(), muonsCutOnPtAndDxy.end(), ptSorter_);
245 
246  // --------------------------------
247  // filling histograms (denominator)
248  // --------------------------------
249  if(muonsCutOnDxy.size() >= nmuons_) {
250  // pt has cut on dxy
251  muonPtME_.denominator->Fill( muonsCutOnDxy[0]->pt() );
253  muonPtME_variableBinning_.denominator->Fill( muonsCutOnDxy[0]->pt() );
254  muonPtVsLS_.denominator->Fill( ls, muonsCutOnDxy[0]->pt() );
255  if(nmuons_ > 1) {
256  subMuonPtME_.denominator->Fill( muonsCutOnDxy[1]->pt() );
257  subMuonPtME_variableBinning_.denominator->Fill( muonsCutOnDxy[1]->pt() );
258  }
259  }
260  if(muonsCutOnPtAndDxy.size() >= nmuons_) {
261  // eta, phi have cut on pt and dxy
262  muonEtaME_.denominator->Fill( muonsCutOnPtAndDxy[0]->eta() );
263  muonPhiME_.denominator->Fill( muonsCutOnPtAndDxy[0]->phi() );
264  if(nmuons_ > 1) {
265  subMuonEtaME_.denominator->Fill( muonsCutOnPtAndDxy[1]->eta() );
266  subMuonPhiME_.denominator->Fill( muonsCutOnPtAndDxy[1]->phi() );
267  }
268  }
269  if(muonsCutOnPt.size() >= nmuons_){
270  // dxy has cut on pt
271  muonDxyME_.denominator->Fill( muonsCutOnPt[0]->dxy() );
272  if (nmuons_ > 1) {
273  subMuonDxyME_.denominator->Fill( muonsCutOnPt[1]->dxy() );
274  }
275  }
276 
277 
278  // --------------------------------
279  // filling histograms (numerator)
280  // --------------------------------
281  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
282 
283  if(muonsCutOnDxy.size() >= nmuons_) {
284  // pt has cut on dxy
285  muonPtME_.numerator->Fill( muonsCutOnDxy[0]->pt() );
287  muonPtME_variableBinning_.numerator->Fill( muonsCutOnDxy[0]->pt() );
288  muonPtVsLS_.numerator->Fill( ls, muonsCutOnDxy[0]->pt() );
289  if(nmuons_ > 1) {
290  subMuonPtME_.numerator->Fill( muonsCutOnDxy[1]->pt() );
291  subMuonPtME_variableBinning_.numerator->Fill( muonsCutOnDxy[1]->pt() );
292  }
293  }
294  if(muonsCutOnPtAndDxy.size() >= nmuons_) {
295  // eta, phi have cut on pt and dxy
296  muonEtaME_.numerator->Fill( muonsCutOnPtAndDxy[0]->eta() );
297  muonPhiME_.numerator->Fill( muonsCutOnPtAndDxy[0]->phi() );
298  if(nmuons_ > 1) {
299  subMuonEtaME_.numerator->Fill( muonsCutOnPtAndDxy[1]->eta() );
300  subMuonPhiME_.numerator->Fill( muonsCutOnPtAndDxy[1]->phi() );
301  }
302  }
303  if(muonsCutOnPt.size() >= nmuons_){
304  // dxy has cut on pt
305  muonDxyME_.numerator->Fill( muonsCutOnPt[0]->dxy() );
306  if (nmuons_ > 1) {
307  subMuonDxyME_.numerator->Fill( muonsCutOnPt[1]->dxy() );
308  }
309  }
310 
311 
312 }
DiDispStaMuonME subMuonPtME_
DiDispStaMuonME subMuonEtaME_
DiDispStaMuonME muonPtNoDxyCutME_
DiDispStaMuonME muonPhiME_
void Fill(long long x)
StringCutObjectSelector< reco::Track, true > muonSelectionGeneral_
int iEvent
Definition: GenABIO.cc:224
DiDispStaMuonME subMuonDxyME_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
double pt() const
track transverse momentum
Definition: TrackBase.h:660
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
StringCutObjectSelector< reco::Track, true > muonSelectionPt_
def ls(path, rec=False)
Definition: eostools.py:349
DiDispStaMuonME muonEtaME_
DiDispStaMuonME muonPtVsLS_
DiDispStaMuonME subMuonPtME_variableBinning_
edm::EDGetTokenT< reco::TrackCollection > muonToken_
DiDispStaMuonME muonDxyME_
DiDispStaMuonME subMuonPhiME_
StringCutObjectSelector< reco::Track, true > muonSelectionDxy_
DiDispStaMuonME muonPtME_variableBinning_
void DiDispStaMuonMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 121 of file DiDispStaMuonMonitor.cc.

References bookME(), den_genTriggerEventFlag_, folderName_, ls_binning_, muonDxy_binning_, muonDxyME_, muonEta_binning_, muonEtaME_, muonPhi_binning_, muonPhiME_, muonPt_binning_, muonPt_variable_binning_, muonPtME_, muonPtME_variableBinning_, muonPtNoDxyCutME_, muonPtVsLS_, DiDispStaMuonMonitor::MEbinning::nbins, nmuons_, num_genTriggerEventFlag_, DQMStore::IBooker::setCurrentFolder(), setTitle(), AlCaHLTBitMon_QueryRunRegistry::string, subMuonDxyME_, subMuonEtaME_, subMuonPhiME_, subMuonPtME_, subMuonPtME_variableBinning_, DiDispStaMuonMonitor::MEbinning::xmax, and DiDispStaMuonMonitor::MEbinning::xmin.

124 {
125 
126  std::string histname, histtitle;
127  bool bookDen;
128 
129  std::string currentFolder = folderName_ ;
130  ibooker.setCurrentFolder(currentFolder);
131 
132  histname = "muonPt"; histtitle = "muonPt";
133  bookDen = true;
135  setTitle(muonPtME_,"DisplacedStandAlone Muon p_{T} [GeV]","Events / [GeV]", bookDen);
136 
137  histname = "muonPtNoDxyCut"; histtitle = "muonPtNoDxyCut";
138  bookDen = true;
140  setTitle(muonPtNoDxyCutME_,"DisplacedStandAlone Muon p_{T} [GeV] without Dxy cut","Events / [GeV]", bookDen);
141 
142  histname = "muonPt_variable"; histtitle = "muonPt";
143  bookDen = true;
144  bookME(ibooker,muonPtME_variableBinning_,histname,histtitle,muonPt_variable_binning_);
145  setTitle(muonPtME_variableBinning_,"DisplacedStandAlone Muon p_{T} [GeV]","Events / [GeV]", bookDen);
146 
147  histname = "muonPtVsLS"; histtitle = "muonPt vs LS";
148  bookDen = true;
150  setTitle(muonPtVsLS_,"LS","DisplacedStandAlone Muon p_{T} [GeV]", bookDen);
151 
152  histname = "muonEta"; histtitle = "muonEta";
153  bookDen = true;
155  setTitle(muonEtaME_,"DisplacedStandAlone Muon #eta","Events", bookDen);
156 
157  histname = "muonPhi"; histtitle = "muonPhi";
158  bookDen = true;
160  setTitle(muonPhiME_,"DisplacedStandAlone Muon #phi","Events", bookDen);
161 
162  histname = "muonDxy"; histtitle = "muonDxy";
163  bookDen = true;
165  setTitle(muonDxyME_,"DisplacedStandAlone Muon #dxy","Events", bookDen);
166 
167 
168  //-----------------------
169  // |
170  //-----------------------
171 
172  if (nmuons_>1) {
173  histname = "subMuonPt"; histtitle = "subMuonPt";
174  bookDen = true;
176  setTitle(subMuonPtME_,"Subleading DisplacedStandAlone Muon p_{T} [GeV]","Events / [GeV]", bookDen);
177 
178  histname = "subMuonPt_variable"; histtitle = "subMuonPt";
179  bookDen = true;
181  setTitle(subMuonPtME_variableBinning_,"Subleading DisplacedStandAlone Muon p_{T} [GeV]","Events / [GeV]", bookDen);
182 
183  histname = "subMuonEta"; histtitle = "subMuonEta";
184  bookDen = true;
186  setTitle(subMuonEtaME_,"Subleading DisplacedStandAlone Muon #eta","Events", bookDen);
187 
188  histname = "subMuonPhi"; histtitle = "subMuonPhi";
189  bookDen = true;
191  setTitle(subMuonPhiME_,"Subleading DisplacedStandAlone Muon #phi","Events", bookDen);
192 
193  histname = "subMuonDxy"; histtitle = "subMuonDxy";
194  bookDen = true;
196  setTitle(subMuonDxyME_,"Subleading DisplacedStandAlone Muon #dxy","Events", bookDen);
197 
198  }
199 
200 
201  // Initialize the GenericTriggerEventFlag
202  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
203  if ( den_genTriggerEventFlag_ && den_genTriggerEventFlag_->on() ) den_genTriggerEventFlag_->initRun( iRun, iSetup );
204 
205 }
DiDispStaMuonME subMuonPtME_
void setTitle(DiDispStaMuonME &me, const std::string &titleX, const std::string &titleY, bool bookDen)
DiDispStaMuonME subMuonEtaME_
std::vector< double > muonPt_variable_binning_
DiDispStaMuonME muonPtNoDxyCutME_
DiDispStaMuonME muonPhiME_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
DiDispStaMuonME subMuonDxyME_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
void bookME(DQMStore::IBooker &, DiDispStaMuonME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
DiDispStaMuonME muonEtaME_
DiDispStaMuonME muonPtVsLS_
DiDispStaMuonME subMuonPtME_variableBinning_
DiDispStaMuonME muonDxyME_
DiDispStaMuonME subMuonPhiME_
DiDispStaMuonME muonPtME_variableBinning_
void DiDispStaMuonMonitor::bookME ( DQMStore::IBooker ibooker,
DiDispStaMuonME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbins,
double  xmin,
double  xmax 
)
protected

Definition at line 85 of file DiDispStaMuonMonitor.cc.

References DQMStore::IBooker::book1D(), DiDispStaMuonMonitor::DiDispStaMuonME::denominator, and DiDispStaMuonMonitor::DiDispStaMuonME::numerator.

Referenced by bookHistograms().

86 {
87  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, min, max);
88  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, min, max);
89 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
T min(T a, T b)
Definition: MathUtil.h:58
void DiDispStaMuonMonitor::bookME ( DQMStore::IBooker ibooker,
DiDispStaMuonME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX 
)
protected

Definition at line 90 of file DiDispStaMuonMonitor.cc.

References DQMStore::IBooker::book1D(), DiDispStaMuonMonitor::DiDispStaMuonME::denominator, pileupCalc::nbins, and DiDispStaMuonMonitor::DiDispStaMuonME::numerator.

91 {
92  int nbins = binning.size()-1;
93  std::vector<float> fbinning(binning.begin(),binning.end());
94  float* arr = &fbinning[0];
95  me.numerator = ibooker.book1D(histname+"_numerator", histtitle+" (numerator)", nbins, arr);
96  me.denominator = ibooker.book1D(histname+"_denominator", histtitle+" (denominator)", nbins, arr);
97 }
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void DiDispStaMuonMonitor::bookME ( DQMStore::IBooker ibooker,
DiDispStaMuonME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
double  ymin,
double  ymax,
bool  bookDen 
)
protected

Definition at line 98 of file DiDispStaMuonMonitor.cc.

References DQMStore::IBooker::bookProfile(), DiDispStaMuonMonitor::DiDispStaMuonME::denominator, and DiDispStaMuonMonitor::DiDispStaMuonME::numerator.

99 {
100  me.numerator = ibooker.bookProfile(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
101  if(bookDen) me.denominator = ibooker.bookProfile(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
102 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:113
void DiDispStaMuonMonitor::bookME ( DQMStore::IBooker ibooker,
DiDispStaMuonME me,
const std::string &  histname,
const std::string &  histtitle,
int  nbinsX,
double  xmin,
double  xmax,
int  nbinsY,
double  ymin,
double  ymax 
)
protected

Definition at line 103 of file DiDispStaMuonMonitor.cc.

References DQMStore::IBooker::book2D(), DiDispStaMuonMonitor::DiDispStaMuonME::denominator, and DiDispStaMuonMonitor::DiDispStaMuonME::numerator.

104 {
105  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
106  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
107 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void DiDispStaMuonMonitor::bookME ( DQMStore::IBooker ibooker,
DiDispStaMuonME me,
const std::string &  histname,
const std::string &  histtitle,
const std::vector< double > &  binningX,
const std::vector< double > &  binningY 
)
protected

Definition at line 108 of file DiDispStaMuonMonitor.cc.

References DQMStore::IBooker::book2D(), DiDispStaMuonMonitor::DiDispStaMuonME::denominator, and DiDispStaMuonMonitor::DiDispStaMuonME::numerator.

109 {
110  int nbinsX = binningX.size()-1;
111  std::vector<float> fbinningX(binningX.begin(),binningX.end());
112  float* arrX = &fbinningX[0];
113  int nbinsY = binningY.size()-1;
114  std::vector<float> fbinningY(binningY.begin(),binningY.end());
115  float* arrY = &fbinningY[0];
116 
117  me.numerator = ibooker.book2D(histname+"_numerator", histtitle+" (numerator)", nbinsX, arrX, nbinsY, arrY);
118  me.denominator = ibooker.book2D(histname+"_denominator", histtitle+" (denominator)", nbinsX, arrX, nbinsY, arrY);
119 }
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void DiDispStaMuonMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 326 of file DiDispStaMuonMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), create_public_pileup_plots::bins, DEFINE_FWK_MODULE, fillHistoPSetDescription(), softMuonTagInfos_cfi::muonSelection, and AlCaHLTBitMon_QueryRunRegistry::string.

327 {
329  desc.add<std::string> ( "FolderName", "HLT/EXO/DiDispStaMuon" );
330 
331  desc.add<edm::InputTag>( "muons", edm::InputTag("displacedStandAloneMuons") );
332  desc.add<unsigned int>("nmuons", 2);
333 
335  muonSelection.add<std::string>("general", "pt > 0");
336  muonSelection.add<std::string>("pt", "");
337  muonSelection.add<std::string>("dxy", "pt > 0");
338  desc.add<edm::ParameterSetDescription>("muonSelection", muonSelection);
339 
340  edm::ParameterSetDescription genericTriggerEventPSet;
341  genericTriggerEventPSet.add<bool>("andOr");
342  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
343  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
344  genericTriggerEventPSet.add<bool>("andOrDcs", false);
345  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
346  genericTriggerEventPSet.add<std::string>("dbLabel","");
347  genericTriggerEventPSet.add<bool>("andOrHlt", true);
348  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
349  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
350  genericTriggerEventPSet.add<std::string>("hltDBKey","");
351  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
352  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",1);
353 
354  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
355  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
356 
358  edm::ParameterSetDescription muonPtPSet;
359  edm::ParameterSetDescription muonEtaPSet;
360  edm::ParameterSetDescription muonPhiPSet;
361  edm::ParameterSetDescription muonDxyPSet;
363  fillHistoPSetDescription(muonPtPSet);
364  fillHistoPSetDescription(muonEtaPSet);
365  fillHistoPSetDescription(muonPhiPSet);
366  fillHistoPSetDescription(muonDxyPSet);
367  fillHistoPSetDescription(lsPSet);
368  histoPSet.add<edm::ParameterSetDescription>("muonPtPSet", muonPtPSet);
369  histoPSet.add<edm::ParameterSetDescription>("muonEtaPSet", muonEtaPSet);
370  histoPSet.add<edm::ParameterSetDescription>("muonPhiPSet", muonPhiPSet);
371  histoPSet.add<edm::ParameterSetDescription>("muonDxyPSet", muonDxyPSet);
372  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
373  std::vector<double> bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.};
374  histoPSet.add<std::vector<double> >("muonPtBinning", bins);
375 
376  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
377 
378  descriptions.add("DiDispStaMuonMonitoring", desc);
379 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void DiDispStaMuonMonitor::fillHistoLSPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 321 of file DiDispStaMuonMonitor.cc.

References edm::ParameterSetDescription::add().

322 {
323  pset.add<unsigned int> ( "nbins", 2000);
324 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void DiDispStaMuonMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 314 of file DiDispStaMuonMonitor.cc.

References edm::ParameterSetDescription::add().

Referenced by fillDescriptions().

315 {
316  pset.add<unsigned int> ( "nbins", 200);
317  pset.add<double>( "xmin", -0.5 );
318  pset.add<double>( "xmax", 19999.5 );
319 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
DiDispStaMuonMonitor::MEbinning DiDispStaMuonMonitor::getHistoLSPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 65 of file DiDispStaMuonMonitor.cc.

References edm::ParameterSet::getParameter().

66 {
67  return MEbinning{
68  pset.getParameter<unsigned int>("nbins"),
69  0.,
70  double(pset.getParameter<unsigned int>("nbins"))
71  };
72 }
T getParameter(std::string const &) const
DiDispStaMuonMonitor::MEbinning DiDispStaMuonMonitor::getHistoPSet ( const edm::ParameterSet pset)
staticprivate

Definition at line 56 of file DiDispStaMuonMonitor.cc.

References edm::ParameterSet::getParameter().

57 {
58  return MEbinning{
59  pset.getParameter<unsigned int>("nbins"),
60  pset.getParameter<double>("xmin"),
61  pset.getParameter<double>("xmax"),
62  };
63 }
T getParameter(std::string const &) const
void DiDispStaMuonMonitor::setTitle ( DiDispStaMuonME me,
const std::string &  titleX,
const std::string &  titleY,
bool  bookDen 
)
protected

Definition at line 74 of file DiDispStaMuonMonitor.cc.

References DiDispStaMuonMonitor::DiDispStaMuonME::denominator, DiDispStaMuonMonitor::DiDispStaMuonME::numerator, and MonitorElement::setAxisTitle().

Referenced by bookHistograms(), Vispa.Gui.PortWidget.PortWidget::setName(), and Vispa.Views.LineDecayView.LineDecayContainer::setPxlObject().

75 {
76  me.numerator->setAxisTitle(titleX,1);
77  me.numerator->setAxisTitle(titleY,2);
78  if(bookDen) {
79  me.denominator->setAxisTitle(titleX,1);
80  me.denominator->setAxisTitle(titleY,2);
81  }
82 
83 }

Member Data Documentation

std::unique_ptr<GenericTriggerEventFlag> DiDispStaMuonMonitor::den_genTriggerEventFlag_
private

Definition at line 102 of file DiDispStaMuonMonitor.h.

Referenced by analyze(), and bookHistograms().

std::string DiDispStaMuonMonitor::folderName_
private

Definition at line 76 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

std::string DiDispStaMuonMonitor::histoSuffix_
private

Definition at line 77 of file DiDispStaMuonMonitor.h.

MEbinning DiDispStaMuonMonitor::ls_binning_
private

Definition at line 86 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

MEbinning DiDispStaMuonMonitor::muonDxy_binning_
private

Definition at line 85 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

DiDispStaMuonME DiDispStaMuonMonitor::muonDxyME_
private

Definition at line 94 of file DiDispStaMuonMonitor.h.

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

MEbinning DiDispStaMuonMonitor::muonEta_binning_
private

Definition at line 83 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

DiDispStaMuonME DiDispStaMuonMonitor::muonEtaME_
private

Definition at line 92 of file DiDispStaMuonMonitor.h.

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

MEbinning DiDispStaMuonMonitor::muonPhi_binning_
private

Definition at line 84 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

DiDispStaMuonME DiDispStaMuonMonitor::muonPhiME_
private

Definition at line 93 of file DiDispStaMuonMonitor.h.

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

MEbinning DiDispStaMuonMonitor::muonPt_binning_
private

Definition at line 82 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

std::vector<double> DiDispStaMuonMonitor::muonPt_variable_binning_
private

Definition at line 81 of file DiDispStaMuonMonitor.h.

Referenced by bookHistograms().

DiDispStaMuonME DiDispStaMuonMonitor::muonPtME_
private

Definition at line 88 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::muonPtME_variableBinning_
private

Definition at line 90 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::muonPtNoDxyCutME_
private

Definition at line 89 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::muonPtVsLS_
private

Definition at line 91 of file DiDispStaMuonMonitor.h.

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

StringCutObjectSelector<reco::Track,true> DiDispStaMuonMonitor::muonSelectionDxy_
private

Definition at line 106 of file DiDispStaMuonMonitor.h.

Referenced by analyze().

StringCutObjectSelector<reco::Track,true> DiDispStaMuonMonitor::muonSelectionGeneral_
private

Definition at line 104 of file DiDispStaMuonMonitor.h.

Referenced by analyze().

StringCutObjectSelector<reco::Track,true> DiDispStaMuonMonitor::muonSelectionPt_
private

Definition at line 105 of file DiDispStaMuonMonitor.h.

Referenced by analyze().

edm::EDGetTokenT<reco::TrackCollection> DiDispStaMuonMonitor::muonToken_
private

Definition at line 79 of file DiDispStaMuonMonitor.h.

Referenced by analyze().

unsigned int DiDispStaMuonMonitor::nmuons_
private

Definition at line 107 of file DiDispStaMuonMonitor.h.

Referenced by analyze(), and bookHistograms().

std::unique_ptr<GenericTriggerEventFlag> DiDispStaMuonMonitor::num_genTriggerEventFlag_
private

Definition at line 101 of file DiDispStaMuonMonitor.h.

Referenced by analyze(), and bookHistograms().

DiDispStaMuonME DiDispStaMuonMonitor::subMuonDxyME_
private

Definition at line 99 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::subMuonEtaME_
private

Definition at line 97 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::subMuonPhiME_
private

Definition at line 98 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::subMuonPtME_
private

Definition at line 95 of file DiDispStaMuonMonitor.h.

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

DiDispStaMuonME DiDispStaMuonMonitor::subMuonPtME_variableBinning_
private

Definition at line 96 of file DiDispStaMuonMonitor.h.

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