PandaRoot
PndMvdEventAnaTask.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndMvdEventAnaTask header file -----
3 // ----- Created 20/03/07 by R.Kliemt -----
4 // -------------------------------------------------------------------------
5 
12 #ifndef PNDMVDEVENTANATASK_H
13 #define PNDMVDEVENTANATASK_H
14 
15 // framework includes
16 #include "FairTask.h"
17 #include "FairHit.h"
18 #include "TH1.h"
19 #include "GFTrackCand.h"
20 
21 #include <vector>
22 #include <map>
23 
24 class TClonesArray;
25 class PndSdsCluster;
26 
27 class PndMvdEventAnaTask : public FairTask {
28  public:
31 
33  virtual ~PndMvdEventAnaTask();
34 
36  virtual void SetParContainers();
37  virtual InitStatus Init();
38 
40  virtual void Exec(Option_t *opt);
41 
42  virtual void Finish();
43 
44  void DrawTracksPerEvent(TString opt = "") { fHTracksPerEvent->DrawClone(opt); }
45  void DrawHitsPerTrack(TString opt = "") { fHHitsPerTrack->DrawClone(opt); }
46  void DrawEnergyPerHit(TString opt = "") { fHEnergyPerHit->DrawClone(opt); }
47 
48  void DrawPointRes(TString opt = "") { fHPointRes->DrawClone(opt); }
49  void DrawPointResS(TString opt = "") { fHPointResS->DrawClone(opt); }
50  void DrawPointResD(TString opt = "") { fHPointResD->DrawClone(opt); }
51  void DrawPointResM(TString opt = "") { fHPointResM->DrawClone(opt); }
52  void DrawEnergyRes(TString opt = "") { fHEnergyRes->DrawClone(opt); }
53  void DrawDigisPerCluster(TString opt = "") { fHDigisPerCluster->DrawClone(opt); }
54 
55  void DrawPointResStrip(TString opt = "") { fHPointResStrip->DrawClone(opt); }
56  void DrawEnergyResStrip(TString opt = "") { fHEnergyResStrip->DrawClone(opt); }
57  void DrawDigisPerClusterStrip(TString opt = "") { fHDigisPerClusterStrip->DrawClone(opt); }
58 
59  void DrawPtRes(TString opt = "") { fHPtRes->DrawClone(opt); }
60  void DrawPRes(TString opt = "") { fHPRes->DrawClone(opt); }
61 
62  void DrawRiemannRes(TString opt = "") { fHRiemannRes->DrawClone(opt); }
63  void DrawRiemannFakes(TString opt = "") { fHRiemannFakes->DrawClone(opt); }
64  void DrawRiemannTracksPerTrack(TString opt = "") { fHRiemannTracksPerTrack->DrawClone(opt); }
65  void DrawRiemannTracksPerTrackAdd(TString opt = "") { fHRiemannTracksPerTrackAdd->DrawClone(opt); }
66 
67  void DrawRiemannVertexResolutionX(TString opt = "") { fHRiemannVertexResolutionX->DrawClone(opt); }
68  void DrawRiemannVertexResolutionY(TString opt = "") { fHRiemannVertexResolutionY->DrawClone(opt); }
69  void DrawRiemannVertexResolutionZ(TString opt = "") { fHRiemannVertexResolutionZ->DrawClone(opt); }
70 
71  private:
72  TClonesArray *fMCTracks;
73  TClonesArray *fMCHits;
74  TClonesArray *fPixDigis;
75  TClonesArray *fStripDigis;
76  TClonesArray *fPixReco;
77  TClonesArray *fStripReco;
78  TClonesArray *fPixCluster;
79  TClonesArray *fStripCluster;
80  TClonesArray *fTrackCand;
81 
82  std::vector<int> fGhostCand;
83 
84  TH1 *fHTracksPerEvent;
85  TH1 *fHHitsPerTrack;
86  TH1 *fHEnergyPerHit;
87 
88  TH1 *fHPointRes;
89  TH1 *fHPointResS;
90  TH1 *fHPointResD;
91  TH1 *fHPointResM;
92  TH1 *fHDigisPerCluster;
93  TH1 *fHEnergyRes;
94  TH1 *fHPRes;
95  TH1 *fHPtRes;
96 
97  TH1 *fHPointResStrip;
98  TH1 *fHPointResSStrip;
99  TH1 *fHPointResDStrip;
100  TH1 *fHPointResMStrip;
101  TH1 *fHDigisPerClusterStrip;
102  TH1 *fHEnergyResStrip;
103 
104  TH1 *fHRiemannRes;
105  TH1 *fHRiemannFakes;
106  TH1 *fHRiemannTracksPerTrack;
107  TH1 *fHRiemannTracksPerTrackAdd;
108 
109  TH1 *fHRiemannVertexResolutionX;
110  TH1 *fHRiemannVertexResolutionY;
111  TH1 *fHRiemannVertexResolutionZ;
112 
113  bool fPrintTrack;
114  bool fPrintMCHit;
115  bool fPrintCluster;
116  bool fPrintPixDigis;
117  bool fPrintPixHit;
118  bool fPrintStripCluster;
119  bool fPrintStripDigis;
120  bool fPrintStripHit;
121  bool fPrintTrackMatch;
122  bool fPrintGhosts;
123 
124  int fNTracks;
125  int fNPossibleTracks;
126  int fNCompleteTracks;
127  int fNPartTracks;
128  int fNNotFoundPossibleTracks;
129  int fNNotFoundTracks;
130  int fNGhostTracks;
131 
132  int fEventNr;
133 
134  std::map<int, std::vector<int>> fTrackPixHitIdMap; // Track -> PixHitId
135  std::map<int, std::vector<int>> fTrackStripHitIdMap; // Track -> StripHitId
136 
137  bool MCHitBelongsToCluster(int HitIndex, PndSdsCluster *cluster, bool pixCluster);
138  void GetTrackCandsForMCTrack(std::vector<int> pixHitId, std::vector<int> stripHitId, std::vector<int> &matches, std::vector<int> &result);
139 
140  int GetRecoHit(int clIndex, bool pixel) const;
141  std::vector<int> GetClusters(int MCHit, bool pixel);
142 
143  void PrintClusterDigiInfo(int clIndex, std::vector<Int_t> digiInd, bool pixel);
144  void PrintRecoHitInfo(int hitInd, int digiSize, TVector3 MCPos, double MCEnergy, bool pixel) const;
145 
146  void PrintTrackCand(GFTrackCand *cand) const;
147  void Register();
148 
149  void Reset();
150 
151  void ProduceHits();
152 
153  FairHit *GetFairHit(Int_t detId, Int_t hitId);
154 
155  std::map<int, std::vector<int>> AssignHitsToTracks();
156 
157  ClassDef(PndMvdEventAnaTask, 1);
158 };
159 
160 #endif
void DrawPointRes(TString opt="")
void DrawRiemannTracksPerTrackAdd(TString opt="")
virtual InitStatus Init()
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
Definition: PndSdsCluster.h:18
void DrawPointResStrip(TString opt="")
virtual void Finish()
void DrawEnergyPerHit(TString opt="")
void DrawEnergyResStrip(TString opt="")
void DrawPRes(TString opt="")
void DrawTracksPerEvent(TString opt="")
void DrawDigisPerCluster(TString opt="")
void DrawRiemannRes(TString opt="")
void DrawPointResD(TString opt="")
Track candidate – a list of cluster indices.
Definition: GFTrackCand.h:55
void DrawPointResS(TString opt="")
void DrawEnergyRes(TString opt="")
void DrawRiemannFakes(TString opt="")
void DrawPointResM(TString opt="")
void DrawRiemannVertexResolutionX(TString opt="")
void DrawPtRes(TString opt="")
void DrawRiemannVertexResolutionY(TString opt="")
void DrawHitsPerTrack(TString opt="")
void DrawRiemannTracksPerTrack(TString opt="")
virtual ~PndMvdEventAnaTask()
void DrawDigisPerClusterStrip(TString opt="")
virtual void Exec(Option_t *opt)
void DrawRiemannVertexResolutionZ(TString opt="")
virtual void SetParContainers()