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

Constructor & Destructor Documentation

CATopJetHelperUser::CATopJetHelperUser ( double  TopMass)
inline

Definition at line 31 of file HLTCATopTagFilter.h.

References operator()().

Member Function Documentation

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

Definition at line 78 of file HLTCATopTagFilter.h.

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

Referenced by CATopJetHelperUser().

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

Member Data Documentation

double CATopJetHelperUser::TopMass_
protected

Definition at line 38 of file HLTCATopTagFilter.h.