CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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, 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 }
vector< PseudoJet > jets
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31