PandaRoot
PndAnalysisForwardTask.h
Go to the documentation of this file.
1 /*
2  * PndAnalysisForwardTask.h
3  *
4  * Created on: Jul 15, 2016
5  * Author: kibellus
6  */
7 
8 #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDANALYSISFORWARDTASK_H_
9 #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDANALYSISFORWARDTASK_H_
10 
11 #include "FairTask.h"
12 #include "FairRuntimeDb.h"
13 #include "FairRunAna.h"
14 #include "FairHit.h"
15 
16 #include "PndGeoFtsPar.h"
17 #include "PndFtsMapCreator.h"
19 #include "PndTrackCombiner.h"
20 #include "PndLine.h"
21 #include "PndFtsLineApproximator.h"
22 #include "PndFtsPoint.h"
23 
24 #include "TClonesArray.h"
25 #include "TVector3.h"
26 
27 #include <iostream>
28 #include <vector>
29 #include <fstream>
30 
31 class PndAnalysisForwardTask : public FairTask {
32  public:
33  PndAnalysisForwardTask() : eventNum(0)
34  {
35  for (int i = 0; i < 10; i++) {
36  hitArray[i] = 0;
37  momentumArray[i] = 0;
38  trackCountArray[i] = 0;
39  hitArray2[i] = 0;
40  momentumArray2[i] = 0;
41  trackCountArray2[i] = 0;
42  }
43  }
44  virtual ~PndAnalysisForwardTask();
45 
46  virtual InitStatus Init();
47 
48  virtual void Exec(Option_t *opt);
49  virtual void FinishEvent();
50  virtual void Finish();
51 
52  map<Int_t, vector<PndFtsHit *>> getMcTracks();
53  map<Int_t, vector<PndFtsHit *> *> getReconstructedTracks();
54  void analyzeMCTracks(vector<PndFtsHit *> hits, map<Int_t, vector<PndFtsHit *> *> tracks, Int_t trackID, Int_t trackCount);
55  vector<Int_t> analyzeMCTrack(vector<PndFtsHit *> mcHits, vector<PndFtsHit *> *reconstructedHits);
56  void anaSpecialCases(map<Int_t, vector<PndFtsHit *>> mcTracks);
57 
58  private:
59  FairRootManager *fIoman;
60  TClonesArray *fHits;
61  TClonesArray *fSolution;
62  TClonesArray *fMCTracks;
63  TClonesArray *fIdealTrack;
64  Int_t eventNum;
65 
66  Int_t completeClean = 0;
67  Int_t completeUnclean = 0;
68  Int_t incompleteClean = 0;
69  Int_t incompleteUnclean = 0;
70  Int_t notEnoughFound = 0;
71  Int_t notFound = 0;
72 
73  map<Int_t, Int_t> mcToHitCount;
74  map<Int_t, Double_t> momentum;
75 
76  Int_t hitArray[10];
77  Double_t momentumArray[10];
78  Int_t trackCountArray[10];
79 
80  Int_t hitArray2[10];
81  Double_t momentumArray2[10];
82  Int_t trackCountArray2[10];
83 
84  Int_t oneHitPerLayer = 0;
85  Int_t moreThan3Hits = 0;
86  Int_t twoTracksOneTube = 0;
87 
88  ClassDef(PndAnalysisForwardTask, 1);
89 };
90 
91 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDANALYSISFORWARDTASK_H_ */
virtual void FinishEvent()
virtual void Exec(Option_t *opt)
map< Int_t, vector< PndFtsHit * > * > getReconstructedTracks()
void analyzeMCTracks(vector< PndFtsHit *> hits, map< Int_t, vector< PndFtsHit *> *> tracks, Int_t trackID, Int_t trackCount)
vector< Int_t > analyzeMCTrack(vector< PndFtsHit *> mcHits, vector< PndFtsHit *> *reconstructedHits)
virtual ~PndAnalysisForwardTask()
map< Int_t, vector< PndFtsHit * > > getMcTracks()
unsigned int i
Definition: P4_F32vec4.h:21
virtual void Finish()
virtual InitStatus Init()
void anaSpecialCases(map< Int_t, vector< PndFtsHit *>> mcTracks)