PandaRoot
PndStraightLineTrackFinderTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndStraightLineTrackFinderTask -----
3 // ----- Created 22/10/09 by M. Michel -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef PndStraightLineTrackFinderTask_H
7 #define PndStraightLineTrackFinderTask_H
8 
9 #include "FairTask.h"
10 #include "PndMCTrack.h"
11 #include "PndSdsGeoPar.h"
12 #include "PndSdsHit.h"
13 #include "PndSdsMCPoint.h"
14 #include "PndSdsClusterStrip.h"
15 #include "PndTrackCand.h"
16 
17 #include <string>
18 #include <vector>
19 #include <utility>
20 
21 class TClonesArray;
22 
23 class PndStraightLineTrackFinderTask : public FairTask {
24  public:
26  PndStraightLineTrackFinderTask(Int_t inFinderMode = 0, TString hitBranch = "LMDHitsStrip", TString clusterBranch = "LMDStripClusterCand", TString digiBranch = "LMDStripDigis",
27  Int_t innSensPP = 8);
30 
32  virtual void SetParContainers();
33  virtual InitStatus Init();
34  virtual InitStatus ReInit();
35 
37  virtual void Exec(Option_t *opt);
38 
39  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
40  void SetInaccuracy(Double_t accu) { dXY = accu; };
41  void SetSensStripFlag(bool fS) { flagStipSens = fS; };
42  void SetSensPixelFlag(bool fS) { flagPixelSens = fS; };
43 
44  private:
45  bool flagStipSens;
46  bool flagPixelSens;
47  Double_t dXY;
48  Int_t fFinderMode;
49  Int_t nSensPP;
50  // std::vector<Int_t> GetHitPerCluster(PndSdsClusterStrip* clusterCand);
51  Double_t GetTrackDip(PndMCTrack *myTrack);
52  Double_t GetTrackCurvature(PndMCTrack *myTrack);
53 
54  TString fHitBranchStrip;
55  TString fClusterBranchStrip;
56  TString fDigiBranchStrip;
57 
59  TClonesArray *fStripHitArray;
60  TClonesArray *fStripClusterArray;
61  TClonesArray *fStripDigiArray;
62 
64  TClonesArray *fTrackCandArray;
65 
66  void Register();
67  void Reset();
68  void ProduceHits();
69 
70  bool SortHitsByZ(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
71  bool SortHitsByDet(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
72  bool SortHitsByDet2(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits); // uses PndLmdDim
73  void FindHitsI(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
74  void FindHitsII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
75  void FindHitsIII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
76 
77  ClassDef(PndStraightLineTrackFinderTask, 2);
78 };
79 
80 #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)