49 const
unsigned& NumNeutralParticles,
57 const
unsigned& NumNeutralParticles,
104 requireValidHLTPaths_(
iConfig.getParameter<
bool>("requireValidHLTPaths")),
105 hltPathsAreValid_(
false),
112 do_met_(
iConfig.getParameter<
bool>("doMETHistos")),
113 do_jet_(
iConfig.getParameter<
bool>("doJetHistos")),
114 do_ht_(
iConfig.getParameter<
bool>("doHTHistos")),
115 do_hmg_(
iConfig.getParameter<
bool>("doHMesonGammaHistos")),
117 iConfig.getParameter<edm::
ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
119 iConfig.getParameter<edm::
ParameterSet>("denGenericTriggerEventPSet"), consumesCollector(), *this)),
120 metSelection_(
iConfig.getParameter<std::
string>("metSelection")),
121 jetSelection_(
iConfig.getParameter<std::
string>("jetSelection")),
122 jetId_(
iConfig.getParameter<std::
string>("jetId")),
123 htjetSelection_(
iConfig.getParameter<std::
string>("htjetSelection")),
124 eleSelection_(
iConfig.getParameter<std::
string>("eleSelection")),
125 muoSelection_(
iConfig.getParameter<std::
string>("muoSelection")),
126 phoSelection_(
iConfig.getParameter<std::
string>("phoSelection")),
127 trkSelection_(
iConfig.getParameter<std::
string>("trkSelection")),
129 nelectrons_(
iConfig.getParameter<
int>("nelectrons")),
130 nmuons_(
iConfig.getParameter<
int>("nmuons")),
131 nphotons_(
iConfig.getParameter<
int>("nphotons")),
132 nmesons_(
iConfig.getParameter<
int>("nmesons")) {
204 float met = pfmet.
pt();
209 std::vector<reco::PFJet>
jets;
210 std::vector<reco::PFJet> htjets;
211 if (jetHandle->size() <
njets_)
213 for (
auto const&
j : *jetHandle) {
216 double abseta =
abs(
j.eta());
217 double NHF =
j.neutralHadronEnergyFraction();
218 double NEMF =
j.neutralEmEnergyFraction();
219 double CHF =
j.chargedHadronEnergyFraction();
220 double CEMF =
j.chargedEmEnergyFraction();
221 unsigned NumNeutralParticles =
j.neutralMultiplicity();
222 unsigned CHM =
j.chargedMultiplicity();
223 bool passId = (
jetId_ ==
"loose" &&
looseJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM)) ||
224 (
jetId_ ==
"tight" &&
tightJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM));
238 std::vector<reco::GsfElectron>
electrons;
241 for (
auto const&
e : *eleHandle) {
243 electrons.push_back(
e);
250 if (muoHandle->size() <
nmuons_)
252 std::vector<reco::Muon>
muons;
253 for (
auto const&
m : *muoHandle) {
264 std::vector<reco::Photon>
photons;
265 for (
auto const&
m : *phoHandle) {
267 photons.push_back(
m);
272 std::vector<TLorentzVector> passedMesons;
277 TLorentzVector t1, t2;
278 float hadronMassHyp[2] = {0.1396, 0.4937};
279 float loMassLim[2] = {0.5, 0.9};
280 float hiMassLim[2] = {1.0, 1.11};
282 for (
size_t i = 0;
i < trkHandle->size(); ++
i) {
286 for (
size_t j =
i + 1;
j < trkHandle->size(); ++
j) {
293 for (
unsigned hyp = 0; hyp < 2; ++hyp) {
294 t1.SetPtEtaPhiM(trk1.
pt(), trk1.
eta(), trk1.
phi(), hadronMassHyp[hyp]);
295 t2.SetPtEtaPhiM(trk2.
pt(), trk2.
eta(), trk2.
phi(), hadronMassHyp[hyp]);
296 TLorentzVector mesCand = t1 + t2;
299 if (mesCand.M() < loMassLim[hyp] || mesCand.M() > hiMassLim[hyp])
301 if (mesCand.Pt() < 35. || fabs(mesCand.Rapidity()) > 2.1)
306 for (
size_t k = 0;
k < trkHandle->size(); ++
k) {
307 if (
k ==
i ||
k ==
j)
310 if (trkN.
charge() == 0 || trkN.
pt() < 0.5 || (trkN.
dz() > 0.1) ||
311 deltaR(trkN.
eta(), trkN.
phi(), mesCand.Eta(), mesCand.Phi()) > 0.5)
315 if (absIso / mesCand.Pt() > 0.2)
317 passedMesons.push_back(mesCand);
343 const unsigned& NumNeutralParticles,
344 const unsigned& CHM) {
346 unsigned NumConst = CHM + NumNeutralParticles;
348 return ((NumConst > 1 && NHF < 0.99 && NEMF < 0.99) &&
349 ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4));
350 }
else if (abseta <= 3) {
351 return (NumNeutralParticles > 2 && NEMF > 0.01 && NHF < 0.98);
353 return NumNeutralParticles > 10 && NEMF < 0.90;
361 const unsigned& NumNeutralParticles,
362 const unsigned& CHM) {
364 unsigned NumConst = CHM + NumNeutralParticles;
365 return (NumConst > 1 && NHF < 0.90 && NEMF < 0.90) &&
366 ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4);
367 }
else if (abseta <= 3) {
368 return (NHF < 0.98 && NEMF > 0.01 && NumNeutralParticles > 2);
370 return (NEMF < 0.90 && NumNeutralParticles > 10);
377 desc.
add<
bool>(
"requireValidHLTPaths",
true);
393 desc.
add<
int>(
"njets", 0);
394 desc.
add<
int>(
"nelectrons", 0);
395 desc.
add<
int>(
"nmuons", 0);
396 desc.
add<
int>(
"nphotons", 0);
397 desc.
add<
int>(
"nmesons", 0);
400 genericTriggerEventPSet.
add<
bool>(
"andOr");
402 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions", {});
403 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
404 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
405 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
406 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
408 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths", {});
409 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
410 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
411 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel", 1);
416 desc.
add<
bool>(
"doMETHistos",
true);
419 desc.
add<
bool>(
"doJetHistos",
true);
421 desc.
add<
bool>(
"doHTHistos",
true);
423 desc.
add<
bool>(
"doHMesonGammaHistos",
true);
428 descriptions.
add(
"objMonitoring", desc);
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
edm::EDGetTokenT< reco::TrackCollection > trkToken_
dqm::reco::DQMStore DQMStore
void fillHistograms(const std::vector< reco::PFJet > &jets, const reco::PFMET &pfmet, const int ls, const bool passCond)
void initialise(const edm::ParameterSet &iConfig)
void bookHistograms(DQMStore::IBooker &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool looseJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
double pt() const final
transverse momentum
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
StringCutObjectSelector< reco::MET, true > metSelection_
#define DEFINE_FWK_MODULE(type)
static void fillJetDescription(edm::ParameterSetDescription &histoPSet)
void fillHistograms(const reco::PhotonCollection &photons, const std::vector< TLorentzVector > &mesons, const int ls, const bool passCond)
void bookHistograms(DQMStore::IBooker &)
static void fillMetDescription(edm::ParameterSetDescription &histoPSet)
std::vector< Track > TrackCollection
collection of Tracks
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
double phi() const
azimuthal angle of momentum vector
auto const & tracks
cannot be loose
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
void initialise(const edm::ParameterSet &iConfig)
const bool requireValidHLTPaths_
bool tightJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
LuminosityBlockNumber_t luminosityBlock() const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
static void fillHmgDescription(edm::ParameterSetDescription &histoPSet)
std::vector< Muon > MuonCollection
collection of Muon objects
const std::string folderName_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
StringCutObjectSelector< reco::Muon, true > muoSelection_
void initialise(const edm::ParameterSet &iConfig)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
double eta() const
pseudorapidity of momentum vector
edm::EDGetTokenT< reco::PFMETCollection > metToken_
void initialise(const edm::ParameterSet &iConfig)
void bookHistograms(DQMStore::IBooker &)
double pt() const
track transverse momentum
Abs< T >::type abs(const T &t)
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
static void fillHtDescription(edm::ParameterSetDescription &histoPSet)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
void bookHistograms(DQMStore::IBooker &)
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
std::vector< Photon > PhotonCollection
collectin of Photon objects
void add(std::string const &label, ParameterSetDescription const &psetDescription)
dqm::reco::MonitorElement MonitorElement
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
StringCutObjectSelector< reco::Photon, true > phoSelection_
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
int charge() const
track electric charge
edm::EDGetTokenT< reco::MuonCollection > muoToken_
double phi() const final
momentum azimuthal angle
ObjMonitor(const edm::ParameterSet &)
StringCutObjectSelector< reco::Track, true > trkSelection_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override