CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/FastSimulation/Event/interface/FSimVertex.h

Go to the documentation of this file.
00001 #ifndef FastSimulation_Event_FSimVertex_H
00002 #define FastSimulation_Event_FSimVertex_H
00003 
00004 // CMSSW Headers
00005 #include "SimDataFormats/Vertex/interface/SimVertex.h"
00006 #include "DataFormats/Math/interface/LorentzVector.h"
00007 
00008 #include <vector>
00009 
00010 class FBaseSimEvent;
00011 class FSimTrack;
00012 
00019 class FSimVertex : public SimVertex {
00020 
00021 public:
00023   FSimVertex();
00024   
00026   FSimVertex(const math::XYZTLorentzVector& v, int im, int id, FBaseSimEvent* mom);
00027 
00029   inline const FSimTrack& parent() const;
00030 
00032   inline const std::vector<int>& daughters() const { return daugh_; }
00033 
00035   inline int nDaughters() const { return daugh_.size(); }
00036 
00038   inline const FSimTrack& daughter(int i) const;
00039 
00041   inline bool  noDaughter() const { return !nDaughters(); }
00042 
00044   inline int id() const { return id_; }
00045 
00046   inline void addDaughter(int i) { daugh_.push_back(i); }
00047 
00049   inline const math::XYZTLorentzVector& position() const { return position_; }
00050 
00052   inline void setPosition(const math::XYZTLorentzVector& newPosition) {position_ = newPosition; }
00053 
00055   inline const SimVertex& simVertex() const { return *this; }
00056 
00057  private:
00058 
00059   const FBaseSimEvent* mom_;
00060   int id_;    // The index in the FSimVertex vector
00061   std::vector<int> daugh_; // The indices of the daughters in FSimTrack
00062 
00063   math::XYZTLorentzVector position_;
00064 
00065 };
00066 
00067 #include<iosfwd>
00068 std::ostream& operator <<(std::ostream& o , const FSimVertex& t);
00069 
00070 #include "FastSimulation/Event/interface/FSimVertex.icc"
00071 
00072 #endif // FSimVertex_H