source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/reconstruction/recoviewer/include/RecoTreePainter.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 4.0 KB
Line 
1// $Id: RecoTreePainter.hh 2703 2006-06-01 09:42:14Z pesce $
2// Author: Dmitry.Naumov   2006/02/03
3
4/*****************************************************************************
5 * ESAF: Euso Simulation and Analysis Framework                              *
6 *                                                                           *
7 *  Id: RecoTreePainter                                                      *
8 *  Package: <packagename>                                                   *
9 *  Coordinator: <coordinator>                                               *
10 *                                                                           *
11 *****************************************************************************/
12
13#ifndef __RECOTREEPAINTER_HH__
14#define __RECOTREEPAINTER_HH__
15
16#include "EsafMsgSource.hh"
17
18#include <TObject.h>
19#include <TCut.h>
20#include <TString.h>
21#include <TSystem.h>
22#include <Riostream.h>
23#include <map>
24
25using std::map;
26class TTree;
27class RecoRootEvent;
28class TH1;
29class TList;
30class TF1;
31class TCanvas;
32class TEventList;
33class EGViewer;
34////////////////////////////////////////////////////////////////////////////////
35//                                                                            //
36//  RecoTreePainter                                                           //
37//                                                                            // 
38// <brief class description>                                                  // 
39//                                                                            // 
40////////////////////////////////////////////////////////////////////////////////
41
42class RecoTreePainter : public TObject, public EsafMsgSource {
43public:
44    RecoTreePainter(TTree*);
45    virtual ~RecoTreePainter();
46    void   Loop();
47    void   DrawAll();
48    //void   DrawDirection();
49    void   DrawTheta();
50    void   DrawPhi();
51    void   DrawEnergy();
52    void   SaveAsPs( Option_t* ="A", const char* prefix = "");
53    TH1*   GetHisto(const char *name, const char *title, Option_t *opt, Int_t, Float_t, Float_t, Int_t, Float_t, Float_t);
54    void   SetFileName(TString f)           { fFilename = f; }
55    inline void SetEnergyIndependentFromDir(Bool_t b=kTRUE) { fEnergyIndependentFromDir = b;}
56    inline void SetUseAA1(Bool_t b=kTRUE) { fUseAA1 = b; }
57    inline void   SaveEpsFiles(TString t);
58
59    const char* GetCut() const { return fCut.GetTitle(); }
60    void SetCut( const char* cut ) { fCut = cut; }
61    void SetCut( const TCut& cut ) { fCut = cut; } 
62    Long64_t UpdateEventList();
63    Long64_t UpdateEventList( const char* selection );
64    Long64_t GetEntry( Int_t i=0 );
65    TTree* GetTree() { return fTree; }
66private:
67    void   FillHistos();
68    void   SaveHistos();
69    void   FillSimHistos();
70    void   FillThetaHistos();
71    void   FillPhiHistos();
72    void   FillDirectionHistos();
73    void   FillEnergyHistos();
74    void   FillAngularResolutions();
75    void   MakeBaseDataMap();
76    Bool_t AcceptDirection();
77    Bool_t AcceptEnergy();
78
79    // if true, in the energy plots accept also
80    // the events rejected from the direction module
81    Bool_t fEnergyIndependentFromDir;
82   
83    TTree              *fTree;
84    RecoRootEvent       *fEvent;
85    TEventList          *fEventList;
86    TCut                 fCut;
87    Int_t                fNevents;
88    TList               *fHistoList;
89    EGViewer            *fEnergyViewer;
90    EGViewer            *fThetaViewer;
91    EGViewer            *fPhiViewer;
92    map <string,Float_t> fRec;
93    map <string,Float_t> fSim;
94    map <string,Float_t> left_edge;
95    map <string,Float_t> right_edge;
96    map <string,Bool_t>  fCuts;
97    map <string,Bool_t>  fEnergyCuts;
98    TString              fFilename;
99    Bool_t               fSaveEpsFiles;
100    Bool_t               fUseAA1; // use the AA1 method track direction data
101    TString              fEpsDir;
102
103    ClassDef(RecoTreePainter,0)
104};
105inline void RecoTreePainter::SaveEpsFiles(TString t) {
106    //
107    //
108    //
109    fSaveEpsFiles = kTRUE;
110    fEpsDir = t;
111    gSystem->mkdir(t,kTRUE);
112}
113
114#endif  /* __RECOTREEPAINTER_HH__ */
115
Note: See TracBrowser for help on using the repository browser.