CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CAWZJetHelperUser Class Reference

#include <HLTCAWZTagFilter.h>

Inheritance diagram for CAWZJetHelperUser:

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.

28  :
29  massdropcut_(massdropcut)
30  {}

Member Function Documentation

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

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

74  {
75  reco::CATopJetProperties properties;
76  // Get subjets
77  reco::Jet::Constituents subjets = ihardJet.getJetConstituents();
78  properties.nSubJets = subjets.size(); // number of subjets
79  properties.wMass = 999999.; // best W mass
80  properties.topMass = 999999.;
81  properties.minMass = -1;
82 
83  if (properties.nSubJets == 2) {
84 
85  sort ( subjets.begin(), subjets.end(), GreaterByPtCandPtrUser() );
86 
87  reco::Jet::Constituent icandJet = subjets[0];
88 
89  reco::Candidate::LorentzVector isubJet = icandJet->p4();
90  double imass = isubJet.mass();
91  double imw = ihardJet.mass();
92 
93  if (imass/imw < massdropcut_) {
94  // Get the candidate mass
95  properties.wMass = imw;
96  }
97  }
98 
99  return properties;
100 }
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()().