19 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
25 , do_met_ (iConfig.getParameter<
bool>(
"doMETHistos") )
26 , do_jet_ (iConfig.getParameter<
bool>(
"doJetHistos") )
27 , do_ht_ (iConfig.getParameter<
bool>(
"doHTHistos") )
30 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
31 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
32 , jetId_ ( iConfig.getParameter<
std::
string>(
"jetId") )
33 , htjetSelection_ ( iConfig.getParameter<
std::
string>(
"htjetSelection"))
34 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
35 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
36 , phoSelection_ ( iConfig.getParameter<
std::
string>(
"phoSelection") )
37 , njets_ ( iConfig.getParameter<
int>(
"njets" ) )
38 , nelectrons_ ( iConfig.getParameter<
int>(
"nelectrons" ) )
39 , nmuons_ ( iConfig.getParameter<
int>(
"nmuons" ) )
40 , nphotons_ ( iConfig.getParameter<
int>(
"nphotons") )
83 float met = pfmet.
pt();
88 std::vector<reco::PFJet>
jets;
89 std::vector<reco::PFJet> htjets;
90 if ( jetHandle->size() <
njets_ )
return;
91 for (
auto const & j : *jetHandle ) {
94 double abseta =
abs(j.eta());
95 double NHF = j.neutralHadronEnergyFraction();
96 double NEMF = j.neutralEmEnergyFraction();
97 double CHF = j.chargedHadronEnergyFraction();
98 double CEMF = j.chargedEmEnergyFraction();
99 unsigned NumNeutralParticles =j.neutralMultiplicity();
100 unsigned CHM = j.chargedMultiplicity();
101 bool passId = (
jetId_==
"loose" &&
looseJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM)) || (
jetId_==
"tight" &&
tightJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM));
102 if (passId) jets.push_back(j);
104 else jets.push_back(j);
108 if ( jets.size() <
njets_ )
return;
112 std::vector<reco::GsfElectron>
electrons;
114 for (
auto const &
e : *eleHandle ) {
121 if ( muoHandle->size() <
nmuons_ )
return;
122 std::vector<reco::Muon>
muons;
123 for (
auto const &
m : *muoHandle ) {
126 if ( muons.size() <
nmuons_ )
return;
130 if ( phoHandle->size() <
nphotons_ )
return;
131 std::vector<reco::Photon>
photons;
132 for (
auto const &
m : *phoHandle ) {
135 if ( photons.size() <
nphotons_ )
return;
152 const unsigned & NumNeutralParticles,
153 const unsigned & CHM)
156 unsigned NumConst = CHM+NumNeutralParticles;
158 return ((NumConst>1 && NHF<0.99 && NEMF<0.99) && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4));
161 return (NumNeutralParticles>2 && NEMF>0.01 && NHF<0.98);
164 return NumNeutralParticles>10 && NEMF<0.90;
172 const unsigned & NumNeutralParticles,
173 const unsigned & CHM)
176 unsigned NumConst = CHM+NumNeutralParticles;
177 return (NumConst>1 && NHF<0.90 && NEMF<0.90 ) && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4);
180 return (NHF<0.98 && NEMF>0.01 && NumNeutralParticles>2);
183 return (NEMF<0.90 && NumNeutralParticles>10);
204 desc.
add<
int>(
"njets", 0);
205 desc.
add<
int>(
"nelectrons", 0);
206 desc.
add<
int>(
"nmuons", 0);
207 desc.
add<
int>(
"nphotons", 0);
210 genericTriggerEventPSet.
add<
bool>(
"andOr");
212 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
213 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
214 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
215 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
216 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
218 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
219 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
220 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
221 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
226 desc.
add<
bool>(
"doMETHistos",
true);
229 desc.
add<
bool>(
"doJetHistos",
true);
231 desc.
add<
bool>(
"doHTHistos",
true);
236 descriptions.
add(
"objMonitoring", desc);
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
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_
double pt() const final
transverse momentum
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
StringCutObjectSelector< reco::Photon, true > phoSelection_
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)
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
void setCurrentFolder(const std::string &fullpath)
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)
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_
double phi() const final
momentum azimuthal angle
ObjMonitor(const edm::ParameterSet &)
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override