FairRoot/PandaRoot
PndMvdAllDataEventAna.h
Go to the documentation of this file.
1 #ifndef PNDMVDALLDATAEVENTANA_H
2 #define PNDMVDALLDATAEVENTANA_H
3 
4 //
5 // C++ Interface: PndMvdMCEventAna
6 //
7 // Description:
8 //
9 //
10 // Author: t.stockmanns <stockman@ikp455>, (C) 2007
11 //
12 // Copyright: See COPYING file that comes with this distribution
13 //
14 //
15 
16 #include "PndMvdEventAna.h"
17 #include "PndSdsMCPoint.h"
18 #include "PndSdsDigiPixel.h"
19 #include "PndSdsHit.h"
20 #include "PndSdsCluster.h"
21 #include "PndSdsCalcFePixel.h"
22 #include "PndEventDisplay.h"
23 #include "TTree.h"
24 #include "TCanvas.h"
25 #include "TH1.h"
26 #include "TH2.h"
27 #include "TH3.h"
28 #include "TFile.h"
29 #include "TClonesArray.h"
30 #include "TVector3.h"
31 #include "TGeoNode.h"
32 
33 #include <vector>
34 
40 public:
44 
45  virtual void Init(TString filename);
46  virtual void InitBranch();
47  virtual void InitHistos();
48  virtual void AnaHits();
49  virtual void BeginOfEventAction(){
51  };
52  virtual void EndOfEventAction(){Create3DGeoHits();};
53  virtual void ClearHistos();
54 
55  void PrintHitArray();
56  void PrintDigiArray();
57  void PrintClusterArray();
58  void PrintRecoArray();
59 
60  void FillHitHistos();
61  void FillDigiHistos();
62  void FillClusterHistos();
63  void FillRecoHistos();
66  void Fill3DHisto();
67  void FillHitProjHistos();
68 
69  void DrawHitHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0);
70  void DrawDigiHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0);
71  void DrawClusterHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0);
72  void DrawRecoHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0);
73  void DrawAllHistos(TString detName, TCanvas* extCan = 0);
74  void DrawAllHistos(Int_t i, TCanvas* extCan = 0);
75  void Draw3D(TString opt = "", TCanvas* extCan = 0, Int_t pad = 0);
76  void DrawAllTracks(TCanvas* extCan = 0, Int_t pad = 0);
77  void DrawHitTracks(TCanvas* extCan = 0, Int_t pad = 0);
78  void DrawEvent(bool tracks = false, TCanvas* extCan = 0);
79  void DrawTopVolume(TCanvas* extCan = 0, Int_t pad = 0, const char* opt = "");
80  void DrawHisxy(TCanvas* extCan = 0, Int_t pad = 0);
81  void DrawHisrz(TCanvas* extCan = 0, Int_t pad = 0);
82  void DrawHistoVec(std::vector<TH1*> *vec, TCanvas* extCan = 0, Int_t pad = 0)const;
83  void DrawHisto(TH1* histo, TCanvas* extCan = 0, Int_t pad = 0) const;
84  void DrawHitPerCluster(TCanvas* extCan = 0, Int_t pad = 0){DrawHisto(fAllHitPerClusterHistos, extCan, pad);};
85  void DrawResolution(TCanvas* extCan = 0, Int_t pad = 0){DrawHisto(fAllHitResolutionHistos, extCan, pad);};
86 
87 
88 
89  void Create3DGeoHits();
90 
91 
92  void ClearHistoMaps(std::map<TString, TH1*>* myHistos) const;
93  void ClearAllHMaps();
94  void ClearHistoVector(std::vector<TH1*>* myVectors) const;
95  void ClearAllVectors();
96 
97  TVector3 GetLocalHitPoints(TString detName, TVector3 input);
98  std::vector<Int_t> GetHitPerCluster(PndSdsCluster* clusterCand);
99  std::vector<TString> GetModulesHit();
100  TVector3 CalcMeanHitPos(std::vector<Int_t> points);
101 
102 protected:
103  TClonesArray* fDigiArray;
104  TClonesArray* fClusterArray;
105  TClonesArray* fRecoArray;
106  TClonesArray* fGeoTrackArray;
107  TClonesArray* fTrackFArray;
108 private:
109  std::map<TString, TH1*> fDigiHistos;
110  std::map<TString, TH1*> fClusterHistos;
111  std::map<TString, TH1*> fRecoHistos;
112  std::map<TString, TH1*> fHitPerClusterHistos;
113  std::map<TString, TH1*> fHitResolutionHistos;
114 
115  std::vector<TH1*> fHitHistoVec;
116  std::vector<TH1*> fDigiHistoVec;
117  std::vector<TH1*> fClusterHistoVec;
118  std::vector<TH1*> fRecoHistoVec;
119 
120  TGeoVolume* fMvdTopVolume;
121  TGeoVolume* fRecoTopVolume;
122  TGeoVolume* fRecoVolume;
123 
127  TH3D* f3DMCHisto;
129  std::vector<TH1*> fSimHisxy;
130  std::vector<TH1*> fSimHisrz;
131  std::vector<TH1*> fRecoHisxy;
132  std::vector<TH1*> fRecoHisrz;
133 
134  TCanvas *fCan1;
135  TCanvas *fCan2;
136 
139 
141 
142 };
143 
144 #endif
void DrawRecoHisto(TString detName, TCanvas *extCan=0, Int_t pad=0)
std::vector< Int_t > GetHitPerCluster(PndSdsCluster *clusterCand)
std::map< TString, TH1 * > fRecoHistos
TVector3 CalcMeanHitPos(std::vector< Int_t > points)
std::vector< TH1 * > fDigiHistoVec
void DrawHisxy(TCanvas *extCan=0, Int_t pad=0)
ClassDef(PndMvdAllDataEventAna, 1)
PndSdsCalcFePixel * fPixelCon
std::vector< TString > GetModulesHit()
Int_t i
Definition: run_full.C:25
void DrawHitPerCluster(TCanvas *extCan=0, Int_t pad=0)
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
Definition: PndSdsCluster.h:19
void DrawHitHisto(TString detName, TCanvas *extCan=0, Int_t pad=0)
void DrawDigiHisto(TString detName, TCanvas *extCan=0, Int_t pad=0)
display of hits inside the gGeoManager
virtual void Init(TString filename)
std::map< TString, TH1 * > fClusterHistos
void Draw3D(TString opt="", TCanvas *extCan=0, Int_t pad=0)
std::vector< TH1 * > fSimHisxy
TVector3 GetLocalHitPoints(TString detName, TVector3 input)
void DrawHitTracks(TCanvas *extCan=0, Int_t pad=0)
std::map< TString, TH1 * > fHitPerClusterHistos
void DrawHistoVec(std::vector< TH1 * > *vec, TCanvas *extCan=0, Int_t pad=0) const
void DrawClusterHisto(TString detName, TCanvas *extCan=0, Int_t pad=0)
void DrawAllHistos(TString detName, TCanvas *extCan=0)
void ClearHistoVector(std::vector< TH1 * > *myVectors) const
std::vector< TH1 * > fClusterHistoVec
std::vector< TH1 * > fRecoHistoVec
void DrawAllTracks(TCanvas *extCan=0, Int_t pad=0)
std::vector< TH1 * > fRecoHisrz
std::vector< TH1 * > fRecoHisxy
void DrawHisto(TH1 *histo, TCanvas *extCan=0, Int_t pad=0) const
void DrawEvent(bool tracks=false, TCanvas *extCan=0)
void DrawTopVolume(TCanvas *extCan=0, Int_t pad=0, const char *opt="")
std::map< TString, TH1 * > fHitResolutionHistos
std::map< TString, TH1 * > fDigiHistos
void DrawHisrz(TCanvas *extCan=0, Int_t pad=0)
std::vector< TH1 * > fSimHisrz
void DrawResolution(TCanvas *extCan=0, Int_t pad=0)
Class to calculate the position of digis on a front-end from the digis on a sensor.
dble_vec_t vec[12]
Definition: ranlxd.cxx:380
std::vector< TH1 * > fHitHistoVec
void ClearHistoMaps(std::map< TString, TH1 * > *myHistos) const
virtual void BeginOfEventAction()
const string filename