PandaRoot
PndLmdTrackFinderTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndLmdTrackFinderTask -----
3 // ----- Created 22/10/09 by M. Michel -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef PNDLMDTRACKFINDERTASK_H
7 #define PNDLMDTRACKFINDERTASK_H
8 
9 #include "FairTask.h"
10 #include "PndMCTrack.h"
11 #include "PndSdsClusterStrip.h"
12 #include "PndSdsGeoPar.h"
13 #include "PndSdsHit.h"
14 #include "PndSdsMCPoint.h"
15 #include "PndTrackCand.h"
16 
17 #include <string>
18 #include <utility>
19 #include <vector>
20 
21 class TClonesArray;
22 
23 class PndLmdTrackFinderTask : public FairTask {
24  public:
26  PndLmdTrackFinderTask(Int_t inFinderMode = 0, TString hitBranch = "LMDHitsStrip", Int_t innSensPP = 8);
28  virtual ~PndLmdTrackFinderTask();
29 
31  virtual void SetParContainers();
32  virtual InitStatus Init();
33  virtual InitStatus ReInit();
34 
36  virtual void Exec(Option_t *opt);
37 
38  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
39  void SetInaccuracy(Double_t accu) { dXY = accu; };
40  void SetSensStripFlag(bool fS) { flagStipSens = fS; };
41  void SetSensPixelFlag(bool fS) { flagPixelSens = fS; };
42 
43  private:
44  bool flagStipSens;
45  bool flagPixelSens;
46  Double_t dXY;
47  Int_t fFinderMode;
48  Int_t nSensPP;
49 
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 
57  TClonesArray *fStripHitArray;
58 
60  TClonesArray *fTrackCandArray;
61 
62  void Register();
63  void Reset();
64  void ProduceHits();
65 
66  bool SortHitsByZ(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
67  bool SortHitsByDet(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
68  bool SortHitsByDet2(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd,
69  Int_t nStripHits); // uses PndLmdDim
70  void FindHitsI(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
71  void FindHitsII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
72  void FindHitsIII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
73 
74  ClassDef(PndLmdTrackFinderTask, 2);
75 };
76 
77 #endif /* PndLmdTrackFinderTASK_H */
virtual void Exec(Option_t *opt)
virtual void SetParContainers()
virtual ~PndLmdTrackFinderTask()
virtual InitStatus Init()
PndLmdTrackFinderTask(Int_t inFinderMode=0, TString hitBranch="LMDHitsStrip", Int_t innSensPP=8)
virtual InitStatus ReInit()
void SetInaccuracy(Double_t accu)
void SetVerbose(Int_t verbose)