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

CamEvd.h

Go to the documentation of this file.
00001 #ifndef CamEvd_H
00002 #define CamEvd_H
00003 
00004 #include <vector>
00005 
00006 #include "RQ_OBJECT.h"
00007 #include "TQObject.h"
00008 
00009 #include "TMarker.h"
00010 #include "TCanvas.h"
00011 #include "TH2F.h"
00012 #include "TLine.h"
00013 #include "TPolyLine.h"
00014 
00015 #include "CamAna.h"
00016 
00017 class AtmosEvent;
00018 
00019 class TGTransientFrame;
00020 class TGCompositeFrame;
00021 class TGNumberEntry;
00022 class TGTextButton;
00023 class TGCheckButton;
00024 class TRootEmbeddedCanvas;
00025 class TGTab;
00026 class TGDoubleHSlider;
00027 class TGDoubleVSlider;
00028 
00029 class TChain;
00030 
00031 class CamEvd : public CamAna {
00032 RQ_OBJECT("CamEvd")
00033  public:
00034   CamEvd();
00035  ~CamEvd();
00036   bool FillEvent(const AtmosEvent* event);
00037 
00038   void MakeHistos();
00039   void MakeCanvases();
00040 
00041   void Reset();
00042 
00043   //Routines to set and get configurables
00044   void MakePS(bool Q); bool MakePS();
00045   void MakeEPS(bool Q); bool MakeEPS();
00046   void MakeGIF(bool Q); bool MakeGIF();
00047   void MakeROOT(bool Q); bool MakeROOT();
00048   void AutoPrint(bool Q); bool AutoPrint();
00049   void DoPrint();
00050 
00051   void DoShieldPlot(bool Q) {fDoShieldPlot=Q;}
00052   bool DoShieldPlot() {return fDoShieldPlot;}
00053   void FakeShieldData(bool Q) {fFakeShieldData=Q;}
00054   bool FakeShieldData() {return fFakeShieldData;}
00055   void DoShowerPlot(bool Q) {fDoShowerPlot=Q;}
00056   bool DoShowerPlot() {return fDoShowerPlot;}
00057 
00058   void MCTimeWin(double D); double MCTimeWin();
00059   void DoTimeCorr1(bool B); bool DoTimeCorr1();
00060   void DoTimeCorr2(bool B); bool DoTimeCorr2();
00061   void WlsFibreN(double D); double WlsFibreN();
00062   void ClearFibreN(double D); double ClearFibreN();
00063 
00064   void CloseWindow();
00065   void DoTab(int itab);
00066   void TabUp(bool up);
00067   void SetNumericOptions();
00068   void SetPlaneRangeUser(int MinPlane = 0, int MaxPlane = 0);
00069   void PlaneSlider();
00070   void SetUStripRangeUser(int MinStrip = -1, int MaxStrip = -1);
00071   void UStripSlider();
00072   void SetVStripRangeUser(int MinStrip = -1, int MaxStrip = -1);
00073   void VStripSlider();
00074   void SetTimeRangeUser(double MinT = -1.0, double MaxT = -1.0);
00075   void UnZoom();
00076 
00077   void AddFakeShieldData(const char* File);
00078 
00079 private:
00080   int fRun, fSubRun, fSnarl;
00081   bool fIsMC;
00082 
00083   //Configurables
00084   bool fMakePS;
00085   bool fMakeEPS;
00086   bool fMakeGIF;
00087   bool fMakeROOT;
00088   bool fAutoPrint;
00089 
00090   void SetStyle();
00091 
00092   void MakeXYHits(const AtmosEvent* event);
00093   void MakeUVHits(const AtmosEvent* event);
00094   void MakeChargePlot(const AtmosEvent* event);
00095   void MakeTimingPlot(const AtmosEvent* event);
00096   void MakeMCPlot(const AtmosEvent* event);
00097 
00098   //Optional routines
00099   bool fDoShieldPlot;
00100   void MakeShieldPlot(const AtmosEvent* event);
00101   bool fDoShowerPlot;
00102   void MakeShowerPlot(const AtmosEvent* event);
00103 
00104   //Canvases
00105   TGTab *cgTab;
00106   std::vector<TCanvas*> AllCanvases;//Store for printing, etc.
00107   TCanvas *fActiveCanvas;
00108   TCanvas* cMainView;
00109   TCanvas* cSideView;
00110   TCanvas* cShieldView;
00111   TCanvas* cShowerView;
00112   TCanvas* cLIView;
00113   TCanvas* cTimingView;
00114   TCanvas* cMCMainView;
00115   TCanvas* cMCSideView;
00116   bool fMakeMCTrkIdView;
00117   TCanvas* cMCTrkIdView;
00118 
00119   //Option input entries
00120   TGNumberEntry *cgMCTimeWin;
00121   double fMCTimeWin;
00122 
00123   TGNumberEntry *cgWlsFibreN, *cgClearFibreN;
00124   double fWlsFibreN, fClearFibreN;
00125 
00126   //Time Correction and result
00127   bool fDoTimeCorr1, fDoTimeCorr2;
00128   double fMeanDEHitDT, fRMSDEHitDT;
00129 
00130   //Axis Histograms, not filled
00131   TH2F* hUZStpPlnAxis;
00132   TH2F* hUZLinearAxis;
00133   TH2F* hVZStpPlnAxis;
00134   TH2F* hVZLinearAxis;
00135   TH2F* hXYAxis;
00136   TH2F* hMCTZAxis;
00137   TH2F* hTZAxis;
00138 
00139   //Plane charge deposition plots
00140   TH1F* hRawPlaneCharge;
00141   TH1F* hCorrPlaneCharge;
00142   TH1F* hMCPlaneDE;
00143   TH2F* hPulserLedCharge;
00144 
00145   //2D Shower Histograms for lego plots
00146   TH2F* hUZStpPlnShw;
00147   TH2F* hVZStpPlnShw;
00148 
00149   //1D Shower Profile Histograms
00150   TH1* hShwPlnProfile;
00151   TH1* hShwPlnCosZProfile;
00152 
00153   //Shield Timing histograms
00154   TH1F* hTrkVeto[4];
00155   TH1F* hShwVeto[4];
00156 
00157   //Faked shield hits for the MC inefficiency study
00158   TChain *FakeShieldDataChain;
00159   AtmosEvent *FakeAtmosEvent;
00160   bool fFakeShieldData;
00161 
00162   //Timing histograms
00163   TH1F* hTiming;
00164 
00165   //Some Min and Max values to be shared across many histos
00166   TGDoubleHSlider *cgPlaneRange;
00167   TGDoubleVSlider *cgUStripRange, *cgVStripRange;
00168   int fMinPlane, fMinUStrip, fMinVStrip;
00169   int fMaxPlane, fMaxUStrip, fMaxVStrip;
00170   double fMinZ, fMinU, fMinV;
00171   double fMaxZ, fMaxU, fMaxV;
00172   double fMinT, fMaxT;
00173 
00174   //Marker and Line vectors
00175   std::vector<TMarker> fUZStpPlnHits;
00176   std::vector<TMarker> fUZLinearHitsT;
00177   std::vector<TMarker> fUZLinearHitsL;
00178   std::vector<TLine> fUZStpPlnLines;
00179   std::vector<TLine> fUZLinearLinesT;
00180   std::vector<TLine> fUZLinearLinesL;
00181   std::vector<TMarker> fVZStpPlnHits;
00182   std::vector<TMarker> fVZLinearHitsT;
00183   std::vector<TMarker> fVZLinearHitsL;
00184   std::vector<TLine> fVZStpPlnLines;
00185   std::vector<TLine> fVZLinearLinesT;
00186   std::vector<TLine> fVZLinearLinesL;
00187   std::vector<TMarker> fTZHits;
00188 
00189   std::vector<TMarker> fXYHits;
00190   std::vector<TLine> fXYLines;
00191   std::vector<TMarker> fKeySpots;
00192 
00193   std::vector<TMarker> fColorScale;
00194 
00195   ClassDef(CamEvd,1)
00196 };
00197 
00198 inline void CamEvd::MakePS(bool Q) {fMakePS = Q;}
00199 inline bool CamEvd::MakePS() {return fMakePS;}
00200 inline void CamEvd::MakeEPS(bool Q) {fMakeEPS = Q;}
00201 inline bool CamEvd::MakeEPS() {return fMakeEPS;}
00202 inline void CamEvd::MakeGIF(bool Q) {fMakeGIF = Q;}
00203 inline bool CamEvd::MakeGIF() {return fMakeGIF;}
00204 inline void CamEvd::MakeROOT(bool Q) {fMakeROOT = Q;}
00205 inline bool CamEvd::MakeROOT() {return fMakeROOT;}
00206 inline void CamEvd::AutoPrint(bool Q) {fAutoPrint = Q;}
00207 inline bool CamEvd::AutoPrint() {return fAutoPrint;}
00208 
00209 inline void CamEvd::MCTimeWin(double D) {fMCTimeWin = D;}
00210 inline double CamEvd::MCTimeWin() {return fMCTimeWin;}
00211 inline void CamEvd::WlsFibreN(double D) {fWlsFibreN = D;}
00212 inline double CamEvd::WlsFibreN() {return fWlsFibreN;}
00213 inline void CamEvd::ClearFibreN(double D) {fClearFibreN = D;}
00214 inline double CamEvd::ClearFibreN() {return fClearFibreN;}
00215 
00216 inline void CamEvd::DoTimeCorr1(bool B) {fDoTimeCorr1 = B;}
00217 inline bool CamEvd::DoTimeCorr1() {return fDoTimeCorr1;}
00218 inline void CamEvd::DoTimeCorr2(bool B) {fDoTimeCorr2 = B;}
00219 inline bool CamEvd::DoTimeCorr2() {return fDoTimeCorr2;}
00220 
00221 #endif

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