PandaRoot
PndMvdRiemannTrackFinderTask.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 PNDMVDRIEMANNTRACKFINDERTASK_H_
14 #define PNDMVDRIEMANNTRACKFINDERTASK_H_
15 
16 #include "FairTask.h"
17 //#include "PndSdsHit.h"
18 #include "TClonesArray.h"
19 #include "TH2F.h"
20 #include "PndGeoHandling.h"
21 #include "PndGeoSttPar.h"
22 
23 #include "FairTSBufferFunctional.h"
24 
25 #include <vector>
26 
27 class PndMvdRiemannTrackFinderTask : public FairTask {
28  public:
33 
35  virtual void SetParContainers();
36  virtual InitStatus Init();
37  virtual InitStatus ReInit();
38 
40  virtual void Exec(Option_t *opt);
41  virtual void FinishEvent();
42 
43  void AddHitBranch(TString branchName); // Has to be called before Init() is used otherwise the default names are taken!
44 
45  void SetMaxSZChi2(double val) { fMaxSZChi2 = val; }
46  void SetMaxSZDist(double val) { fMaxSZDist = val; }
47  void SetMinPointDist(double val) { fMinPointDist = val; }
48  void SetMaxDist(double val) { fMaxDist = val; }
49 
50  void SetCutDistH(TH2F *hist) { fCutDistH = hist; }
51  void SetCutChi2H(TH2F *hist) { fCutChi2H = hist; }
52 
53  void SetB(Double_t B) { fB = B; }
54 
55  // void PrintResult(); // not implemented
56  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
57  void SetPersistence(Bool_t val) { fPersistence = val; };
58  // void SetGeoH(PndGeoHandling geoH){ fGeoH=geoH;};
59 
60  void FillHitArray();
61  void InitHitArray(TString branchName);
62 
63  private:
64  std::vector<TString> fHitBranch;
65  TString fTrackBranch;
66 
67  int fEventNr;
68 
69  double fMaxSZChi2;
70  double fMaxSZDist;
71  double fMinPointDist;
72  double fMaxDist;
73 
74  double fB;
75 
76  std::vector<TClonesArray *> fHitArray;
77  TClonesArray *fTrackCandArray;
78  TClonesArray *fRiemannTrackArray;
79  TClonesArray *fTrackArray;
80 
81  TH2F *fCutDistH;
82  TH2F *fCutChi2H;
83 
84  Bool_t fInitDone;
85  Bool_t fPersistence;
86 
87  BinaryFunctor *fStopFunctor;
88  BinaryFunctor *fTimeGapFunctor;
89 
90  PndGeoSttPar *fSttParameters; // CHECK added
91  TClonesArray *fTubeArray;
92 
93  // PndGeoHandling* fGeoH;
94 
95  void Register();
96  void Reset();
97  void ProduceHits();
98 
99  ClassDef(PndMvdRiemannTrackFinderTask, 1);
100 };
101 
102 #endif /*PNDMVDRIEMANNTRACKFINDERTASK_H_*/
PndMvdRiemannTrackFinderTask & operator=(const PndMvdRiemannTrackFinderTask &)=delete
virtual void Exec(Option_t *opt)
void InitHitArray(TString branchName)
virtual InitStatus Init()
virtual InitStatus ReInit()
void AddHitBranch(TString branchName)
virtual void SetParContainers()