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 27 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 69 of file HLTCATopTagFilter.h.

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

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