StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StKFVertex.h
1 #ifndef __StKFVertex_h__
2 #define __StKFVertex_h__
3 // $Id: StKFVertex.h,v 2.4 2013/04/10 22:14:20 fisyak Exp $
4 #include "Riostream.h"
5 #include "TObject.h"
6 #include "StKFTrack.h"
7 #include "TObjArray.h"
8 #include "KFVertex.h"
9 #include "TVector3.h"
10 
11 class StKFVertex;
12 std::ostream& operator<<(std::ostream& os, const StKFVertex& v);
13 class StKFVertex : public TObject {
14 public:
15  StKFVertex(Int_t id = -1) : fID(id) , fIdTruth(0), fQuality(0), fIdParentTk(0),
16  fTimeMc(0), fNoDaughtersMc(0), fgePidMc(0)
17  {fKFTracks.SetOwner(kTRUE); Clear();}
18  virtual ~StKFVertex() {Clear();}
19  void AddTrack(const StKFTrack *track);
20  virtual void Clear(Option_t *opt="") {fKFTracks.Clear(opt);}
21  StKFTrack* Remove(Int_t k=0) {return (StKFTrack *) fKFTracks.RemoveAt(k);}
22  StKFTrack* Remove(StKFTrack *track) {return (StKFTrack *) fKFTracks.Remove(track);}
23  StKFTrack* Remove(KFParticle *particle);
24  Int_t ID() const {return fID;}
25  KFVertex &Vertex() {return *&fVertex;}
26  KFVertex Vertex() const {return fVertex;}
27  TObjArray &Tracks() {return *&fKFTracks;}
28  Int_t NoTracks() const {return fKFTracks.GetEntriesFast();}
29  Int_t Charge() const {return fVertex.GetQ();}
30  StKFTrack* Track(Int_t k = 0) {return (StKFTrack* ) fKFTracks[k];}
31  const StKFTrack* Track(Int_t k = 0) const {return (const StKFTrack* ) fKFTracks[k];}
32  Double_t UpdateVertex2TrackChi2();
33  void Compress() {fKFTracks.Compress();}
34  void Fit();
35  Int_t IdTruth() const { return fIdTruth;}
36  Int_t QaTruth() const { return fQuality; }
37  Int_t IdParentTk() const {return fIdParentTk;}
38  void SetIdTruth(Int_t idtru,Int_t qatru=0) {fIdTruth = (UShort_t) idtru; fQuality = (UShort_t) qatru;}
39  void SetIdParentTk(Int_t id) {fIdParentTk = id;}
40  Int_t MultW() const {return MultWE(1);}
41  Int_t MultE() const {return MultWE(2);}
42  Int_t MultWE(Int_t k = 1) const;
43  Int_t Q() const;
44  void operator +=(StKFVertex &vtx);
45  void Print(Option_t *option="") const {std::cout << option << *this << std::endl; }
46  void PrintW(Option_t *option="") const;
47  void SetMc(Float_t time, Float_t x, Float_t y, Float_t z, Int_t NoDaughters, Int_t gePid);
48  Float_t TimeMc() const {return fTimeMc;}
49  const TVector3 &XyzMc() const {return *&fXyzMc;}
50  Int_t NoDaughtersMc() const {return fNoDaughtersMc;}
51  Int_t gePidMc() const {return fgePidMc;}
52  static void SetDebug(Int_t k = 0) {_debug = k;}
53  static Int_t Debug() {return _debug;}
54 private:
55  Int_t fID;
56  KFVertex fVertex;
57  TObjArray fKFTracks;
58  UShort_t fIdTruth; // MC vertex id
59  UShort_t fQuality; // quality of this information (percentage of hits coming from the above MC track)
60  Int_t fIdParentTk;
61  Float_t fTimeMc;
62  TVector3 fXyzMc;
63  Int_t fNoDaughtersMc;
64  Int_t fgePidMc;
65  public:
66  static Int_t _debug;
67  static const Char_t *GeNames[52];
68  ClassDef(StKFVertex,0)
69 };
70 // $Log: StKFVertex.h,v $
71 // Revision 2.4 2013/04/10 22:14:20 fisyak
72 // Roll back to version 04/04/2013
73 //
74 // Revision 2.2 2012/06/11 15:33:41 fisyak
75 // std namespace
76 //
77 // Revision 2.1 2012/05/07 14:56:14 fisyak
78 // Add StKFVertexMaker
79 //
80 // Revision 1.3 2012/03/29 23:35:47 fisyak
81 // Fix problem with multiple beam tracks
82 //
83 // Revision 1.2 2012/02/07 19:38:26 fisyak
84 // Repackage
85 //
86 #endif
C++ STL includes.
Definition: AgUStep.h:47