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