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