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

MadEvDisplay.h

Go to the documentation of this file.
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];  //hold run and snarl info for print filename
00014   char printOpt[10];     //to hold extension for filename
00015 
00016   Float_t Dspe_val;
00017   Float_t Dmid_val;
00018 
00019   Bool_t ptt_msg;  //messages on/off
00020 
00021   Int_t *Dec2Bin(Int_t); // method for decoding hitbits variable in flsdgt
00022   void   DrawKey(TVirtualPad *); // draw key for Event Display
00023   void   DrawKey2(TVirtualPad *); // draw key for Event Display
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(); //find next event passing cuts
00032   Int_t  PrevPass(); //find previous event passing cuts
00033   Int_t  SkipTo(); //Skip to... method for event display
00034   Int_t  JumpTo(); //Jump to... method for event display
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); //Draw Event Display
00037   void   SetDVals(Float_t,Float_t); //Set charge limits for Display
00038   void   PrintDisplay(); //Print Event Display canvases
00039   void   SetPrintOpt(char *opt); //Set print opt e.g. gif, ps, eps
00040   void   SetMessages(Bool_t yesno=true) {ptt_msg=yesno;} //print extra info?
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   //For Event Display method:
00051   Int_t LeNu;              // 14 => numu,numubar; 12 => nue,nuebar
00052   Int_t LeAction;          // 0 => NC; 1 => CC
00053   Bool_t LeLego;           // Draw lego plots by default
00054   Bool_t LeClus;           // Draw cluster plots by default
00055   Int_t LeEvent;           // current event (within snarl)
00056   Int_t LeSlice;           // current slice (within snarl)
00057   Int_t LeMCevent;         // current MC event (within snarl)
00058   Int_t LeEntry;           // current entry in tree (=> current snarl)
00059   Bool_t UseNuInfo;        // use or ignore neutrino info for pass events
00060   Bool_t LeAutoMat;        // automatic or manual event/slice/truth matching
00061   Bool_t drawSAME;         // overlay next event/slice/etc.
00062 
00063   //For hand scanning functionality
00064   Bool_t handScan;         // will this be a hand scanning session? 
00065   Int_t ScanID;            // hand scan ID (0-6): N/A,mu,e,NC,mu/NC?,e/NC?,???
00066   Int_t ScanTop;           // hand scan topology ID(0-4): N/A,QE,RES,DIS,???
00067   char logFileName[256];   // txt filename to log scanner decisions
00068 
00069   void StartLogger();               // sets up the buttons
00070   void Log();                       // performs write operation to txtfile
00071   void EnableHandScan(char *); //switches on hand scan + sets txt file name
00072   void ChangeLogButColor(); // fill button colours for hand scan controls
00073   void PrintHSHelp();
00074   void SetDefaultShowerMarkerColor(Int_t col) {fDefaultShowerMarkerColor=col;}
00075   void SetDefaultShowerMarkerStyle(Int_t style) {fDefaultShowerMarkerStyle=style;}
00076 
00077   // read a file of interesting run,snarl,events
00078   bool ReadEventsFile(const char* filename);
00079   Int_t NextInterestingEvent(bool backward=false);
00080  private:
00081   // some interesting events
00082   std::vector< std::vector<Int_t> > fNeatoEvents;
00083   bool fHaveNeatoEvents; // did we read the file 
00084   Int_t fNeatoEventIdx; // index of current event in fNeatoEvents
00085   Int_t fDefaultShowerMarkerColor;
00086   Int_t fDefaultShowerMarkerStyle;
00087 };
00088 
00089 #endif // #ifdef madevdisplay_h

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