13 for(
int i=0;(unsigned)
i<v.size();
i++)
22 gStyle->SetOptStat(0);
24 unsigned col1 = kOrange+7;
25 unsigned col2 = kBlue+2;
26 unsigned col3 = kGreen+2;
29 string type[3] = {
"3pion",
"DIScharged",
"DISneutral"};
30 string seed[10] = {
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"};
36 TChain chain_CC(
"event");
37 TChain chain_NC(
"event");
38 TChain chain_tau(
"event");
41 for (
int b = 0;
b<3;
b++){
42 for (
int g = 0;
g<10;
g++){
44 if(
b==0 &
g==0)
continue;
46 if(
b==0) nevents =
"1000";
47 if(
b==1 ||
b==2) nevents =
"100";
49 if(
b==0) file =
"/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/LeptoAna_p250_e20_"+nevents+
"events_"+seed[
g]+
"seed_"+type[
b]+
"_r0"+R_max+
".root";
50 if(
b==1 ||
b==2) file =
"/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/LeptoAna_p250_e20_"+nevents+
"events_"+seed[
g]+
"seed_"+type[
b]+
"_tau_r0"+R_max+
".root";
52 if(
b==0) chain_tau.Add(file.c_str());
53 if(
b==1) chain_CC.Add(file.c_str());
54 if(
b==2) chain_NC.Add(file.c_str());
59 string inputFile =
"/gpfs/mnt/gpfs02/phenix/scratch/spjeffas/data/LeptoAna_p250_e20_1000events_1seed_"+type[0]+
"_r0"+R_max+
".root";
61 TFile *
f = TFile::Open(inputFile.c_str());
62 TTree *
t = (TTree*)f->Get(
"event");
65 TCanvas* ctemp =
new TCanvas();
67 vector< TString > observables;
68 vector< TString > observables_name;
70 vector< float > plots_xmin;
71 vector< float > plots_xmax;
74 observables.push_back(
"Et_miss" );
75 observables_name.push_back(
"p_{T}^{miss} (GeV)" );
76 plots_xmin.push_back(0);
77 plots_xmax.push_back(50);
80 observables.push_back(
"Et_miss_phi" );
81 observables_name.push_back(
"#Delta#phi_{miss - #tau jet}" );
82 plots_xmin.push_back(0);
83 plots_xmax.push_back(180);
85 TString name_CC_base(
"h_CC_");
86 TString name_NC_base(
"h_NC_");
87 TString name_tau_base(
"h_tau_");
89 const int nvar = observables.size();
95 TString name_CC_i = name_CC_base;
96 TString name_NC_i = name_NC_base;
97 TString name_tau_i = name_tau_base;
100 for (
int l = 0; l < observables.size(); l++ ){
101 name_CC_i = name_CC_base;
102 name_NC_i = name_NC_base;
103 name_tau_i = name_tau_base;
107 name_tau_i.Append(l);
109 h_CC[l] =
new TH1F( name_CC_i,
"", 50, plots_xmin.at(l), plots_xmax.at(l));
110 h_NC[l] =
new TH1F( name_NC_i,
"", 50, plots_xmin.at(l), plots_xmax.at(l));
111 h_tau[l] =
new TH1F( name_tau_i,
"", 50, plots_xmin.at(l), plots_xmax.at(l));
115 for(
int i = 0;
i < observables.size();
i++){
119 name_CC_i = name_CC_base;
120 name_NC_i = name_NC_base;
121 name_tau_i = name_tau_base;
125 name_tau_i.Append(
i);
130 int n_CC = chain_CC.Draw( observables.at(
i) +
" >> " + name_CC_i,
"",
"goff");
131 h_CC[
i]->Scale(1./h_CC[
i]->Integral());
132 h_CC[
i]->GetXaxis()->SetTitle( observables_name.at(
i) );
133 h_CC[
i]->GetYaxis()->SetRangeUser(0, .13 );
134 h_CC[
i]->SetLineColor(col1);
135 h_CC[
i]->SetFillColor(col1);
136 h_CC[
i]->SetFillStyle(0);
137 h_CC[
i]->GetYaxis()->SetTitle(
"# entries / #Sigma entries");
138 h_CC[
i]->GetYaxis()->SetTitleOffset(1.5);
141 int n_NC = chain_NC.Draw( observables.at(
i) +
" >> " + name_NC_i,
"",
"goff");
142 h_NC[
i]->Scale(1./h_NC[
i]->Integral());
143 h_NC[
i]->SetLineColor(col3);
144 h_NC[
i]->SetFillColor(col3);
145 h_NC[
i]->SetFillStyle(0);
148 int n_tau = chain_tau.Draw( observables.at(
i) +
" >> " + name_tau_i,
"",
"goff");
149 h_tau[
i]->Scale(1./h_tau[
i]->Integral());
150 h_tau[
i]->SetLineColor(col2);
151 h_tau[
i]->SetFillColor(col2);
152 h_tau[
i]->SetFillStyle(0);
154 TCanvas *c1 =
new TCanvas();
156 h_CC[
i]->DrawClone(
"");
157 h_NC[
i]->DrawClone(
"sames");
158 h_tau[
i]->DrawClone(
"sames");
161 TLegend *legend =
new TLegend(0.4,0.6,0.7,0.89);
162 legend->AddEntry(h_CC[
i],
"Neutral Current",
"l");
163 legend->AddEntry(h_NC[i],
"Charged Current",
"l");
164 legend->AddEntry(h_tau[i],
"Leptoquark",
"l");
171 float Et_miss_phi_tau, Et_miss_phi_CC, Et_miss_phi_NC;
172 float tau_phi_tau, tau_phi_CC, tau_phi_NC;
175 chain_CC.SetBranchAddress(
"Et_miss_phi",&Et_miss_phi_CC);
176 chain_CC.SetBranchAddress(
"reco_tau_phi",&tau_phi_CC);
178 chain_NC.SetBranchAddress(
"Et_miss_phi",&Et_miss_phi_NC);
179 chain_NC.SetBranchAddress(
"reco_tau_phi",&tau_phi_NC);
181 chain_tau.SetBranchAddress(
"Et_miss_phi",&Et_miss_phi_tau);
182 chain_tau.SetBranchAddress(
"reco_tau_phi",&tau_phi_tau);
188 for(
int j = 0;
j<n_CC;
j++){
189 chain_CC.GetEntry(
j);
190 delta_phi = fabs(Et_miss_phi_CC - tau_phi_CC) * 180 / TMath::Pi();
191 if(delta_phi > 180) delta_phi = 360 -
delta_phi;
192 h_CC[
i]->Fill(delta_phi);
195 for(
int l = 0; l<n_NC;l++){
196 chain_NC.GetEntry(l);
197 delta_phi = fabs(Et_miss_phi_NC - tau_phi_NC) * 180 / TMath::Pi();
198 if(delta_phi > 180) delta_phi = 360 -
delta_phi;
199 h_NC[
i]->Fill(delta_phi);
202 for(
int k = 0;
k<n_tau;
k++){
203 chain_tau.GetEntry(
k);
204 delta_phi = fabs(Et_miss_phi_tau - tau_phi_tau) * 180 / TMath::Pi();
205 if(delta_phi > 180) delta_phi = 360 -
delta_phi;
206 h_tau[
i]->Fill(delta_phi);
210 h_CC[
i]->Scale(1./h_CC[
i]->Integral());
211 h_CC[
i]->GetXaxis()->SetTitle( observables_name.at(
i) );
212 h_CC[
i]->GetYaxis()->SetRangeUser(0, 0.27 );
213 h_CC[
i]->SetLineColor(col1);
214 h_CC[
i]->SetFillColor(col1);
215 h_CC[
i]->SetFillStyle(0);
216 h_CC[
i]->GetYaxis()->SetTitle(
"# entries / #Sigma entries");
217 h_CC[
i]->GetYaxis()->SetTitleOffset(1.5);
219 h_NC[
i]->Scale(1./h_NC[
i]->Integral());
220 h_NC[
i]->SetLineColor(col3);
221 h_NC[
i]->SetFillColor(col3);
222 h_NC[
i]->SetFillStyle(0);
225 h_tau[
i]->Scale(1./h_tau[
i]->Integral());
226 h_tau[
i]->SetLineColor(col2);
227 h_tau[
i]->SetFillColor(col2);
228 h_tau[
i]->SetFillStyle(0);
230 TCanvas *c1 =
new TCanvas();
232 h_CC[
i]->DrawClone(
"");
233 h_NC[
i]->DrawClone(
"sames");
234 h_tau[
i]->DrawClone(
"sames");
237 TLegend *legend =
new TLegend(0.4,0.6,0.7,0.89);
238 legend->AddEntry(h_NC[
i],
"Neutral Current",
"l");
239 legend->AddEntry(h_CC[i],
"Charged Current",
"l");
240 legend->AddEntry(h_tau[i],
"Leptoquark",
"l");