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") )
33 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
34 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
35 , jetId_ ( iConfig.getParameter<
std::
string>(
"jetId") )
36 , htjetSelection_ ( iConfig.getParameter<
std::
string>(
"htjetSelection"))
37 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
38 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
39 , phoSelection_ ( iConfig.getParameter<
std::
string>(
"phoSelection") )
40 , trkSelection_ ( iConfig.getParameter<
std::
string>(
"trkSelection") )
41 , njets_ ( iConfig.getParameter<
int>(
"njets" ) )
42 , nelectrons_ ( iConfig.getParameter<
int>(
"nelectrons" ) )
43 , nmuons_ ( iConfig.getParameter<
int>(
"nmuons" ) )
44 , nphotons_ ( iConfig.getParameter<
int>(
"nphotons") )
45 , nmesons_ ( iConfig.getParameter<
int>(
"nmesons") )
92 float met = pfmet.
pt();
97 std::vector<reco::PFJet>
jets;
98 std::vector<reco::PFJet> htjets;
99 if ( jetHandle->size() <
njets_ )
return;
100 for (
auto const & j : *jetHandle ) {
103 double abseta =
abs(j.eta());
104 double NHF = j.neutralHadronEnergyFraction();
105 double NEMF = j.neutralEmEnergyFraction();
106 double CHF = j.chargedHadronEnergyFraction();
107 double CEMF = j.chargedEmEnergyFraction();
108 unsigned NumNeutralParticles =j.neutralMultiplicity();
109 unsigned CHM = j.chargedMultiplicity();
110 bool passId = (
jetId_==
"loose" &&
looseJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM)) || (
jetId_==
"tight" &&
tightJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM));
111 if (passId) jets.push_back(j);
113 else jets.push_back(j);
117 if ( jets.size() <
njets_ )
return;
121 std::vector<reco::GsfElectron>
electrons;
123 for (
auto const &
e : *eleHandle ) {
130 if ( muoHandle->size() <
nmuons_ )
return;
131 std::vector<reco::Muon>
muons;
132 for (
auto const &
m : *muoHandle ) {
135 if ( muons.size() <
nmuons_ )
return;
139 if ( phoHandle->size() <
nphotons_ )
return;
140 std::vector<reco::Photon>
photons;
141 for (
auto const &
m : *phoHandle ) {
144 if ( photons.size() <
nphotons_ )
return;
146 std::vector<TLorentzVector> passedMesons;
151 TLorentzVector t1,t2;
152 float hadronMassHyp[2] = {0.1396,0.4937};
153 float loMassLim[2] = {0.5,0.9};
154 float hiMassLim[2] = {1.0,1.11};
156 for (
size_t i = 0;
i < trkHandle->size(); ++
i){
159 for (
size_t j =
i+1; j < trkHandle->size(); ++j){
164 for (
unsigned hyp = 0; hyp < 2; ++hyp){
166 t1.SetPtEtaPhiM(trk1.
pt(),trk1.
eta(),trk1.
phi(),hadronMassHyp[hyp]);
167 t2.SetPtEtaPhiM(trk2.
pt(),trk2.
eta(),trk2.
phi(),hadronMassHyp[hyp]);
168 TLorentzVector mesCand = t1 + t2;
171 if (mesCand.M() < loMassLim[hyp] || mesCand.M() > hiMassLim[hyp])
continue;
172 if (mesCand.Pt() < 35. || fabs(mesCand.Rapidity()) > 2.1 )
continue;
176 for (
size_t k = 0;
k < trkHandle->size(); ++
k){
177 if (
k ==
i ||
k == j)
continue;
179 if (trkN.
charge() == 0 || trkN.
pt() < 0.5 ||
180 ( trkN.
dz() > 0.1 ) ||
181 deltaR(trkN.
eta(),trkN.
phi(),mesCand.Eta(),mesCand.Phi()) > 0.5)
continue;
184 if (absIso/mesCand.Pt() > 0.2)
continue;
185 passedMesons.push_back(mesCand);
189 if ( passedMesons.size() <
nmesons_ )
return;
207 const unsigned & NumNeutralParticles,
208 const unsigned & CHM)
211 unsigned NumConst = CHM+NumNeutralParticles;
213 return ((NumConst>1 && NHF<0.99 && NEMF<0.99) && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4));
216 return (NumNeutralParticles>2 && NEMF>0.01 && NHF<0.98);
219 return NumNeutralParticles>10 && NEMF<0.90;
227 const unsigned & NumNeutralParticles,
228 const unsigned & CHM)
231 unsigned NumConst = CHM+NumNeutralParticles;
232 return (NumConst>1 && NHF<0.90 && NEMF<0.90 ) && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4);
235 return (NHF<0.98 && NEMF>0.01 && NumNeutralParticles>2);
238 return (NEMF<0.90 && NumNeutralParticles>10);
261 desc.
add<
int>(
"njets", 0);
262 desc.
add<
int>(
"nelectrons", 0);
263 desc.
add<
int>(
"nmuons", 0);
264 desc.
add<
int>(
"nphotons", 0);
265 desc.
add<
int>(
"nmesons", 0);
268 genericTriggerEventPSet.
add<
bool>(
"andOr");
270 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
271 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
272 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
273 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
274 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
276 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
277 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
278 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
279 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
284 desc.
add<
bool>(
"doMETHistos",
true);
287 desc.
add<
bool>(
"doJetHistos",
true);
289 desc.
add<
bool>(
"doHTHistos",
true);
291 desc.
add<
bool>(
"doHMesonGammaHistos",
true);
296 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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
StringCutObjectSelector< reco::MET, true > metSelection_
static void fillHmgDescription(edm::ParameterSetDescription &histoPSet)
std::vector< Muon > MuonCollection
collection of Muon objects
void initialise(const edm::ParameterSet &iConfig)
StringCutObjectSelector< reco::Photon, true > phoSelection_
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
double eta() const
pseudorapidity of momentum vector
void setCurrentFolder(std::string const &fullpath)
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)
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 bookHistograms(DQMStore::IBooker &)
StringCutObjectSelector< reco::Track, true > trkSelection_
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)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
StringCutObjectSelector< reco::Muon, true > muoSelection_
void fillHistograms(const reco::PhotonCollection &photons, std::vector< TLorentzVector > mesons, const int &ls, const bool passCond)
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
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::GsfElectron, true > eleSelection_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override