Get the analysis.
263 std::vector<std::string> eleTrigPathNames;
264 std::vector<std::string> muTrigPathNames;
270 bool passed_electron_HLT =
false;
271 bool passed_muon_HLT =
false;
272 for (
unsigned int i = 0;
i < HLTresults->size();
i++) {
275 for (
unsigned int index = 0;
282 passed_electron_HLT = HLTresults->accept(
i);
286 for (
unsigned int index = 0;
293 passed_muon_HLT = HLTresults->accept(
i);
299 if (!(passed_electron_HLT || passed_muon_HLT))
309 VertexCollection::const_iterator
v = vertexCollection.begin();
310 int vertex_number = vertexCollection.size();
311 double vertex_chi2 = v->normalizedChi2();
312 double vertex_d0 =
sqrt(v->x()*v->x()+v->y()*v->y());
313 double vertex_numTrks = v->tracksSize();
314 double vertex_sumTrks = 0.0;
318 vertex_curTrack != v->tracks_end(); vertex_curTrack++)
319 vertex_sumTrks += (*vertex_curTrack)->pt();
325 if (!caloMETCollection.
isValid())
327 float missing_et = caloMETCollection->begin()->et();
328 float met_phi = caloMETCollection->begin()->phi();
335 if (!electronCollection.
isValid())
339 float electron_et = -8.0;
340 float electron_eta = -8.0;
341 float electron_phi = -8.0;
342 float electron2_et = -9.0;
343 float electron2_eta = -9.0;
344 float electron2_phi = -9.0;
345 float ee_invMass = -9.0;
346 TLorentzVector e1, e2;
349 if (passed_electron_HLT) {
350 for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
351 recoElectron != electronCollection->end(); recoElectron++) {
353 if (recoElectron->et() < 20 || fabs(recoElectron->eta()) > 2.5)
357 if (recoElectron->deltaPhiSuperClusterTrackAtVtx() > 0.58 ||
358 recoElectron->deltaEtaSuperClusterTrackAtVtx() > 0.01 ||
359 recoElectron->sigmaIetaIeta() > 0.027)
362 if (recoElectron->et() > electron_et) {
363 electron2_et = electron_et;
364 electron2_eta = electron_eta;
365 electron2_phi = electron_phi;
366 electron_et = recoElectron->et();
367 electron_eta = recoElectron->eta();
368 electron_phi = recoElectron->phi();
369 e1 = TLorentzVector(recoElectron->momentum().x(),
370 recoElectron->momentum().y(),
371 recoElectron->momentum().z(),
373 }
else if (recoElectron->et() > electron2_et) {
374 electron2_et = recoElectron->et();
375 electron2_eta = recoElectron->eta();
376 electron2_phi = recoElectron->phi();
377 e2 = TLorentzVector(recoElectron->momentum().x(),
378 recoElectron->momentum().y(),
379 recoElectron->momentum().z(),
383 if (electron2_et > 0.0) {
384 TLorentzVector pair = e1+e2;
385 ee_invMass = pair.M();
400 float mm_invMass = -9.0;
401 float muon_pt = -9.0;
402 float muon_eta = -9.0;
403 float muon_phi = -9.0;
404 float muon2_pt = -9.0;
405 float muon2_eta = -9.0;
406 float muon2_phi = -9.0;
407 TLorentzVector m1, m2;
409 if (passed_muon_HLT) {
410 for (reco::MuonCollection::const_iterator recoMuon = muonCollection->begin();
411 recoMuon != muonCollection->end(); recoMuon++) {
413 if (recoMuon->pt() < 20 || !recoMuon->isGlobalMuon())
416 if (recoMuon->globalTrack()->normalizedChi2() > 10)
419 if (recoMuon->pt() > muon_pt) {
421 muon2_eta = muon_eta;
422 muon2_phi = muon_phi;
423 muon_pt = recoMuon->pt();
424 muon_eta = recoMuon->eta();
425 muon_phi = recoMuon->phi();
426 m1 = TLorentzVector(recoMuon->momentum().x(),
427 recoMuon->momentum().y(),
428 recoMuon->momentum().z(),
430 }
else if (recoMuon->pt() > muon2_pt) {
431 muon2_pt = recoMuon->pt();
432 muon2_eta = recoMuon->eta();
433 muon2_phi = recoMuon->phi();
434 m2 = TLorentzVector(recoMuon->momentum().x(),
435 recoMuon->momentum().y(),
436 recoMuon->momentum().z(),
441 if (muon2_pt > 0.0) {
442 TLorentzVector pair = m1+m2;
443 mm_invMass = pair.M();
454 if (!PFJetCollection.
isValid())
457 unsigned int muonCollectionSize = muonCollection->size();
459 unsigned int PFJetCollectionSize = PFJetCollection->size();
464 float jet_et = -80.0;
465 float jet_pt = -80.0;
466 float jet_eta = -80.0;
467 float jet_phi = -80.0;
468 float jet2_et = -90.0;
469 float jet2_eta = -90.0;
470 float jet2_phi = -90.0;
480 for (
unsigned int i = 0;
i < PFJetCollectionSize;
i++) {
481 const Jet&
jet = PFJetCollection->at(
i);
483 double minDistance = 99999;
484 for (
unsigned int j = 0;
j < muonCollectionSize;
j++) {
485 const Muon&
mu = muonCollection->at(
j);
488 if (minDistance > distance)
489 minDistance = distance;
491 if (minDistance < 0.3)
496 if (electron_et > 0.0 &&
497 fabs(jet.
eta() - electron_eta) < 0.2 &&
500 if (electron2_et > 0.0 &&
501 fabs(jet.
eta() - electron2_eta) < 0.2 &&
527 if (jet.
et() > jet_et) {
539 }
else if (jet.
et() > jet2_et) {
544 jet2_eta = jet.
eta();
545 jet2_phi = jet.
phi();
557 bool fill_e1 =
false;
558 bool fill_e2 =
false;
559 bool fill_m1 =
false;
560 bool fill_m2 =
false;
561 bool fill_met =
false;
564 if (ee_invMass > 0.0) {
571 if (mm_invMass > 0.0) {
579 if (electron_et > 0.0 && missing_et > 20.0) {
580 float dphiW = fabs(met_phi-electron_phi);
581 float W_mt_e =
sqrt(2 * missing_et * electron_et * (1 -
cos(dphiW)));
588 if (muon_pt > 0.0 && missing_et > 20.0) {
589 float dphiW = fabs(met_phi - muon_phi);
590 float W_mt_m =
sqrt(2 * missing_et * muon_pt * (1 -
cos(dphiW)));
596 if (jet_et > -10.0) {
605 if (jet_eta > -50.) {
609 if (jet_phi > -10.) {
613 if (jet2_et > -10.0) {
621 if (jet2_eta > -50.) {
625 if (jet2_phi > -10.) {
631 if (fill_e1 || fill_m1) {
MonitorElement * h_e1_phi
MonitorElement * h_vertex_d0
std::vector< std::string > theMuonTriggerPathToPass_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
edm::EDGetTokenT< edm::View< reco::Jet > > thePFJetCollectionToken_
virtual float pt() const
transverse momentum
MonitorElement * h_jet2_phi
virtual double et() const
transverse energy
MonitorElement * h_m1_phi
MonitorElement * h_m_invWMass
edm::EDGetTokenT< edm::TriggerResults > theTriggerResultsToken_
MonitorElement * h_e1_eta
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * h_vertex_numTrks
virtual float phi() const
momentum azimuthal angle
Base class for all types of Jets.
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::MuonCollection > theMuonCollectionLabel_
MonitorElement * h_mumu_invMass
MonitorElement * h_jet_eta
MonitorElement * h_jet_phi
MonitorElement * h_e2_eta
MonitorElement * h_m2_phi
MonitorElement * h_e_invWMass
std::vector< std::string > theElecTriggerPathToPass_
MonitorElement * h_vertex_sumTrks
virtual float eta() const
momentum pseudorapidity
Cos< T >::type cos(const T &t)
MonitorElement * h_m1_eta
MonitorElement * h_m2_eta
edm::EDGetTokenT< edm::View< reco::MET > > theCaloMETCollectionToken_
MonitorElement * h_vertex_chi2
static const char *const trigNames[]
MonitorElement * h_ee_invMass
MonitorElement * h_e2_phi
std::string const & triggerName(unsigned int index) const
T const * product() const
MonitorElement * h_jet_et
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollectionLabel_
MonitorElement * h_met_phi
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
MonitorElement * h_jet_pt
double calcDeltaPhi(double phi1, double phi2)
MonitorElement * h_vertex_number
edm::EDGetTokenT< reco::VertexCollection > theVertexToken_
MonitorElement * h_jet_count
MonitorElement * h_jet2_et
MonitorElement * h_jet2_eta