Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MadScanDisplay.h

Go to the documentation of this file.
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];  //hold run and snarl info for print filename
00016   char printOpt[10];     //to hold extension for filename
00017 
00018   Float_t Dspe_val;
00019   Float_t Dmid_val;
00020 
00021   Bool_t ptt_msg;  //messages on/off
00022 
00023   Int_t *Dec2Bin(Int_t); // method for decoding hitbits variable in flsdgt
00024   void   DrawKey(TVirtualPad *); // draw key for Event Display
00025   void   DrawKey2(TVirtualPad *); // draw key for Event Display
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(); //find next reco event
00035   Int_t   PrevEvt(); //find previous reco event
00036   Int_t   NextPass(); //find next event passing cuts
00037   Int_t   PrevPass(); //find previous event passing cuts
00038   Int_t   NextFidNoTrk(); //find next event passing cuts
00039   Int_t   PrevFidNoTrk(); //find previous event passing cuts
00040   Bool_t  InFidNoTrk(int e);
00041   Int_t   NextFidTrk(); //find next event passing cuts
00042   Int_t   PrevFidTrk(); //find previous event passing cuts
00043   Bool_t  InFidTrk(int e);
00044   Int_t   SkipTo(); //Skip to... method for event display
00045   Int_t   JumpTo(); //Jump to... method for event display
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); //Draw Event Display
00048   void    SetDVals(Float_t,Float_t); //Set charge limits for Display
00049   void    PrintDisplay(); //Print Event Display canvases
00050   void    SetPrintOpt(char *opt); //Set print opt e.g. gif, ps, eps
00051   void    SetMessages(Bool_t yesno=true) {ptt_msg=yesno;} //print extra info?
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   //For Event Display method:
00064   Int_t  LeNu;              // 14 => numu,numubar; 12 => nue,nuebar
00065   Int_t  LeAction;          // 0 => NC; 1 => CC
00066   Bool_t LeLego;           // Draw lego plots by default
00067   Bool_t LeClus;           // Draw cluster plots by default
00068   Int_t  LeEvent;           // current event (within snarl)
00069   Int_t  LeSlice;           // current slice (within snarl)
00070   Int_t  LeMCevent;         // current MC event (within snarl)
00071   Int_t  LeEntry;           // current entry in tree (=> current snarl)
00072   Bool_t UseNuInfo;        // use or ignore neutrino info for pass events
00073   Bool_t LeAutoMat;        // automatic or manual event/slice/truth matching
00074   Bool_t drawSAME;         // overlay next event/slice/etc.
00075   ScanFrame * SFrame;
00076   //For hand scanning functionality
00077   Bool_t handScan;         // will this be a hand scanning session? 
00078   Int_t  ScanID;            // hand scan ID (0-6): N/A,mu,e,NC,mu/NC?,e/NC?,???
00079   Int_t  ScanTop;           // hand scan topology ID(0-4): N/A,QE,RES,DIS,???
00080   char   logFileName[256];   // txt filename to log scanner decisions
00081   bool   fAltDisplay;
00082 
00083   void  HandleZoomEvent();                 // handles box-based zoom
00084   void  MakeGraphNonEditable(TObject *);   // make a T(Multi)Graph non-editable
00085   void  MakeGraphListNonEditable(TList *); // make any TGraphs in list non-editable
00086 
00087   void  StartLogger();               // sets up the buttons
00088   void  Log();                       // performs write operation to txtfile
00089   void  EnableHandScan(char *); //switches on hand scan + sets txt file name
00090   void  ChangeLogButColor(); // fill button colours for hand scan controls
00091   void  PrintHSHelp();
00092   void  SetDefaultShowerMarkerColor(Int_t col) {fDefaultShowerMarkerColor=col;}
00093   void  SetDefaultShowerMarkerStyle(Int_t style) {fDefaultShowerMarkerStyle=style;}
00094   void  FindUnSliced();
00095   // read a file of interesting run,snarl,events
00096   bool  ReadEventsFile(const char* filename);
00097   Int_t NextInterestingEvent(bool backward=false);
00098  private:
00099   // some interesting events
00100   std::vector< std::vector<Int_t> > fNeatoEvents;
00101   bool  fHaveNeatoEvents; // did we read the file 
00102   Int_t fNeatoEventIdx; // index of current event in fNeatoEvents
00103   Int_t fDefaultShowerMarkerColor;
00104   Int_t fDefaultShowerMarkerStyle;
00105   bool  fSetFidSet;
00106 };
00107 #endif // #ifdef madscandisplay_h

Generated on Mon Feb 15 11:06:56 2010 for loon by  doxygen 1.3.9.1