CMS 3D CMS Logo

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< TrackingParticleTrackingParticlePtr
 
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

◆ DetSet

Definition at line 28 of file Stub.h.

◆ DetSetVec

Definition at line 27 of file Stub.h.

◆ FitTrackCollection

Definition at line 18 of file VertexFinder.h.

◆ RecoVertexCollection

Definition at line 19 of file VertexFinder.h.

◆ RecoVertexWithTP

Definition at line 89 of file RecoVertex.h.

◆ TPPtrToRefMap

Definition at line 27 of file InputData.h.

◆ TrackingParticlePtr

Definition at line 26 of file InputData.h.

◆ TTClusterAssMap

Definition at line 33 of file Stub.h.

◆ TTClusterRef

Definition at line 31 of file Stub.h.

◆ TTStubAssMap

Definition at line 32 of file Stub.h.

◆ TTStubRef

Definition at line 29 of file Stub.h.

◆ TTTrackAssMap

Definition at line 20 of file L1TrackTruthMatched.h.

Enumeration Type Documentation

◆ Algorithm

Enumerator
FastHisto 
FastHistoLooseAssociation 
GapClustering 
AgglomerativeHierarchical 
DBSCAN 
PVR 
AdaptiveVertexReconstruction 
HPV 
Kmeans 

Definition at line 12 of file AlgoSettings.h.

Function Documentation

◆ getPrimaryVertex() [1/2]

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.

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  }

References TtFullHadEvtBuilder_cfi::sumPt, submitPVValidationJobs::t, and tracks.

Referenced by MuonPFAnalyzer::analyze().

◆ getPrimaryVertex() [2/2]

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.

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  }

References l1t::Vertex::tracks().

◆ operator<<()

std::ostream& l1tVertexFinder::operator<< ( std::ostream &  out,
const reco::GenParticle particle 
)

Definition at line 355 of file VertexNTupler.cc.

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  }

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

l1tVertexFinder::Algorithm::Kmeans
l1tVertexFinder::Algorithm::HPV
l1tVertexFinder::Algorithm::FastHisto
l1t::Vertex
Definition: Vertex.h:15
l1tVertexFinder::Algorithm::FastHistoLooseAssociation
l1tVertexFinder::Algorithm::AdaptiveVertexReconstruction
TtFullHadEvtBuilder_cfi.sumPt
sumPt
Definition: TtFullHadEvtBuilder_cfi.py:38
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:176
l1tVertexFinder::getPrimaryVertex
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
reco::LeafCandidate::pdgId
int pdgId() const final
PDG identifier.
Definition: LeafCandidate.h:176
l1tVertexFinder::Algorithm::AgglomerativeHierarchical
l1tVertexFinder::Algorithm::DBSCAN
l1tVertexFinder::Algorithm::GapClustering
l1t::Vertex::tracks
const std::vector< edm::Ptr< Track_t > > & tracks() const
Definition: Vertex.cc:16
l1tVertexFinder::Algorithm::PVR
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644