CMS 3D CMS Logo

Functions
TtFullHadSignalSel.cc File Reference
#include "TopQuarkAnalysis/TopEventSelection/interface/TtFullHadSignalSel.h"
#include "PhysicsTools/CandUtils/interface/EventShapeVariables.h"
#include "PhysicsTools/CandUtils/interface/Thrust.h"
#include "DataFormats/Math/interface/deltaR.h"
#include "TLorentzVector.h"
#include "TVector3.h"

Go to the source code of this file.

Functions

std::vector< math::XYZVectormakeVecForEventShape (std::vector< pat::Jet > jets, bool only6Jets=true, ROOT::Math::Boost boost=ROOT::Math::Boost(0., 0., 0.))
 

Function Documentation

◆ makeVecForEventShape()

std::vector<math::XYZVector> makeVecForEventShape ( std::vector< pat::Jet jets,
bool  only6Jets = true,
ROOT::Math::Boost  boost = ROOT::Math::Boost(0., 0., 0.) 
)

Definition at line 10 of file TtFullHadSignalSel.cc.

References metsig::jet, PDWG_EXODelayedJetMET_cff::jets, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by TtFullHadSignalSel::TtFullHadSignalSel().

12  {
13  std::vector<math::XYZVector> p;
14  bool doBoost = (boost == ROOT::Math::Boost(0., 0., 0.)) ? false : true;
15  for (std::vector<pat::Jet>::const_iterator jet = jets.begin(); jet != jets.end(); ++jet) {
16  math::XYZVector Vjet;
17  if (doBoost) {
18  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > Ljet(jet->px(), jet->py(), jet->pz(), jet->energy());
19  Vjet = math::XYZVector(boost(Ljet).Px(), boost(Ljet).Py(), boost(Ljet).Pz());
20  } else
21  Vjet = math::XYZVector(jet->px(), jet->py(), jet->pz());
22  p.push_back(Vjet);
23  if (only6Jets && jet - jets.begin() == 5)
24  break;
25  }
26  return p;
27 }
Definition: CLHEP.h:16
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31