CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
FSimDisplacedVertex Class Reference

A FSimDisplacedVertex extends the FSimVertex with VertexType information. More...

#include <FSimDisplacedVertex.h>

Public Member Functions

const std::vector< int > & daughterIds () const
 
 FSimDisplacedVertex ()
 
 FSimDisplacedVertex (const SimVertex &vertex, unsigned id, int motherId, unsigned nCharged, const std::vector< int > &daughterIds, const FSimVertexType::VertexType vertexType)
 
 FSimDisplacedVertex (const FSimDisplacedVertex &other)
 
int id () const
 
const bool isRecoVertex () const
 
int motherId () const
 
unsigned int nChargedDaughters () const
 
unsigned int nDaughters () const
 
const int recoVertexId () const
 
void removeRecoVertex ()
 Remove the associated reconstructed DispacedVertex. More...
 
void setRecoVertex (int recoVertexId)
 Set the associated reconstructed DispacedVertex. More...
 
const SimVertex vertex () const
 
const FSimVertexType::VertexType vertexType () const
 
virtual ~FSimDisplacedVertex ()
 

Private Attributes

std::vector< int > daughterIds_
 Vector of daughter ids in the track collection. More...
 
int id_
 
bool isRecoVertex_
 Flag to indicate if a reconstructed DisplacedVertex was found and associated. More...
 
int motherId_
 id of mother particle. -1 if no mother More...
 
unsigned int nCharged_
 Number of charged daughters. More...
 
int recoVertexId_
 
SimVertex vertex_
 Sim Vertex. More...
 
FSimVertexType::VertexType vertexType_
 Vertex Type. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const FSimDisplacedVertex &co)
 

Detailed Description

A FSimDisplacedVertex extends the FSimVertex with VertexType information.

Format FSimDisplacedVertex

This data format is designed to combine the informations from FSimVertex and its FSimVertexType. It is not part of general FAMOS sequence and useful for private productions and analyses. The format contains also an integer identifier which may be optionally used to associate it to reconstruced nuclear Interaction: boolean isRecoVertex and int recoVertexId;

Author
Maxime Gouzevitch
Date
November 2009

Definition at line 27 of file FSimDisplacedVertex.h.

Constructor & Destructor Documentation

◆ FSimDisplacedVertex() [1/3]

FSimDisplacedVertex::FSimDisplacedVertex ( )

Definition at line 3 of file FSimDisplacedVertex.cc.

4  : id_(-1),
5  motherId_(-1),
6  nCharged_(0),
8  isRecoVertex_(false),
9  recoVertexId_(-1)
10 
11 {}
FSimVertexType::VertexType vertexType_
Vertex Type.
int motherId_
id of mother particle. -1 if no mother
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
unsigned int nCharged_
Number of charged daughters.

◆ FSimDisplacedVertex() [2/3]

FSimDisplacedVertex::FSimDisplacedVertex ( const SimVertex vertex,
unsigned  id,
int  motherId,
unsigned  nCharged,
const std::vector< int > &  daughterIds,
const FSimVertexType::VertexType  vertexType 
)

Definition at line 13 of file FSimDisplacedVertex.cc.

19  : vertex_(vertex),
20  id_(id),
25  isRecoVertex_(false),
26  recoVertexId_(-1) {}
FSimVertexType::VertexType vertexType_
Vertex Type.
int motherId_
id of mother particle. -1 if no mother
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
const std::vector< int > & daughterIds() const
std::vector< int > daughterIds_
Vector of daughter ids in the track collection.
SimVertex vertex_
Sim Vertex.
const FSimVertexType::VertexType vertexType() const
unsigned int nCharged_
Number of charged daughters.
const SimVertex vertex() const

◆ FSimDisplacedVertex() [3/3]

FSimDisplacedVertex::FSimDisplacedVertex ( const FSimDisplacedVertex other)

Definition at line 28 of file FSimDisplacedVertex.cc.

29  : vertex_(other.vertex_),
30  id_(other.id_),
31  motherId_(other.motherId_),
32  nCharged_(other.nCharged_),
33  daughterIds_(other.daughterIds_),
34  vertexType_(other.vertexType_),
35  isRecoVertex_(other.isRecoVertex()),
36  recoVertexId_(other.recoVertexId()) {}
FSimVertexType::VertexType vertexType_
Vertex Type.
int motherId_
id of mother particle. -1 if no mother
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
std::vector< int > daughterIds_
Vector of daughter ids in the track collection.
SimVertex vertex_
Sim Vertex.
unsigned int nCharged_
Number of charged daughters.

◆ ~FSimDisplacedVertex()

virtual FSimDisplacedVertex::~FSimDisplacedVertex ( )
inlinevirtual

Definition at line 39 of file FSimDisplacedVertex.h.

39 {}

Member Function Documentation

◆ daughterIds()

const std::vector<int>& FSimDisplacedVertex::daughterIds ( ) const
inline
Returns
vector of daughter ids

Definition at line 57 of file FSimDisplacedVertex.h.

References daughterIds_.

57 { return daughterIds_; }
std::vector< int > daughterIds_
Vector of daughter ids in the track collection.

◆ id()

int FSimDisplacedVertex::id ( void  ) const
inline
Returns
the id of the vertex in the collection

Definition at line 45 of file FSimDisplacedVertex.h.

References id_.

45 { return id_; }

◆ isRecoVertex()

const bool FSimDisplacedVertex::isRecoVertex ( ) const
inline
Returns
indicated if there is a Displaced Vertex associated

Definition at line 63 of file FSimDisplacedVertex.h.

References isRecoVertex_.

63 { return isRecoVertex_; }
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.

◆ motherId()

int FSimDisplacedVertex::motherId ( ) const
inline
Returns
mother id in the track collection

Definition at line 48 of file FSimDisplacedVertex.h.

References motherId_.

48 { return motherId_; }
int motherId_
id of mother particle. -1 if no mother

◆ nChargedDaughters()

unsigned int FSimDisplacedVertex::nChargedDaughters ( ) const
inline
Returns
the number of charged daughters

Definition at line 54 of file FSimDisplacedVertex.h.

References nCharged_.

54 { return nCharged_; }
unsigned int nCharged_
Number of charged daughters.

◆ nDaughters()

unsigned int FSimDisplacedVertex::nDaughters ( ) const
inline
Returns
the number of daughters

Definition at line 51 of file FSimDisplacedVertex.h.

References daughterIds_.

51 { return daughterIds_.size(); }
std::vector< int > daughterIds_
Vector of daughter ids in the track collection.

◆ recoVertexId()

const int FSimDisplacedVertex::recoVertexId ( ) const
inline
Returns
the reconstructed Displaced Vertex index

Definition at line 66 of file FSimDisplacedVertex.h.

References recoVertexId_.

Referenced by setRecoVertex().

◆ removeRecoVertex()

void FSimDisplacedVertex::removeRecoVertex ( )
inline

Remove the associated reconstructed DispacedVertex.

Definition at line 75 of file FSimDisplacedVertex.h.

References isRecoVertex_, and recoVertexId_.

75  {
76  isRecoVertex_ = false;
77  recoVertexId_ = -1;
78  }
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.

◆ setRecoVertex()

void FSimDisplacedVertex::setRecoVertex ( int  recoVertexId)
inline

Set the associated reconstructed DispacedVertex.

Definition at line 69 of file FSimDisplacedVertex.h.

References isRecoVertex_, recoVertexId(), and recoVertexId_.

69  {
70  isRecoVertex_ = true;
72  }
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
const int recoVertexId() const

◆ vertex()

const SimVertex FSimDisplacedVertex::vertex ( ) const
inline
Returns
the SimVertex

Definition at line 42 of file FSimDisplacedVertex.h.

References vertex_.

Referenced by Tau.Tau::dxy().

42 { return vertex_; }
SimVertex vertex_
Sim Vertex.

◆ vertexType()

const FSimVertexType::VertexType FSimDisplacedVertex::vertexType ( ) const
inline
Returns
the vertex type

Definition at line 60 of file FSimDisplacedVertex.h.

References vertexType_.

60 { return vertexType_; }
FSimVertexType::VertexType vertexType_
Vertex Type.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const FSimDisplacedVertex co 
)
friend

Definition at line 38 of file FSimDisplacedVertex.cc.

38  {
39  return out << "id = " << co.id() << " mother = " << co.motherId() << " N daugh. = " << co.nDaughters()
40  << " N charged " << co.nChargedDaughters() << " Type = " << co.vertexType()
41  << " recoVertexId = " << co.recoVertexId() << " " << co.vertex();
42 }
__host__ __device__ VT * co
Definition: prefixScan.h:47

Member Data Documentation

◆ daughterIds_

std::vector<int> FSimDisplacedVertex::daughterIds_
private

Vector of daughter ids in the track collection.

Definition at line 95 of file FSimDisplacedVertex.h.

Referenced by daughterIds(), and nDaughters().

◆ id_

int FSimDisplacedVertex::id_
private
Returns
the id in the vertex in the collection. -1 if the default value

Definition at line 86 of file FSimDisplacedVertex.h.

Referenced by id().

◆ isRecoVertex_

bool FSimDisplacedVertex::isRecoVertex_
private

Flag to indicate if a reconstructed DisplacedVertex was found and associated.

Definition at line 101 of file FSimDisplacedVertex.h.

Referenced by isRecoVertex(), removeRecoVertex(), and setRecoVertex().

◆ motherId_

int FSimDisplacedVertex::motherId_
private

id of mother particle. -1 if no mother

Definition at line 89 of file FSimDisplacedVertex.h.

Referenced by motherId().

◆ nCharged_

unsigned int FSimDisplacedVertex::nCharged_
private

Number of charged daughters.

Definition at line 92 of file FSimDisplacedVertex.h.

Referenced by nChargedDaughters().

◆ recoVertexId_

int FSimDisplacedVertex::recoVertexId_
private

The index of the reconstructed DisplacedVertex associated. By default the value is -1. The association may be done in the dedicated algorithm of the producer.

Definition at line 106 of file FSimDisplacedVertex.h.

Referenced by recoVertexId(), removeRecoVertex(), and setRecoVertex().

◆ vertex_

SimVertex FSimDisplacedVertex::vertex_
private

Sim Vertex.

Definition at line 82 of file FSimDisplacedVertex.h.

Referenced by vertex().

◆ vertexType_

FSimVertexType::VertexType FSimDisplacedVertex::vertexType_
private

Vertex Type.

Definition at line 98 of file FSimDisplacedVertex.h.

Referenced by vertexType().