PandaRoot
PndLmdTrackFinderTask.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 // ----- PndLmdTrackFinderTask -----
15 // ----- Created 22/10/09 by M. Michel -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef PNDLMDTRACKFINDERTASK_H
19 #define PNDLMDTRACKFINDERTASK_H
20 
21 #include "FairTask.h"
22 #include "PndMCTrack.h"
23 #include "PndSdsClusterStrip.h"
24 #include "PndSdsGeoPar.h"
25 #include "PndSdsHit.h"
26 #include "PndSdsMCPoint.h"
27 #include "PndTrackCand.h"
28 
29 #include <string>
30 #include <utility>
31 #include <vector>
32 
33 class TClonesArray;
34 
35 class PndLmdTrackFinderTask : public FairTask {
36  public:
38  PndLmdTrackFinderTask(Int_t inFinderMode = 0, TString hitBranch = "LMDHitsStrip", Int_t innSensPP = 8);
40  virtual ~PndLmdTrackFinderTask();
41 
43  virtual void SetParContainers();
44  virtual InitStatus Init();
45  virtual InitStatus ReInit();
46 
48  virtual void Exec(Option_t *opt);
49 
50  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
51  void SetInaccuracy(Double_t accu) { dXY = accu; };
52  void SetSensStripFlag(bool fS) { flagStipSens = fS; };
53  void SetSensPixelFlag(bool fS) { flagPixelSens = fS; };
54 
55  private:
56  bool flagStipSens;
57  bool flagPixelSens;
58  Double_t dXY;
59  Int_t fFinderMode;
60  Int_t nSensPP;
61 
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 
69  TClonesArray *fStripHitArray;
70 
72  TClonesArray *fTrackCandArray;
73 
74  void Register();
75  void Reset();
76  void ProduceHits();
77 
78  bool SortHitsByZ(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
79  bool SortHitsByDet(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
80  bool SortHitsByDet2(std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd,
81  Int_t nStripHits); // uses PndLmdDim
82  void FindHitsI(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
83  void FindHitsII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
84  void FindHitsIII(std::vector<PndTrackCand> &tofill, std::vector<std::vector<std::pair<Int_t, bool>>> &hitsd, Int_t nStripHits);
85 
86  ClassDef(PndLmdTrackFinderTask, 2);
87 };
88 
89 #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)