StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StKFVerticesCollection.h
1 #ifndef __StKFVerticesCollection_h__
2 // $Id: StKFVerticesCollection.h,v 2.2 2012/06/11 15:33:41 fisyak Exp $
3 #define __StKFVerticesCollection_h__
4 #include "TObject.h"
5 #include "TObjArray.h"
6 #include "StKFVertex.h"
7 #include "TCanvas.h"
8 #include "TH1.h"
9 #include "TH1K.h"
11 std::ostream& operator<<(std::ostream& os, const StKFVerticesCollection& vc);
12 class StKFVerticesCollection : public TObject {
13 public:
14  StKFVerticesCollection(Int_t NoPeaks = 0, Double_t *zOfPeaks = 0, Double_t sigmaXY = 1.5, Double_t sigmaZ = 2);
15  void AddVertex(Double_t x, Double_t y, Double_t z, Double_t sigmaXY, Double_t sigmaZ);
16  void AddVertex(StKFVertex*vtx) {fVertices.AddLast(vtx);}
17  virtual ~StKFVerticesCollection() {}
18  Int_t NoVertices() const {return fVertices.GetEntriesFast();}
19  StKFVertex* Remove(Int_t k=0) {return (StKFVertex *) fVertices.RemoveAt(k);}
20  Double_t DoTrack2VertexAssociation(const TObjArray &particles); // associate tracks to vertex
21  Double_t UpdateStVertexTrackAssociation(); // reassociate tracks to vertex
22  void CleanDuplicatedVertices();
23  void MergeDuplicatedVertices();
24  void UpdateWeights();
25  void UniqueTracks2VertexAssociation();
26  void Compress() {fVertices.Compress();}
27  Double_t Fit(Int_t marker = 0, TCanvas *c1 = 0, TH1* Vtx = 0);
28  StKFVertex *&Vertex(Int_t l) {return (StKFVertex *&) fVertices[l];}
29  const StKFVertex *Vertex(Int_t l) const {return (const StKFVertex *) fVertices[l];}
30  void operator +=(StKFVerticesCollection &col);
31  void SetMc(Int_t NoMuMcVertex = 0, Int_t NoMuMcTrack = 0, const Float_t *time = 0,
32  const Float_t *x = 0,const Float_t *y = 0,const Float_t *z = 0,
33  const Int_t *NoDaughters = 0,const Int_t *IdParTrk = 0,const Int_t *gePid = 0);
34  virtual void Print(const Option_t* opt = "") const {if (opt) {}; std::cout << *this;}
35  static void SetVxPenaltyFactor(Double_t chi2 = 1000) {fgVxPenaltyFactor = chi2;}
36  private:
37  TObjArray fVertices;
38  static Double_t fgVxPenaltyFactor;
39  public:
40  ClassDef(StKFVerticesCollection,0)
41 };
42 // $Log: StKFVerticesCollection.h,v $
43 // Revision 2.2 2012/06/11 15:33:41 fisyak
44 // std namespace
45 //
46 // Revision 2.1 2012/05/07 14:56:14 fisyak
47 // Add StKFVertexMaker
48 //
49 // Revision 1.3 2012/03/26 23:42:36 fisyak
50 // Add beam constrain
51 //
52 // Revision 1.2 2012/02/07 19:38:26 fisyak
53 // Repackage
54 //
55 #endif