PandaRoot
PndMvdRiemannTrackFinderTaskCutPar.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 PNDMVDRIEMANNTRACKFINDERTASKCUTPAR_H_
14 #define PNDMVDRIEMANNTRACKFINDERTASKCUTPAR_H_
15 
16 #include "FairTask.h"
17 #include "PndSdsHit.h"
18 #include "TH2F.h"
19 #include "TVector3.h"
20 
21 #include "TString.h"
22 
23 #include "TClonesArray.h"
24 
25 #include "PndRiemannHit.h"
26 
27 class PndMvdRiemannTrackFinderTaskCutPar : 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 SetMaxSZChi2(double val) { fMaxSZChi2 = val; }
44  void SetMaxSZDist(double val) { fMaxSZDist = val; }
45  void SetMinPointDist(double val) { fMinPointDist = val; }
46  void SetMaxDist(double val) { fMaxDist = val; }
47 
48  void CalcCuts();
49 
50  // void PrintResult(); // not implemented
51  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
52 
53  private:
54  TString fHitBranch;
55  TString fHitBranch2;
56  TString fMCTrackBranch;
57  TString fTrackBranch;
58  int fEventNr;
59 
60  double fMaxSZChi2;
61  double fMaxSZDist;
62  double fMinPointDist;
63  double fMaxDist;
64 
65  TClonesArray *fHitArray;
66  TClonesArray *fHitArray2;
67  TClonesArray *fTrackCandArray;
68  TClonesArray *fMCTrackArray;
69  TClonesArray *fRiemannTracks;
70 
71  void Register();
72  void Reset();
73  void ProduceHits();
74 
75  bool CheckTooCloseHits(PndRiemannHit hit1, PndRiemannHit hit2);
76  void CalcRiemannTracks();
77  void CalcParHists();
78 
79  unsigned int fNCut;
80 
81  int fNbin;
82  double frangeDist;
83  double frangeChi2;
84  double fPtS;
85  double fPtF;
86  static const int fNPt = 10;
87  double fThetaS;
88  double fThetaF;
89  static const int fNTh = 10;
90 
91  TH1F *fhistsDist[fNPt][fNTh];
92  TH1F *fhistsChi2[fNPt][fNTh];
93  TH2F *fCutDistH;
94  TH2F *fCutChi2H;
95 
97 };
98 
99 #endif /*PndMvdRiemannTrackFinderTaskCutPar_H_*/
virtual void Exec(Option_t *opt)
PndMvdRiemannTrackFinderTaskCutPar & operator=(const PndMvdRiemannTrackFinderTaskCutPar &)=delete