ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/mschen/SusyAnalysis/code/run.C
Revision: 1.1
Committed: Mon Mar 28 09:42:00 2011 UTC (14 years, 1 month ago) by mschen
Content type: text/plain
Branch: MAIN
CVS Tags: V2010_data_analysis_effModelInPaper, V2010_data_analysis, HEAD
Log Message:
2010 same sign analysis coding

File Contents

# Content
1 #include <iostream>
2 #include "analysis.h"
3 #include <TChain.h>
4 #include <ctime>
5
6
7 using namespace std;
8 int main(int argc, char *argv[]) {
9 //#define TIMING time(&cur_time); cout << "TIME from the program start: " << cur_time - start_time << " sec\n";
10 cout<<"start running runmc...." <<endl;
11
12 int t;
13
14 time_t start_time, cur_time;
15 time(&start_time);
16
17 string ss = "";// "/scratch/crn/mschen/data/Summer09MinBiasGEN-SIM-RECO-STARTUP3X_V8K_900GeV-v1_ufrmV4/mc_4G.root";
18 //string ss = "~/scratch0/CMSSW_3_3_6_patch3/src/Histo/HistoAnalyzer/ufrm_mc.root";
19 string scfg="mc.cfg";
20
21 //ss="0"; scfg="0";
22
23 string sout = "";
24 string sFakeRateInput = "";
25 if(argc>1){
26 ss=argv[1];
27 if(argc>2){
28 scfg=argv[2];
29 if(argc>3){
30 sout=argv[3];
31 if(argc>4){
32 sFakeRateInput=argv[4];
33 }
34 }
35 }
36 }
37
38
39 cout<<"reading root file: "<<ss.c_str()<<endl;
40 cout<<"reading config file: "<<scfg.c_str()<<endl;
41
42 TChain* ch = new TChain("T");
43 //char *ss = "/data/Projects/900GeV_Analysis/ufrm/ufrm_mc.root";
44 //char *ss = "/scratch/crn/mschen/data/Summer09MinBiasGEN-SIM-RECO-STARTUP3X_V8K_900GeV-v1_ufrmV4/mc.root";
45 ch->Add(ss.c_str());
46
47 analysis a(ch);
48 a.SetOutPut(sout);
49 a.SetFakeRateInput(sFakeRateInput);
50 a.SetConfigFileName(scfg);
51 cout << "FYI: files read, ROOT chain created\n";
52
53 //a.Loop();
54 a.susy();
55
56 time(&cur_time); cout << "TIME from the program start: " << cur_time - start_time << " sec\n";
57 return 1;
58 }