CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions
l1tVertexFinder Namespace Reference

Classes

class  AlgoSettings
 
class  AnalysisSettings
 
class  InputData
 
class  L1Track
 Simple wrapper class for TTTrack. More...
 
class  L1TrackTruthMatched
 Simple wrapper class for TTTrack, with match to a tracking particle. More...
 
class  RecoVertex
 
class  Stub
 
class  TP
 
class  Vertex
 
class  VertexFinder
 
class  VertexNTupler
 

Typedefs

typedef edmNew::DetSet< TTStub
< Ref_Phase2TrackerDigi_ > > 
DetSet
 
typedef edmNew::DetSetVector
< TTStub
< Ref_Phase2TrackerDigi_ > > 
DetSetVec
 
typedef std::vector< L1TrackFitTrackCollection
 
typedef std::vector< RecoVertex<> > RecoVertexCollection
 
using RecoVertexWithTP = RecoVertex< L1TrackTruthMatched >
 
typedef std::map
< TrackingParticlePtr,
edm::RefToBase
< TrackingParticle > > 
TPPtrToRefMap
 
typedef edm::Ptr
< TrackingParticle
TrackingParticlePtr
 
typedef
TTClusterAssociationMap
< Ref_Phase2TrackerDigi_
TTClusterAssMap
 
typedef edm::Ref
< edmNew::DetSetVector
< TTCluster
< Ref_Phase2TrackerDigi_ >
>, TTCluster
< Ref_Phase2TrackerDigi_ > > 
TTClusterRef
 
typedef TTStubAssociationMap
< Ref_Phase2TrackerDigi_
TTStubAssMap
 
typedef edm::Ref< DetSetVec,
TTStub< Ref_Phase2TrackerDigi_ > > 
TTStubRef
 
typedef TTTrackAssociationMap
< Ref_Phase2TrackerDigi_
TTTrackAssMap
 

Enumerations

enum  Algorithm {
  Algorithm::FastHisto, Algorithm::FastHistoLooseAssociation, Algorithm::GapClustering, Algorithm::AgglomerativeHierarchical,
  Algorithm::DBSCAN, Algorithm::PVR, Algorithm::AdaptiveVertexReconstruction, Algorithm::HPV,
  Algorithm::Kmeans
}
 

Functions

const l1t::VertexgetPrimaryVertex (const std::vector< l1t::Vertex > &aVertexCollection)
 Returns primary vertex based on default criterion (max sum pT from all constituent tracks); throws if given empty collection. More...
 
const l1t::VertexgetPrimaryVertex (const std::vector< l1t::Vertex > &aVertexCollection, const std::function< float(const std::vector< edm::Ptr< l1t::Vertex::Track_t >> &)> &aFunction)
 Returns vertex for which parameter 'aFunction' returns the highest value; throws if given empty collection. More...
 
std::ostream & operator<< (std::ostream &out, const reco::GenParticle &particle)
 

Typedef Documentation

Definition at line 28 of file Stub.h.

Definition at line 27 of file Stub.h.

Definition at line 18 of file VertexFinder.h.

Definition at line 19 of file VertexFinder.h.

Definition at line 89 of file RecoVertex.h.

Definition at line 27 of file InputData.h.

Definition at line 26 of file InputData.h.

Definition at line 33 of file Stub.h.

Definition at line 31 of file Stub.h.

Definition at line 32 of file Stub.h.

Definition at line 29 of file Stub.h.

Definition at line 20 of file L1TrackTruthMatched.h.

Enumeration Type Documentation

Function Documentation

const l1t::Vertex & l1tVertexFinder::getPrimaryVertex ( const std::vector< l1t::Vertex > &  aVertexCollection)

Returns primary vertex based on default criterion (max sum pT from all constituent tracks); throws if given empty collection.

Definition at line 9 of file selection.cc.

References submitPVValidationJobs::t, and tracks.

Referenced by MuonPFAnalyzer::analyze().

9  {
10  typedef std::vector<edm::Ptr<l1t::Vertex::Track_t>> Tracks_t;
11 
12  return getPrimaryVertex(aVertexCollection, [](const Tracks_t& tracks) -> float {
13  float sumPt = 0.0;
14  for (const auto& t : tracks)
15  sumPt += t->momentum().transverse();
16  return sumPt;
17  });
18  }
auto const & tracks
cannot be loose
const l1t::Vertex & getPrimaryVertex(const std::vector< l1t::Vertex > &aVertexCollection)
Returns primary vertex based on default criterion (max sum pT from all constituent tracks); throws if...
Definition: selection.cc:9
const l1t::Vertex & l1tVertexFinder::getPrimaryVertex ( const std::vector< l1t::Vertex > &  aVertexCollection,
const std::function< float(const std::vector< edm::Ptr< l1t::Vertex::Track_t >> &)> &  aFunction 
)

Returns vertex for which parameter 'aFunction' returns the highest value; throws if given empty collection.

Definition at line 20 of file selection.cc.

References l1t::Vertex::tracks().

22  {
23  if (aVertexCollection.empty())
24  throw std::invalid_argument("Cannot find primary vertex from empty vertex collection");
25  return *std::max_element(aVertexCollection.begin(),
26  aVertexCollection.end(),
27  [aFunction](const l1t::Vertex& v1, const l1t::Vertex& v2) -> bool {
28  return (aFunction(v1.tracks()) < aFunction(v2.tracks()));
29  });
30  }
const std::vector< edm::Ptr< Track_t > > & tracks() const
Definition: Vertex.cc:16
std::ostream& l1tVertexFinder::operator<< ( std::ostream &  out,
const reco::GenParticle particle 
)

Definition at line 355 of file VertexNTupler.cc.

References funct::abs(), and reco::LeafCandidate::pdgId().

355  {
356  const bool positive = (particle.pdgId() < 0);
357  const size_t absId = abs(particle.pdgId());
358  switch (absId) {
359  case 1:
360  return (out << (positive ? "d" : "anti-d"));
361  case 2:
362  return (out << (positive ? "u" : "anti-u"));
363  case 3:
364  return (out << (positive ? "s" : "anti-s"));
365  case 4:
366  return (out << (positive ? "c" : "anti-c"));
367  case 5:
368  return (out << (positive ? "b" : "anti-b"));
369  case 6:
370  return (out << (positive ? "t" : "anti-t"));
371  case 11:
372  return (out << (positive ? "e+" : "e-"));
373  case 12:
374  return (out << (positive ? "nu_e" : "anti-nu_e"));
375  case 13:
376  return (out << (positive ? "mu+" : "mu-"));
377  case 14:
378  return (out << (positive ? "nu_mu" : "anti-nu_mu"));
379  case 15:
380  return (out << (positive ? "tau+" : "tau-"));
381  case 16:
382  return (out << (positive ? "nu_tau" : "anti-nu_tau"));
383  case 21:
384  return (out << "g");
385  case 22:
386  return (out << "photon");
387  case 23:
388  return (out << "Z");
389  case 24:
390  return (out << (positive ? "W-" : "W+"));
391  default:
392  if ((((absId / 1000) % 10) != 0) and (((absId / 10) % 10) == 0))
393  return (out << "diquark<" << particle.pdgId() << ">");
394  else
395  return (out << "unknown<" << particle.pdgId() << ">");
396  }
397  }
int pdgId() const final
PDG identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22