Go to the documentation of this file.00001 #ifndef FORIA_VERTEX_HH
00002 #define FORIA_VERTEX_HH
00003
00004 #include "ForIA/Vertex.fh"
00005 #include "ForIA/Track.hh"
00006
00007 #include "boost/smart_ptr.hpp"
00008
00009 #include <vector>
00010 #include <iostream>
00011
00012 namespace ForIA{
00013
00014 using std::vector;
00015
00016 class Vertex;
00017 class Event;
00018
00019
00020
00021
00022
00024
00029 class Vertex{
00030
00031 public:
00032
00044 enum VertexType{BAD=-1, TYPE_BEGIN=0, NONE = TYPE_BEGIN, PRIMARY=1, SECONDARY=2, PILE_UP=3, CONVERSION=4,
00045 V0=5, KINK=6, V0_LAMBDA=7, V0_LAMBDA_BAR=8, V0_KSHORT=9, TRUTH, TYPE_END};
00046
00048 Vertex();
00049
00051 double x() const;
00053 double y() const;
00055 double z() const;
00057 double r() const;
00058
00060 int nTracks() const;
00061
00063 VertexType type() const;
00064
00069 bool hasTrackAssociations()const;
00070
00071 const TrackVector &associatedTracks()const;
00072
00073 struct ByNTracksUp{
00074 bool operator()(VertexConstPtr left, VertexConstPtr right){
00075 return left->nTracks() < right->nTracks();
00076 }
00077 };
00078
00079 struct ByNTracksDown{
00080 bool operator()(VertexConstPtr left, VertexConstPtr right){
00081 return ByNTracksUp()(right, left);
00082 }
00083 };
00084
00085 private:
00086
00087 friend std::ostream &operator << (std::ostream &out, const Vertex &vtx);
00088
00089 friend class DataConverter;
00090 friend class Event;
00091
00092 const Event *m_event;
00093
00094 double m_x;
00095 double m_y;
00096 double m_z;
00097
00098 mutable double m_r;
00099 mutable bool m_gotR;
00100
00101 int m_nTracks;
00102
00103 VertexType m_type;
00104
00105 mutable TrackVector m_associatedTracks;
00106 mutable bool m_gotTracks;
00107
00115 vector<int> m_trackIDs;
00116
00117 bool m_haveTrackIDs;
00118
00119 };
00120
00121 }
00122
00123 #endif