PandaRoot
PndLmdTrackFinderCATask.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 // -------------------------------------------------------------------------
14 // ----- PndLmdTrackFinderCATask -----
15 // ----- Created 18/05/11 by A. Karavdina -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef PNDLMDTRACKFINDERCATASK_H
19 #define PNDLMDTRACKFINDERCATASK_H
20 #include "FairTask.h"
21 #include "PndMCTrack.h"
22 #include "PndSdsClusterStrip.h"
23 #include "PndSdsGeoPar.h"
24 #include "PndSdsHit.h"
25 #include "PndSdsMCPoint.h"
26 #include "PndTrackCand.h"
27 
28 #include <string>
29 #include <vector>
30 #include "PndSdsCell.h"
31 #include "TH2.h"
32 #include "TNtuple.h"
33 
34 class TClonesArray;
35 
36 class PndLmdTrackFinderCATask : public FairTask {
37  public:
41  PndLmdTrackFinderCATask(const bool missPl, const double setdmax, Int_t innSensPP = 8, Int_t innP = 4, TString hitBranch = "LMDHitsStrip");
43  virtual ~PndLmdTrackFinderCATask();
44 
46  virtual void SetParContainers();
47  virtual InitStatus Init();
48  virtual InitStatus ReInit();
49 
51  virtual void Exec(Option_t *opt);
52 
53  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
54  void SetInaccuracy(Double_t accu) { dXY = accu; };
55  void SetSensStripFlag(bool fS) { flagStipSens = fS; };
56  void SetSensPixelFlag(bool fS) { flagPixelSens = fS; };
57  void SetTrkCandCutsFlag(bool fS) { flagTrkCandCuts = fS; };
58  void FinishTask();
59 
60  private:
61  Double_t dXY;
62  double rule_max;
63  int nSensPP; // number of sensors on one plane
64  int nP; // number of planes
65  bool SortHitsByDet(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
66  bool SortHitsByDetSimple(std::vector<std::vector<Int_t>> &hitsd, Int_t nStripHits);
67  bool SortHitsByDetSimple2(std::vector<std::vector<Int_t>> &hitsd,
68  Int_t nStripHits); // Uses PmdLmdDim class
69  bool SortHitsByZ(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
70  Double_t GetTrackDip(PndMCTrack *myTrack);
71  Double_t GetTrackCurvature(PndMCTrack *myTrack);
72  bool Neighbor(int &icell0, int &icell1);
73  bool Neighbor(PndSdsCell *cell0, PndSdsCell *cell1);
74  void Evolution(int &pv0, int &pv1, int &pv0_n, int &pv1_n, bool isch);
75  TClonesArray *ForwardEvolution(TClonesArray *fCellArray, int niter = 100);
76  TClonesArray *CookAllCells(std::vector<std::vector<Int_t>> hitsd);
77  TClonesArray *CookCells(std::vector<std::vector<Int_t>> hitsd, int &pl0, int &pl1, TClonesArray *tCellArray);
78  TString fHitBranchStrip;
79 
80  bool missPlAlgo;
81  bool flagStipSens;
82  bool flagPixelSens;
83  bool flagTrkCandCuts;
85  TClonesArray *fStripHitArray;
86 
88  TClonesArray *fTrackCandArray;
89  TClonesArray *fCellArray;
90 
91  void Register();
92  void Reset();
93  void ProduceHits();
94 
95  ClassDef(PndLmdTrackFinderCATask, 4);
96 };
97 
98 #endif /* PndLmdTrackFinderCATASK_H */
virtual ~PndLmdTrackFinderCATask()
virtual void Exec(Option_t *opt)
void SetInaccuracy(Double_t accu)
virtual void SetParContainers()
virtual InitStatus ReInit()
void SetVerbose(Int_t verbose)
virtual InitStatus Init()