20 : folderName_(iConfig.getParameter<
std::
string>(
"FolderName")),
27 do_met_(iConfig.getParameter<
bool>(
"doMETHistos")),
28 do_jet_(iConfig.getParameter<
bool>(
"doJetHistos")),
29 do_ht_(iConfig.getParameter<
bool>(
"doHTHistos")),
30 do_hmg_(iConfig.getParameter<
bool>(
"doHMesonGammaHistos")),
32 iConfig.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
34 iConfig.getParameter<
edm::
ParameterSet>(
"denGenericTriggerEventPSet"), consumesCollector(), *this)),
35 metSelection_(iConfig.getParameter<
std::
string>(
"metSelection")),
36 jetSelection_(iConfig.getParameter<
std::
string>(
"jetSelection")),
37 jetId_(iConfig.getParameter<
std::
string>(
"jetId")),
38 htjetSelection_(iConfig.getParameter<
std::
string>(
"htjetSelection")),
39 eleSelection_(iConfig.getParameter<
std::
string>(
"eleSelection")),
40 muoSelection_(iConfig.getParameter<
std::
string>(
"muoSelection")),
41 phoSelection_(iConfig.getParameter<
std::
string>(
"phoSelection")),
42 trkSelection_(iConfig.getParameter<
std::
string>(
"trkSelection")),
43 njets_(iConfig.getParameter<
int>(
"njets")),
44 nelectrons_(iConfig.getParameter<
int>(
"nelectrons")),
45 nmuons_(iConfig.getParameter<
int>(
"nmuons")),
46 nphotons_(iConfig.getParameter<
int>(
"nphotons")),
47 nmesons_(iConfig.getParameter<
int>(
"nmesons")) {
95 float met = pfmet.
pt();
100 std::vector<reco::PFJet>
jets;
101 std::vector<reco::PFJet> htjets;
102 if (jetHandle->size() <
njets_)
104 for (
auto const&
j : *jetHandle) {
107 double abseta =
abs(
j.eta());
108 double NHF =
j.neutralHadronEnergyFraction();
109 double NEMF =
j.neutralEmEnergyFraction();
110 double CHF =
j.chargedHadronEnergyFraction();
111 double CEMF =
j.chargedEmEnergyFraction();
112 unsigned NumNeutralParticles =
j.neutralMultiplicity();
113 unsigned CHM =
j.chargedMultiplicity();
114 bool passId = (
jetId_ ==
"loose" &&
looseJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM)) ||
115 (
jetId_ ==
"tight" &&
tightJetId(abseta, NHF, NEMF, CHF, CEMF, NumNeutralParticles, CHM));
129 std::vector<reco::GsfElectron>
electrons;
132 for (
auto const&
e : *eleHandle) {
134 electrons.push_back(
e);
141 if (muoHandle->size() <
nmuons_)
143 std::vector<reco::Muon>
muons;
144 for (
auto const&
m : *muoHandle) {
155 std::vector<reco::Photon>
photons;
156 for (
auto const&
m : *phoHandle) {
158 photons.push_back(
m);
163 std::vector<TLorentzVector> passedMesons;
168 TLorentzVector
t1,
t2;
169 float hadronMassHyp[2] = {0.1396, 0.4937};
170 float loMassLim[2] = {0.5, 0.9};
171 float hiMassLim[2] = {1.0, 1.11};
173 for (
size_t i = 0;
i < trkHandle->size(); ++
i) {
177 for (
size_t j =
i + 1;
j < trkHandle->size(); ++
j) {
184 for (
unsigned hyp = 0; hyp < 2; ++hyp) {
185 t1.SetPtEtaPhiM(trk1.
pt(), trk1.
eta(), trk1.
phi(), hadronMassHyp[hyp]);
186 t2.SetPtEtaPhiM(trk2.
pt(), trk2.
eta(), trk2.
phi(), hadronMassHyp[hyp]);
187 TLorentzVector mesCand = t1 +
t2;
190 if (mesCand.M() < loMassLim[hyp] || mesCand.M() > hiMassLim[hyp])
192 if (mesCand.Pt() < 35. || fabs(mesCand.Rapidity()) > 2.1)
197 for (
size_t k = 0;
k < trkHandle->size(); ++
k) {
198 if (
k ==
i ||
k ==
j)
201 if (trkN.
charge() == 0 || trkN.
pt() < 0.5 || (trkN.
dz() > 0.1) ||
202 deltaR(trkN.
eta(), trkN.
phi(), mesCand.Eta(), mesCand.Phi()) > 0.5)
206 if (absIso / mesCand.Pt() > 0.2)
208 passedMesons.push_back(mesCand);
234 const unsigned& NumNeutralParticles,
235 const unsigned& CHM) {
237 unsigned NumConst = CHM + NumNeutralParticles;
239 return ((NumConst > 1 && NHF < 0.99 && NEMF < 0.99) &&
240 ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4));
241 }
else if (abseta <= 3) {
242 return (NumNeutralParticles > 2 && NEMF > 0.01 && NHF < 0.98);
244 return NumNeutralParticles > 10 && NEMF < 0.90;
252 const unsigned& NumNeutralParticles,
253 const unsigned& CHM) {
255 unsigned NumConst = CHM + NumNeutralParticles;
256 return (NumConst > 1 && NHF < 0.90 && NEMF < 0.90) &&
257 ((abseta <= 2.4 && CHF > 0 && CHM > 0 && CEMF < 0.99) || abseta > 2.4);
258 }
else if (abseta <= 3) {
259 return (NHF < 0.98 && NEMF > 0.01 && NumNeutralParticles > 2);
261 return (NEMF < 0.90 && NumNeutralParticles > 10);
283 desc.
add<
int>(
"njets", 0);
284 desc.
add<
int>(
"nelectrons", 0);
285 desc.
add<
int>(
"nmuons", 0);
286 desc.
add<
int>(
"nphotons", 0);
287 desc.
add<
int>(
"nmesons", 0);
290 genericTriggerEventPSet.add<
bool>(
"andOr");
292 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions", {});
293 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
294 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
295 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
296 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
298 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths", {});
299 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
300 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
301 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel", 1);
306 desc.
add<
bool>(
"doMETHistos",
true);
309 desc.
add<
bool>(
"doJetHistos",
true);
311 desc.
add<
bool>(
"doHTHistos",
true);
313 desc.
add<
bool>(
"doHMesonGammaHistos",
true);
318 descriptions.
add(
"objMonitoring", desc);
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
edm::EDGetTokenT< reco::TrackCollection > trkToken_
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)
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
StringCutObjectSelector< reco::MET, true > metSelection_
void setCurrentFolder(std::string const &fullpath)
static void fillJetDescription(edm::ParameterSetDescription &histoPSet)
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
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
static void fillHmgDescription(edm::ParameterSetDescription &histoPSet)
std::vector< Muon > MuonCollection
collection of Muon objects
StringCutObjectSelector< reco::PFJet, true > jetSelection_
StringCutObjectSelector< reco::Muon, true > muoSelection_
void initialise(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
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)
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 reco::PhotonCollection &photons, std::vector< TLorentzVector > mesons, const int &ls, const bool passCond)
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