PandaRoot
RhoVertexSelectorBase.h
Go to the documentation of this file.
1 #ifndef RHOVERTEXSELECTORBSE_H
2 #define RHOVERTEXSELECTORBSE_H
3 // //
5 // RhoVertexSelectorBase //
6 // //
7 // Abstract Selector classes for vertexing //
8 // //
9 // Author: Marcel Kunze, RUB, July 99 //
10 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
11 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
12 // //
14 
15 #include <iostream>
16 
17 #include "TNamed.h"
18 #include "TVector3.h"
19 
20 class RhoCandidate;
21 class RhoCandList;
22 
23 class RhoVertexSelectorBase : public TNamed {
24 
25  public:
26  // Constructor
27  RhoVertexSelectorBase(const char *name = "RhoVertexSelectorBase");
28  // Destructor
29  virtual ~RhoVertexSelectorBase();
30 
31  // operations
32  virtual Bool_t Accept(RhoCandidate *, RhoCandidate *) = 0;
33  virtual Bool_t Accept(RhoCandidate *, RhoCandidate *, RhoCandidate *) { return kTRUE; };
34  virtual Bool_t Accept(RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *) { return kTRUE; };
35  virtual Bool_t Accept(RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *) { return kTRUE; };
36  void SetDistanceOfClosestApproach(Double_t d) { fDoca = d; }
37  void SetAngle(Double_t d) { fVtxip = d; }
38  void SetRadius(Double_t r1, Double_t r2 = 1.E8)
39  {
40  fRmin = r1;
41  fRmax = r2;
42  }
43  void SetPrimaryVertex(TVector3 x) { fPrimaryVertex = x; }
44  TVector3 GetVertex() { return fVertex; }
46  Double_t GetAngle() { return fActualVtxip; }
47  virtual void PrintOn(std::ostream &o = std::cout) const;
48 
49  const TVector3 &GetMomentumA() const { return fMomA; }
50  const TVector3 &GetMomentumB() const { return fMomB; }
51  TVector3 GetMomentum() const { return fMomA + fMomB; }
52  Double_t GetRadius() const { return fActualR; }
53  void Combine(RhoCandList &in1, RhoCandList &in2, RhoCandList &out);
54 
55  protected:
56  Double_t fDoca; // Distance of closest approach
57  Double_t fVtxip; // Angle between momentum and (IP->Vertex)
58  Double_t fRmin; // Inner radius of acceptance
59  Double_t fRmax; // Outer radius of acceptance
60  Double_t fActualR; // Calculated distance to IP
61  Double_t fActualVtxip; // Calculated angle
62  Double_t fActualDoca; // Calculated doca
63  TVector3 fVertex; // Reconstructed vertex
64  TVector3 fPrimaryVertex; // Origin
65  TVector3 fMomA, fMomB; // P3 of the two candidates at poca
66 
67  public:
68  ClassDef(RhoVertexSelectorBase, 1) // Vertexing base class
69 };
70 
71 std::ostream &operator<<(std::ostream &o, const RhoVertexSelectorBase &);
72 
73 #endif
void Combine(RhoCandList &in1, RhoCandList &in2, RhoCandList &out)
virtual Bool_t Accept(RhoCandidate *, RhoCandidate *, RhoCandidate *)
RhoVertexSelectorBase(const char *name="RhoVertexSelectorBase")
const TVector3 & GetMomentumB() const
void SetRadius(Double_t r1, Double_t r2=1.E8)
void SetDistanceOfClosestApproach(Double_t d)
std::ostream & operator<<(std::ostream &o, const RhoVertexSelectorBase &)
virtual void PrintOn(std::ostream &o=std::cout) const
virtual ~RhoVertexSelectorBase()
virtual Bool_t Accept(RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *)
virtual Bool_t Accept(RhoCandidate *, RhoCandidate *, RhoCandidate *, RhoCandidate *)
const TVector3 & GetMomentumA() const
virtual Bool_t Accept(RhoCandidate *, RhoCandidate *)=0
void SetPrimaryVertex(TVector3 x)
TVector3 GetMomentum() const