Get the analysis.
218 std::vector<std::string> eleTrigPathNames;
219 std::vector<std::string> muTrigPathNames;
225 bool passed_electron_HLT =
false;
226 bool passed_muon_HLT =
false;
227 for (
unsigned int i = 0;
i < HLTresults->size();
i++) {
235 passed_electron_HLT = HLTresults->accept(
i);
244 passed_muon_HLT = HLTresults->accept(
i);
250 if (!(passed_electron_HLT || passed_muon_HLT))
260 VertexCollection::const_iterator
v = vertexCollection.begin();
261 int vertex_number = vertexCollection.size();
262 double vertex_chi2 = v->normalizedChi2();
263 double vertex_d0 =
sqrt(v->x() * v->x() + v->y() * v->y());
264 double vertex_numTrks = v->tracksSize();
265 double vertex_sumTrks = 0.0;
270 vertex_sumTrks += (*vertex_curTrack)->pt();
276 if (!caloMETCollection.
isValid())
278 float missing_et = caloMETCollection->begin()->et();
279 float met_phi = caloMETCollection->begin()->phi();
285 if (!electronCollection.
isValid())
289 float electron_et = -8.0;
290 float electron_eta = -8.0;
291 float electron_phi = -8.0;
292 float electron2_et = -9.0;
293 float electron2_eta = -9.0;
294 float electron2_phi = -9.0;
295 float ee_invMass = -9.0;
296 TLorentzVector e1, e2;
300 if (passed_electron_HLT) {
301 for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
302 recoElectron != electronCollection->end();
305 if (recoElectron->et() < 20 || fabs(recoElectron->eta()) > 2.5)
309 if (recoElectron->deltaPhiSuperClusterTrackAtVtx() > 0.58 ||
310 recoElectron->deltaEtaSuperClusterTrackAtVtx() > 0.01 || recoElectron->sigmaIetaIeta() > 0.027)
313 if (recoElectron->et() > electron_et) {
314 electron2_et = electron_et;
315 electron2_eta = electron_eta;
316 electron2_phi = electron_phi;
317 electron_et = recoElectron->et();
318 electron_eta = recoElectron->eta();
319 electron_phi = recoElectron->phi();
320 e1 = TLorentzVector(recoElectron->momentum().x(),
321 recoElectron->momentum().y(),
322 recoElectron->momentum().z(),
324 }
else if (recoElectron->et() > electron2_et) {
325 electron2_et = recoElectron->et();
326 electron2_eta = recoElectron->eta();
327 electron2_phi = recoElectron->phi();
328 e2 = TLorentzVector(recoElectron->momentum().x(),
329 recoElectron->momentum().y(),
330 recoElectron->momentum().z(),
334 if (electron2_et > 0.0) {
335 TLorentzVector pair = e1 + e2;
336 ee_invMass = pair.M();
349 float mm_invMass = -9.0;
350 float muon_pt = -9.0;
351 float muon_eta = -9.0;
352 float muon_phi = -9.0;
353 float muon2_pt = -9.0;
354 float muon2_eta = -9.0;
355 float muon2_phi = -9.0;
356 TLorentzVector m1,
m2;
358 if (passed_muon_HLT) {
359 for (reco::MuonCollection::const_iterator recoMuon = muonCollection->begin(); recoMuon != muonCollection->end();
362 if (recoMuon->pt() < 20 || !recoMuon->isGlobalMuon())
365 if (recoMuon->globalTrack()->normalizedChi2() > 10)
368 if (recoMuon->pt() > muon_pt) {
370 muon2_eta = muon_eta;
371 muon2_phi = muon_phi;
372 muon_pt = recoMuon->pt();
373 muon_eta = recoMuon->eta();
374 muon_phi = recoMuon->phi();
376 TLorentzVector(recoMuon->momentum().x(), recoMuon->momentum().y(), recoMuon->momentum().z(), recoMuon->p());
377 }
else if (recoMuon->pt() > muon2_pt) {
378 muon2_pt = recoMuon->pt();
379 muon2_eta = recoMuon->eta();
380 muon2_phi = recoMuon->phi();
382 TLorentzVector(recoMuon->momentum().x(), recoMuon->momentum().y(), recoMuon->momentum().z(), recoMuon->p());
386 if (muon2_pt > 0.0) {
387 TLorentzVector pair = m1 +
m2;
388 mm_invMass = pair.M();
398 if (!PFJetCollection.
isValid())
401 unsigned int muonCollectionSize = muonCollection->size();
403 unsigned int PFJetCollectionSize = PFJetCollection->size();
407 float jet_et = -80.0;
408 float jet_pt = -80.0;
409 float jet_eta = -80.0;
410 float jet_phi = -80.0;
411 float jet2_et = -90.0;
412 float jet2_eta = -90.0;
413 float jet2_phi = -90.0;
425 for (
unsigned int i = 0;
i < PFJetCollectionSize;
i++) {
426 const Jet&
jet = PFJetCollection->at(
i);
428 double minDistance = 99999;
429 for (
unsigned int j = 0;
j < muonCollectionSize;
j++) {
430 const Muon&
mu = muonCollection->at(
j);
433 if (minDistance > distance)
436 if (minDistance < 0.3)
442 if (electron_et > 0.0 && fabs(jet.
eta() - electron_eta) < 0.2 &&
calcDeltaPhi(jet.
phi(), electron_phi) < 0.2)
444 if (electron2_et > 0.0 && fabs(jet.
eta() - electron2_eta) < 0.2 &&
calcDeltaPhi(jet.
phi(), electron2_phi) < 0.2)
469 if (jet.
et() > jet_et) {
481 }
else if (jet.
et() > jet2_et) {
486 jet2_eta = jet.
eta();
487 jet2_phi = jet.
phi();
497 bool fill_e1 =
false;
498 bool fill_e2 =
false;
499 bool fill_m1 =
false;
500 bool fill_m2 =
false;
501 bool fill_met =
false;
504 if (ee_invMass > 0.0) {
511 if (mm_invMass > 0.0) {
519 if (electron_et > 0.0 && missing_et > 20.0) {
520 float dphiW = fabs(met_phi - electron_phi);
521 float W_mt_e =
sqrt(2 * missing_et * electron_et * (1 -
cos(dphiW)));
528 if (muon_pt > 0.0 && missing_et > 20.0) {
529 float dphiW = fabs(met_phi - muon_phi);
530 float W_mt_m =
sqrt(2 * missing_et * muon_pt * (1 -
cos(dphiW)));
536 if (jet_et > -10.0) {
545 if (jet_eta > -50.) {
549 if (jet_phi > -10.) {
553 if (jet2_et > -10.0) {
561 if (jet2_eta > -50.) {
565 if (jet2_phi > -10.) {
569 if (fill_e1 || fill_m1) {
MonitorElement * h_e1_phi
MonitorElement * h_vertex_d0
std::vector< std::string > theMuonTriggerPathToPass_
edm::EDGetTokenT< edm::View< reco::Jet > > thePFJetCollectionToken_
double pt() const final
transverse momentum
MonitorElement * h_jet2_phi
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
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
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
MonitorElement * h_e2_eta
MonitorElement * h_m2_phi
MonitorElement * h_e_invWMass
std::vector< std::string > theElecTriggerPathToPass_
MonitorElement * h_vertex_sumTrks
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
T const * product() const
MonitorElement * h_e2_phi
std::string const & triggerName(unsigned int index) const
MonitorElement * h_jet_et
std::vector< PFJet > PFJetCollection
collection of PFJet objects
double et() const final
transverse energy
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollectionLabel_
MonitorElement * h_met_phi
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
double phi() const final
momentum azimuthal angle
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
double eta() const final
momentum pseudorapidity