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

Definition at line 60 of file HLTCAWZTagFilter.h.

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 }

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

Member Data Documentation

◆ massdropcut_

double CAWZJetHelperUser::massdropcut_
protected

Definition at line 32 of file HLTCAWZTagFilter.h.

Referenced by operator()().

RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
reco::Jet::Constituents
std::vector< Constituent > Constituents
Definition: Jet.h:23
reco::CATopJetProperties
Definition: CATopJetTagInfo.h:21
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
reco::CATopJetProperties::minMass
double minMass
Definition: CATopJetTagInfo.h:30
reco::CATopJetProperties::nSubJets
int nSubJets
Definition: CATopJetTagInfo.h:29
reco::CATopJetProperties::wMass
double wMass
Definition: CATopJetTagInfo.h:32
edm::Ptr< Candidate >
reco::CATopJetProperties::topMass
double topMass
Definition: CATopJetTagInfo.h:31
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
CAWZJetHelperUser::massdropcut_
double massdropcut_
Definition: HLTCAWZTagFilter.h:32