File indexing completed on 2024-04-06 11:58:56
0001 #include <TStyle.h>
0002 #include <TCanvas.h>
0003 #include <TROOT.h>
0004 #include <TChain.h>
0005 #include <TFile.h>
0006 #include <TProfile.h>
0007 #include <TH1D.h>
0008 #include <TH2D.h>
0009 #include <TString.h>
0010 #include <TTree.h>
0011
0012 #include <fstream>
0013 #include <iomanip>
0014 #include <iostream>
0015 #include <sstream>
0016 #include <string>
0017 #include <vector>
0018
0019 #include "HBHEMuonOfflineAnalyzer.C"
0020
0021 int main(Int_t argc, Char_t *argv[]) {
0022 if (argc < 4) {
0023 std::cerr << "Please give 15 arguments \n"
0024 << "InputFileName"
0025 << "\n"
0026 << "outputFileName"
0027 << "\n"
0028 << "flag (default 0)\n"
0029 << "mode (default 3)\n"
0030 << "cutMu: muon type (default 0)\n"
0031 << "minimum muon momentum (default 10)\n"
0032 << "maximum entries to be processed: -1 means all (default -1)\n"
0033 << "override all constraints in storage (default 0)\n"
0034 << "maxDHB (default 4)\n"
0035 << "maxDHE (default 7)\n"
0036 << "runLo (default 0)\n"
0037 << "runHi (default 99999999)\n"
0038 << "etaMin (default 1)\n"
0039 << "etaMax (default 29)\n"
0040 << "corrFileName"
0041 << "\n"
0042 << std::endl;
0043 return -1;
0044 }
0045
0046 const char *inputFileList = argv[1];
0047 const char *outFileName = argv[2];
0048 int flag = (argc > 3) ? atoi(argv[3]) : 0;
0049 int mode = (argc > 4) ? atoi(argv[4]) : 3;
0050 int cutMu = (argc > 5) ? atoi(argv[5]) : 0;
0051 float cutP = (argc > 6) ? atof(argv[6]) : 5;
0052 int nevMax = (argc > 7) ? atoi(argv[7]) : -1;
0053 int over = (argc > 8) ? atoi(argv[8]) : 0;
0054 int maxDHB = (argc > 9) ? atoi(argv[9]) : 4;
0055 int maxDHE = (argc > 10) ? atoi(argv[10]) : 7;
0056 int runLo = (argc > 11) ? atoi(argv[11]) : 0;
0057 int runHi = (argc > 12) ? atoi(argv[12]) : 99999999;
0058 int etaMin = (argc > 13) ? atoi(argv[13]) : 1;
0059 int etaMax = (argc > 14) ? atoi(argv[14]) : 29;
0060 const char *corrFileName = (argc > 15) ? argv[15] : "";
0061 std::cout << "Input File List " << inputFileList << std::endl
0062 << "Output FIle Name " << outFileName << std::endl
0063 << "Correction File Name " << corrFileName << std::endl
0064 << "Flag " << flag << " Mode " << mode << std::endl
0065 << "Muon type " << cutMu << " Minimum muon momentum " << cutP << std::endl
0066 << "Maximum # of entries to process " << nevMax << " Override " << over << std::endl
0067 << "Max Depth (HB) " << maxDHB << " (HE) " << maxDHE << std::endl
0068 << "Run (low) " << runLo << " (High) " << runHi << std::endl
0069 << "Eta (min) " << etaMin << " (max) " << etaMax << std::endl;
0070
0071 HBHEMuonOfflineAnalyzer *tree = new HBHEMuonOfflineAnalyzer(inputFileList,
0072 outFileName,
0073 corrFileName,
0074 flag,
0075 mode,
0076 maxDHB,
0077 maxDHE,
0078 cutMu,
0079 cutP,
0080 nevMax,
0081 over,
0082 runLo,
0083 runHi,
0084 etaMin,
0085 etaMax,
0086 false);
0087 tree->Loop();
0088 delete tree;
0089
0090 return 0;
0091 }