#include #include #include "TClass.h" #include "TApplication.h" #include "TGClient.h" #include "TROOT.h" #include "TH1.h" #include "TStyle.h" #include "TClass.h" #include "IUAmpTools/AmpToolsInterface.h" #include "IUAmpTools/FitResults.h" #include "AmpPlotter/PlotterMainWindow.h" #include "AmpPlotter/PlotFactory.h" #include "AMPTOOLS_DATAIO/ROOTDataReader.h" #include "AMPTOOLS_AMPS/Uniform.h" #include "HCA_Amplitudes/HCAmplitude_Chain.h" #include "HCA_Amplitudes/BreitWigner.h" #include "HCA_Amplitudes/TChannel_Basic.h" #include "PlotGenerator_d2pi/PlotGenerator_d2pi.h" // THE USER SHOULD NOT HAVE TO CHANGE ANYTHING BELOW THIS LINE // ************************************************************* using namespace std; int main(int argc, char* argv[]) { if(argc <= 2) { cout << "Usage:" << endl; cout << "\tHCA_AmpPlotter_d2pi " << endl; return 0; } // parse the command line parameters string locResultsName(argv[1]); double locBinMeanSqrtS = atoi(argv[3]); // load the results and display the configuration info FitResults locFitResults(locResultsName); if(!locFitResults.valid()) { cout << "Invalid fit results in file: " << locResultsName << endl; return 1; } locFitResults.configInfo()->display(); string locReactionName = locFitResults.reactionList()[0]; // set up AmpToolsInterface::registerDataReader(ROOTDataReader()); AmpToolsInterface::registerAmplitude(BreitWigner()); AmpToolsInterface::registerAmplitude(HCAmplitude_Chain()); AmpToolsInterface::registerAmplitude(TChannel_Basic()); AmpToolsInterface::registerAmplitude(Uniform()); PlotGenerator_d2pi locPlotGenerator(locFitResults, locBinMeanSqrtS); // start the GUI int dummy_argc = 0; char* dummy_argv[] = {}; TApplication app("app", &dummy_argc, dummy_argv); gStyle->SetFillColor(10); gStyle->SetCanvasColor(10); gStyle->SetPadColor(10); gStyle->SetFillStyle(1001); gStyle->SetPalette(1); gStyle->SetFrameFillColor(10); gStyle->SetFrameFillStyle(1001); PlotFactory locPlotFactory(locPlotGenerator); PlotterMainWindow locMainFrame(gClient->GetRoot(), locPlotFactory); app.Run(); return 0; }