00001
00002 #include "TFile.h"
00003
00004 #include "TCanvas.h"
00005
00006
00007
00008
00009
00010
00011 #include "TArrow.h"
00012 #include "TPaveText.h"
00013 #include "TFrame.h"
00014 #include "TH1F.h"
00015
00016
00017 #include "TLegend.h"
00018 #include "TH1F.h"
00019 #include "TH2F.h"
00020 #include "TProfile.h"
00021 #include "TTree.h"
00022 #include "TCut.h"
00023
00024 class comparisonPlots
00025 {
00026
00027 public:
00028 comparisonPlots(std::string filename, std::string outputDir, std::string outputFilename = "OUTPUT_comparison.root");
00029
00030 void readTree();
00031 void plot3x5(TCut Cut, char* dirName, bool savePlot = false, std::string plotName = "plot3x5.eps", bool autolimits = false,int ColorCode = 1);
00032 void plot3x5Profile(TCut Cut, char* dirName, int nBins, bool savePlot = false, std::string plotName = "plot3x5Profile.eps", bool autolimits = false,int ColorCode = 1);
00033
00034 void plotTwist(TCut Cut, char* dirName, bool savePlot = false, std::string plotName = "plot3x5.eps", bool autolimits = false,int ColorCode = 1);
00035
00036 float arrowSize;
00037 void Write();
00038 TFile* fin;
00039 TFile* output;
00040 TTree* data;
00041
00042
00043
00044 private:
00045
00046 void getMaxMin();
00047 void getHistMaxMin( TH1* hist, double &max, double &min, int flag );
00048
00049 std::string _outputDir;
00050
00051
00052 int id_, level_, sublevel_, mid_, mlevel_, useDetId_, detDim_;
00053 float x_, y_, z_, r_, phi_, alpha_, beta_, gamma_,eta_;
00054 float dx_, dy_, dz_, dr_, dphi_, dalpha_, dbeta_, dgamma_;
00055
00056 float maxR, minR;
00057 float maxZ, minZ;
00058 float maxPhi, minPhi;
00059 float maxDR, minDR;
00060 float maxDZ, minDZ;
00061 float maxRDPhi, minRDPhi;
00062 float maxDX, minDX;
00063 float maxDY, minDY;
00064
00065
00066 };