#ifndef PNDMVDALLDATAEVENTANA_H #define PNDMVDALLDATAEVENTANA_H // // C++ Interface: PndMvdMCEventAna // // Description: // // // Author: t.stockmanns , (C) 2007 // // Copyright: See COPYING file that comes with this distribution // // #include "PndMvdEventAna.h" #include "PndSdsMCPoint.h" #include "PndSdsDigiPixel.h" #include "PndSdsHit.h" #include "PndSdsCluster.h" #include "PndSdsCalcFePixel.h" #include "PndEventDisplay.h" #include "TTree.h" #include "TCanvas.h" #include "TH1.h" #include "TH2.h" #include "TH3.h" #include "TFile.h" #include "TClonesArray.h" #include "TVector3.h" #include "TGeoNode.h" #include /** PndMvdAllDataEventAna.h * @author t.stockmanns * Analysis class which loads in a complete simulation chain */ class PndMvdAllDataEventAna : public PndMvdEventAna{ public: PndMvdAllDataEventAna(){}; PndMvdAllDataEventAna(TString fileName); virtual ~PndMvdAllDataEventAna(){}; virtual void Init(TString filename); virtual void InitBranch(); virtual void InitHistos(); virtual void AnaHits(); virtual void BeginOfEventAction(){ ClearAllVectors(); }; virtual void EndOfEventAction(){Create3DGeoHits();}; virtual void ClearHistos(); void PrintHitArray(); void PrintDigiArray(); void PrintClusterArray(); void PrintRecoArray(); void FillHitHistos(); void FillDigiHistos(); void FillClusterHistos(); void FillRecoHistos(); void FillHitPerClusterHistos(); void FillHitResolutionHistos(); void Fill3DHisto(); void FillHitProjHistos(); void DrawHitHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0); void DrawDigiHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0); void DrawClusterHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0); void DrawRecoHisto(TString detName, TCanvas* extCan = 0, Int_t pad = 0); void DrawAllHistos(TString detName, TCanvas* extCan = 0); void DrawAllHistos(Int_t i, TCanvas* extCan = 0); void Draw3D(TString opt = "", TCanvas* extCan = 0, Int_t pad = 0); void DrawAllTracks(TCanvas* extCan = 0, Int_t pad = 0); void DrawHitTracks(TCanvas* extCan = 0, Int_t pad = 0); void DrawEvent(bool tracks = false, TCanvas* extCan = 0); void DrawTopVolume(TCanvas* extCan = 0, Int_t pad = 0, const char* opt = ""); void DrawHisxy(TCanvas* extCan = 0, Int_t pad = 0); void DrawHisrz(TCanvas* extCan = 0, Int_t pad = 0); void DrawHistoVec(std::vector *vec, TCanvas* extCan = 0, Int_t pad = 0)const; void DrawHisto(TH1* histo, TCanvas* extCan = 0, Int_t pad = 0) const; void DrawHitPerCluster(TCanvas* extCan = 0, Int_t pad = 0){DrawHisto(fAllHitPerClusterHistos, extCan, pad);}; void DrawResolution(TCanvas* extCan = 0, Int_t pad = 0){DrawHisto(fAllHitResolutionHistos, extCan, pad);}; void Create3DGeoHits(); void ClearHistoMaps(std::map* myHistos) const; void ClearAllHMaps(); void ClearHistoVector(std::vector* myVectors) const; void ClearAllVectors(); TVector3 GetLocalHitPoints(TString detName, TVector3 input); std::vector GetHitPerCluster(PndSdsCluster* clusterCand); std::vector GetModulesHit(); TVector3 CalcMeanHitPos(std::vector points); protected: TClonesArray* fDigiArray; TClonesArray* fClusterArray; TClonesArray* fRecoArray; TClonesArray* fGeoTrackArray; TClonesArray* fTrackFArray; private: std::map fDigiHistos; std::map fClusterHistos; std::map fRecoHistos; std::map fHitPerClusterHistos; std::map fHitResolutionHistos; std::vector fHitHistoVec; std::vector fDigiHistoVec; std::vector fClusterHistoVec; std::vector fRecoHistoVec; TGeoVolume* fMvdTopVolume; TGeoVolume* fRecoTopVolume; TGeoVolume* fRecoVolume; TH1* fRecoErrorHisto; TH1* fAllHitPerClusterHistos; TH1* fAllHitResolutionHistos; TH3D* f3DMCHisto; TH3D* f3DRecoHisto; std::vector fSimHisxy; std::vector fSimHisrz; std::vector fRecoHisxy; std::vector fRecoHisrz; TCanvas *fCan1; TCanvas *fCan2; PndSdsCalcFePixel* fPixelCon; PndEventDisplay* fGeoList; ClassDef(PndMvdAllDataEventAna,1); }; #endif