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