PandaRoot
RhoGoodTrackSelector.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 RHOGOODTRACKSELECTOR_H
14 #define RHOGOODTRACKSELECTOR_H
15 // //
17 // RhoGoodTrackSelector //
18 // //
19 // Selector classes for track quality selections //
20 // //
21 // Author List: //
22 // Marcel Kunze, RUB, Feb. 99 //
23 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
24 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
25 // Klaus Goetzen, GSI, May. 2020 (Updated/modified criteria) //
26 // //
28 
30 
32 
33  public:
34  // Default constructor installs the currently accepted general setting
35  RhoGoodTrackSelector(const char *name = "RhoGoodTrackSelector", Double_t pmin=0.0, Double_t ptmin=0.0, Double_t fitprob=-1, Int_t mvdhits=0, Double_t xydoca = 100, Double_t zdoca = 100);
36  RhoGoodTrackSelector(const char *name, criterion crit);
37  RhoGoodTrackSelector(const char *name, const char *crit);
38  // Destructor
39  virtual ~RhoGoodTrackSelector() {};
40  virtual void PrintOn(std::ostream &o = std::cout) const;
41 
42  // void SetNHitsCut ( Int_t min, Int_t max=65535 ) {
43  // fNHitsMin = min;
44  // fNHitsMax = max;
45  // fCutHits=kTRUE;
46  // }
47  void SetMomentumCut(Double_t pmin, Double_t pmax = 1.E8)
48  {
49  fPMin = pmin;
50  fPMax = pmax;
51  }
52 
53  void SetPtCut(Double_t ptmin, Double_t ptmax = 1.E8)
54  {
55  fPtMin = ptmin;
56  fPtMax = ptmax;
57  }
58 
59  void SetFitProbCut(Double_t probmin)
60  {
61  fFitProbMin = probmin;
62  }
63 
64  void SetMvdHitsCut(Int_t hitsmin, Int_t hitsmax=100000)
65  {
66  fMvdHitsMin = hitsmin;
67  fMvdHitsMax = hitsmax;
68  }
69 
70  void SetPrimaryVertexCut(Double_t d, Double_t zmin, Double_t zmax)
71  {
72  fXYDocaMax = d;
73  fZDocaMin = zmin;
74  fZDocaMax = zmax;
75  }
76 
77  // backward compatibility for PndGoodTrackSelector; values are ignored!
78  void SetFitCut(Double_t chi = 1e9, Double_t chipm = 0.0)
79  {
80  fChisqProbMin = chipm;
81  fChisqMax = chi;
82  }
83 
84  // operations
85  virtual void SetCriterion(const char *crit);
86  virtual void SetCriterion(criterion crit);
87  virtual Bool_t Accept(RhoCandidate *b);
88  virtual Bool_t Accept(PndPidCandidate *b);
89 
90  private:
91  // Int_t fNHitsMin; // Number of hits: total
92  // Int_t fNHitsMax; // Number of hits: total
93  Double_t fPMin, fPMax, fPtMin, fPtMax; // Momentum cuts (abs. value)
94  Double_t fFitProbMin; // Fit probability
95  Int_t fMvdHitsMin, fMvdHitsMax; // Mvd hits
96  Double_t fXYDocaMax; // Distance of closest approach
97  Double_t fZDocaMin, fZDocaMax; // Closest z approach to beam spot
98  Double_t fChisqProbMin, fChisqMax; // Fit chi-square probability
99 
100  public:
101  ClassDef(RhoGoodTrackSelector, 1) // Track selector
102 };
103 
104 // standalone print
105 std::ostream &operator<<(std::ostream &o, const RhoGoodTrackSelector &);
106 
107 #endif
void SetPrimaryVertexCut(Double_t d, Double_t zmin, Double_t zmax)
void SetPtCut(Double_t ptmin, Double_t ptmax=1.E8)
void SetFitProbCut(Double_t probmin)
void SetMomentumCut(Double_t pmin, Double_t pmax=1.E8)
virtual void SetCriterion(const char *crit)
std::ostream & operator<<(std::ostream &o, const RhoGoodTrackSelector &)
void SetFitCut(Double_t chi=1e9, Double_t chipm=0.0)
virtual Bool_t Accept(RhoCandidate *b)
virtual void PrintOn(std::ostream &o=std::cout) const
void SetMvdHitsCut(Int_t hitsmin, Int_t hitsmax=100000)
RhoGoodTrackSelector(const char *name="RhoGoodTrackSelector", Double_t pmin=0.0, Double_t ptmin=0.0, Double_t fitprob=-1, Int_t mvdhits=0, Double_t xydoca=100, Double_t zdoca=100)