CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1tVertexFinder::Vertex Class Reference

#include <Vertex.h>

Public Member Functions

void computeParameters ()
 Compute vertex parameters. More...
 
void insert (TP &tp)
 Assign TP to this vertex. More...
 
unsigned int numTracks () const
 Number of tracks originating from this vertex. More...
 
double pT () const
 Sum of fitted tracks transverse momentum [GeV]. More...
 
void reset ()
 Reset/initialize all of the member data. More...
 
const std::vector< TP > & tracks () const
 Tracking Particles in vertex. More...
 
 Vertex ()
 
 Vertex (double vz)
 
double vz () const
 Vertex z position [cm]. More...
 
double z0 () const
 Vertex z0 position [cm]. More...
 
double z0width () const
 Vertex z0 width [cm]. More...
 
 ~Vertex ()
 

Private Attributes

double pT_
 
std::vector< TPtracks_
 
double vz_
 
double z0_
 
double z0width_
 

Detailed Description

Definition at line 10 of file Vertex.h.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

l1tVertexFinder::Vertex::Vertex ( )
inline

Definition at line 13 of file Vertex.h.

References Vertex().

Referenced by Vertex().

13 { Vertex(-999.); }

◆ Vertex() [2/2]

l1tVertexFinder::Vertex::Vertex ( double  vz)
inline

Definition at line 15 of file Vertex.h.

References pT_, z0_, and z0width_.

15  : vz_(vz) {
16  z0_ = -999.;
17  z0width_ = -999.;
18  pT_ = -999.;
19  }
double vz() const
Vertex z position [cm].
Definition: Vertex.h:38

◆ ~Vertex()

l1tVertexFinder::Vertex::~Vertex ( )
inline

Definition at line 21 of file Vertex.h.

21 {}

Member Function Documentation

◆ computeParameters()

void l1tVertexFinder::Vertex::computeParameters ( )

Compute vertex parameters.

Definition at line 6 of file Vertex.cc.

References funct::abs(), pT_, mathSSE::sqrt(), HLT_2024v10_cff::track, tracks_, z0_, and z0width_.

6  {
7  pT_ = 0.;
8  z0_ = 0.;
9  float z0square = 0.;
10  for (const TP& track : tracks_) {
11  pT_ += track->pt();
12  z0_ += track->z0();
13  z0square += track->z0() * track->z0();
14  }
15  z0_ /= tracks_.size();
16  z0square /= tracks_.size();
17  z0width_ = sqrt(std::abs(z0_ * z0_ - z0square));
18  }
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< TP > tracks_
Definition: Vertex.h:48

◆ insert()

void l1tVertexFinder::Vertex::insert ( TP tp)
inline

Assign TP to this vertex.

Definition at line 28 of file Vertex.h.

References cmsswSequenceInfo::tp, and tracks_.

Referenced by l1tVertexFinder::VertexFinder::GapClustering().

28 { tracks_.push_back(tp); }
std::vector< TP > tracks_
Definition: Vertex.h:48

◆ numTracks()

unsigned int l1tVertexFinder::Vertex::numTracks ( ) const
inline

Number of tracks originating from this vertex.

Definition at line 26 of file Vertex.h.

References tracks_.

Referenced by l1tVertexFinder::VertexFinder::GapClustering().

26 { return tracks_.size(); }
std::vector< TP > tracks_
Definition: Vertex.h:48

◆ pT()

double l1tVertexFinder::Vertex::pT ( ) const
inline

Sum of fitted tracks transverse momentum [GeV].

Definition at line 32 of file Vertex.h.

References pT_.

Referenced by l1tVertexFinder::InputData::SortVertexByPt::operator()().

32 { return pT_; }

◆ reset()

void l1tVertexFinder::Vertex::reset ( )

Reset/initialize all of the member data.

◆ tracks()

const std::vector<TP>& l1tVertexFinder::Vertex::tracks ( void  ) const
inline

Tracking Particles in vertex.

Definition at line 24 of file Vertex.h.

References tracks_.

24 { return tracks_; }
std::vector< TP > tracks_
Definition: Vertex.h:48

◆ vz()

double l1tVertexFinder::Vertex::vz ( ) const
inline

Vertex z position [cm].

Definition at line 38 of file Vertex.h.

References vz_.

Referenced by l1tVertexFinder::VertexNTupler::analyze().

38 { return vz_; }

◆ z0()

double l1tVertexFinder::Vertex::z0 ( ) const
inline

Vertex z0 position [cm].

Definition at line 34 of file Vertex.h.

References z0_.

Referenced by l1tVertexFinder::InputData::SortVertexByZ0::operator()().

34 { return z0_; }

◆ z0width()

double l1tVertexFinder::Vertex::z0width ( ) const
inline

Vertex z0 width [cm].

Definition at line 36 of file Vertex.h.

References z0width_.

36 { return z0width_; }

Member Data Documentation

◆ pT_

double l1tVertexFinder::Vertex::pT_
private

Definition at line 46 of file Vertex.h.

Referenced by computeParameters(), pT(), and Vertex().

◆ tracks_

std::vector<TP> l1tVertexFinder::Vertex::tracks_
private

Definition at line 48 of file Vertex.h.

Referenced by computeParameters(), insert(), numTracks(), and tracks().

◆ vz_

double l1tVertexFinder::Vertex::vz_
private

Definition at line 43 of file Vertex.h.

Referenced by vz().

◆ z0_

double l1tVertexFinder::Vertex::z0_
private

Definition at line 44 of file Vertex.h.

Referenced by computeParameters(), Vertex(), and z0().

◆ z0width_

double l1tVertexFinder::Vertex::z0width_
private

Definition at line 45 of file Vertex.h.

Referenced by computeParameters(), Vertex(), and z0width().