Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 09:39:25

0001 #ifndef TILETREND_H
0002 #define TILETREND_H
0003 
0004 #include "TObject.h"
0005 #include "TString.h"
0006 #include "TH1D.h"
0007 #include "TH2D.h"
0008 #include "TProfile.h"
0009 #include "TGraphErrors.h"
0010 #include "TF1.h"
0011 #include "TPad.h" 
0012 #include "TCanvas.h"
0013 #include "TLegend.h"
0014 #include "TFile.h"
0015 #include "Calib.h"
0016 
0017 class TileTrend: public TObject{
0018 
0019  public:
0020  TileTrend():TObject(){}
0021  TileTrend(int id, int deb=0):TObject()
0022     {
0023     CellID         = id;
0024     debug          = deb;
0025     gTrendLGped    = TGraphErrors();
0026     gTrendHGped    = TGraphErrors();
0027     gTrendLGscale  = TGraphErrors();
0028     gTrendHGscale  = TGraphErrors();
0029     gTrendHGLGcorr = TGraphErrors();
0030     
0031     gTrendLGped    .SetName(Form("TrendLGpedCellID%d",CellID));
0032     gTrendHGped    .SetName(Form("TrendHGpedCellID%d",CellID));
0033     gTrendLGscale  .SetName(Form("TrendLGscaleCellID%d",CellID));
0034     gTrendHGscale  .SetName(Form("TrendHGscaleCellID%d",CellID));
0035     gTrendHGLGcorr .SetName(Form("TrendHGLGcorrCellID%d",CellID));
0036     
0037     gTrendLGped    .SetLineColor(kRed);
0038     gTrendHGped    .SetLineColor(kRed);
0039     gTrendLGscale  .SetLineColor(kRed);
0040     gTrendHGscale  .SetLineColor(kRed);
0041     gTrendHGLGcorr .SetLineColor(kRed);
0042     
0043     gTrendLGped    .SetMarkerColor(kRed);
0044     gTrendHGped    .SetMarkerColor(kRed);
0045     gTrendLGscale  .SetMarkerColor(kRed);
0046     gTrendHGscale  .SetMarkerColor(kRed);
0047     gTrendHGLGcorr .SetMarkerColor(kRed);
0048     
0049     gTrendLGped    .SetMarkerStyle(kFullCircle);
0050     gTrendHGped    .SetMarkerStyle(kFullCircle);
0051     gTrendLGscale  .SetMarkerStyle(kFullCircle);
0052     gTrendHGscale  .SetMarkerStyle(kFullCircle);
0053     gTrendHGLGcorr .SetMarkerStyle(kFullCircle);
0054 
0055     //gTrendLGped    .SetDirectory(0);
0056     //gTrendHGped    .SetDirectory(0);
0057     //gTrendLGscale  .SetDirectory(0);
0058     //gTrendHGscale  .SetDirectory(0);
0059     //gTrendHGLGcorr .SetDirectory(0);
0060     }
0061   ~TileTrend(){}
0062 
0063   bool Fill(double, const TileCalib&);
0064   bool DrawLGped(TString);
0065   bool DrawHGped(TString);
0066   bool DrawLGscale(TString);
0067   bool DrawHGscale(TString);
0068   bool DrawHGLGcorr(TString);
0069   bool SetLineColor(uint);
0070   bool SetMarkerColor(uint);
0071   bool SetMarkerStyle(uint);
0072   bool Write(TFile*);
0073 
0074   inline double GetMinLGped()   {return MinLGped;};
0075   inline double GetMaxLGped()   {return MaxLGped;};
0076   inline double GetMinHGped()   {return MinHGped;};
0077   inline double GetMaxHGped()   {return MaxHGped;};
0078   inline double GetMinLGscale() {return MinLGscale;};
0079   inline double GetMaxLGscale() {return MaxLGscale;};
0080   inline double GetMinHGscale() {return MinHGscale;};
0081   inline double GetMaxHGscale() {return MaxHGscale;};
0082   inline double GetMinHGHGcorr(){return MinHGLGcorr;};
0083   inline double GetMaxHGHGcorr(){return MaxHGLGcorr;};
0084   
0085  protected:
0086   int CellID;
0087   int debug;
0088   TGraphErrors gTrendLGped    ;
0089   TGraphErrors gTrendHGped    ;
0090   TGraphErrors gTrendLGscale  ;
0091   TGraphErrors gTrendHGscale  ;
0092   TGraphErrors gTrendHGLGcorr ;
0093 
0094   double MaxLGped    =0.;
0095   double MaxHGped    =0.;
0096   double MaxLGscale  =0.;
0097   double MaxHGscale  =0.;
0098   double MaxHGLGcorr =0.;
0099   
0100   double MinLGped    =9999.;
0101   double MinHGped    =9999.;
0102   double MinLGscale  =9999.;
0103   double MinHGscale  =9999.;
0104   double MinHGLGcorr =9999.;
0105 
0106   ClassDef(TileTrend,1);
0107 };
0108 
0109 #endif