PandaRoot
PndStraightLineTrackFinderTask.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 // ----- PndStraightLineTrackFinderTask -----
15 // ----- Created 22/10/09 by M. Michel -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef PndStraightLineTrackFinderTask_H
19 #define PndStraightLineTrackFinderTask_H
20 
21 #include "FairTask.h"
22 #include "PndMCTrack.h"
23 #include "PndSdsGeoPar.h"
24 #include "PndSdsHit.h"
25 #include "PndSdsMCPoint.h"
26 #include "PndSdsClusterStrip.h"
27 #include "PndTrackCand.h"
28 
29 #include <string>
30 #include <vector>
31 #include <utility>
32 
33 class TClonesArray;
34 
35 class PndStraightLineTrackFinderTask : public FairTask {
36  public:
38  PndStraightLineTrackFinderTask(Int_t inFinderMode = 0, TString hitBranch = "LMDHitsStrip", TString clusterBranch = "LMDStripClusterCand", TString digiBranch = "LMDStripDigis",
39  Int_t innSensPP = 8);
42 
44  virtual void SetParContainers();
45  virtual InitStatus Init();
46  virtual InitStatus ReInit();
47 
49  virtual void Exec(Option_t *opt);
50 
51  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
52  void SetInaccuracy(Double_t accu) { dXY = accu; };
53  void SetSensStripFlag(bool fS) { flagStipSens = fS; };
54  void SetSensPixelFlag(bool fS) { flagPixelSens = fS; };
55 
56  private:
57  bool flagStipSens;
58  bool flagPixelSens;
59  Double_t dXY;
60  Int_t fFinderMode;
61  Int_t nSensPP;
62  // std::vector<Int_t> GetHitPerCluster(PndSdsClusterStrip* clusterCand);
63  Double_t GetTrackDip(PndMCTrack *myTrack);
64  Double_t GetTrackCurvature(PndMCTrack *myTrack);
65 
66  TString fHitBranchStrip;
67  TString fClusterBranchStrip;
68  TString fDigiBranchStrip;
69 
71  TClonesArray *fStripHitArray;
72  TClonesArray *fStripClusterArray;
73  TClonesArray *fStripDigiArray;
74 
76  TClonesArray *fTrackCandArray;
77 
78  void Register();
79  void Reset();
80  void ProduceHits();
81 
82  bool SortHitsByZ(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
83  bool SortHitsByDet(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
84  bool SortHitsByDet2(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits); // uses PndLmdDim
85  void FindHitsI(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
86  void FindHitsII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
87  void FindHitsIII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
88 
89  ClassDef(PndStraightLineTrackFinderTask, 2);
90 };
91 
92 #endif /* PndStraightLineTrackFinderTask_H */
virtual void Exec(Option_t *opt)
virtual InitStatus ReInit()
virtual InitStatus Init()
PndStraightLineTrackFinderTask(Int_t inFinderMode=0, TString hitBranch="LMDHitsStrip", TString clusterBranch="LMDStripClusterCand", TString digiBranch="LMDStripDigis", Int_t innSensPP=8)