Get the analysis.
262 std::vector<std::string> eleTrigPathNames;
263 std::vector<std::string> muTrigPathNames;
269 bool passed_electron_HLT =
false;
270 bool passed_muon_HLT =
false;
271 for (
unsigned int i = 0;
i < HLTresults->size();
i++) {
274 for (
unsigned int index = 0;
281 passed_electron_HLT = HLTresults->accept(
i);
285 for (
unsigned int index = 0;
292 passed_muon_HLT = HLTresults->accept(
i);
298 if (!(passed_electron_HLT || passed_muon_HLT))
304 iEvent.
getByLabel(
"offlinePrimaryVertices", vertexHandle);
308 VertexCollection::const_iterator
v = vertexCollection.begin();
309 int vertex_number = vertexCollection.size();
310 double vertex_chi2 = v->normalizedChi2();
311 double vertex_d0 =
sqrt(v->x()*v->x()+v->y()*v->y());
312 double vertex_numTrks = v->tracksSize();
313 double vertex_sumTrks = 0.0;
317 vertex_curTrack != v->tracks_end(); vertex_curTrack++)
318 vertex_sumTrks += (*vertex_curTrack)->pt();
324 if (!caloMETCollection.
isValid())
326 float missing_et = caloMETCollection->begin()->et();
327 float met_phi = caloMETCollection->begin()->phi();
334 if (!electronCollection.
isValid())
338 float electron_et = -8.0;
339 float electron_eta = -8.0;
340 float electron_phi = -8.0;
341 float electron2_et = -9.0;
342 float electron2_eta = -9.0;
343 float electron2_phi = -9.0;
344 float ee_invMass = -9.0;
345 TLorentzVector
e1,
e2;
348 if (passed_electron_HLT) {
349 for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
350 recoElectron != electronCollection->end(); recoElectron++) {
352 if (recoElectron->et() < 20 || fabs(recoElectron->eta()) > 2.5)
356 if (recoElectron->deltaPhiSuperClusterTrackAtVtx() > 0.58 ||
357 recoElectron->deltaEtaSuperClusterTrackAtVtx() > 0.01 ||
358 recoElectron->sigmaIetaIeta() > 0.027)
361 if (recoElectron->et() > electron_et) {
362 electron2_et = electron_et;
363 electron2_eta = electron_eta;
364 electron2_phi = electron_phi;
365 electron_et = recoElectron->et();
366 electron_eta = recoElectron->eta();
367 electron_phi = recoElectron->phi();
368 e1 = TLorentzVector(recoElectron->momentum().x(),
369 recoElectron->momentum().y(),
370 recoElectron->momentum().z(),
372 }
else if (recoElectron->et() > electron2_et) {
373 electron2_et = recoElectron->et();
374 electron2_eta = recoElectron->eta();
375 electron2_phi = recoElectron->phi();
376 e2 = TLorentzVector(recoElectron->momentum().x(),
377 recoElectron->momentum().y(),
378 recoElectron->momentum().z(),
382 if (electron2_et > 0.0) {
383 TLorentzVector pair = e1+
e2;
384 ee_invMass = pair.M();
399 float mm_invMass = -9.0;
400 float muon_pt = -9.0;
401 float muon_eta = -9.0;
402 float muon_phi = -9.0;
403 float muon2_pt = -9.0;
404 float muon2_eta = -9.0;
405 float muon2_phi = -9.0;
406 TLorentzVector m1, m2;
408 if (passed_muon_HLT) {
409 for (reco::MuonCollection::const_iterator recoMuon = muonCollection->begin();
410 recoMuon != muonCollection->end(); recoMuon++) {
412 if (recoMuon->pt() < 20 || !recoMuon->isGlobalMuon())
415 if (recoMuon->globalTrack()->normalizedChi2() > 10)
418 if (recoMuon->pt() > muon_pt) {
420 muon2_eta = muon_eta;
421 muon2_phi = muon_phi;
422 muon_pt = recoMuon->pt();
423 muon_eta = recoMuon->eta();
424 muon_phi = recoMuon->phi();
425 m1 = TLorentzVector(recoMuon->momentum().x(),
426 recoMuon->momentum().y(),
427 recoMuon->momentum().z(),
429 }
else if (recoMuon->pt() > muon2_pt) {
430 muon2_pt = recoMuon->pt();
431 muon2_eta = recoMuon->eta();
432 muon2_phi = recoMuon->phi();
433 m2 = TLorentzVector(recoMuon->momentum().x(),
434 recoMuon->momentum().y(),
435 recoMuon->momentum().z(),
440 if (muon2_pt > 0.0) {
441 TLorentzVector pair = m1+m2;
442 mm_invMass = pair.M();
455 if (!PFJetCollection.
isValid())
458 unsigned int muonCollectionSize = muonCollection->size();
460 unsigned int PFJetCollectionSize = PFJetCollection->size();
465 float jet_et = -80.0;
466 float jet_pt = -80.0;
467 float jet_eta = -80.0;
468 float jet_phi = -80.0;
469 float jet2_et = -90.0;
470 float jet2_eta = -90.0;
471 float jet2_phi = -90.0;
481 for (
unsigned int i = 0;
i < PFJetCollectionSize;
i++) {
482 const Jet&
jet = PFJetCollection->at(
i);
484 double minDistance = 99999;
485 for (
unsigned int j = 0;
j < muonCollectionSize;
j++) {
486 const Muon&
mu = muonCollection->at(
j);
489 if (minDistance > distance)
490 minDistance = distance;
492 if (minDistance < 0.3)
497 if (electron_et > 0.0 &&
498 fabs(jet.
eta() - electron_eta) < 0.2 &&
501 if (electron2_et > 0.0 &&
502 fabs(jet.
eta() - electron2_eta) < 0.2 &&
528 if (jet.
et() > jet_et) {
540 }
else if (jet.
et() > jet2_et) {
545 jet2_eta = jet.
eta();
546 jet2_phi = jet.
phi();
558 bool fill_e1 =
false;
559 bool fill_e2 =
false;
560 bool fill_m1 =
false;
561 bool fill_m2 =
false;
562 bool fill_met =
false;
565 if (ee_invMass > 0.0) {
572 if (mm_invMass > 0.0) {
580 if (electron_et > 0.0 && missing_et > 20.0) {
581 float dphiW = fabs(met_phi-electron_phi);
582 float W_mt_e =
sqrt(2 * missing_et * electron_et * (1 -
cos(dphiW)));
589 if (muon_pt > 0.0 && missing_et > 20.0) {
590 float dphiW = fabs(met_phi - muon_phi);
591 float W_mt_m =
sqrt(2 * missing_et * muon_pt * (1 -
cos(dphiW)));
597 if (jet_et > -10.0) {
606 if (jet_eta > -50.) {
610 if (jet_phi > -10.) {
614 if (jet2_et > -10.0) {
622 if (jet2_eta > -50.) {
626 if (jet2_phi > -10.) {
632 if (fill_e1 || fill_m1) {
MonitorElement * h_e1_phi
MonitorElement * h_vertex_d0
virtual double et() const GCC11_FINAL
transverse energy
std::vector< std::string > theMuonTriggerPathToPass_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
MonitorElement * h_jet2_phi
MonitorElement * h_m1_phi
MonitorElement * h_m_invWMass
MonitorElement * h_e1_eta
MonitorElement * h_vertex_numTrks
Base class for all types of Jets.
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::InputTag theMuonCollectionLabel_
edm::InputTag thePFJetCollectionLabel_
MonitorElement * h_mumu_invMass
MonitorElement * h_jet_eta
MonitorElement * h_jet_phi
MonitorElement * h_e2_eta
MonitorElement * h_m2_phi
MonitorElement * h_e_invWMass
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::vector< std::string > theElecTriggerPathToPass_
edm::InputTag theCaloMETCollectionLabel_
MonitorElement * h_vertex_sumTrks
Cos< T >::type cos(const T &t)
MonitorElement * h_m1_eta
MonitorElement * h_m2_eta
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
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
edm::InputTag theTriggerResultsCollection_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
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
MonitorElement * h_jet_count
MonitorElement * h_jet2_et
MonitorElement * h_jet2_eta
virtual float pt() const GCC11_FINAL
transverse momentum
edm::InputTag theElectronCollectionLabel_