CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FSimVertex.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Event_FSimVertex_H
2 #define FastSimulation_Event_FSimVertex_H
3 
4 // CMSSW Headers
7 
8 #include <vector>
9 
10 class FBaseSimEvent;
11 class FSimTrack;
12 
19 class FSimVertex : public SimVertex {
20 
21 public:
23  FSimVertex();
24 
26  FSimVertex(const math::XYZTLorentzVector& v, int im, int id, FBaseSimEvent* mom);
27 
29  inline const FSimTrack& parent() const;
30 
32  inline const std::vector<int>& daughters() const { return daugh_; }
33 
35  inline int nDaughters() const { return daugh_.size(); }
36 
38  inline const FSimTrack& daughter(int i) const;
39 
41  inline bool noDaughter() const { return !nDaughters(); }
42 
44  inline int id() const { return id_; }
45 
46  inline void addDaughter(int i) { daugh_.push_back(i); }
47 
49  inline const math::XYZTLorentzVector& position() const { return position_; }
50 
52  inline void setPosition(const math::XYZTLorentzVector& newPosition) {position_ = newPosition; }
53 
55  inline const SimVertex& simVertex() const { return *this; }
56 
57  private:
58 
60  int id_; // The index in the FSimVertex vector
61  std::vector<int> daugh_; // The indices of the daughters in FSimTrack
62 
64 
65 };
66 
67 #include<iosfwd>
68 std::ostream& operator <<(std::ostream& o , const FSimVertex& t);
69 
70 #include "FastSimulation/Event/interface/FSimVertex.icc"
71 
72 #endif // FSimVertex_H
int id() const
the index in FBaseSimEvent
Definition: FSimVertex.h:44
void setPosition(const math::XYZTLorentzVector &newPosition)
Reset the position (to be used with care)
Definition: FSimVertex.h:52
bool noDaughter() const
no Daughters
Definition: FSimVertex.h:41
math::XYZTLorentzVector position_
Definition: FSimVertex.h:63
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:49
std::ostream & operator<<(std::ostream &o, const FSimVertex &t)
Definition: FSimVertex.cc:12
int nDaughters() const
The number of daughters.
Definition: FSimVertex.h:35
const FSimTrack & daughter(int i) const
ith daughter
const FSimTrack & parent() const
parent track
const std::vector< int > & daughters() const
The vector of daughter indices.
Definition: FSimVertex.h:32
std::vector< int > daugh_
Definition: FSimVertex.h:61
const FBaseSimEvent * mom_
Definition: FSimVertex.h:59
void addDaughter(int i)
Definition: FSimVertex.h:46
const SimVertex & simVertex() const
Simply returns the SimVertex.
Definition: FSimVertex.h:55
FSimVertex()
Default constructor.
Definition: FSimVertex.cc:4