CMS 3D CMS Logo

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

#include <HLTCATopTagFilter.h>

Public Member Functions

 CATopJetHelperUser (double TopMass)
 
reco::CATopJetProperties operator() (reco::Jet const &ihardJet) const
 

Protected Attributes

double TopMass_
 

Detailed Description

Definition at line 25 of file HLTCATopTagFilter.h.

Constructor & Destructor Documentation

◆ CATopJetHelperUser()

CATopJetHelperUser::CATopJetHelperUser ( double  TopMass)
inline

Member Function Documentation

◆ operator()()

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

Definition at line 67 of file HLTCATopTagFilter.h.

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

67  {
68  reco::CATopJetProperties properties;
69  // Get subjets
70  reco::Jet::Constituents subjets = ihardJet.getJetConstituents();
71  properties.nSubJets = subjets.size(); // number of subjets
72  properties.topMass = ihardJet.mass(); // jet mass
73  properties.minMass = 999999.; // minimum mass pairing
74 
75  // Require at least three subjets in all cases, if not, untagged
76  if (properties.nSubJets >= 3) {
77  // Take the highest 3 pt subjets for cuts
78  sort(subjets.begin(), subjets.end(), GreaterByPtCandPtrUser());
79 
80  // Now look at the subjets that were formed
81  for (int isub = 0; isub < 2; ++isub) {
82  // Get this subjet
83  reco::Jet::Constituent icandJet = subjets[isub];
84 
85  // Now look at the "other" subjets than this one, form the minimum invariant mass
86  // pairing, as well as the "closest" combination to the W mass
87  for (int jsub = isub + 1; jsub < 3; ++jsub) {
88  // Get the second subjet
89  reco::Jet::Constituent jcandJet = subjets[jsub];
90 
91  reco::Candidate::LorentzVector wCand = icandJet->p4() + jcandJet->p4();
92 
93  // Get the candidate mass
94  double imw = wCand.mass();
95 
96  // Find the minimum mass pairing.
97  if (fabs(imw) < properties.minMass) {
98  properties.minMass = imw;
99  }
100  } // end second loop over subjets
101  } // end first loop over subjets
102  } // endif 3 subjets
103 
104  if (properties.minMass == 999999)
105  properties.minMass = -1;
106 
107  return properties;
108 }
std::vector< Constituent > Constituents
Definition: Jet.h:23
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36

Member Data Documentation

◆ TopMass_

double CATopJetHelperUser::TopMass_
protected

Definition at line 32 of file HLTCATopTagFilter.h.