// $Id: ETreePainter.hh,v 1.1 2005/03/22 15:40:54 stutz Exp $ // Author: Anne Stutz 2005/03/03 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: ETreePainter * * Package: * * Coordinator: * * * *****************************************************************************/ #ifndef __ETREEPAINTER_HH__ #define __ETREEPAINTER_HH__ //#include "euso.hh" #include #include class TGeoManager; class TGeoVolume; class TGeoMedium; class TTree; class EAtmosphere; class ETruth; class EShower; class EAtmosphereHistoPainter; class EEvent; class TH1F; //////////////////////////////////////////////////////////////////////////////// // // ETreePainter // // // * This class is responsible for reading events from the euso simulation tree // * and doing its graphycal representation. // * It can draw the EUSO Field of View, displays 3D tracks, // * draw histos from Truth with Energy,Theta, Phi, X1 // * draw histograms for photons in atmosphere // * draw histograms for photons on pupil // * fill a simple tree with fundamental parameters //////////////////////////////////////////////////////////////////////////////// class ETreePainter : public TObject { public: ETreePainter( TTree* ); virtual ~ETreePainter(); void Build(); TH1F* BuildHistos(const char *name, const char *title); // Build histogramms TTree* BuildTree(); // Build a tree void BuildWorld(); // Build the geometry inline Bool_t IsWorldBuilt() {return fWorldBuild;} // Checks if the geometry is built void AddShower(EShower*); // Adds new shower read from the file void FillAtmoHistos(EAtmosphereHistoPainter *); // Fills the histogramms for atmosphere void FillTruthHistos( ETruth *); // Fills the histograms for truth void FillTree(); // Fills the simple tree void DrawHistos(Option_t *); // Draw the histogramms virtual void Draw( Option_t * =""); private: TTree *fTree; // Pointer for the euso tree to read from EEvent *fEv; // Current Euso Event Int_t fEvTot; // Total number of events in the fTree TSeqCollection *fHistos; // Collection of histogramms representing the events Bool_t fWorldBuild; // true if the geometry is build, false othewise TGeoVolume *fTop; // TOP Volume of the global geometry TGeoVolume *fFoVVolume; // Geometry realization of the Field of View of EUSO TGeoMedium *fVacuum; // Geometry Medium Int_t fCurrentTrack; // index of the current track read from fTree typedef struct { // Truth Float_t fEnergy; Float_t fTheta; Float_t fPhi; Float_t fZ1; Float_t fZmax; Float_t fX1; Float_t fXmax; // Photons at creation Float_t fNph_f; Float_t fNph_c; Float_t fNmax_f; Float_t fNmax_c; Float_t fZmax_f; Float_t fZmax_c; // Photons on pupil Float_t fNph_f_p; Float_t fNph_cb_p; Float_t fNph_cr_p; Float_t fTmax_f_p; Float_t fNmax_f_p; Float_t fSig_f_p; } Track; Track fTrack; ClassDef(ETreePainter,0) }; #endif /* __ETREEPAINTER_HH__ */