CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
22  FSimVertex();
23 
25  FSimVertex(const math::XYZTLorentzVector& v, int im, int id, FBaseSimEvent* mom);
26 
28  inline const FSimTrack& parent() const;
29 
31  inline const std::vector<int>& daughters() const { return daugh_; }
32 
34  inline int nDaughters() const { return daugh_.size(); }
35 
37  inline const FSimTrack& daughter(int i) const;
38 
40  inline bool noDaughter() const { return !nDaughters(); }
41 
43  inline int id() const { return id_; }
44 
45  inline void addDaughter(int i) { daugh_.push_back(i); }
46 
48  inline const math::XYZTLorentzVector& position() const { return position_; }
49 
51  inline void setPosition(const math::XYZTLorentzVector& newPosition) { position_ = newPosition; }
52 
54  inline const SimVertex& simVertex() const { return *this; }
55 
56 private:
58  int id_; // The index in the FSimVertex vector
59  std::vector<int> daugh_; // The indices of the daughters in FSimTrack
60 
62 };
63 
64 #include <iosfwd>
65 std::ostream& operator<<(std::ostream& o, const FSimVertex& t);
66 
67 #include "FastSimulation/Event/interface/FSimVertex.icc"
68 
69 #endif // FSimVertex_H
int id() const
the index in FBaseSimEvent
Definition: FSimVertex.h:43
void setPosition(const math::XYZTLorentzVector &newPosition)
Reset the position (to be used with care)
Definition: FSimVertex.h:51
bool noDaughter() const
no Daughters
Definition: FSimVertex.h:40
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
math::XYZTLorentzVector position_
Definition: FSimVertex.h:61
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:48
int nDaughters() const
The number of daughters.
Definition: FSimVertex.h:34
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:31
std::vector< int > daugh_
Definition: FSimVertex.h:59
const FBaseSimEvent * mom_
Definition: FSimVertex.h:57
void addDaughter(int i)
Definition: FSimVertex.h:45
const SimVertex & simVertex() const
Simply returns the SimVertex.
Definition: FSimVertex.h:54
FSimVertex()
Default constructor.
Definition: FSimVertex.cc:4