-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompilereference_2e2mu_single.C
71 lines (52 loc) · 1.69 KB
/
compilereference_2e2mu_single.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#if !defined(__CINT__) || defined(__MAKECINT__)
#include "HZZ4LeptonsAnalysis_2e2mu.h"
#include <TTree.h>
#include <TFile.h>
#include <TString.h>
#include <TROOT.h>
#include <string>
#include <iostream>
#include <TSystem.h>
#include <TH2.h>
#include "TChain.h"
#include <stdlib.h>
#include <TDCacheFile.h>
#endif
using namespace std;
int main(int argc, char ** argv){
string site=argv[1];
cout << site << " configuration" <<endl;
string dataconf=argv[2];
cout << dataconf << " dataconfiguration" <<endl;
string mcconf=argv[3];
cout << mcconf << " mc configuration" <<endl;
Char_t nome[300];
if (site.find("CERN")<5){
sprintf(nome,"/castor/cern.ch/user/n/ndefilip/DAS2013/bkg/roottree_leptons_ZZTo2e2mu_8TeV-powheg-pythia6.root");
}
else if (site.find("FNAL")<5){
sprintf(nome,"dcap://cmsgridftp.fnal.gov:24125/pnfs/fnal.gov/usr/cms/WAX/11/store/user/cmsdas/2013/HZZ4lExercise/sig/roottree_leptons_GluGluToHToZZTo4L_M-1000_8TeV-powheg-pythia6.root");
}
else {
//sprintf(nome,"/localdata/Syncr13TeV/roottree_leptons_sync_Fall15_HiggsToZZ_76x.root");
sprintf(nome,"roottree_leptons_2015.root");
}
TFile *file3;
file3 = TFile::Open(nome);
//if (site.find("FNAL")<5){
// file3 = new TDCacheFile (nome,"READ","ROOT file with trees",0);
//}
//else {
// file3 = TFile::Open(nome);
//}
cout << "Read file with name: " << nome << endl;
TTree *tree3 = (TTree*)file3->Get("HZZ4LeptonsAnalysis");
HZZ4LeptonsAnalysis make3(tree3,1.,dataconf,mcconf);
//HZZ4LeptonsAnalysis make3(tree3);
sprintf(nome,"output_2015_Higgs.root");
make3.Loop(nome);
cout << "Create file with name: " << nome << endl;
delete tree3;
file3 -> Close();
return 0;
}