CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 28 of file FSimDisplacedVertex.h.

Constructor & Destructor Documentation

FSimDisplacedVertex::FSimDisplacedVertex ( )

Definition at line 5 of file FSimDisplacedVertex.cc.

5  :
6  id_(-1),
7  motherId_(-1),
8  nCharged_(0),
10  isRecoVertex_(false),
11  recoVertexId_(-1)
12 
13 {}
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::FSimDisplacedVertex ( const SimVertex vertex,
unsigned  id,
int  motherId,
unsigned  nCharged,
const std::vector< int > &  daughterIds,
const FSimVertexType::VertexType  vertexType 
)

Definition at line 15 of file FSimDisplacedVertex.cc.

20  :
21  vertex_(vertex),
22  id_(id),
27  isRecoVertex_(false),
28  recoVertexId_(-1)
29 {}
const std::vector< int > & daughterIds() const
const FSimVertexType::VertexType vertexType() const
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.
unsigned int nCharged(const GenJet &jet)
SimVertex vertex_
Sim Vertex.
unsigned int nCharged_
Number of charged daughters.
FSimDisplacedVertex::FSimDisplacedVertex ( const FSimDisplacedVertex other)

Definition at line 32 of file FSimDisplacedVertex.cc.

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

Definition at line 44 of file FSimDisplacedVertex.h.

44 {}

Member Function Documentation

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

Definition at line 62 of file FSimDisplacedVertex.h.

References daughterIds_.

62 {return daughterIds_;}
std::vector< int > daughterIds_
Vector of daughter ids in the track collection.
int FSimDisplacedVertex::id ( void  ) const
inline
Returns
the id of the vertex in the collection

Definition at line 50 of file FSimDisplacedVertex.h.

References id_.

Referenced by operator<<().

50 { return id_; }
const bool FSimDisplacedVertex::isRecoVertex ( ) const
inline
Returns
indicated if there is a Displaced Vertex associated

Definition at line 68 of file FSimDisplacedVertex.h.

References isRecoVertex_.

68 {return isRecoVertex_;}
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
int FSimDisplacedVertex::motherId ( ) const
inline
Returns
mother id in the track collection

Definition at line 53 of file FSimDisplacedVertex.h.

References motherId_.

Referenced by operator<<().

53 { return motherId_; }
int motherId_
id of mother particle. -1 if no mother
unsigned int FSimDisplacedVertex::nChargedDaughters ( ) const
inline
Returns
the number of charged daughters

Definition at line 59 of file FSimDisplacedVertex.h.

References nCharged_.

Referenced by operator<<().

59 { return nCharged_;}
unsigned int nCharged_
Number of charged daughters.
unsigned int FSimDisplacedVertex::nDaughters ( ) const
inline
Returns
the number of daughters

Definition at line 56 of file FSimDisplacedVertex.h.

References daughterIds_.

Referenced by operator<<().

56 { return daughterIds_.size();}
std::vector< int > daughterIds_
Vector of daughter ids in the track collection.
const int FSimDisplacedVertex::recoVertexId ( ) const
inline
Returns
the reconstructed Displaced Vertex index

Definition at line 71 of file FSimDisplacedVertex.h.

References recoVertexId_.

Referenced by operator<<(), and setRecoVertex().

void FSimDisplacedVertex::removeRecoVertex ( )
inline

Remove the associated reconstructed DispacedVertex.

Definition at line 80 of file FSimDisplacedVertex.h.

References isRecoVertex_, and recoVertexId_.

80  {
81  isRecoVertex_ = false;
82  recoVertexId_ = -1;
83  }
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
void FSimDisplacedVertex::setRecoVertex ( int  recoVertexId)
inline

Set the associated reconstructed DispacedVertex.

Definition at line 74 of file FSimDisplacedVertex.h.

References isRecoVertex_, recoVertexId(), and recoVertexId_.

74  {
75  isRecoVertex_ = true;
77  }
bool isRecoVertex_
Flag to indicate if a reconstructed DisplacedVertex was found and associated.
const int recoVertexId() const
const SimVertex FSimDisplacedVertex::vertex ( ) const
inline
Returns
the SimVertex

Definition at line 47 of file FSimDisplacedVertex.h.

References vertex_.

Referenced by Tau.Tau::dxy(), Tau.Tau::dz(), and operator<<().

47 { return vertex_; }
SimVertex vertex_
Sim Vertex.
const FSimVertexType::VertexType FSimDisplacedVertex::vertexType ( ) const
inline
Returns
the vertex type

Definition at line 65 of file FSimDisplacedVertex.h.

References vertexType_.

Referenced by operator<<().

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

Friends And Related Function Documentation

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

Definition at line 44 of file FSimDisplacedVertex.cc.

45  {
46 
47  return out << "id = " << co.id()
48  << " mother = " << co.motherId()
49  << " N daugh. = " << co.nDaughters()
50  << " N charged " << co.nChargedDaughters()
51  << " Type = " << co.vertexType()
52  << " recoVertexId = " << co.recoVertexId() << " "
53  << co.vertex();
54 
55 }
const FSimVertexType::VertexType vertexType() const
unsigned int nChargedDaughters() const
const int recoVertexId() const
const SimVertex vertex() const
tuple out
Definition: dbtoconf.py:99
unsigned int nDaughters() const

Member Data Documentation

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

Vector of daughter ids in the track collection.

Definition at line 103 of file FSimDisplacedVertex.h.

Referenced by daughterIds(), and nDaughters().

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

Definition at line 94 of file FSimDisplacedVertex.h.

Referenced by id().

bool FSimDisplacedVertex::isRecoVertex_
private

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

Definition at line 109 of file FSimDisplacedVertex.h.

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

int FSimDisplacedVertex::motherId_
private

id of mother particle. -1 if no mother

Definition at line 97 of file FSimDisplacedVertex.h.

Referenced by motherId().

unsigned int FSimDisplacedVertex::nCharged_
private

Number of charged daughters.

Definition at line 100 of file FSimDisplacedVertex.h.

Referenced by nChargedDaughters().

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 114 of file FSimDisplacedVertex.h.

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

SimVertex FSimDisplacedVertex::vertex_
private

Sim Vertex.

Definition at line 90 of file FSimDisplacedVertex.h.

Referenced by vertex().

FSimVertexType::VertexType FSimDisplacedVertex::vertexType_
private

Vertex Type.

Definition at line 106 of file FSimDisplacedVertex.h.

Referenced by vertexType().