LightYield.hh

Go to the documentation of this file.
00001 
00007 #ifndef LIGHT_YIELD_h
00008 #define LIGHT_YIELD_h
00009 
00010 #include "Rtypes.h"
00011 #include <map>
00012 #include <vector>
00013 #include "TH1.h"
00014 class TGraphErrors;
00015 class TTree;
00016 
00018 
00025 class LightYieldGraph{
00026   //these stick around
00027   std::vector<double> _x, _y, _ex, _ey; 
00028   std::map<int, std::vector<double> > _chan_spe; 
00029   std::map<int, std::vector<double> > _chan_spe_err; 
00030   TH1* histo; 
00031 public:
00033   LightYieldGraph() : histo(0) {} 
00034   virtual ~LightYieldGraph(){ if(histo) delete histo; }
00036   int AddRun(int run, double epeak, int nbins=200, 
00037              double emin=1000, double emax=2500);
00039   int AddRuns(const std::vector<int>& runs, double epeak, int nbins=200, 
00040               double emin=1000, double emax=2500);
00041 
00043   int AddFile(const char* filename, double epeak, int nbins=200, 
00044              double emin=1000, double emax=2500);
00046   int SetAliasesFromLocalData(TTree* Events, bool draw = false);
00047   
00049   TH1* DrawSpectrum(const char* filename, int nbins = 200, double xmin=0, 
00050                     double xmax = 4500);
00052   TGraphErrors* DrawGraph();
00053   
00055   TGraphErrors* DrawChannelSpeGraph(int channel);
00056   
00058   static int FitPhotopeak(TH1* h, double epeak, 
00059                           double& yield, double& yield_err);
00060 
00061   ClassDef(LightYieldGraph,1);
00062 };
00063 
00070 TGraphErrors* PlotNa22LightYield();
00071 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1