CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
BPHMonitor Class Reference
Inheritance diagram for BPHMonitor:
DQMEDAnalyzer TriggerDQMBase edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Types inherited from TriggerDQMBase
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

 BPHMonitor (const edm::ParameterSet &)
 
 ~BPHMonitor () override throw ()
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
- Public Member Functions inherited from TriggerDQMBase
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const uint nbinsY, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY, const bool bookDen=true)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Static Public Member Functions inherited from TriggerDQMBase
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &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
 
template<typename T >
bool matchToTrigger (const std::string &theTriggerName, T t)
 
double Prescale (const std::string num, const std::string den, edm::Event const &iEvent, edm::EventSetup const &iSetup, HLTPrescaleProvider *hltPrescale_)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

std::string getTriggerName (std::string partialName)
 

Private Attributes

ObjME BMass_
 
MEbinning Bmass_binning_
 
edm::InputTag bsInputTag_
 
edm::EDGetTokenT< reco::BeamSpotbsToken_
 
MEbinning cos_binning_
 
MEbinning d0_binning_
 
MEbinning dca_binning_
 
std::unique_ptr< GenericTriggerEventFlagden_genTriggerEventFlag_
 
ObjME DiMuDCA_
 
ObjME DiMudR_
 
ObjME DiMuDS_
 
ObjME DiMuEta_
 
ObjME DiMuMass_
 
ObjME DiMuPhi_
 
ObjME DiMuProb_
 
ObjME DiMuPt_
 
ObjME DiMuPVcos_
 
int displaced_
 
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
 
std::vector< double > dMu_pt_variable_binning_
 
MEbinning dR_binning_
 
MEbinning ds_binning_
 
int enum_
 
MEbinning eta_binning_
 
const std::string folderName_
 
edm::Handle< trigger::TriggerEventhandleTriggerEvent
 
HLTConfigProvider hltConfig_
 
edm::EDGetTokenT< trigger::TriggerEventhltInputTag_
 
edm::InputTag hltInputTag_1
 
std::vector< std::string > hltpaths_den
 
std::vector< std::string > hltpaths_num
 
bool hltPathsAreValid_
 
HLTPrescaleProviderhltPrescale_
 
edm::Handle< edm::TriggerResultsHLTR
 
edm::EDGetTokenT< edm::TriggerResultshltTrigResTag_
 
int Jpsi_
 
double kaon_mass
 
int L3_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagneticFieldToken_
 
MEbinning mass_binning_
 
double max_dR
 
double maxmass_
 
double maxmassJpsi
 
double maxmassJpsiTk
 
double maxmassTkTk
 
double maxmassUpsilon
 
double min_dR
 
double mincos
 
double minDS
 
double minmass_
 
double minmassJpsi
 
double minmassJpsiTk
 
double minmassTkTk
 
double minmassUpsilon
 
double minprob
 
ObjME mu1d0_
 
ObjME mu1Eta_
 
ObjME mu1Phi_
 
ObjME mu1Pt_
 
ObjME mu1z0_
 
ObjME mu2d0_
 
ObjME mu2Eta_
 
ObjME mu2Phi_
 
ObjME mu2Pt_
 
ObjME mu2z0_
 
ObjME mu3d0_
 
ObjME mu3Eta_
 
ObjME mu3Phi_
 
ObjME mu3Pt_
 
ObjME mu3z0_
 
double mu_mass
 
ObjME mud0_
 
ObjME muEta_
 
edm::InputTag muoInputTag_
 
StringCutObjectSelector< reco::Muon, true > muoSelection_
 
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
 
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
 
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
 
edm::EDGetTokenT< reco::MuonCollectionmuoToken_
 
ObjME muPhi_
 
ObjME muPt_
 
ObjME muz0_
 
int nmuons_
 
std::unique_ptr< GenericTriggerEventFlagnum_genTriggerEventFlag_
 
ObjME phEta_
 
MEbinning phi_binning_
 
edm::InputTag phInputTag_
 
ObjME phPhi_
 
ObjME phPt_
 
edm::EDGetTokenT< reco::PhotonCollectionphToken_
 
std::vector< double > prob_variable_binning_
 
std::vector< double > pt_variable_binning_
 
int ptCut_
 
const bool requireValidHLTPaths_
 
int seagull_
 
bool tnp_
 
edm::InputTag trInputTag_
 
int trOrMu_
 
StringCutObjectSelector< reco::Track, true > trSelection_
 
StringCutObjectSelector< reco::Track, true > trSelection_ref
 
edm::EDGetTokenT< reco::TrackCollectiontrToken_
 
int Upsilon_
 
edm::InputTag vtxInputTag_
 
edm::EDGetTokenT< reco::VertexCollectionvtxToken_
 
MEbinning z0_binning_
 

Additional Inherited Members

- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 47 of file BPHMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 50 of file BPHMonitor.cc.

◆ MonitorElement

Definition at line 49 of file BPHMonitor.cc.

Constructor & Destructor Documentation

◆ BPHMonitor()

BPHMonitor::BPHMonitor ( const edm::ParameterSet iConfig)

Definition at line 193 of file BPHMonitor.cc.

References magneticFieldToken_, and tnp_.

194  : folderName_(iConfig.getParameter<std::string>("FolderName")),
195  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
196  hltPathsAreValid_(false),
197  muoInputTag_(iConfig.getParameter<edm::InputTag>("muons")),
198  bsInputTag_(iConfig.getParameter<edm::InputTag>("beamSpot")),
199  trInputTag_(iConfig.getParameter<edm::InputTag>("tracks")),
200  phInputTag_(iConfig.getParameter<edm::InputTag>("photons")),
201  vtxInputTag_(iConfig.getParameter<edm::InputTag>("offlinePVs")),
202  muoToken_(mayConsume<reco::MuonCollection>(muoInputTag_)),
203  bsToken_(mayConsume<reco::BeamSpot>(bsInputTag_)),
204  trToken_(mayConsume<reco::TrackCollection>(trInputTag_)),
205  phToken_(mayConsume<reco::PhotonCollection>(phInputTag_)),
206  vtxToken_(mayConsume<reco::VertexCollection>(vtxInputTag_)),
208  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("ptBinning")),
210  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("dMuPtBinning")),
212  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double>>("probBinning")),
214  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("phiPSet"))),
216  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("etaPSet"))),
217  d0_binning_(
218  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("d0PSet"))),
219  z0_binning_(
220  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("z0PSet"))),
221  dR_binning_(
222  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("dRPSet"))),
224  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("massPSet"))),
226  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("BmassPSet"))),
228  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("dcaPSet"))),
229  ds_binning_(
230  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("dsPSet"))),
232  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("cosPSet"))),
234  iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
236  iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
237  hltPrescale_(new HLTPrescaleProvider(iConfig, consumesCollector(), *this)),
238  muoSelection_(iConfig.getParameter<std::string>("muoSelection")),
239  muoSelection_ref(iConfig.getParameter<std::string>("muoSelection_ref")),
240  muoSelection_tag(iConfig.getParameter<std::string>("muoSelection_tag")),
241  muoSelection_probe(iConfig.getParameter<std::string>("muoSelection_probe")),
242  nmuons_(iConfig.getParameter<int>("nmuons")),
243  tnp_(iConfig.getParameter<bool>("tnp")),
244  L3_(iConfig.getParameter<int>("L3")),
245  ptCut_(iConfig.getParameter<int>("ptCut")),
246  displaced_(iConfig.getParameter<int>("displaced")),
247  trOrMu_(iConfig.getParameter<int>("trOrMu")),
248  Jpsi_(iConfig.getParameter<int>("Jpsi")),
249  Upsilon_(iConfig.getParameter<int>("Upsilon")) // if ==1 path with Upsilon constraint
250  ,
251  enum_(iConfig.getParameter<int>("enum")),
252  seagull_(iConfig.getParameter<int>("seagull")),
253  maxmass_(iConfig.getParameter<double>("maxmass")),
254  minmass_(iConfig.getParameter<double>("minmass")),
255  maxmassJpsi(iConfig.getParameter<double>("maxmassJpsi")),
256  minmassJpsi(iConfig.getParameter<double>("minmassJpsi")),
257  maxmassUpsilon(iConfig.getParameter<double>("maxmassUpsilon")),
258  minmassUpsilon(iConfig.getParameter<double>("minmassUpsilon")),
259  maxmassTkTk(iConfig.getParameter<double>("maxmassTkTk")),
260  minmassTkTk(iConfig.getParameter<double>("minmassTkTk")),
261  maxmassJpsiTk(iConfig.getParameter<double>("maxmassJpsiTk")),
262  minmassJpsiTk(iConfig.getParameter<double>("minmassJpsiTk")),
263  kaon_mass(iConfig.getParameter<double>("kaon_mass")),
264  mu_mass(iConfig.getParameter<double>("mu_mass")),
265  min_dR(iConfig.getParameter<double>("min_dR")),
266  max_dR(iConfig.getParameter<double>("max_dR")),
267  minprob(iConfig.getParameter<double>("minprob")),
268  mincos(iConfig.getParameter<double>("mincos")),
269  minDS(iConfig.getParameter<double>("minDS")),
270  hltInputTag_1(iConfig.getParameter<edm::InputTag>("hltTriggerSummaryAOD")),
271  hltInputTag_(mayConsume<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("hltTriggerSummaryAOD"))),
272  hltpaths_num(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet")
273  .getParameter<std::vector<std::string>>("hltPaths")),
274  hltpaths_den(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet")
275  .getParameter<std::vector<std::string>>("hltPaths")),
276  trSelection_(iConfig.getParameter<std::string>("muoSelection")),
277  trSelection_ref(iConfig.getParameter<std::string>("trSelection_ref")),
278  DMSelection_ref(iConfig.getParameter<std::string>("DMSelection_ref")) {
279  if (!tnp_) {
280  magneticFieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
281  }
282 }
const bool requireValidHLTPaths_
Definition: BPHMonitor.cc:72
MEbinning z0_binning_
Definition: BPHMonitor.cc:95
double max_dR
Definition: BPHMonitor.cc:172
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool hltPathsAreValid_
Definition: BPHMonitor.cc:73
double maxmassJpsiTk
Definition: BPHMonitor.cc:167
double kaon_mass
Definition: BPHMonitor.cc:169
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.cc:142
StringCutObjectSelector< reco::Track, true > trSelection_
Definition: BPHMonitor.cc:182
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.cc:184
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.cc:81
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: BPHMonitor.cc:140
edm::InputTag bsInputTag_
Definition: BPHMonitor.cc:76
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.cc:145
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MEbinning eta_binning_
Definition: BPHMonitor.cc:93
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.cc:179
double maxmassTkTk
Definition: BPHMonitor.cc:165
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.cc:83
double minmass_
Definition: BPHMonitor.cc:160
double minprob
Definition: BPHMonitor.cc:174
MEbinning dca_binning_
Definition: BPHMonitor.cc:99
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
const std::string folderName_
Definition: BPHMonitor.cc:70
int displaced_
Definition: BPHMonitor.cc:153
double mincos
Definition: BPHMonitor.cc:175
double maxmassJpsi
Definition: BPHMonitor.cc:161
edm::InputTag muoInputTag_
Definition: BPHMonitor.cc:75
MEbinning dR_binning_
Definition: BPHMonitor.cc:96
edm::InputTag vtxInputTag_
Definition: BPHMonitor.cc:79
StringCutObjectSelector< reco::Track, true > trSelection_ref
Definition: BPHMonitor.cc:183
double mu_mass
Definition: BPHMonitor.cc:170
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: BPHMonitor.cc:85
MEbinning phi_binning_
Definition: BPHMonitor.cc:92
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Definition: BPHMonitor.cc:87
MEbinning ds_binning_
Definition: BPHMonitor.cc:100
double maxmass_
Definition: BPHMonitor.cc:159
MEbinning cos_binning_
Definition: BPHMonitor.cc:101
std::vector< std::string > hltpaths_den
Definition: BPHMonitor.cc:181
MEbinning d0_binning_
Definition: BPHMonitor.cc:94
std::vector< double > pt_variable_binning_
Definition: BPHMonitor.cc:89
double minmassJpsiTk
Definition: BPHMonitor.cc:168
std::vector< double > dMu_pt_variable_binning_
Definition: BPHMonitor.cc:90
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.cc:84
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.cc:82
double minDS
Definition: BPHMonitor.cc:176
double minmassUpsilon
Definition: BPHMonitor.cc:164
StringCutObjectSelector< reco::Muon, true > muoSelection_probe
Definition: BPHMonitor.cc:147
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.cc:144
edm::InputTag hltInputTag_1
Definition: BPHMonitor.cc:178
double maxmassUpsilon
Definition: BPHMonitor.cc:163
double minmassTkTk
Definition: BPHMonitor.cc:166
edm::InputTag trInputTag_
Definition: BPHMonitor.cc:77
StringCutObjectSelector< reco::Muon, true > muoSelection_tag
Definition: BPHMonitor.cc:146
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: BPHMonitor.cc:139
MEbinning mass_binning_
Definition: BPHMonitor.cc:97
std::vector< std::string > hltpaths_num
Definition: BPHMonitor.cc:180
double minmassJpsi
Definition: BPHMonitor.cc:162
edm::InputTag phInputTag_
Definition: BPHMonitor.cc:78
std::vector< double > prob_variable_binning_
Definition: BPHMonitor.cc:91
MEbinning Bmass_binning_
Definition: BPHMonitor.cc:98
double min_dR
Definition: BPHMonitor.cc:171

◆ ~BPHMonitor()

BPHMonitor::~BPHMonitor ( )
throw (
)
override

Definition at line 284 of file BPHMonitor.cc.

References den_genTriggerEventFlag_, hltPrescale_, and num_genTriggerEventFlag_.

284  {
286  num_genTriggerEventFlag_.reset();
287  }
289  den_genTriggerEventFlag_.reset();
290  }
291 
292  delete hltPrescale_;
293 }
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.cc:142
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: BPHMonitor.cc:140
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: BPHMonitor.cc:139

Member Function Documentation

◆ analyze()

void BPHMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 469 of file BPHMonitor.cc.

References pwdgSkimBPark_cfi::beamSpot, BMass_, bsToken_, ClosestApproachInRPhi::calculate(), reco::Vertex::chi2(), SiPixelRawToDigiRegional_cfi::deltaPhi, reco::deltaR(), den_genTriggerEventFlag_, TriggerDQMBase::ObjME::denominator, DiMuDCA_, DiMudR_, DiMuDS_, DiMuEta_, DiMuMass_, DiMuPhi_, DiMuProb_, DiMuPt_, DiMuPVcos_, displaced_, ClosestApproachInRPhi::distance(), DMSelection_ref, reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), StorageManager_cfg::e1, SiPixelPhase1Clusters_cfi::e3, vertexPlots::e4, enum_, submitPVResolutionJobs::err, dqm::impl::MonitorElement::Fill(), edm::EventSetup::getData(), getTriggerName(), handleTriggerEvent, reco::TrackBase::highPurity, hltInputTag_, hltpaths_den, hltpaths_num, hltPathsAreValid_, hltPrescale_, mps_fire::i, iEvent, createfilelist::int, edm::HandleBase::isValid(), TrajectoryStateClosestToPoint::isValid(), TransientVertex::isValid(), Jpsi_, kaon_mass, edm::InputTag::label(), visualization-live-secondInstance_cfg::m, callgraph::m2, HLT_2023v12_cff::magneticField, magneticFieldToken_, matchToTrigger(), maxmass_, maxmassJpsi, maxmassJpsiTk, maxmassTkTk, maxmassUpsilon, min_dR, mincos, minDS, minmass_, minmassJpsi, minmassJpsiTk, minmassTkTk, minmassUpsilon, minprob, reco::TrackBase::momentum(), mu1Eta_, mu1Phi_, mu1Pt_, mu2Eta_, mu2Phi_, mu2Pt_, mu3Eta_, mu3Phi_, mu3Pt_, mu_mass, muEta_, muoSelection_, muoSelection_ref, muoToken_, muPhi_, muPt_, reco::Vertex::ndof(), num_genTriggerEventFlag_, TriggerDQMBase::ObjME::numerator, AlCaHLTBitMon_ParallelJobs::p, LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, chargedHadronTrackResolutionFilter_cfi::p3, PV3DBase< T, PVType, FrameType >::perp(), phEta_, VtxSmearedParameters_cfi::Phi, phInputTag_, phPhi_, phPt_, phToken_, TransientVertex::position(), TransientVertex::positionError(), Prescale(), DiDispStaMuonMonitor_cfi::pt, ptCut_, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), reco::TrackBase::quality(), requireValidHLTPaths_, GlobalErrorBase< T, ErrorWeightType >::rerr(), seagull_, singleTopDQM_miniAOD_cfi::secondaryVertex, trigger::TriggerEvent::sizeFilters(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, RandomServiceHelper::t1, TrajectoryStateClosestToPoint::theState(), tnp_, trSelection_ref, trToken_, Upsilon_, bphysicsOniaDQM_cfi::vertex, KalmanVertexFitter::vertex(), PV3DBase< T, PVType, FrameType >::x(), reco::BeamSpot::x0(), PV3DBase< T, PVType, FrameType >::y(), reco::BeamSpot::y0(), PV3DBase< T, PVType, FrameType >::z(), and reco::BeamSpot::z0().

469  {
470  // if valid HLT paths are required,
471  // analyze event only if all paths are valid
473  return;
474  }
475 
477  iEvent.getByToken(bsToken_, beamSpot);
478  if (!beamSpot.isValid()) {
479  return;
480  }
481 
483  iEvent.getByToken(muoToken_, muoHandle);
484  if (!muoHandle.isValid()) {
485  return;
486  }
487 
489  iEvent.getByToken(trToken_, trHandle);
490  if (!trHandle.isValid()) {
491  return;
492  }
493 
495  iEvent.getByToken(phToken_, phHandle);
496 
497  edm::Handle<edm::TriggerResults> handleTriggerTrigRes;
498 
499  const std::string& hltpath = getTriggerName(hltpaths_den[0]);
500  const std::string& hltpath1 = getTriggerName(hltpaths_num[0]);
501 
502  double PrescaleWeight = 1.0;
503  if (den_genTriggerEventFlag_->on() && den_genTriggerEventFlag_->accept(iEvent, iSetup) &&
504  num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup))
505  PrescaleWeight = Prescale(hltpath1, hltpath, iEvent, iSetup, hltPrescale_);
506 
507  if (tnp_ > 0) { //TnP method
508 
509  if (den_genTriggerEventFlag_->on() && !den_genTriggerEventFlag_->accept(iEvent, iSetup))
510  return;
512  if (handleTriggerEvent->sizeFilters() == 0)
513  return;
514 
515  std::vector<reco::Muon> tagMuons;
516  for (auto const& m : *muoHandle) { // applying tag selection
517  if (!matchToTrigger(hltpath, m))
518  continue;
519  if (muoSelection_ref(m))
520  tagMuons.push_back(m);
521  }
522 
523  for (int i = 0; i < int(tagMuons.size()); i++) {
524  for (auto const& m : *muoHandle) {
525  if (!matchToTrigger(hltpath, m))
526  continue;
527  if ((tagMuons[i].pt() == m.pt()))
528  continue; //not the same
529  if ((tagMuons[i].p4() + m.p4()).M() > minmass_ &&
530  (tagMuons[i].p4() + m.p4()).M() < maxmass_) { //near to J/psi mass
531  muPhi_.denominator->Fill(m.phi());
532  muEta_.denominator->Fill(m.eta());
533  muPt_.denominator->Fill(m.pt());
534  if (muoSelection_(m) && num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
535  muPhi_.numerator->Fill(m.phi(), PrescaleWeight);
536  muEta_.numerator->Fill(m.eta(), PrescaleWeight);
537  muPt_.numerator->Fill(m.pt(), PrescaleWeight);
538  }
539  }
540  }
541  }
542 
543  } else { // reference method
544 
545  if (den_genTriggerEventFlag_->on() && (!den_genTriggerEventFlag_->accept(iEvent, iSetup)))
546  return;
547 
549  if (handleTriggerEvent->sizeFilters() == 0)
550  return;
551 
552  for (auto const& m : *muoHandle) {
553  if (!muoSelection_ref(m))
554  continue;
555  if (!matchToTrigger(hltpath, m))
556  continue;
557 
558  for (auto const& m1 : *muoHandle) {
559  if (!(m1.pt() > m.pt()))
560  continue;
561  if (ptCut_) {
562  if (!muoSelection_(m1))
563  continue;
564  } else if (!muoSelection_ref(m1))
565  continue;
566  if (!matchToTrigger(hltpath, m1))
567  continue;
568 
569  if (enum_ != 10) {
570  if (!DMSelection_ref(m1.p4() + m.p4()))
571  continue;
572  if (m.charge() * m1.charge() > 0)
573  continue;
574  }
575 
576  // dimuon vertex reconstruction
577  MagneticField const& magneticField = iSetup.getData(magneticFieldToken_);
578  const reco::BeamSpot& vertexBeamSpot = *beamSpot;
579  std::vector<reco::TransientTrack> j_tks;
580  reco::TransientTrack mu1TT(m.track(), &magneticField);
581  reco::TransientTrack mu2TT(m1.track(), &magneticField);
582  j_tks.push_back(mu1TT);
583  j_tks.push_back(mu2TT);
584  KalmanVertexFitter jkvf;
585  TransientVertex jtv = jkvf.vertex(j_tks);
586  if (!jtv.isValid())
587  continue;
588  reco::Vertex jpsivertex = jtv;
589  float dimuonCL = 0;
590  if ((jpsivertex.chi2() >= 0) && (jpsivertex.ndof() > 0))
591  dimuonCL = TMath::Prob(jpsivertex.chi2(), jpsivertex.ndof());
592  math::XYZVector jpperp(m.px() + m1.px(), m.py() + m1.py(), 0.);
593  GlobalPoint jVertex = jtv.position();
594  GlobalError jerr = jtv.positionError();
595  GlobalPoint displacementFromBeamspotJpsi(
596  -1 * ((vertexBeamSpot.x0() - jVertex.x()) + (jVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dxdz()),
597  -1 * ((vertexBeamSpot.y0() - jVertex.y()) + (jVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dydz()),
598  0);
599  reco::Vertex::Point vperpj(displacementFromBeamspotJpsi.x(), displacementFromBeamspotJpsi.y(), 0.);
600  float jpsi_cos = vperpj.Dot(jpperp) / (vperpj.R() * jpperp.R());
601  TrajectoryStateClosestToPoint mu1TS = mu1TT.impactPointTSCP();
602  TrajectoryStateClosestToPoint mu2TS = mu2TT.impactPointTSCP();
604  if (mu1TS.isValid() && mu2TS.isValid()) {
605  if (!cApp.calculate(mu1TS.theState(), mu2TS.theState()))
606  continue;
607  } else
608  continue;
609  double DiMuMass = (m1.p4() + m.p4()).M();
610 
611  switch (
612  enum_) { // enum_ = 1...9, represents different sets of variables for different paths, we want to have different hists for different paths
613 
614  case 1:
615 
616  tnp_ = true; // already filled hists for tnp method
617  [[fallthrough]];
618  case 2:
619 
620  if ((Jpsi_) && (!Upsilon_))
621  if (DiMuMass > maxmassJpsi || DiMuMass < minmassJpsi)
622  continue;
623  if ((!Jpsi_) && (Upsilon_))
624  if (DiMuMass > maxmassUpsilon || DiMuMass < minmassUpsilon)
625  continue;
626  if (dimuonCL < minprob)
627  continue;
628 
629  mu1Phi_.denominator->Fill(m.phi());
630  mu1Eta_.denominator->Fill(m.eta());
631  mu1Pt_.denominator->Fill(m.pt());
632  mu2Phi_.denominator->Fill(m1.phi());
633  mu2Eta_.denominator->Fill(m1.eta());
634  mu2Pt_.denominator->Fill(m1.pt());
635  DiMuPt_.denominator->Fill((m1.p4() + m.p4()).Pt());
636  DiMuEta_.denominator->Fill((m1.p4() + m.p4()).Eta());
637  DiMuPhi_.denominator->Fill((m1.p4() + m.p4()).Phi());
638 
639  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
640  if (!matchToTrigger(hltpath1, m1))
641  continue;
642  if (!matchToTrigger(hltpath1, m))
643  continue;
644  mu1Phi_.numerator->Fill(m.phi(), PrescaleWeight);
645  mu1Eta_.numerator->Fill(m.eta(), PrescaleWeight);
646  mu1Pt_.numerator->Fill(m.pt(), PrescaleWeight);
647  mu2Phi_.numerator->Fill(m1.phi(), PrescaleWeight);
648  mu2Eta_.numerator->Fill(m1.eta(), PrescaleWeight);
649  mu2Pt_.numerator->Fill(m1.pt(), PrescaleWeight);
650  DiMuPt_.numerator->Fill((m1.p4() + m.p4()).Pt(), PrescaleWeight);
651  DiMuEta_.numerator->Fill((m1.p4() + m.p4()).Eta(), PrescaleWeight);
652  DiMuPhi_.numerator->Fill((m1.p4() + m.p4()).Phi(), PrescaleWeight);
653  }
654 
655  break;
656 
657  case 3:
658 
659  if ((Jpsi_) && (!Upsilon_))
660  if (DiMuMass > maxmassJpsi || DiMuMass < minmassJpsi)
661  continue;
662  if ((!Jpsi_) && (Upsilon_))
663  if (DiMuMass > maxmassUpsilon || DiMuMass < minmassUpsilon)
664  continue;
665  if (dimuonCL < minprob)
666  continue;
667 
668  mu1Phi_.denominator->Fill(m.phi());
669  mu1Eta_.denominator->Fill(m.eta());
670  mu1Pt_.denominator->Fill(m.pt());
671  mu2Phi_.denominator->Fill(m1.phi());
672  mu2Eta_.denominator->Fill(m1.eta());
673  mu2Pt_.denominator->Fill(m1.pt());
674 
675  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
676  if (!matchToTrigger(hltpath1, m1))
677  continue;
678  if (!matchToTrigger(hltpath1, m))
679  continue;
680  mu1Phi_.numerator->Fill(m.phi(), PrescaleWeight);
681  mu1Eta_.numerator->Fill(m.eta(), PrescaleWeight);
682  mu1Pt_.numerator->Fill(m.pt(), PrescaleWeight);
683  mu2Phi_.numerator->Fill(m1.phi(), PrescaleWeight);
684  mu2Eta_.numerator->Fill(m1.eta(), PrescaleWeight);
685  mu2Pt_.numerator->Fill(m1.pt(), PrescaleWeight);
686  }
687 
688  break;
689 
690  case 4:
691 
692  if (dimuonCL < minprob)
693  continue;
694 
695  // fill mass plots without selecting mass region
696  DiMuMass_.denominator->Fill(DiMuMass);
697  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup) &&
698  !(seagull_ && m.charge() * deltaPhi(m.phi(), m1.phi()) > 0) && matchToTrigger(hltpath1, m1) &&
699  matchToTrigger(hltpath1, m))
700  DiMuMass_.numerator->Fill(DiMuMass, PrescaleWeight);
701 
702  if ((Jpsi_) && (!Upsilon_))
703  if (DiMuMass > maxmassJpsi || DiMuMass < minmassJpsi)
704  continue;
705  if ((!Jpsi_) && (Upsilon_))
706  if (DiMuMass > maxmassUpsilon || DiMuMass < minmassUpsilon)
707  continue;
708 
709  mu1Phi_.denominator->Fill(m.phi());
710  mu1Eta_.denominator->Fill(m.eta());
711  mu1Pt_.denominator->Fill(m.pt());
712  mu2Phi_.denominator->Fill(m1.phi());
713  mu2Eta_.denominator->Fill(m1.eta());
714  mu2Pt_.denominator->Fill(m1.pt());
715  DiMuPt_.denominator->Fill((m1.p4() + m.p4()).Pt());
716  DiMuEta_.denominator->Fill((m1.p4() + m.p4()).Eta());
717  DiMuPhi_.denominator->Fill((m1.p4() + m.p4()).Phi());
719 
720  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
721  if (seagull_ && m.charge() * deltaPhi(m.phi(), m1.phi()) > 0)
722  continue;
723  if (!matchToTrigger(hltpath1, m1))
724  continue;
725  if (!matchToTrigger(hltpath1, m))
726  continue;
727  mu1Phi_.numerator->Fill(m.phi(), PrescaleWeight);
728  mu1Eta_.numerator->Fill(m.eta(), PrescaleWeight);
729  mu1Pt_.numerator->Fill(m.pt(), PrescaleWeight);
730  mu2Phi_.numerator->Fill(m1.phi(), PrescaleWeight);
731  mu2Eta_.numerator->Fill(m1.eta(), PrescaleWeight);
732  mu2Pt_.numerator->Fill(m1.pt(), PrescaleWeight);
733  DiMuPt_.numerator->Fill((m1.p4() + m.p4()).Pt(), PrescaleWeight);
734  DiMuEta_.numerator->Fill((m1.p4() + m.p4()).Eta(), PrescaleWeight);
735  DiMuPhi_.numerator->Fill((m1.p4() + m.p4()).Phi(), PrescaleWeight);
736  DiMudR_.numerator->Fill(reco::deltaR(m, m1), PrescaleWeight);
737  }
738 
739  break;
740 
741  case 5:
742 
743  if (dimuonCL < minprob)
744  continue;
745  if ((Jpsi_) && (!Upsilon_))
746  if (DiMuMass > maxmassJpsi || DiMuMass < minmassJpsi)
747  continue;
748  if ((!Jpsi_) && (Upsilon_))
749  if (DiMuMass > maxmassUpsilon || DiMuMass < minmassUpsilon)
750  continue;
751 
752  mu1Phi_.denominator->Fill(m.phi());
753  mu1Eta_.denominator->Fill(m.eta());
754  mu1Pt_.denominator->Fill(m.pt());
755  mu2Phi_.denominator->Fill(m1.phi());
756  mu2Eta_.denominator->Fill(m1.eta());
757  mu2Pt_.denominator->Fill(m1.pt());
758  DiMuPt_.denominator->Fill((m1.p4() + m.p4()).Pt());
759  DiMuEta_.denominator->Fill((m1.p4() + m.p4()).Eta());
760  DiMuPhi_.denominator->Fill((m1.p4() + m.p4()).Phi());
762 
763  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
764  if (seagull_ && m.charge() * deltaPhi(m.phi(), m1.phi()) > 0)
765  continue;
766  if (!matchToTrigger(hltpath1, m1))
767  continue;
768  if (!matchToTrigger(hltpath1, m))
769  continue;
770  mu1Phi_.numerator->Fill(m.phi(), PrescaleWeight);
771  mu1Eta_.numerator->Fill(m.eta(), PrescaleWeight);
772  mu1Pt_.numerator->Fill(m.pt(), PrescaleWeight);
773  mu2Phi_.numerator->Fill(m1.phi(), PrescaleWeight);
774  mu2Eta_.numerator->Fill(m1.eta(), PrescaleWeight);
775  mu2Pt_.numerator->Fill(m1.pt(), PrescaleWeight);
776  DiMuPt_.numerator->Fill((m1.p4() + m.p4()).Pt(), PrescaleWeight);
777  DiMuEta_.numerator->Fill((m1.p4() + m.p4()).Eta(), PrescaleWeight);
778  DiMuPhi_.numerator->Fill((m1.p4() + m.p4()).Phi(), PrescaleWeight);
779  DiMudR_.numerator->Fill(reco::deltaR(m, m1), PrescaleWeight);
780  }
781 
782  break;
783 
784  case 6:
785 
786  if (dimuonCL < minprob)
787  continue;
788  if ((Jpsi_) && (!Upsilon_))
789  if (DiMuMass > maxmassJpsi || DiMuMass < minmassJpsi)
790  continue;
791  if ((!Jpsi_) && (Upsilon_))
792  if (DiMuMass > maxmassUpsilon || DiMuMass < minmassUpsilon)
793  continue;
794 
795  for (auto const& m2 : *muoHandle) {
796  if (m2.pt() == m.pt())
797  continue; // remove duplicates but do not introduce ordering
798  if (m2.pt() == m1.pt())
799  continue; // -> m2 will be the non-resonant and non-vertexing muon in the triplet
800  if (!matchToTrigger(hltpath, m2))
801  continue;
802 
803  mu1Phi_.denominator->Fill(m.phi());
804  mu1Eta_.denominator->Fill(m.eta());
805  mu1Pt_.denominator->Fill(m.pt());
806  mu2Phi_.denominator->Fill(m1.phi());
807  mu2Eta_.denominator->Fill(m1.eta());
808  mu2Pt_.denominator->Fill(m1.pt());
809  mu3Phi_.denominator->Fill(m2.phi());
810  mu3Eta_.denominator->Fill(m2.eta());
811  mu3Pt_.denominator->Fill(m2.pt());
812 
813  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
814  if (!matchToTrigger(hltpath1, m1))
815  continue;
816  if (!matchToTrigger(hltpath1, m))
817  continue;
818  if (!matchToTrigger(hltpath1, m2))
819  continue;
820  mu1Phi_.numerator->Fill(m.phi(), PrescaleWeight);
821  mu1Eta_.numerator->Fill(m.eta(), PrescaleWeight);
822  mu1Pt_.numerator->Fill(m.pt(), PrescaleWeight);
823  mu2Phi_.numerator->Fill(m1.phi(), PrescaleWeight);
824  mu2Eta_.numerator->Fill(m1.eta(), PrescaleWeight);
825  mu2Pt_.numerator->Fill(m1.pt(), PrescaleWeight);
826  mu3Phi_.numerator->Fill(m2.phi(), PrescaleWeight);
827  mu3Eta_.numerator->Fill(m2.eta(), PrescaleWeight);
828  mu3Pt_.numerator->Fill(m2.pt(), PrescaleWeight);
829  }
830  }
831 
832  break;
833 
834  case 7:
835 
836  if (phHandle.isValid()) {
837  if (!phHandle->empty())
838  for (auto const& p : *phHandle) {
839  if (!matchToTrigger(hltpath, p))
840  continue;
841 
842  phPhi_.denominator->Fill(p.phi());
843  phEta_.denominator->Fill(p.eta());
844  phPt_.denominator->Fill(p.pt());
845 
846  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
847  if (!matchToTrigger(hltpath1, p))
848  continue;
849  if (!matchToTrigger(hltpath1, m))
850  continue;
851  if (!matchToTrigger(hltpath1, m1))
852  continue;
853  phPhi_.numerator->Fill(p.phi(), PrescaleWeight);
854  phEta_.numerator->Fill(p.eta(), PrescaleWeight);
855  phPt_.numerator->Fill(p.pt(), PrescaleWeight);
856  }
857  }
858  } else {
859  // if Handle is not valid, because the InputTag has been mis-configured, then skip the event
860  if (!phInputTag_.label().empty())
861  return;
862  }
863 
864  break;
865 
866  case 8: //vtx monitoring, filling probability, DS, DCA, cos of pointing angle to the PV, eta, pT of dimuon
867 
868  if (displaced_)
869  if ((displacementFromBeamspotJpsi.perp() / sqrt(jerr.rerr(displacementFromBeamspotJpsi))) < minDS)
870  continue;
871  if ((Jpsi_) && (!Upsilon_))
872  if (DiMuMass > maxmassJpsi || DiMuMass < minmassJpsi)
873  continue;
874  if ((!Jpsi_) && (Upsilon_))
875  if (DiMuMass > maxmassUpsilon || DiMuMass < minmassUpsilon)
876  continue;
877 
878  // fill vtx-prob plots before selecting on this variable
879  DiMuProb_.denominator->Fill(dimuonCL);
880  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup) &&
881  matchToTrigger(hltpath1, m1) && matchToTrigger(hltpath1, m))
882  DiMuProb_.numerator->Fill(dimuonCL, PrescaleWeight);
883 
884  if (dimuonCL < minprob)
885  continue;
886 
887  DiMuDS_.denominator->Fill(displacementFromBeamspotJpsi.perp() /
888  sqrt(jerr.rerr(displacementFromBeamspotJpsi)));
889  DiMuPVcos_.denominator->Fill(jpsi_cos);
890  DiMuPt_.denominator->Fill((m1.p4() + m.p4()).Pt());
891  DiMuEta_.denominator->Fill((m1.p4() + m.p4()).Eta());
892  DiMuPhi_.denominator->Fill((m1.p4() + m.p4()).Phi());
894 
895  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
896  if (!matchToTrigger(hltpath1, m1))
897  continue;
898  if (!matchToTrigger(hltpath1, m))
899  continue;
901  displacementFromBeamspotJpsi.perp() / sqrt(jerr.rerr(displacementFromBeamspotJpsi)), PrescaleWeight);
902  DiMuPVcos_.numerator->Fill(jpsi_cos, PrescaleWeight);
903  DiMuPt_.numerator->Fill((m1.p4() + m.p4()).Pt(), PrescaleWeight);
904  DiMuEta_.numerator->Fill((m1.p4() + m.p4()).Eta(), PrescaleWeight);
905  DiMuPhi_.numerator->Fill((m1.p4() + m.p4()).Phi(), PrescaleWeight);
906  DiMuDCA_.numerator->Fill(cApp.distance(), PrescaleWeight);
907  }
908 
909  break;
910 
911  case 9:
912 
913  if (dimuonCL < minprob)
914  continue;
915  if (fabs(jpsi_cos) < mincos)
916  continue;
917  if ((displacementFromBeamspotJpsi.perp() / sqrt(jerr.rerr(displacementFromBeamspotJpsi))) < minDS)
918  continue;
919 
920  if (trHandle.isValid())
921  for (auto const& t : *trHandle) {
922  if (!trSelection_ref(t))
923  continue;
924  const reco::Track& itrk1 = t;
925  if (reco::deltaR(t, m1) <= min_dR)
926  continue;
927  if (reco::deltaR(t, m) <= min_dR)
928  continue;
930  continue;
931 
932  // reconstruct B+ hadron
934  double trackMass2 = kaon_mass * kaon_mass;
935  double MuMass2 = mu_mass * mu_mass;
936  double e1 = sqrt(m.momentum().Mag2() + MuMass2);
937  double e2 = sqrt(m1.momentum().Mag2() + MuMass2);
938  double e3 = sqrt(itrk1.momentum().Mag2() + trackMass2);
939  p1 = reco::Particle::LorentzVector(m.px(), m.py(), m.pz(), e1);
940  p2 = reco::Particle::LorentzVector(m1.px(), m1.py(), m1.pz(), e2);
941  p3 = reco::Particle::LorentzVector(itrk1.px(), itrk1.py(), itrk1.pz(), e3);
942  pB = p1 + p2 + p3;
943  if (pB.mass() > maxmassJpsiTk || pB.mass() < minmassJpsiTk)
944  continue;
945  reco::TransientTrack trTT(itrk1, &magneticField);
946  std::vector<reco::TransientTrack> t_tks;
947  t_tks.push_back(mu1TT);
948  t_tks.push_back(mu2TT);
949  t_tks.push_back(trTT);
950  KalmanVertexFitter kvf;
951  TransientVertex tv = kvf.vertex(t_tks);
952  reco::Vertex vertex = tv;
953  if (!tv.isValid())
954  continue;
955  float JpsiTkCL = 0;
956  if ((vertex.chi2() >= 0.0) && (vertex.ndof() > 0))
957  JpsiTkCL = TMath::Prob(vertex.chi2(), vertex.ndof());
958  math::XYZVector pperp(m.px() + m1.px() + itrk1.px(), m.py() + m1.py() + itrk1.py(), 0.);
961  GlobalPoint displacementFromBeamspot(
962  -1 * ((vertexBeamSpot.x0() - secondaryVertex.x()) +
963  (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dxdz()),
964  -1 * ((vertexBeamSpot.y0() - secondaryVertex.y()) +
965  (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dydz()),
966  0);
967  reco::Vertex::Point vperp(displacementFromBeamspot.x(), displacementFromBeamspot.y(), 0.);
968  float jpsiKcos = vperp.Dot(pperp) / (vperp.R() * pperp.R());
969  if (JpsiTkCL < minprob)
970  continue;
971  if (fabs(jpsiKcos) < mincos)
972  continue;
973  if ((displacementFromBeamspot.perp() / sqrt(err.rerr(displacementFromBeamspot))) < minDS)
974  continue;
975 
976  muPhi_.denominator->Fill(t.phi());
977  muEta_.denominator->Fill(t.eta());
978  muPt_.denominator->Fill(t.pt());
979  BMass_.denominator->Fill(pB.mass());
980 
981  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
982  if (!matchToTrigger(hltpath1, m1))
983  continue;
984  if (!matchToTrigger(hltpath1, m))
985  continue;
986  if (!matchToTrigger(hltpath1, t))
987  continue;
988  muPhi_.numerator->Fill(t.phi(), PrescaleWeight);
989  muEta_.numerator->Fill(t.eta(), PrescaleWeight);
990  muPt_.numerator->Fill(t.pt(), PrescaleWeight);
991  BMass_.numerator->Fill(pB.mass(), PrescaleWeight);
992  }
993  }
994 
995  break;
996 
997  case 10:
998 
999  if (trHandle.isValid())
1000  for (auto const& t : *trHandle) {
1001  if (!trSelection_ref(t))
1002  continue;
1003  const reco::Track& itrk1 = t;
1004  if (reco::deltaR(t, m1) <= min_dR)
1005  continue;
1006  if (reco::deltaR(t, m) <= min_dR)
1007  continue;
1009  continue;
1010 
1011  // reconstruct Mu+TkMu structure
1013  double trackMass2 = kaon_mass * kaon_mass;
1014  double MuMass2 = mu_mass * mu_mass;
1015  double e2 = sqrt(m1.momentum().Mag2() + MuMass2);
1016  double e3 = sqrt(itrk1.momentum().Mag2() + trackMass2);
1017  p2 = reco::Particle::LorentzVector(m1.px(), m1.py(), m1.pz(), e2);
1018  p3 = reco::Particle::LorentzVector(itrk1.px(), itrk1.py(), itrk1.pz(), e3);
1019  pB = p2 + p3;
1020  if (pB.mass() > maxmassJpsiTk || pB.mass() < minmassJpsiTk)
1021  continue;
1022  reco::TransientTrack trTT(itrk1, &magneticField);
1023  std::vector<reco::TransientTrack> t_tks;
1024  t_tks.push_back(mu2TT);
1025  t_tks.push_back(trTT);
1026  KalmanVertexFitter kvf;
1027  TransientVertex tv = kvf.vertex(t_tks);
1028  reco::Vertex vertex = tv;
1029  if (!tv.isValid())
1030  continue;
1031  float JpsiTkCL = 0;
1032  if ((vertex.chi2() >= 0.0) && (vertex.ndof() > 0))
1033  JpsiTkCL = TMath::Prob(vertex.chi2(), vertex.ndof());
1034  math::XYZVector pperp(m1.px() + itrk1.px(), m1.py() + itrk1.py(), 0.);
1036  GlobalError err = tv.positionError();
1037  GlobalPoint displacementFromBeamspot(
1038  -1 * ((vertexBeamSpot.x0() - secondaryVertex.x()) +
1039  (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dxdz()),
1040  -1 * ((vertexBeamSpot.y0() - secondaryVertex.y()) +
1041  (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dydz()),
1042  0);
1043  reco::Vertex::Point vperp(displacementFromBeamspot.x(), displacementFromBeamspot.y(), 0.);
1044  if (JpsiTkCL < minprob)
1045  continue;
1046 
1047  muPhi_.denominator->Fill(m1.phi());
1048  muEta_.denominator->Fill(m1.eta());
1049  muPt_.denominator->Fill(m1.pt());
1050 
1051  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
1052  if (!matchToTrigger(hltpath1, m1))
1053  continue;
1054  if (!matchToTrigger(hltpath1, m))
1055  continue;
1056  if (!matchToTrigger(hltpath1, t))
1057  continue;
1058  muPhi_.numerator->Fill(m1.phi(), PrescaleWeight);
1059  muEta_.numerator->Fill(m1.eta(), PrescaleWeight);
1060  muPt_.numerator->Fill(m1.pt(), PrescaleWeight);
1061  }
1062  }
1063 
1064  break;
1065 
1066  case 11:
1067 
1068  if (dimuonCL < minprob)
1069  continue;
1070  if (fabs(jpsi_cos) < mincos)
1071  continue;
1072  if (displacementFromBeamspotJpsi.perp() / sqrt(jerr.rerr(displacementFromBeamspotJpsi)) < minDS)
1073  continue;
1074 
1075  if (trHandle.isValid())
1076  for (auto const& t : *trHandle) {
1077  if (!trSelection_ref(t))
1078  continue;
1079  if ((reco::deltaR(t, m) <= min_dR))
1080  continue;
1081  if ((reco::deltaR(t, m1) <= min_dR))
1082  continue;
1083 
1084  for (auto const& t1 : *trHandle) {
1085  if (&t - &(*trHandle)[0] >= &t1 - &(*trHandle)[0])
1086  continue; // not enough, need the following DeltaR checks
1087  if (!trSelection_ref(t1))
1088  continue;
1089  if ((reco::deltaR(t1, m) <= min_dR))
1090  continue;
1091  if ((reco::deltaR(t1, m1) <= min_dR))
1092  continue;
1093  if ((reco::deltaR(t, t1) <= min_dR))
1094  continue;
1095  const reco::Track& itrk1 = t;
1096  const reco::Track& itrk2 = t1;
1098  continue;
1100  continue;
1101 
1102  // reconstruct Bs candidate
1103  reco::Particle::LorentzVector pB, pTkTk, p1, p2, p3, p4;
1104  double trackMass2 = kaon_mass * kaon_mass;
1105  double MuMass2 = mu_mass * mu_mass;
1106  double e1 = sqrt(m.momentum().Mag2() + MuMass2);
1107  double e2 = sqrt(m1.momentum().Mag2() + MuMass2);
1108  double e3 = sqrt(itrk1.momentum().Mag2() + trackMass2);
1109  double e4 = sqrt(itrk2.momentum().Mag2() + trackMass2);
1110  p1 = reco::Particle::LorentzVector(m.px(), m.py(), m.pz(), e1);
1111  p2 = reco::Particle::LorentzVector(m1.px(), m1.py(), m1.pz(), e2);
1112  p3 = reco::Particle::LorentzVector(itrk1.px(), itrk1.py(), itrk1.pz(), e3);
1113  p4 = reco::Particle::LorentzVector(itrk2.px(), itrk2.py(), itrk2.pz(), e4);
1114  pTkTk = p3 + p4;
1115  if (pTkTk.mass() > maxmassTkTk || pTkTk.mass() < minmassTkTk)
1116  continue;
1117  pB = p1 + p2 + p3 + p4;
1118  if (pB.mass() > maxmassJpsiTk || pB.mass() < minmassJpsiTk)
1119  continue;
1120  reco::TransientTrack mu1TT(m.track(), &magneticField);
1121  reco::TransientTrack mu2TT(m1.track(), &magneticField);
1122  reco::TransientTrack trTT(itrk1, &magneticField);
1123  reco::TransientTrack tr1TT(itrk2, &magneticField);
1124  std::vector<reco::TransientTrack> t_tks;
1125  t_tks.push_back(mu1TT);
1126  t_tks.push_back(mu2TT);
1127  t_tks.push_back(trTT);
1128  t_tks.push_back(tr1TT);
1129  KalmanVertexFitter kvf;
1130  TransientVertex tv = kvf.vertex(t_tks); // this will compare the tracks
1131  reco::Vertex vertex = tv;
1132  if (!tv.isValid())
1133  continue;
1134  float JpsiTkCL = 0;
1135  if ((vertex.chi2() >= 0.0) && (vertex.ndof() > 0))
1136  JpsiTkCL = TMath::Prob(vertex.chi2(), vertex.ndof());
1137  math::XYZVector pperp(
1138  m.px() + m1.px() + itrk1.px() + itrk2.px(), m.py() + m1.py() + itrk1.py() + itrk2.py(), 0.);
1140  GlobalError err = tv.positionError();
1141  GlobalPoint displacementFromBeamspot(
1142  -1 * ((vertexBeamSpot.x0() - secondaryVertex.x()) +
1143  (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dxdz()),
1144  -1 * ((vertexBeamSpot.y0() - secondaryVertex.y()) +
1145  (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dydz()),
1146  0);
1147  reco::Vertex::Point vperp(displacementFromBeamspot.x(), displacementFromBeamspot.y(), 0.);
1148  float jpsiKcos = vperp.Dot(pperp) / (vperp.R() * pperp.R());
1149  if (JpsiTkCL < minprob)
1150  continue;
1151  if (fabs(jpsiKcos) < mincos)
1152  continue;
1153  if ((displacementFromBeamspot.perp() / sqrt(err.rerr(displacementFromBeamspot))) < minDS)
1154  continue;
1155 
1156  mu1Phi_.denominator->Fill(t.phi());
1157  mu1Eta_.denominator->Fill(t.eta());
1158  mu1Pt_.denominator->Fill(t.pt());
1159  mu2Phi_.denominator->Fill(t1.phi());
1160  mu2Eta_.denominator->Fill(t1.eta());
1161  mu2Pt_.denominator->Fill(t1.pt());
1162  BMass_.denominator->Fill(pB.mass());
1163 
1164  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(iEvent, iSetup)) {
1165  if (!matchToTrigger(hltpath1, m))
1166  continue;
1167  if (!matchToTrigger(hltpath1, m1))
1168  continue;
1169  if (!matchToTrigger(hltpath1, t))
1170  continue;
1171  if (!matchToTrigger(hltpath1, t1))
1172  continue;
1173  mu1Phi_.numerator->Fill(t.phi(), PrescaleWeight);
1174  mu1Eta_.numerator->Fill(t.eta(), PrescaleWeight);
1175  mu1Pt_.numerator->Fill(t.pt(), PrescaleWeight);
1176  mu2Phi_.numerator->Fill(t1.phi(), PrescaleWeight);
1177  mu2Eta_.numerator->Fill(t1.eta(), PrescaleWeight);
1178  mu2Pt_.numerator->Fill(t1.pt(), PrescaleWeight);
1179  BMass_.numerator->Fill(pB.mass(), PrescaleWeight);
1180  }
1181 
1182  } // for (auto const & t1 : *trHandle)
1183  } // for (auto const & t : *trHandle)
1184 
1185  break;
1186  }
1187  }
1188  }
1189  }
1190 }
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:552
const bool requireValidHLTPaths_
Definition: BPHMonitor.cc:72
ObjME muPhi_
Definition: BPHMonitor.cc:103
ObjME DiMuMass_
Definition: BPHMonitor.cc:135
ObjME DiMuProb_
Definition: BPHMonitor.cc:132
bool hltPathsAreValid_
Definition: BPHMonitor.cc:73
double maxmassJpsiTk
Definition: BPHMonitor.cc:167
double kaon_mass
Definition: BPHMonitor.cc:169
GlobalPoint position() const
float distance() const override
ObjME phPhi_
Definition: BPHMonitor.cc:125
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.cc:142
T z() const
Definition: PV3DBase.h:61
GlobalError positionError() const
StringCutObjectSelector< reco::Candidate::LorentzVector, true > DMSelection_ref
Definition: BPHMonitor.cc:184
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: BPHMonitor.cc:81
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: BPHMonitor.cc:140
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
ObjME DiMuPt_
Definition: BPHMonitor.cc:130
double Prescale(const std::string num, const std::string den, edm::Event const &iEvent, edm::EventSetup const &iSetup, HLTPrescaleProvider *hltPrescale_)
Definition: BPHMonitor.cc:1355
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
StringCutObjectSelector< reco::Muon, true > muoSelection_ref
Definition: BPHMonitor.cc:145
ObjME mu3Eta_
Definition: BPHMonitor.cc:120
double dydz() const
dydz slope
Definition: BeamSpot.h:80
ObjME phEta_
Definition: BPHMonitor.cc:126
ObjME DiMudR_
Definition: BPHMonitor.cc:137
ObjME DiMuDCA_
Definition: BPHMonitor.cc:134
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< trigger::TriggerEvent > hltInputTag_
Definition: BPHMonitor.cc:179
double maxmassTkTk
Definition: BPHMonitor.cc:165
double ndof() const
Definition: Vertex.h:123
ObjME muEta_
Definition: BPHMonitor.cc:104
edm::EDGetTokenT< reco::TrackCollection > trToken_
Definition: BPHMonitor.cc:83
double minmass_
Definition: BPHMonitor.cc:160
ObjME mu2Pt_
Definition: BPHMonitor.cc:116
double minprob
Definition: BPHMonitor.cc:174
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const override
void Fill(long long x)
double x0() const
x coordinate
Definition: BeamSpot.h:61
ObjME mu3Pt_
Definition: BPHMonitor.cc:121
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int displaced_
Definition: BPHMonitor.cc:153
int iEvent
Definition: GenABIO.cc:224
ObjME mu1Pt_
Definition: BPHMonitor.cc:111
double mincos
Definition: BPHMonitor.cc:175
double maxmassJpsi
Definition: BPHMonitor.cc:161
bool isValid() const
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
ObjME DiMuPVcos_
Definition: BPHMonitor.cc:131
T sqrt(T t)
Definition: SSEVec.h:19
double mu_mass
Definition: BPHMonitor.cc:170
StringCutObjectSelector< reco::Track, true > trSelection_ref
Definition: BPHMonitor.cc:183
MonitorElement * denominator
ObjME mu2Phi_
Definition: BPHMonitor.cc:114
MonitorElement * numerator
ObjME mu3Phi_
Definition: BPHMonitor.cc:119
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
ObjME DiMuEta_
Definition: BPHMonitor.cc:129
ObjME DiMuPhi_
Definition: BPHMonitor.cc:128
double y0() const
y coordinate
Definition: BeamSpot.h:63
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Definition: BPHMonitor.cc:87
ObjME BMass_
Definition: BPHMonitor.cc:136
ObjME mu1Phi_
Definition: BPHMonitor.cc:109
double maxmass_
Definition: BPHMonitor.cc:159
std::vector< std::string > hltpaths_den
Definition: BPHMonitor.cc:181
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double minmassJpsiTk
Definition: BPHMonitor.cc:168
edm::EDGetTokenT< reco::PhotonCollection > phToken_
Definition: BPHMonitor.cc:84
ObjME mu1Eta_
Definition: BPHMonitor.cc:110
edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: BPHMonitor.cc:82
double minDS
Definition: BPHMonitor.cc:176
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
ObjME DiMuDS_
Definition: BPHMonitor.cc:133
double minmassUpsilon
Definition: BPHMonitor.cc:164
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
double dxdz() const
dxdz slope
Definition: BeamSpot.h:78
ObjME mu2Eta_
Definition: BPHMonitor.cc:115
std::string getTriggerName(std::string partialName)
Definition: BPHMonitor.cc:1302
edm::Handle< trigger::TriggerEvent > handleTriggerEvent
Definition: BPHMonitor.cc:186
const FreeTrajectoryState & theState() const
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: BPHMonitor.cc:144
double maxmassUpsilon
Definition: BPHMonitor.cc:163
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
bool isValid() const
Definition: HandleBase.h:70
double chi2() const
chi-squares
Definition: Vertex.h:116
double minmassTkTk
Definition: BPHMonitor.cc:166
double z0() const
z coordinate
Definition: BeamSpot.h:65
ObjME muPt_
Definition: BPHMonitor.cc:105
bool matchToTrigger(const std::string &theTriggerName, T t)
Definition: BPHMonitor.cc:1316
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: BPHMonitor.cc:139
T rerr(const GlobalPoint &aPoint) const
std::vector< std::string > hltpaths_num
Definition: BPHMonitor.cc:180
double minmassJpsi
Definition: BPHMonitor.cc:162
edm::InputTag phInputTag_
Definition: BPHMonitor.cc:78
ObjME phPt_
Definition: BPHMonitor.cc:127
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
double min_dR
Definition: BPHMonitor.cc:171

◆ bookHistograms()

void BPHMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 295 of file BPHMonitor.cc.

References BMass_, Bmass_binning_, TriggerDQMBase::bookME(), cos_binning_, dca_binning_, den_genTriggerEventFlag_, DiMuDCA_, DiMudR_, DiMuDS_, DiMuEta_, DiMuMass_, DiMuPhi_, DiMuProb_, DiMuPt_, DiMuPVcos_, dMu_pt_variable_binning_, dR_binning_, ds_binning_, enum_, eta_binning_, folderName_, hltConfig_, HLTPrescaleProvider::hltConfigProvider(), hltPathsAreValid_, hltPrescale_, HLTPrescaleProvider::init(), mass_binning_, mu1Eta_, mu1Phi_, mu1Pt_, mu2Eta_, mu2Phi_, mu2Pt_, mu3Eta_, mu3Phi_, mu3Pt_, muEta_, muPhi_, muPt_, TriggerDQMBase::MEbinning::nbins, num_genTriggerEventFlag_, phi_binning_, prob_variable_binning_, pt_variable_binning_, requireValidHLTPaths_, dqm::implementation::NavigatorBase::setCurrentFolder(), TriggerDQMBase::setMETitle(), AlCaHLTBitMon_QueryRunRegistry::string, tnp_, trOrMu_, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

295  {
296  // Initialize the GenericTriggerEventFlag
298  num_genTriggerEventFlag_->initRun(iRun, iSetup);
299  }
301  den_genTriggerEventFlag_->initRun(iRun, iSetup);
302  }
303 
304  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
306  den_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->allHLTPathsAreValid() &&
307  den_genTriggerEventFlag_->allHLTPathsAreValid());
308 
309  // if valid HLT paths are required,
310  // create DQM outputs only if all paths are valid
312  return;
313  }
314 
315  std::string histname, histtitle, istnp, trMuPh;
316 
317  bool Ph_ = false;
318  if (enum_ == 7)
319  Ph_ = true;
320  if (tnp_)
321  istnp = "Tag_and_Probe/";
322  else
323  istnp = "";
324 
325  std::string currentFolder = folderName_ + istnp;
326  ibooker.setCurrentFolder(currentFolder);
327 
328  if (trOrMu_)
329  trMuPh = "tr";
330  else if (Ph_)
331  trMuPh = "ph";
332  else
333  trMuPh = "mu";
334 
335  if (enum_ == 7 || enum_ == 1 || enum_ == 9 || enum_ == 10) {
336  histname = trMuPh + "Pt";
337  histtitle = trMuPh + "_P_{t}";
338  bookME(ibooker, muPt_, histname, histtitle, pt_variable_binning_);
339  setMETitle(muPt_, trMuPh + "_Pt[GeV]", "events / 1 GeV");
340 
341  histname = trMuPh + "Phi";
342  histtitle = trMuPh + "Phi";
343  bookME(ibooker, muPhi_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
344  setMETitle(muPhi_, trMuPh + "_#phi", "events / 0.1 rad");
345 
346  histname = trMuPh + "Eta";
347  histtitle = trMuPh + "_Eta";
348  bookME(ibooker, muEta_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
349  setMETitle(muEta_, trMuPh + "_#eta", "events / 0.2");
350 
351  if (enum_ == 9) {
352  histname = "BMass";
353  histtitle = "BMass";
354  bookME(ibooker, BMass_, histname, histtitle, Bmass_binning_.nbins, mass_binning_.xmin, mass_binning_.xmax);
355  setMETitle(BMass_, "B_#mass", "events /");
356  }
357  } else {
358  if (enum_ != 8) {
359  histname = trMuPh + "1Pt";
360  histtitle = trMuPh + "1_P_{t}";
361  bookME(ibooker, mu1Pt_, histname, histtitle, pt_variable_binning_);
362  setMETitle(mu1Pt_, trMuPh + "_Pt[GeV]", "events / 1 GeV");
363 
364  histname = trMuPh + "1Phi";
365  histtitle = trMuPh + "1Phi";
366  bookME(ibooker, mu1Phi_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
367  setMETitle(mu1Phi_, trMuPh + "_#phi", "events / 0.1 rad");
368 
369  histname = trMuPh + "1Eta";
370  histtitle = trMuPh + "1_Eta";
371  bookME(ibooker, mu1Eta_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
372  setMETitle(mu1Eta_, trMuPh + "_#eta", "events / 0.2");
373 
374  histname = trMuPh + "2Pt";
375  histtitle = trMuPh + "2_P_{t}";
376  bookME(ibooker, mu2Pt_, histname, histtitle, pt_variable_binning_);
377  setMETitle(mu2Pt_, trMuPh + "_Pt[GeV]", "events / 1 GeV");
378 
379  histname = trMuPh + "2Phi";
380  histtitle = trMuPh + "2Phi";
381  bookME(ibooker, mu2Phi_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
382  setMETitle(mu2Phi_, trMuPh + "_#phi", "events / 0.1 rad");
383 
384  histname = trMuPh + "2Eta";
385  histtitle = trMuPh + "2_Eta";
386  bookME(ibooker, mu2Eta_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
387  setMETitle(mu2Eta_, trMuPh + "_#eta", "events / 0.2");
388  if (enum_ == 11) {
389  histname = "BMass";
390  histtitle = "BMass";
391  bookME(ibooker, BMass_, histname, histtitle, Bmass_binning_.nbins, mass_binning_.xmin, mass_binning_.xmax);
392  setMETitle(BMass_, "B_#mass", "events /");
393  }
394  }
395  if (enum_ == 6) {
396  histname = trMuPh + "3Eta";
397  histtitle = trMuPh + "3Eta";
398  bookME(ibooker, mu3Eta_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
399  setMETitle(mu3Eta_, trMuPh + "3#eta", "events / 0.2");
400 
401  histname = trMuPh + "3Pt";
402  histtitle = trMuPh + "3_P_{t}";
403  bookME(ibooker, mu3Pt_, histname, histtitle, pt_variable_binning_);
404  setMETitle(mu3Pt_, trMuPh + "3_Pt[GeV]", "events / 1 GeV");
405 
406  histname = trMuPh + "3Phi";
407  histtitle = trMuPh + "3Phi";
408  bookME(ibooker, mu3Phi_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
409  setMETitle(mu3Phi_, trMuPh + "3_#phi", "events / 0.1 rad");
410 
411  } else if (enum_ == 2 || enum_ == 4 || enum_ == 5 || enum_ == 8) {
412  histname = "DiMuEta";
413  histtitle = "DiMuEta";
414  bookME(ibooker, DiMuEta_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
415  setMETitle(DiMuEta_, "DiMu#eta", "events / 0.2");
416 
417  histname = "DiMuPt";
418  histtitle = "DiMu_P_{t}";
419  bookME(ibooker, DiMuPt_, histname, histtitle, dMu_pt_variable_binning_);
420  setMETitle(DiMuPt_, "DiMu_Pt[GeV]", "events / 1 GeV");
421 
422  histname = "DiMuPhi";
423  histtitle = "DiMuPhi";
424  bookME(ibooker, DiMuPhi_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
425  setMETitle(DiMuPhi_, "DiMu_#phi", "events / 0.1 rad");
426 
427  if (enum_ == 4 || enum_ == 5) {
428  histname = "DiMudR";
429  histtitle = "DiMudR";
430  bookME(ibooker, DiMudR_, histname, histtitle, dR_binning_.nbins, dR_binning_.xmin, dR_binning_.xmax);
431  setMETitle(DiMudR_, "DiMu_#dR", "events /");
432 
433  if (enum_ == 4) {
434  histname = "DiMuMass";
435  histtitle = "DiMuMass";
436  bookME(ibooker, DiMuMass_, histname, histtitle, mass_binning_.nbins, mass_binning_.xmin, mass_binning_.xmax);
437  setMETitle(DiMuMass_, "DiMu_#mass", "events /");
438  }
439  } else if (enum_ == 8) {
440  histname = "DiMuProb";
441  histtitle = "DiMuProb";
442  bookME(ibooker, DiMuProb_, histname, histtitle, prob_variable_binning_);
443  setMETitle(DiMuProb_, "DiMu_#prob", "events /");
444 
445  histname = "DiMuPVcos";
446  histtitle = "DiMuPVcos";
447  bookME(ibooker, DiMuPVcos_, histname, histtitle, cos_binning_.nbins, cos_binning_.xmin, cos_binning_.xmax);
448  setMETitle(DiMuPVcos_, "DiMu_#cosPV", "events /");
449 
450  histname = "DiMuDS";
451  histtitle = "DiMuDS";
452  bookME(ibooker, DiMuDS_, histname, histtitle, ds_binning_.nbins, ds_binning_.xmin, ds_binning_.xmax);
453  setMETitle(DiMuDS_, "DiMu_#ds", "events /");
454 
455  histname = "DiMuDCA";
456  histtitle = "DiMuDCA";
457  bookME(ibooker, DiMuDCA_, histname, histtitle, dca_binning_.nbins, dca_binning_.xmin, dca_binning_.xmax);
458  setMETitle(DiMuDCA_, "DiMu_#dca", "events /");
459  }
460  } // if (enum_ == 2 || enum_ == 4 || enum_ == 5 || enum_ == 8)
461  }
462 
463  bool changed = true;
464 
465  hltPrescale_->init(iRun, iSetup, "HLT", changed);
467 }
const bool requireValidHLTPaths_
Definition: BPHMonitor.cc:72
ObjME muPhi_
Definition: BPHMonitor.cc:103
ObjME DiMuMass_
Definition: BPHMonitor.cc:135
ObjME DiMuProb_
Definition: BPHMonitor.cc:132
bool hltPathsAreValid_
Definition: BPHMonitor.cc:73
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.cc:142
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: BPHMonitor.cc:140
ObjME DiMuPt_
Definition: BPHMonitor.cc:130
ObjME mu3Eta_
Definition: BPHMonitor.cc:120
HLTConfigProvider const & hltConfigProvider() const
ObjME DiMudR_
Definition: BPHMonitor.cc:137
MEbinning eta_binning_
Definition: BPHMonitor.cc:93
ObjME DiMuDCA_
Definition: BPHMonitor.cc:134
ObjME muEta_
Definition: BPHMonitor.cc:104
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
ObjME mu2Pt_
Definition: BPHMonitor.cc:116
ObjME mu3Pt_
Definition: BPHMonitor.cc:121
MEbinning dca_binning_
Definition: BPHMonitor.cc:99
const std::string folderName_
Definition: BPHMonitor.cc:70
ObjME mu1Pt_
Definition: BPHMonitor.cc:111
ObjME DiMuPVcos_
Definition: BPHMonitor.cc:131
MEbinning dR_binning_
Definition: BPHMonitor.cc:96
ObjME mu2Phi_
Definition: BPHMonitor.cc:114
HLTConfigProvider hltConfig_
Definition: BPHMonitor.cc:188
ObjME mu3Phi_
Definition: BPHMonitor.cc:119
MEbinning phi_binning_
Definition: BPHMonitor.cc:92
ObjME DiMuEta_
Definition: BPHMonitor.cc:129
ObjME DiMuPhi_
Definition: BPHMonitor.cc:128
MEbinning ds_binning_
Definition: BPHMonitor.cc:100
ObjME BMass_
Definition: BPHMonitor.cc:136
ObjME mu1Phi_
Definition: BPHMonitor.cc:109
MEbinning cos_binning_
Definition: BPHMonitor.cc:101
std::vector< double > pt_variable_binning_
Definition: BPHMonitor.cc:89
std::vector< double > dMu_pt_variable_binning_
Definition: BPHMonitor.cc:90
ObjME mu1Eta_
Definition: BPHMonitor.cc:110
ObjME DiMuDS_
Definition: BPHMonitor.cc:133
ObjME mu2Eta_
Definition: BPHMonitor.cc:115
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
ObjME muPt_
Definition: BPHMonitor.cc:105
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: BPHMonitor.cc:139
MEbinning mass_binning_
Definition: BPHMonitor.cc:97
std::vector< double > prob_variable_binning_
Definition: BPHMonitor.cc:91
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
MEbinning Bmass_binning_
Definition: BPHMonitor.cc:98

◆ fillDescriptions()

void BPHMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1192 of file BPHMonitor.cc.

References edm::ConfigurationDescriptions::add(), BPHMonitor_cfi::BmassPSet, BPHMonitor_cfi::cosPSet, BPHMonitor_cfi::d0PSet, BPHMonitor_cfi::dcaPSet, submitPVResolutionJobs::desc, BPHMonitor_cff::dRPSet, BPHMonitor_cfi::dsPSet, V0Monitor_cfi::etaPSet, TriggerDQMBase::fillHistoPSetDescription(), HLTPrescaleProvider::fillPSetDescription(), GenericTriggerEventFlag::fillPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, V0Monitor_cff::histoPSet, ProducerED_cfi::InputTag, V0Monitor_cff::massPSet, BPHMonitor_cff::phiPSet, V0Monitor_cfi::ptPSet, AlCaHLTBitMon_QueryRunRegistry::string, and BPHMonitor_cfi::z0PSet.

1192  {
1194  desc.add<std::string>("FolderName", "HLT/BPH/");
1195  desc.add<bool>("requireValidHLTPaths", true);
1196 
1197  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
1198  desc.add<edm::InputTag>("photons", edm::InputTag("photons"));
1199  desc.add<edm::InputTag>("offlinePVs", edm::InputTag("offlinePrimaryVertices"));
1200  desc.add<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"));
1201  desc.add<edm::InputTag>("muons", edm::InputTag("muons"));
1202  desc.add<edm::InputTag>("hltTriggerSummaryAOD", edm::InputTag("hltTriggerSummaryAOD", "", "HLT"));
1203  desc.add<std::string>("muoSelection", "");
1204  desc.add<std::string>("muoSelection_ref",
1205  "isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & "
1206  "innerTrack.hitPattern.numberOfValidPixelHits> 0");
1207  desc.add<std::string>(
1208  "muoSelection_tag",
1209  "isGlobalMuon && isPFMuon && isTrackerMuon && abs(eta) < 2.4 && innerTrack.hitPattern.numberOfValidPixelHits > 0 "
1210  "&& innerTrack.hitPattern.trackerLayersWithMeasurement > 5 && globalTrack.hitPattern.numberOfValidMuonHits > 0 "
1211  "&& globalTrack.normalizedChi2 < 10"); // tight selection for tag muon
1212  desc.add<std::string>("muoSelection_probe",
1213  "isPFMuon & isGlobalMuon & innerTrack.hitPattern.trackerLayersWithMeasurement>5 & "
1214  "innerTrack.hitPattern.numberOfValidPixelHits> 0");
1215  desc.add<std::string>("trSelection_ref", "");
1216  desc.add<std::string>("DMSelection_ref", "Pt>4 & abs(eta)");
1217 
1218  desc.add<int>("nmuons", 1);
1219  desc.add<bool>("tnp", false);
1220  desc.add<int>("L3", 0);
1221  desc.add<int>("ptCut", 0);
1222  desc.add<int>("displaced", 0);
1223  desc.add<int>("trOrMu", 0); // if =0, track param monitoring
1224  desc.add<int>("Jpsi", 0);
1225  desc.add<int>("Upsilon", 0);
1226  desc.add<int>("enum", 1); // 1...9, 9 sets of variables to be filled, depends on the hlt path
1227  desc.add<int>("seagull", 1);
1228  desc.add<double>("maxmass", 3.596);
1229  desc.add<double>("minmass", 2.596);
1230  desc.add<double>("maxmassJpsi", 3.2);
1231  desc.add<double>("minmassJpsi", 3.);
1232  desc.add<double>("maxmassUpsilon", 10.0);
1233  desc.add<double>("minmassUpsilon", 8.8);
1234  desc.add<double>("maxmassTkTk", 10);
1235  desc.add<double>("minmassTkTk", 0);
1236  desc.add<double>("maxmassJpsiTk", 5.46);
1237  desc.add<double>("minmassJpsiTk", 5.1);
1238  desc.add<double>("kaon_mass", 0.493677);
1239  desc.add<double>("mu_mass", 0.1056583745);
1240  desc.add<double>("min_dR", 0.001);
1241  desc.add<double>("max_dR", 1.4);
1242  desc.add<double>("minprob", 0.005);
1243  desc.add<double>("mincos", 0.95);
1244  desc.add<double>("minDS", 3.);
1246  desc, 1, edm::InputTag("gtStage2Digis"), edm::InputTag("gtStage2Digis"), false);
1247 
1250 
1251  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
1252  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
1253 
1258  edm::ParameterSetDescription dMu_ptPSet;
1272  fillHistoPSetDescription(dMu_ptPSet);
1282  fillHistoPSetDescription(probPSet);
1283  histoPSet.add<std::vector<double>>("ptBinning", {-0.5, 0, 2, 4, 8, 10, 12, 16, 20, 25, 30, 35, 40, 50});
1284  histoPSet.add<std::vector<double>>("dMuPtBinning", {6, 8, 12, 16, 20, 25, 30, 35, 40, 50, 70});
1285  histoPSet.add<std::vector<double>>("probBinning",
1286  {0.01, 0.02, 0.04, 0.06, 0.08, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0});
1297  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
1298 
1299  descriptions.add("bphMonitoring", desc);
1300 }
static void fillPSetDescription(edm::ParameterSetDescription &desc, unsigned int stageL1Trigger, edm::InputTag const &l1tAlgBlkInputTag, edm::InputTag const &l1tExtBlkInputTag, bool readPrescalesFromFile)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ getTriggerName()

std::string BPHMonitor::getTriggerName ( std::string  partialName)
private

Definition at line 1302 of file BPHMonitor.cc.

References hltConfig_, mps_fire::i, HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, and HLTConfigProvider::triggerName().

Referenced by analyze(), and matchToTrigger().

1302  {
1303  const std::string trigger_name_tmp = partialName.substr(0, partialName.find("v*"));
1304  const unsigned int Ntriggers(hltConfig_.size());
1305  std::string trigger_name = "";
1306  for (unsigned int i = 0; i < Ntriggers; i++) {
1307  trigger_name = hltConfig_.triggerName(i);
1308  if (trigger_name.find(trigger_name_tmp) != std::string::npos)
1309  break;
1310  }
1311 
1312  return trigger_name;
1313 }
const std::string & triggerName(unsigned int triggerIndex) const
unsigned int size() const
number of trigger paths in trigger table
HLTConfigProvider hltConfig_
Definition: BPHMonitor.cc:188

◆ matchToTrigger()

template<typename T >
bool BPHMonitor::matchToTrigger ( const std::string &  theTriggerName,
T  t 
)
protected

Definition at line 1316 of file BPHMonitor.cc.

References reco::deltaR(), trigger::TriggerObject::eta(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), getTriggerName(), handleTriggerEvent, hltConfig_, hltInputTag_1, mps_fire::i, HLTConfigProvider::inited(), muonTagProbeFilters_cff::matched, HLTConfigProvider::moduleLabels(), trigger::TriggerObject::phi(), edm::InputTag::process(), trigger::TriggerObject::pt(), HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, and HLTConfigProvider::triggerIndex().

Referenced by analyze().

1316  {
1317  bool matched = false;
1318  //validity check
1319  if (!hltConfig_.inited())
1320  return false;
1321 
1322  //Find the precise trigger name
1323  std::string trigger_name = getTriggerName(theTriggerName);
1324  const unsigned int trigger_index = hltConfig_.triggerIndex(trigger_name);
1325 
1326  //loop over all the modules for this trigger
1327  //by default use the last one
1328  unsigned int Nmodules = hltConfig_.size(trigger_index);
1329  const vector<string>& moduleLabels(hltConfig_.moduleLabels(trigger_index));
1330  unsigned int fIdx = 0;
1331  for (unsigned int i = 0; i < Nmodules; i++) {
1332  const unsigned int tmp_fIdx =
1334  if (tmp_fIdx < handleTriggerEvent->sizeFilters()) //index of not used filters are set to sizeFilters()
1335  {
1336  fIdx = tmp_fIdx;
1337  } //good index
1338  }
1339 
1340  //loop over all the objects in the filter of choice
1341  const trigger::Keys& KEYS(handleTriggerEvent->filterKeys(fIdx));
1342  const trigger::size_type nK(KEYS.size());
1344  for (trigger::size_type i = 0; i != nK; ++i) {
1345  const trigger::TriggerObject& TO(TOC[KEYS[i]]);
1346  //perform matching: deltaR and pt check
1347  if ((reco::deltaR(t.eta(), t.phi(), TO.eta(), TO.phi()) <= 0.2) && (TMath::Abs(t.pt() - TO.pt()) < 0.12)) {
1348  matched = true;
1349  }
1350  }
1351 
1352  return matched;
1353 }
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
uint16_t size_type
bool inited() const
Accessors (const methods)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
unsigned int size() const
number of trigger paths in trigger table
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
HLTConfigProvider hltConfig_
Definition: BPHMonitor.cc:188
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:132
std::vector< size_type > Keys
std::string getTriggerName(std::string partialName)
Definition: BPHMonitor.cc:1302
edm::Handle< trigger::TriggerEvent > handleTriggerEvent
Definition: BPHMonitor.cc:186
edm::InputTag hltInputTag_1
Definition: BPHMonitor.cc:178
std::string const & process() const
Definition: InputTag.h:40

◆ Prescale()

double BPHMonitor::Prescale ( const std::string  num,
const std::string  den,
edm::Event const &  iEvent,
edm::EventSetup const &  iSetup,
HLTPrescaleProvider hltPrescale_ 
)
protected

Definition at line 1355 of file BPHMonitor.cc.

References RemoveAddSevLevel::flag, hltPrescale_, mps_fire::i, iEvent, SiStripPI::min, and HLTPrescaleProvider::prescaleValuesInDetail().

Referenced by analyze().

1359  {
1360  double Prescale_num = 1;
1361  double L1P = 1, HLTP = 1;
1362  bool flag = true;
1363  std::vector<bool> theSame_den;
1364  std::vector<bool> theSame_num;
1365  // object holding L1T (double) and HLT (uint) prescales
1366  auto const prescales_den = hltPrescale_->prescaleValuesInDetail<double>(iEvent, iSetup, hltpath);
1367  auto const prescales_num = hltPrescale_->prescaleValuesInDetail<double>(iEvent, iSetup, hltpath1);
1368  // retrieving HLT prescale
1369  auto PrescaleHLT_den = prescales_den.second;
1370  auto PrescaleHLT_num = prescales_num.second;
1371  if (PrescaleHLT_den > 0 && PrescaleHLT_num > 0)
1372  HLTP = PrescaleHLT_num / std::min(PrescaleHLT_num, PrescaleHLT_den);
1373 
1374  //retrieving L1 prescale
1375  //Checking if we have the same l1 seeds in den and num
1376  //taking into account that they can be written in different order in num and den
1377  //and some of them can be also switched off
1378 
1379  //check if for each den l1 there is the same l1 seed in num
1380  if (not prescales_den.first.empty()) {
1381  for (size_t iSeed = 0; iSeed < prescales_den.first.size(); ++iSeed) {
1382  auto l1_den = prescales_den.first.at(iSeed).first;
1383  auto l1_denp = prescales_den.first.at(iSeed).second;
1384  if (l1_denp < 1)
1385  continue;
1386  flag = false;
1387  for (size_t iSeed1 = 0; iSeed1 < prescales_num.first.size(); ++iSeed1) {
1388  auto l1_num = prescales_num.first.at(iSeed1).first;
1389  auto l1_nump = prescales_num.first.at(iSeed1).second;
1390  if (l1_num == l1_den && l1_nump >= 1) //the same seed
1391  {
1392  flag = true;
1393  break;
1394  }
1395  }
1396  theSame_den.push_back(flag);
1397  }
1398  }
1399  //check if for each num l1 there is the same l1 seed in den
1400  if (not prescales_num.first.empty()) {
1401  for (size_t iSeed = 0; iSeed < prescales_num.first.size(); ++iSeed) {
1402  auto l1_num = prescales_num.first.at(iSeed).first;
1403  auto l1_nump = prescales_num.first.at(iSeed).second;
1404  if (l1_nump < 1)
1405  continue;
1406  flag = false;
1407  for (size_t iSeed1 = 0; iSeed1 < prescales_den.first.size(); ++iSeed1) {
1408  auto l1_den = prescales_den.first.at(iSeed1).first;
1409  auto l1_denp = prescales_den.first.at(iSeed1).second;
1410  if (l1_den == l1_num && l1_denp >= 1) //the same seed
1411  {
1412  flag = true;
1413  break;
1414  }
1415  }
1416  theSame_num.push_back(flag);
1417  }
1418  }
1419  flag = true;
1420 
1421  if (theSame_num.size() == theSame_den.size()) {
1422  for (size_t i = 0; i < theSame_num.size(); ++i) {
1423  if ((!theSame_num.at(i)) || (!theSame_den.at(i))) {
1424  flag = false;
1425  break;
1426  }
1427  }
1428  }
1429 
1430  if (flag && (theSame_num.size() == theSame_den.size())) {
1431  L1P = 1; //den and num have the same set of l1 seeds
1432  } else {
1433  if (not prescales_num.first.empty()) {
1434  Prescale_num = 1;
1435  for (size_t iSeed = 0; iSeed < prescales_num.first.size(); ++iSeed) {
1436  auto l1 = prescales_num.first.at(iSeed).second;
1437  if (l1 < 1)
1438  continue;
1439  if (l1 == 1) {
1440  Prescale_num = 1;
1441  break;
1442  } else
1443  Prescale_num *= 1 - (1.0 / (l1));
1444  }
1445  if (Prescale_num != 1)
1446  Prescale_num = 1.0 / (1 - Prescale_num);
1447  }
1448  L1P = Prescale_num;
1449  }
1450 
1451  return L1P * HLTP;
1452 }
HLTPrescaleProvider * hltPrescale_
Definition: BPHMonitor.cc:142
std::pair< std::vector< std::pair< std::string, TL1 > >, THLT > prescaleValuesInDetail(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
int iEvent
Definition: GenABIO.cc:224

Member Data Documentation

◆ BMass_

ObjME BPHMonitor::BMass_
private

Definition at line 136 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ Bmass_binning_

MEbinning BPHMonitor::Bmass_binning_
private

Definition at line 98 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ bsInputTag_

edm::InputTag BPHMonitor::bsInputTag_
private

Definition at line 76 of file BPHMonitor.cc.

◆ bsToken_

edm::EDGetTokenT<reco::BeamSpot> BPHMonitor::bsToken_
private

Definition at line 82 of file BPHMonitor.cc.

Referenced by analyze().

◆ cos_binning_

MEbinning BPHMonitor::cos_binning_
private

Definition at line 101 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ d0_binning_

MEbinning BPHMonitor::d0_binning_
private

Definition at line 94 of file BPHMonitor.cc.

◆ dca_binning_

MEbinning BPHMonitor::dca_binning_
private

Definition at line 99 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ den_genTriggerEventFlag_

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

Definition at line 140 of file BPHMonitor.cc.

Referenced by analyze(), bookHistograms(), and ~BPHMonitor().

◆ DiMuDCA_

ObjME BPHMonitor::DiMuDCA_
private

Definition at line 134 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMudR_

ObjME BPHMonitor::DiMudR_
private

Definition at line 137 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuDS_

ObjME BPHMonitor::DiMuDS_
private

Definition at line 133 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuEta_

ObjME BPHMonitor::DiMuEta_
private

Definition at line 129 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuMass_

ObjME BPHMonitor::DiMuMass_
private

Definition at line 135 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuPhi_

ObjME BPHMonitor::DiMuPhi_
private

Definition at line 128 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuProb_

ObjME BPHMonitor::DiMuProb_
private

Definition at line 132 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuPt_

ObjME BPHMonitor::DiMuPt_
private

Definition at line 130 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ DiMuPVcos_

ObjME BPHMonitor::DiMuPVcos_
private

Definition at line 131 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ displaced_

int BPHMonitor::displaced_
private

Definition at line 153 of file BPHMonitor.cc.

Referenced by analyze().

◆ DMSelection_ref

StringCutObjectSelector<reco::Candidate::LorentzVector, true> BPHMonitor::DMSelection_ref
private

Definition at line 184 of file BPHMonitor.cc.

Referenced by analyze().

◆ dMu_pt_variable_binning_

std::vector<double> BPHMonitor::dMu_pt_variable_binning_
private

Definition at line 90 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ dR_binning_

MEbinning BPHMonitor::dR_binning_
private

Definition at line 96 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ ds_binning_

MEbinning BPHMonitor::ds_binning_
private

Definition at line 100 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ enum_

int BPHMonitor::enum_
private

Definition at line 157 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ eta_binning_

MEbinning BPHMonitor::eta_binning_
private

Definition at line 93 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ folderName_

const std::string BPHMonitor::folderName_
private

Definition at line 70 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ handleTriggerEvent

edm::Handle<trigger::TriggerEvent> BPHMonitor::handleTriggerEvent
private

Definition at line 186 of file BPHMonitor.cc.

Referenced by analyze(), and matchToTrigger().

◆ hltConfig_

HLTConfigProvider BPHMonitor::hltConfig_
private

Definition at line 188 of file BPHMonitor.cc.

Referenced by bookHistograms(), getTriggerName(), and matchToTrigger().

◆ hltInputTag_

edm::EDGetTokenT<trigger::TriggerEvent> BPHMonitor::hltInputTag_
private

Definition at line 179 of file BPHMonitor.cc.

Referenced by analyze().

◆ hltInputTag_1

edm::InputTag BPHMonitor::hltInputTag_1
private

Definition at line 178 of file BPHMonitor.cc.

Referenced by matchToTrigger().

◆ hltpaths_den

std::vector<std::string> BPHMonitor::hltpaths_den
private

Definition at line 181 of file BPHMonitor.cc.

Referenced by analyze().

◆ hltpaths_num

std::vector<std::string> BPHMonitor::hltpaths_num
private

Definition at line 180 of file BPHMonitor.cc.

Referenced by analyze().

◆ hltPathsAreValid_

bool BPHMonitor::hltPathsAreValid_
private

Definition at line 73 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ hltPrescale_

HLTPrescaleProvider* BPHMonitor::hltPrescale_
private

Definition at line 142 of file BPHMonitor.cc.

Referenced by analyze(), bookHistograms(), Prescale(), and ~BPHMonitor().

◆ HLTR

edm::Handle<edm::TriggerResults> BPHMonitor::HLTR
private

Definition at line 189 of file BPHMonitor.cc.

◆ hltTrigResTag_

edm::EDGetTokenT<edm::TriggerResults> BPHMonitor::hltTrigResTag_
private

Definition at line 177 of file BPHMonitor.cc.

◆ Jpsi_

int BPHMonitor::Jpsi_
private

Definition at line 155 of file BPHMonitor.cc.

Referenced by analyze().

◆ kaon_mass

double BPHMonitor::kaon_mass
private

Definition at line 169 of file BPHMonitor.cc.

Referenced by analyze().

◆ L3_

int BPHMonitor::L3_
private

Definition at line 151 of file BPHMonitor.cc.

◆ magneticFieldToken_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> BPHMonitor::magneticFieldToken_
private

Definition at line 87 of file BPHMonitor.cc.

Referenced by analyze(), and BPHMonitor().

◆ mass_binning_

MEbinning BPHMonitor::mass_binning_
private

Definition at line 97 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ max_dR

double BPHMonitor::max_dR
private

Definition at line 172 of file BPHMonitor.cc.

◆ maxmass_

double BPHMonitor::maxmass_
private

Definition at line 159 of file BPHMonitor.cc.

Referenced by analyze().

◆ maxmassJpsi

double BPHMonitor::maxmassJpsi
private

Definition at line 161 of file BPHMonitor.cc.

Referenced by analyze().

◆ maxmassJpsiTk

double BPHMonitor::maxmassJpsiTk
private

Definition at line 167 of file BPHMonitor.cc.

Referenced by analyze().

◆ maxmassTkTk

double BPHMonitor::maxmassTkTk
private

Definition at line 165 of file BPHMonitor.cc.

Referenced by analyze().

◆ maxmassUpsilon

double BPHMonitor::maxmassUpsilon
private

Definition at line 163 of file BPHMonitor.cc.

Referenced by analyze().

◆ min_dR

double BPHMonitor::min_dR
private

Definition at line 171 of file BPHMonitor.cc.

Referenced by analyze().

◆ mincos

double BPHMonitor::mincos
private

Definition at line 175 of file BPHMonitor.cc.

Referenced by analyze().

◆ minDS

double BPHMonitor::minDS
private

Definition at line 176 of file BPHMonitor.cc.

Referenced by analyze().

◆ minmass_

double BPHMonitor::minmass_
private

Definition at line 160 of file BPHMonitor.cc.

Referenced by analyze().

◆ minmassJpsi

double BPHMonitor::minmassJpsi
private

Definition at line 162 of file BPHMonitor.cc.

Referenced by analyze().

◆ minmassJpsiTk

double BPHMonitor::minmassJpsiTk
private

Definition at line 168 of file BPHMonitor.cc.

Referenced by analyze().

◆ minmassTkTk

double BPHMonitor::minmassTkTk
private

Definition at line 166 of file BPHMonitor.cc.

Referenced by analyze().

◆ minmassUpsilon

double BPHMonitor::minmassUpsilon
private

Definition at line 164 of file BPHMonitor.cc.

Referenced by analyze().

◆ minprob

double BPHMonitor::minprob
private

Definition at line 174 of file BPHMonitor.cc.

Referenced by analyze().

◆ mu1d0_

ObjME BPHMonitor::mu1d0_
private

Definition at line 112 of file BPHMonitor.cc.

◆ mu1Eta_

ObjME BPHMonitor::mu1Eta_
private

Definition at line 110 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu1Phi_

ObjME BPHMonitor::mu1Phi_
private

Definition at line 109 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu1Pt_

ObjME BPHMonitor::mu1Pt_
private

Definition at line 111 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu1z0_

ObjME BPHMonitor::mu1z0_
private

Definition at line 113 of file BPHMonitor.cc.

◆ mu2d0_

ObjME BPHMonitor::mu2d0_
private

Definition at line 117 of file BPHMonitor.cc.

◆ mu2Eta_

ObjME BPHMonitor::mu2Eta_
private

Definition at line 115 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu2Phi_

ObjME BPHMonitor::mu2Phi_
private

Definition at line 114 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu2Pt_

ObjME BPHMonitor::mu2Pt_
private

Definition at line 116 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu2z0_

ObjME BPHMonitor::mu2z0_
private

Definition at line 118 of file BPHMonitor.cc.

◆ mu3d0_

ObjME BPHMonitor::mu3d0_
private

Definition at line 122 of file BPHMonitor.cc.

◆ mu3Eta_

ObjME BPHMonitor::mu3Eta_
private

Definition at line 120 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu3Phi_

ObjME BPHMonitor::mu3Phi_
private

Definition at line 119 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu3Pt_

ObjME BPHMonitor::mu3Pt_
private

Definition at line 121 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mu3z0_

ObjME BPHMonitor::mu3z0_
private

Definition at line 123 of file BPHMonitor.cc.

◆ mu_mass

double BPHMonitor::mu_mass
private

Definition at line 170 of file BPHMonitor.cc.

Referenced by analyze().

◆ mud0_

ObjME BPHMonitor::mud0_
private

Definition at line 106 of file BPHMonitor.cc.

◆ muEta_

ObjME BPHMonitor::muEta_
private

Definition at line 104 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muoInputTag_

edm::InputTag BPHMonitor::muoInputTag_
private

Definition at line 75 of file BPHMonitor.cc.

◆ muoSelection_

StringCutObjectSelector<reco::Muon, true> BPHMonitor::muoSelection_
private

Definition at line 144 of file BPHMonitor.cc.

Referenced by analyze().

◆ muoSelection_probe

StringCutObjectSelector<reco::Muon, true> BPHMonitor::muoSelection_probe
private

Definition at line 147 of file BPHMonitor.cc.

◆ muoSelection_ref

StringCutObjectSelector<reco::Muon, true> BPHMonitor::muoSelection_ref
private

Definition at line 145 of file BPHMonitor.cc.

Referenced by analyze().

◆ muoSelection_tag

StringCutObjectSelector<reco::Muon, true> BPHMonitor::muoSelection_tag
private

Definition at line 146 of file BPHMonitor.cc.

◆ muoToken_

edm::EDGetTokenT<reco::MuonCollection> BPHMonitor::muoToken_
private

Definition at line 81 of file BPHMonitor.cc.

Referenced by analyze().

◆ muPhi_

ObjME BPHMonitor::muPhi_
private

Definition at line 103 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muPt_

ObjME BPHMonitor::muPt_
private

Definition at line 105 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ muz0_

ObjME BPHMonitor::muz0_
private

Definition at line 107 of file BPHMonitor.cc.

◆ nmuons_

int BPHMonitor::nmuons_
private

Definition at line 149 of file BPHMonitor.cc.

◆ num_genTriggerEventFlag_

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

Definition at line 139 of file BPHMonitor.cc.

Referenced by analyze(), bookHistograms(), and ~BPHMonitor().

◆ phEta_

ObjME BPHMonitor::phEta_
private

Definition at line 126 of file BPHMonitor.cc.

Referenced by analyze().

◆ phi_binning_

MEbinning BPHMonitor::phi_binning_
private

Definition at line 92 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ phInputTag_

edm::InputTag BPHMonitor::phInputTag_
private

Definition at line 78 of file BPHMonitor.cc.

Referenced by analyze().

◆ phPhi_

ObjME BPHMonitor::phPhi_
private

Definition at line 125 of file BPHMonitor.cc.

Referenced by analyze().

◆ phPt_

ObjME BPHMonitor::phPt_
private

Definition at line 127 of file BPHMonitor.cc.

Referenced by analyze().

◆ phToken_

edm::EDGetTokenT<reco::PhotonCollection> BPHMonitor::phToken_
private

Definition at line 84 of file BPHMonitor.cc.

Referenced by analyze().

◆ prob_variable_binning_

std::vector<double> BPHMonitor::prob_variable_binning_
private

Definition at line 91 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ pt_variable_binning_

std::vector<double> BPHMonitor::pt_variable_binning_
private

Definition at line 89 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ ptCut_

int BPHMonitor::ptCut_
private

◆ requireValidHLTPaths_

const bool BPHMonitor::requireValidHLTPaths_
private

Definition at line 72 of file BPHMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ seagull_

int BPHMonitor::seagull_
private

Definition at line 158 of file BPHMonitor.cc.

Referenced by analyze().

◆ tnp_

bool BPHMonitor::tnp_
private

Definition at line 150 of file BPHMonitor.cc.

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

◆ trInputTag_

edm::InputTag BPHMonitor::trInputTag_
private

Definition at line 77 of file BPHMonitor.cc.

◆ trOrMu_

int BPHMonitor::trOrMu_
private

Definition at line 154 of file BPHMonitor.cc.

Referenced by bookHistograms().

◆ trSelection_

StringCutObjectSelector<reco::Track, true> BPHMonitor::trSelection_
private

Definition at line 182 of file BPHMonitor.cc.

◆ trSelection_ref

StringCutObjectSelector<reco::Track, true> BPHMonitor::trSelection_ref
private

Definition at line 183 of file BPHMonitor.cc.

Referenced by analyze().

◆ trToken_

edm::EDGetTokenT<reco::TrackCollection> BPHMonitor::trToken_
private

Definition at line 83 of file BPHMonitor.cc.

Referenced by analyze().

◆ Upsilon_

int BPHMonitor::Upsilon_
private

Definition at line 156 of file BPHMonitor.cc.

Referenced by analyze().

◆ vtxInputTag_

edm::InputTag BPHMonitor::vtxInputTag_
private

Definition at line 79 of file BPHMonitor.cc.

◆ vtxToken_

edm::EDGetTokenT<reco::VertexCollection> BPHMonitor::vtxToken_
private

Definition at line 85 of file BPHMonitor.cc.

◆ z0_binning_

MEbinning BPHMonitor::z0_binning_
private

Definition at line 95 of file BPHMonitor.cc.