00001 #ifndef madevdisplay_h
00002 #define madevdisplay_h
00003 #include "TROOT.h"
00004 #include "TChain.h"
00005 #include "TVirtualPad.h"
00006 #include "Mad/MadBase.h"
00007
00008 class MadEvDisplay : public MadBase
00009 {
00010
00011 protected :
00012
00013 char printName[100];
00014 char printOpt[10];
00015
00016 Float_t Dspe_val;
00017 Float_t Dmid_val;
00018
00019 Bool_t ptt_msg;
00020
00021 Int_t *Dec2Bin(Int_t);
00022 void DrawKey(TVirtualPad *);
00023 void DrawKey2(TVirtualPad *);
00024
00025 public:
00026
00027 MadEvDisplay(TChain *chainSR=0,TChain *chainMC=0,
00028 TChain *chainTH=0,TChain *chainem=0);
00029 MadEvDisplay(JobC *,string,int);
00030 virtual ~MadEvDisplay();
00031 Int_t NextPass();
00032 Int_t PrevPass();
00033 Int_t SkipTo();
00034 Int_t JumpTo();
00035 Bool_t Display(Int_t entry=0, Int_t theSlice=0, Int_t theEvent=0,
00036 Int_t theMCevent=0, Bool_t automat=true);
00037 void SetDVals(Float_t,Float_t);
00038 void PrintDisplay();
00039 void SetPrintOpt(char *opt);
00040 void SetMessages(Bool_t yesno=true) {ptt_msg=yesno;}
00041 virtual Bool_t PassCuts();
00042 void DrawButtons(TCanvas*);
00043 void DrawTextBox(TCanvas*,Bool_t);
00044 void DrawInteractionDiagram(Int_t itr=0);
00045 void EventDump();
00046 Float_t RecoMKMuEnergy(Int_t& opt, Int_t itrk, bool isdata=true);
00047 Float_t RecoMuDCosNeuND(Int_t itr=0, Float_t* vtx=0);
00048 Float_t RecoMuDCosNeuFD(Int_t itr=0, Float_t* vtx=0);
00049
00050
00051 Int_t LeNu;
00052 Int_t LeAction;
00053 Bool_t LeLego;
00054 Bool_t LeClus;
00055 Int_t LeEvent;
00056 Int_t LeSlice;
00057 Int_t LeMCevent;
00058 Int_t LeEntry;
00059 Bool_t UseNuInfo;
00060 Bool_t LeAutoMat;
00061 Bool_t drawSAME;
00062
00063
00064 Bool_t handScan;
00065 Int_t ScanID;
00066 Int_t ScanTop;
00067 char logFileName[256];
00068
00069 void StartLogger();
00070 void Log();
00071 void EnableHandScan(char *);
00072 void ChangeLogButColor();
00073 void PrintHSHelp();
00074 void SetDefaultShowerMarkerColor(Int_t col) {fDefaultShowerMarkerColor=col;}
00075 void SetDefaultShowerMarkerStyle(Int_t style) {fDefaultShowerMarkerStyle=style;}
00076
00077
00078 bool ReadEventsFile(const char* filename);
00079 Int_t NextInterestingEvent(bool backward=false);
00080 private:
00081
00082 std::vector< std::vector<Int_t> > fNeatoEvents;
00083 bool fHaveNeatoEvents;
00084 Int_t fNeatoEventIdx;
00085 Int_t fDefaultShowerMarkerColor;
00086 Int_t fDefaultShowerMarkerStyle;
00087 };
00088
00089 #endif // #ifdef madevdisplay_h