19 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
24 , do_met_ (iConfig.getParameter<bool>(
"doMETHistos") )
25 , do_jet_ (iConfig.getParameter<bool>(
"doJetHistos") )
26 , do_ht_ (iConfig.getParameter<bool>(
"doHTHistos") )
29 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
30 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
31 , jetId_ ( iConfig.getParameter<
std::
string>(
"jetId") )
32 , htjetSelection_ ( iConfig.getParameter<
std::
string>(
"htjetSelection"))
33 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
34 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
35 , njets_ ( iConfig.getParameter<
int>(
"njets" ) )
36 , nelectrons_ ( iConfig.getParameter<
int>(
"nelectrons" ) )
37 , nmuons_ ( iConfig.getParameter<
int>(
"nmuons" ) )
80 float met = pfmet.
pt();
85 std::vector<reco::PFJet>
jets;
86 std::vector<reco::PFJet> htjets;
87 if (
int(jetHandle->size()) <
njets_ )
return;
88 for (
auto const & j : *jetHandle ) {
91 double abseta =
abs(j.eta());
92 double NHF = j.neutralHadronEnergyFraction();
93 double NEMF = j.neutralEmEnergyFraction();
94 double CHF = j.chargedHadronEnergyFraction();
95 double CEMF = j.chargedEmEnergyFraction();
96 unsigned NumNeutralParticles =j.neutralMultiplicity();
97 unsigned CHM = j.chargedMultiplicity();
98 bool passId = (
jetId_==
"loose" &&
looseJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM)) || (
jetId_==
"tight" &&
tightJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM));
99 if (passId) jets.push_back(j);
101 else jets.push_back(j);
105 if (
int(jets.size()) <
njets_ )
return;
109 std::vector<reco::GsfElectron>
electrons;
110 if (
int(eleHandle->size()) <
nelectrons_ )
return;
111 for (
auto const &
e : *eleHandle ) {
118 if (
int(muoHandle->size()) <
nmuons_ )
return;
119 std::vector<reco::Muon>
muons;
120 for (
auto const &
m : *muoHandle ) {
123 if (
int(muons.size()) <
nmuons_ )
return;
140 const unsigned & NumNeutralParticles,
141 const unsigned & CHM)
144 unsigned NumConst = CHM+NumNeutralParticles;
146 return ((NumConst>1 && NHF<0.99 && NEMF<0.99) && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4));
149 return (NumNeutralParticles>2 && NEMF>0.01 && NHF<0.98);
152 return NumNeutralParticles>10 && NEMF<0.90;
160 const unsigned & NumNeutralParticles,
161 const unsigned & CHM)
164 unsigned NumConst = CHM+NumNeutralParticles;
165 return (NumConst>1 && NHF<0.90 && NEMF<0.90 ) && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4);
168 return (NHF<0.98 && NEMF>0.01 && NumNeutralParticles>2);
171 return (NEMF<0.90 && NumNeutralParticles>10);
190 desc.
add<
int>(
"njets", 0);
191 desc.
add<
int>(
"nelectrons", 0);
192 desc.
add<
int>(
"nmuons", 0);
195 genericTriggerEventPSet.
add<
bool>(
"andOr");
197 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
198 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
199 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
200 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
201 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
203 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
204 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
205 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
206 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
211 desc.
add<
bool>(
"doMETHistos",
true);
214 desc.
add<
bool>(
"doJetHistos",
true);
216 desc.
add<
bool>(
"doHTHistos",
true);
221 descriptions.
add(
"objMonitoring", desc);
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
virtual double pt() const final
transverse momentum
void initialise(const edm::ParameterSet &iConfig)
void fillHistograms(const std::vector< reco::PFJet > &jets, const reco::PFMET &pfmet, const int &ls, const bool passCond)
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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static void fillJetDescription(edm::ParameterSetDescription &histoPSet)
void bookHistograms(DQMStore::IBooker &)
static void fillMetDescription(edm::ParameterSetDescription &histoPSet)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
void initialise(const edm::ParameterSet &iConfig)
bool tightJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
StringCutObjectSelector< reco::MET, true > metSelection_
std::vector< Muon > MuonCollection
collection of Muon objects
virtual double phi() const final
momentum azimuthal angle
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
edm::EDGetTokenT< reco::PFMETCollection > metToken_
void initialise(const edm::ParameterSet &iConfig)
void bookHistograms(DQMStore::IBooker &)
Abs< T >::type abs(const T &t)
StringCutObjectSelector< reco::PFJet, true > jetSelection_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
static void fillHtDescription(edm::ParameterSetDescription &histoPSet)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void setCurrentFolder(const std::string &fullpath)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
StringCutObjectSelector< reco::Muon, true > muoSelection_
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
edm::EDGetTokenT< reco::MuonCollection > muoToken_
ObjMonitor(const edm::ParameterSet &)
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override