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