CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
CAWZJetHelperUser Class Reference

#include <HLTCAWZTagFilter.h>

Public Member Functions

 CAWZJetHelperUser (double massdropcut)
 
reco::CATopJetProperties operator() (reco::Jet const &ihardJet) const
 

Protected Attributes

double massdropcut_
 

Detailed Description

Definition at line 25 of file HLTCAWZTagFilter.h.

Constructor & Destructor Documentation

◆ CAWZJetHelperUser()

CAWZJetHelperUser::CAWZJetHelperUser ( double  massdropcut)
inline

Definition at line 27 of file HLTCAWZTagFilter.h.

27 : massdropcut_(massdropcut) {}

Member Function Documentation

◆ operator()()

reco::CATopJetProperties CAWZJetHelperUser::operator() ( reco::Jet const &  ihardJet) const
inline

Definition at line 60 of file HLTCAWZTagFilter.h.

References reco::Jet::getJetConstituents(), reco::LeafCandidate::mass(), massdropcut_, reco::CATopJetProperties::minMass, reco::CATopJetProperties::nSubJets, jetUpdater_cfi::sort, RandomServiceHelper::t1, RandomServiceHelper::t2, reco::CATopJetProperties::topMass, and reco::CATopJetProperties::wMass.

60  {
61  reco::CATopJetProperties properties;
62  // Get subjets
63  reco::Jet::Constituents subjets = ihardJet.getJetConstituents();
64  properties.nSubJets = subjets.size(); // number of subjets
65  properties.wMass = 999999.; // best W mass
66  properties.topMass = 999999.;
67  properties.minMass = -1;
68 
69  if (properties.nSubJets == 2) {
70  sort(subjets.begin(), subjets.end(), [](auto const& t1, auto const& t2) { return t1->pt() > t2->pt(); });
71 
72  reco::Jet::Constituent icandJet = subjets[0];
73 
74  reco::Candidate::LorentzVector isubJet = icandJet->p4();
75  double imass = isubJet.mass();
76  double imw = ihardJet.mass();
77 
78  if (imass / imw < massdropcut_) {
79  // Get the candidate mass
80  properties.wMass = imw;
81  }
82  }
83 
84  return properties;
85 }
std::vector< Constituent > Constituents
Definition: Jet.h:23
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36

Member Data Documentation

◆ massdropcut_

double CAWZJetHelperUser::massdropcut_
protected

Definition at line 32 of file HLTCAWZTagFilter.h.

Referenced by operator()().