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 ( double  massdropcut)
inline

Definition at line 28 of file HLTCAWZTagFilter.h.

References operator()().

28  :
29  massdropcut_(massdropcut)
30  {}

Member Function Documentation

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

Definition at line 64 of file HLTCAWZTagFilter.h.

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

Referenced by CAWZJetHelperUser().

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

Member Data Documentation

double CAWZJetHelperUser::massdropcut_
protected

Definition at line 35 of file HLTCAWZTagFilter.h.

Referenced by operator()().