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 23 of file HLTCAWZTagFilter.h.

Constructor & Destructor Documentation

◆ CAWZJetHelperUser()

CAWZJetHelperUser::CAWZJetHelperUser ( double  massdropcut)
inline

Definition at line 25 of file HLTCAWZTagFilter.h.

25 : massdropcut_(massdropcut) {}

Member Function Documentation

◆ operator()()

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

Definition at line 58 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.

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

Referenced by operator()().