PandaRoot
PndMvdSttGemRiemannTrackFinder.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 PndMvdSttGemRiemannTrackFinder_H_
14 #define PndMvdSttGemRiemannTrackFinder_H_
15 
16 #include "TClonesArray.h"
17 #include "PndRiemannTrackFinder.h"
18 #include "PndGeoHandling.h"
19 #include "PndSttStrawMap.h"
20 
21 #include "TH2F.h"
22 #include <vector>
23 
24 class PndSttHit;
25 
27  public:
32 
33  void FindTracks();
34  void AddHits(TClonesArray *hits, Int_t branchId);
35 
36  // void SetGeoH(PndGeoHandling geoH){fGeoH=geoH;};
37  void SetCutDistH(TH2F *hist) { fCutDistH = hist; }
38  void SetCutChi2H(TH2F *hist) { fCutChi2H = hist; }
39 
40  void SetSttTubeArray(TClonesArray *SttTubeArray) { fStrawMap.GenerateStrawMap(SttTubeArray); }
41 
42  private:
43  PndGeoHandling *fGeoH;
44 
45  std::vector<std::set<Int_t>> GetStartTracks();
46  bool CheckSZ(PndRiemannTrack aTrack);
47  bool CheckRiemannHit(PndRiemannTrack *track, PndRiemannHit *hit, FairHit *fairHit);
48  bool CheckRiemannHitMvd(PndRiemannTrack *track, PndRiemannHit *hit, FairHit *fairHit);
49  bool CheckRiemannHitGem(PndRiemannTrack *track, PndRiemannHit *hit, FairHit *fairHit);
50  bool CheckRiemannHitStt(PndRiemannTrack *track, PndRiemannHit *hit, FairHit *fairHit);
51  bool CheckRiemannHitSkewedStt(PndRiemannTrack *track, PndRiemannHit *hit, FairHit *fairHit);
52 
53  // bool CheckTrackStt(PndRiemannTrack* track);
54 
55  void AssignSttHits(PndRiemannTrack &actTrack, std::set<Int_t> &startTrack);
56  void AssignSkewedSttHits(PndRiemannTrack &actTrack, std::set<Int_t> &startTrack);
57  void AssignGemHits(PndRiemannTrack &actTrack, std::set<Int_t> &startTrack);
58 
59  bool CheckBoarderHitsStt(PndTrackCand *track);
60  int GetStrawSector(PndRiemannTrack &track);
61 
62  int GetLayerGem(FairHit *hit);
63  int GetLayerMvd(FairHit *hit);
64  int GetLayer(TString identifier);
65  void InitLayerMap();
66  void InitLayerMapMvd();
67  void InitLayerMapGem();
68 
69  TH2F *fCutDistH;
70  TH2F *fCutChi2H;
71 
72  TClonesArray *fSttHits;
73  TClonesArray *fSkewedSttHits;
74  TClonesArray *fGemHits;
75  PndSttStrawMap fStrawMap;
76  std::vector<std::vector<PndSttHit *>> fSttHitsInSectors;
77  std::vector<std::vector<FairHit *>> fSttSkewedHitsInSectors;
78 
79  double fZClosePar;
80 
81  std::vector<std::vector<int>> fLayers;
82  std::map<TString, int> fLayerMap;
83  int fLastLayerId;
84  /* b - barrel layer; d - disk layer
85  0 - zero position
86  1 - 1b
87  2 - 1d
88  3 - 2d
89  4 - 2b
90  5 - 3d
91  6 - 4d
92  7 - 3b
93  8 - 5d
94  9 - 4b
95  10 - 6d
96 */
97  int fNLayers;
98  double GetMaxPlaneDist(double radius, double dip, bool sign); // getting cut distance
99  double GetMaxSZChi2(double radius, double dip, bool sign); // getting cut Chi2
100  std::set<int> GetTooCloseHitsInLayer(int LayerNumber, int HitNumber); // searching for too close hits to HitNumber-Hit in layer LayerNumber
101 
102  public:
103  ClassDef(PndMvdSttGemRiemannTrackFinder, 1)
104 };
105 
106 #endif /*PndMvdSttGemRiemannTrackFinder_H_*/
void AddHits(TClonesArray *hits, Int_t branchId)
Class to access the naming information of the MVD.
void GenerateStrawMap(TClonesArray *const stt_tube_array)
PndMvdSttGemRiemannTrackFinder & operator=(const PndMvdSttGemRiemannTrackFinder &)=delete
void SetSttTubeArray(TClonesArray *SttTubeArray)
int sign(T val)
Definition: PndCADef.h:61
void FindTracks()
Main function to start the riemann track finding.