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