DrawPlots.C 16.8 KB
Newer Older
Charlie Paxman's avatar
Charlie Paxman committed
1
#include "DrawPlots.h"
2

Charlie Paxman's avatar
Charlie Paxman committed
3

Charlie Paxman's avatar
Charlie Paxman committed
4 5
/* USE THIS SPACE TO TEST NEW FEATURES */
/* ONCE HAPPY, MOVE TO HEADER          */
Charlie Paxman's avatar
Charlie Paxman committed
6 7


Charlie Paxman's avatar
Charlie Paxman committed
8
///////////////////////////////////////////////////////////////////////////////
9 10 11 12
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Charlie Paxman's avatar
Charlie Paxman committed
13 14 15 16 17
void DrawPlots(){

  gStyle->SetOptStat("nei");
  LoadChainNP();
  
18
  cout << "==========================================" << endl;
Charlie Paxman's avatar
Charlie Paxman committed
19 20
  cout << "========== AVAILABLE FUNCTIONS ===========" << endl;
  cout << " 2D Matrices " << endl;
21
  cout << "\t- Draw_2DParticleGamma() "<< endl;
Charlie Paxman's avatar
Charlie Paxman committed
22 23 24
  cout << "\t- Draw_2DGammaGamma() "<< endl;
  cout << ""<< endl;
  cout << " Ungated histograms " << endl;
25
  cout << "\t- Draw_1DParticle() "<< endl;
Charlie Paxman's avatar
Charlie Paxman committed
26 27 28 29 30 31
  cout << "\t- Draw_1DGamma() "<< endl;
  cout << ""<< endl;
  cout << " Gated histograms " << endl;
  cout << "\t- GateParticle_SeeGamma(particle, width) "<< endl;
  cout << "\t- GateGamma_SeeParticle(gamma, width) "<< endl;
  cout << "\t- GateGamma_SeeGamma(gamma, width) "<< endl;
32
  cout << ""<< endl;
Charlie Paxman's avatar
Charlie Paxman committed
33 34 35 36
  cout << " Gated histograms w/ background selection" << endl;
  cout << "\t- GateParticle_SeeGamma_WithBG(particle, width, bgrnd) "<< endl;
  cout << "\t- GateGamma_SeeParticle_WithBG(gamma, width, bgrnd) "<< endl;
  cout << "\t- GateGamma_SeeGamma_WithBG(gamma, width, bgrnd) "<< endl;
37
  cout << ""<< endl;
Charlie Paxman's avatar
Charlie Paxman committed
38
  cout << " Specific functions" << endl;
39 40 41
  cout << "\t- CompareExsAt4MeV() "<< endl;
  cout << "\t- CompareSimExp() "<< endl;
  cout << "==========================================" << endl;
42 43 44 45




Charlie Paxman's avatar
Charlie Paxman committed
46
  /************** OLD STUFF! Make these into functions, eventually ***************/
47

Charlie Paxman's avatar
Charlie Paxman committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
  /*
  TCanvas *cF = new TCanvas("cF","cF",1000,1000);
  gPad->SetLogz();
  chain->Draw("ELab:ThetaLab>>hcF(130,50,180,600,0,12)","abs(T_MUGAST_VAMOS-2777)<600","col");
  TH2F* hcF = (TH2F*) gDirectory->Get("hcF");
  hcF->GetXaxis()->SetTitle("#theta_{lab} [deg]");
  hcF->GetYaxis()->SetTitle("E_{lab} [MeV]");
  plot_kine(Kdp, 0, kBlack, 2, 9);
  plot_kine(Kdp, 2, kRed, 2, 9);
  plot_kine(Kdp, 4, kBlue, 2, 9);
  plot_kine(Kdd, 0, kGreen+2, 2, 9);
  plot_kine(Kpp, 0, kYellow, 2, 9);
  */


  /* MUGAST testing phi dependance */
  //TCanvas *diagnose = new TCanvas("diagnose","diagnose",1000,1000);
//  chain->Draw("PhiLab","abs(T_MUGAST_VAMOS-2777)<600 && (Mugast.TelescopeNumber==1 ||  Mugast.TelescopeNumber==2 || Mugast.TelescopeNumber==3 || Mugast.TelescopeNumber==4 || Mugast.TelescopeNumber==5 || Mugast.TelescopeNumber==7)","");
//  chain->Draw("PhiLab>>h1","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==1","");
//  chain->Draw("PhiLab>>h2","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==2","same");
//  chain->Draw("PhiLab>>h3","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==3","same");
//  chain->Draw("PhiLab>>h4","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==4","same");
//  chain->Draw("PhiLab>>h5","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==5","same");
//  chain->Draw("PhiLab>>h7","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==7","same");
//  TH2F* histDiag = (TH2F*) gDirectory->Get("histDiag");
  

//  TH1F* h1 = (TH1F*) gDirectory->Get("h1");
//  h1->SetTitle("Phi of MUGAST telescopes");
//  h1->GetXaxis()->SetTitle("PhiLab [deg]");
//  h1->GetYaxis()->SetTitle("Counts");
//  h1->SetLineColor(kRed);
  //h1->SetFillStyle(3001);
  //h1->SetFillColor(kRed);
//  TH1F* h2 = (TH1F*) gDirectory->Get("h2");
//  h2->SetLineColor(kOrange);
  //h2->SetFillStyle(3001);
  //h2->SetFillColor(kOrange);
//  TH1F* h3 = (TH1F*) gDirectory->Get("h3");
//  h3->SetLineColor(kGreen);
  //h3->SetFillStyle(3001);
  //h3->SetFillColor(kGreen);
//  TH1F* h4 = (TH1F*) gDirectory->Get("h4");
//  h4->SetLineColor(kTeal);
  //h4->SetFillStyle(3001);
  //h4->SetFillColor(kTeal);
//  TH1F* h5 = (TH1F*) gDirectory->Get("h5");
//  h5->SetLineColor(kBlue);
  //h5->SetFillStyle(3001);
  //h5->SetFillColor(kBlue);
//  TH1F* h7 = (TH1F*) gDirectory->Get("h7");
//  h7->SetLineColor(kViolet);
  //h7->SetFillStyle(3001);
  //h7->SetFillColor(kViolet);
//  h7->GetYaxis()->SetRangeUser(0.,4000.);
//  h7->GetXaxis()->SetRangeUser(-180.,180.);

  //auto legend = new TLegend(0.1,0.7,0.48,0.9);
  //legend->AddEntry(h1,"MUGAST 1","f");
  //legend->AddEntry(h2,"MUGAST 2","f");
  //legend->AddEntry(h3,"MUGAST 3","f");
  //legend->AddEntry(h4,"MUGAST 4","f");
  //legend->AddEntry(h5,"MUGAST 5","f");
  //legend->AddEntry(h7,"MUGAST 7","f");
  //legend->Draw();

  /* MUGAST good Phi-Ex histogram*/
  //TCanvas *diagnose = new TCanvas("diagnose","diagnose",1000,1000);
  //chain->Draw("Ex:PhiLab>>hist(180,-180,180,80,-2,6)","abs(T_MUGAST_VAMOS-2777)<600 && (Mugast.TelescopeNumber==1 || Mugast.TelescopeNumber==2 || Mugast.TelescopeNumber==3 || Mugast.TelescopeNumber==4 || Mugast.TelescopeNumber==5 || Mugast.TelescopeNumber==7 )","colz");

  /* MUGAST testing theta dependance by detector */
//  TCanvas *diagnose = new TCanvas("diagnose","diagnose",1000,1000);
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600","colz");
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==1","colz");
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==2","colz");
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==3","colz");
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==4","colz");
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==5","colz");
//  chain->Draw("Ex:ThetaLab>>histDiag(36,0,180,200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==7","colz");
//  TH2F* histDiag = (TH2F*) gDirectory->Get("histDiag");

//  TCanvas *cG = new TCanvas("cG","cG",1000,1000);
//  chain->Draw("Ex>>hcG(200,-3,7)","");
//  chain->Draw("Ex>>hcG_T1(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==1","");
//  chain->Draw("Ex>>hcG_T2(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==2","same");
//  chain->Draw("Ex>>hcG_T3(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==3","same");
//  chain->Draw("Ex>>hcG_T4(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==4","same");
//  chain->Draw("Ex>>hcG_T5(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==5","same");
//  chain->Draw("Ex>>hcG_T7(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==7","same");
//  TH1F* hcG = (TH1F*) gDirectory->Get("hcG");
//  hcG->GetXaxis()->SetTitle("E_{x} [MeV]");
//  hcG->GetYaxis()->SetTitle("Counts / (50 keV)");
//  hcG->SetLineColor(kBlack);
//  TH1F* hcG_T1 = (TH1F*) gDirectory->Get("hcG_T1");
//  hcG_T1->SetLineColor(kRed);
//  hcG_T1->SetFillStyle(3001);
//  hcG_T1->SetFillColor(kRed);
//  TH1F* hcG_T2 = (TH1F*) gDirectory->Get("hcG_T2");
//  hcG_T2->SetLineColor(kOrange);
//  hcG_T2->SetFillStyle(3001);
//  hcG_T2->SetFillColor(kOrange);
//  TH1F* hcG_T3 = (TH1F*) gDirectory->Get("hcG_T3");
//  hcG_T3->SetLineColor(kGreen);
//  hcG_T3->SetFillStyle(3001);
//  hcG_T3->SetFillColor(kGreen);
//  TH1F* hcG_T4 = (TH1F*) gDirectory->Get("hcG_T4");
//  hcG_T4->SetLineColor(kTeal);
//  hcG_T4->SetFillStyle(3001);
//  hcG_T4->SetFillColor(kTeal);
//  TH1F* hcG_T5 = (TH1F*) gDirectory->Get("hcG_T5");
//  hcG_T5->SetTitle("Misalignment of MUGAST telescopes");
//  hcG_T5->GetXaxis()->SetTitle("E_{x} [MeV]");
//  hcG_T5->GetYaxis()->SetTitle("Counts / (50 keV)");
//  hcG_T5->SetLineColor(kBlue);
//  hcG_T5->SetFillStyle(3001);
//  hcG_T5->SetFillColor(kBlue);
//  TH1F* hcG_T7 = (TH1F*) gDirectory->Get("hcG_T7");
//  hcG_T7->SetLineColor(kViolet);
//  hcG_T7->SetFillStyle(3001);
//  hcG_T7->SetFillColor(kViolet);
//  hcG_T5->GetYaxis()->SetRangeUser(0.,500.);
//  hcG_T5->GetXaxis()->SetRangeUser(-3.,7.);


172 173
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
Charlie Paxman's avatar
Charlie Paxman committed
174 175

  // MUGAST Displacement Ex histogram //
176
  TCanvas *cMisaligned = new TCanvas("cMisaligned","cMisaligned",1000,1000);
Charlie Paxman's avatar
Charlie Paxman committed
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
//  chain->Draw("Ex>>hcG(200,-3,7)","");
  chain->Draw("Ex>>hcG_T1(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==1","");
  chain->Draw("Ex>>hcG_T2(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==2","same");
  chain->Draw("Ex>>hcG_T3(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==3","same");
  chain->Draw("Ex>>hcG_T4(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==4","same");
  chain->Draw("Ex>>hcG_T5(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==5","same");
  chain->Draw("Ex>>hcG_T7(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==7","same");
//  TH1F* hcG = (TH1F*) gDirectory->Get("hcG");
//  hcG->GetXaxis()->SetTitle("E_{x} [MeV]");
//  hcG->GetYaxis()->SetTitle("Counts / (50 keV)");
//  hcG->SetLineColor(kBlack);
  TH1F* hcG_T1 = (TH1F*) gDirectory->Get("hcG_T1");
  hcG_T1->SetTitle("Misalignment of MUGAST telescopes");
  hcG_T1->GetXaxis()->SetTitle("E_{x} [MeV]");
  hcG_T1->GetYaxis()->SetTitle("Counts / (50 keV)");
  hcG_T1->SetLineColor(kRed);
193
  hcG_T1->SetFillStyle(3244);
Charlie Paxman's avatar
Charlie Paxman committed
194
  hcG_T1->SetFillColor(kRed);
195
  hcG_T1->GetYaxis()->SetRangeUser(0.,200.);
Charlie Paxman's avatar
Charlie Paxman committed
196 197
  TH1F* hcG_T2 = (TH1F*) gDirectory->Get("hcG_T2");
  hcG_T2->SetLineColor(kOrange);
198
  hcG_T2->SetFillStyle(3344);
Charlie Paxman's avatar
Charlie Paxman committed
199 200 201
  hcG_T2->SetFillColor(kOrange);
  TH1F* hcG_T3 = (TH1F*) gDirectory->Get("hcG_T3");
  hcG_T3->SetLineColor(kGreen);
202
  hcG_T3->SetFillStyle(3444);
Charlie Paxman's avatar
Charlie Paxman committed
203 204 205
  hcG_T3->SetFillColor(kGreen);
  TH1F* hcG_T4 = (TH1F*) gDirectory->Get("hcG_T4");
  hcG_T4->SetLineColor(kTeal);
206
  hcG_T4->SetFillStyle(3544);
Charlie Paxman's avatar
Charlie Paxman committed
207 208 209
  hcG_T4->SetFillColor(kTeal);
  TH1F* hcG_T5 = (TH1F*) gDirectory->Get("hcG_T5");
  hcG_T5->SetLineColor(kBlue);
210
  hcG_T5->SetFillStyle(3644);
Charlie Paxman's avatar
Charlie Paxman committed
211 212 213
  hcG_T5->SetFillColor(kBlue);
  TH1F* hcG_T7 = (TH1F*) gDirectory->Get("hcG_T7");
  hcG_T7->SetLineColor(kViolet);
214
  hcG_T7->SetFillStyle(3644);
Charlie Paxman's avatar
Charlie Paxman committed
215
  hcG_T7->SetFillColor(kViolet);
216
//  hcG_T7->GetYaxis()->SetRangeUser(0.,750.);
Charlie Paxman's avatar
Charlie Paxman committed
217

218
  TLine *line = new TLine(0,0,0,200);
Charlie Paxman's avatar
Charlie Paxman committed
219 220 221 222 223 224 225 226 227 228 229 230
  line->SetLineColor(kBlack);
  line->Draw();

  auto legend = new TLegend(0.1,0.7,0.48,0.9);
  legend->AddEntry(hcG_T1,"MUGAST 1","f");
  legend->AddEntry(hcG_T2,"MUGAST 2","f");
  legend->AddEntry(hcG_T3,"MUGAST 3","f");
  legend->AddEntry(hcG_T4,"MUGAST 4","f");
  legend->AddEntry(hcG_T5,"MUGAST 5","f");
  legend->AddEntry(hcG_T7,"MUGAST 7","f");
  legend->Draw();

231 232 233 234
*/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Charlie Paxman's avatar
Charlie Paxman committed
235 236 237 238 239 240 241 242 243 244 245 246 247 248

/* ORIGINAL - DO NOT EDIT
  TCanvas *cG = new TCanvas("cG","cG",1000,1000);
  chain->Draw("Ex>>hcG(200,-3,7)","");
  chain->Draw("Ex>>hcG2(200,-3,7)","abs(T_MUGAST_VAMOS-2777)<600","same");
  TH1F* hcG = (TH1F*) gDirectory->Get("hcG");
  hcG->GetXaxis()->SetTitle("E_{x} [MeV]");
  hcG->GetYaxis()->SetTitle("Counts / (50 keV)");
  hcG->SetLineColor(kBlack);
  TH1F* hcG2 = (TH1F*) gDirectory->Get("hcG2");
  hcG2->SetLineColor(kRed);
*/

  /* ORIGINAL 4-PLOT KINEMATIC SCREEN */
249 250
/*
  TCanvas *c0 = new TCanvas("c0", "Kinematics", 1000, 1000);
Charlie Paxman's avatar
Charlie Paxman committed
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
  c0->Divide(2,2);
  c0->cd(1);
  gPad->SetLogz();
  chain->Draw("ELab:ThetaLab>>hKine(200,0,180,600,0,12)","abs(T_MUGAST_VAMOS-2777)<600","col");
  TH2F* hKine = (TH2F*) gDirectory->Get("hKine");
  hKine->GetXaxis()->SetTitle("#theta_{lab} [deg]");
  hKine->GetYaxis()->SetTitle("E_{lab} [MeV]");
  plot_kine(Kdp, 0, kBlack, 2, 9);
  plot_kine(Kdp, 2, kRed, 2, 9);
  plot_kine(Kdp, 4, kBlue, 2, 9);
  plot_kine(Kdd, 0, kGreen+2, 2, 9);
  plot_kine(Kpp, 0, kYellow, 2, 9);
  plot_kine(Kdt, 0, kMagenta, 2, 9);
  plot_kine(K12C12C, 4, kCyan, 2, 9);
  plot_kine(Tidp, 4, 42, 2, 9);
  plot_kine(Tidt, 4, 42, 2, 9);
  plot_kine(Tidd, 4, 42, 2, 9);
  plot_kine(Ti12C12C, 4, 42, 2, 9);
  
  c0->cd(2);
  chain->Draw("Ex>>hEx(300,-3,7)","abs(T_MUGAST_VAMOS-2777)<600");
  TH1F* hEx = (TH1F*) gDirectory->Get("hEx");
  hEx->GetXaxis()->SetTitle("E_{x} [MeV]");
  hEx->GetYaxis()->SetTitle("Counts / (100 keV)");
  hEx->SetLineColor(kBlack);
  chain->Draw("Ex>>hEx_gateNoG(300,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && AddBack_EDC@.size()==0","same");
  chain->Draw("Ex>>hEx_gate(300,-3,7)","abs(T_MUGAST_VAMOS-2777)<600 && abs(AddBack_EDC-0.143)< 0.01","same");
  TH1F* hEx_gate = (TH1F*) gDirectory->Get("hEx_gate");
  hEx_gate->SetLineColor(kRed);
  auto AGATA_eff = new TF1("AGATA_eff","TMath::Exp([0]+[1]*TMath::Log(x)+[2]*pow(TMath::Log(x),2.0)+[3]*pow(TMath::Log(x),3.0)+[4]*pow(TMath::Log(x),4.0))",100,5000);
  AGATA_eff->SetParameter(0,-7.84071e+00);
  AGATA_eff->SetParameter(1, 6.44921e+00);
  AGATA_eff->SetParameter(2, -1.42899e+00);
  AGATA_eff->SetParameter(3, 1.37921e-01);
  AGATA_eff->SetParameter(4, -5.23947e-03);
  
  //TH1F* hEx_gate_scaled = (TH1F*) hEx_gate->Clone("hEx_gate_scaled");
  hEx_gate->Scale(1./(AGATA_eff->Eval(143)*0.01));
  hEx_gate->Draw("histsame");
  c0->Update();
  double ymax = gPad->GetUymax();
  plot_state(0, ymax, kBlack, 2, 9);
  plot_state(2, ymax, kRed, 2, 9);
  plot_state(3.8, ymax, kBlue, 2, 9);
  plot_state(4.644, ymax, kGreen+2, 2, 1);
  TLatex latex;
  latex.SetTextAlign(13);
  latex.SetTextSize(0.035);
  latex.SetTextAngle(90);
  latex.SetTextColor(kGreen+2);
  latex.DrawLatex(4.8,0.6*ymax,"S_{n} = 4.64 MeV");

  TLegend *legend = new TLegend(0.7,0.7,0.9,0.9);

  c0->cd(3);
  chain->Draw("AddBack_EDC:Ex>>hEgEx(300,-1,7,5000,0,5)","abs(T_MUGAST_VAMOS-2777)<600","col");
*/
/*  chain->Draw("AddBack_EDC:Ex>>hEgEx(150,0,6,1000,0,5)","abs(T_MUGAST_VAMOS-2777)<600 && Mugast.TelescopeNumber==5","col");
  TH2F* hEgEx = (TH2F*) gDirectory->Get("hEgEx");
  hEgEx->SetTitle("MUGAST#5 only");
  hEgEx->GetXaxis()->SetTitle("E_{x} [MeV]");
  hEgEx->GetYaxis()->SetTitle("E_{#gamma} [MeV]");
  TLine *line = new TLine(0,0,6,6);
  line->SetLineWidth(2);
  line->SetLineColor(kRed);
  line->Draw();
*/
318

Charlie Paxman's avatar
Charlie Paxman committed
319 320
  //  plot_state(0.143, ymax, kYellow, 2, 9);
  
321
/*
Charlie Paxman's avatar
Charlie Paxman committed
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
  c0->cd(4);
  chain->Draw("AddBack_EDC>>hEg(4000,0,4)","abs(T_MUGAST_VAMOS-2777)<600");
  TH1F* hEg = (TH1F*) gDirectory->Get("hEg");
  hEg->GetXaxis()->SetTitle("E_{#gamma} [MeV]");
  hEg->GetYaxis()->SetTitle("Counts / (1 keV)");
  hEg->SetLineColor(kBlack);
  c0->Update();
  ymax = gPad->GetUymax();
  //plot_state(0.143, ymax, kMagenta, 2, 9);
  //plot_state(0.279, ymax, kCyan, 2, 9);
  //plot_state(1.863, ymax, kOrange, 2, 9);
*/


/*
  TCanvas *gammaspec = new TCanvas("gammaSpec", "gammaSpec", 1000, 1000);
  chain->Draw("AddBack_EDC>>hEg(4000,0,4)","abs(T_MUGAST_VAMOS-2777)<600");
  TH1F* hEg = (TH1F*) gDirectory->Get("hEg");
  hEg->GetXaxis()->SetTitle("E_{#gamma} [MeV]");
  hEg->GetYaxis()->SetTitle("Counts / (1 keV)");
  hEg->SetLineColor(kBlack);
  //c0->Update();
  //ymax = gPad->GetUymax();
  //plot_state(0.143, ymax, kMagenta, 2, 9);
  //plot_state(0.279, ymax, kCyan, 2, 9);
  //plot_state(1.863, ymax, kOrange, 2, 9);
*/





354 355
/*  
  TCanvas *c1 = new TCanvas("c1", "Egamma, gated on Ex", 1000, 1000);
Charlie Paxman's avatar
Charlie Paxman committed
356 357
  c1->Divide(2,2);
  c1->cd(1);
358 359 360 361 362
  chain->Draw("AddBack_EDC>>hEg_0p143(800,0,4)","abs(T_MUGAST_VAMOS-2777)<600 && abs(Ex-0.143)<0.1");
  TH1F* hEg_0p143 = (TH1F*) gDirectory->Get("hEg_0p143");
  hEg_0p143->GetXaxis()->SetTitle("E_{#gamma} [MeV]");
  hEg_0p143->GetYaxis()->SetTitle("Counts / (5 keV)");
  hEg_0p143->SetLineColor(kBlack);
Charlie Paxman's avatar
Charlie Paxman committed
363 364

  c1->cd(2);
365 366 367 368 369
  chain->Draw("AddBack_EDC>>hEg_1p275(800,0,4)","abs(T_MUGAST_VAMOS-2777)<600 && abs(Ex-1.275)<0.1");
  TH1F* hEg_1p275 = (TH1F*) gDirectory->Get("hEg_1p275");
  hEg_1p275->GetXaxis()->SetTitle("E_{#gamma} [MeV]");
  hEg_1p275->GetYaxis()->SetTitle("Counts / (5 keV)");
  hEg_1p275->SetLineColor(kBlack);
Charlie Paxman's avatar
Charlie Paxman committed
370 371

  c1->cd(3);
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
  chain->Draw("AddBack_EDC>>hEg_1p822(800,0,4)","abs(T_MUGAST_VAMOS-2777)<600 && abs(Ex-1.822)<0.1");
  TH1F* hEg_1p822 = (TH1F*) gDirectory->Get("hEg_1p822");
  hEg_1p822->GetXaxis()->SetTitle("E_{#gamma} [MeV]");
  hEg_1p822->GetYaxis()->SetTitle("Counts / (5 keV)");
  hEg_1p822->SetLineColor(kBlack);

  c1->cd(4);
  chain->Draw("AddBack_EDC>>hEg_3p609(800,0,4)","abs(T_MUGAST_VAMOS-2777)<600 && abs(Ex-3.609)<0.1");
  TH1F* hEg_3p609 = (TH1F*) gDirectory->Get("hEg_3p609");
  hEg_3p609->GetXaxis()->SetTitle("E_{#gamma} [MeV]");
  hEg_3p609->GetYaxis()->SetTitle("Counts / (5 keV)");
  hEg_3p609->SetLineColor(kBlack);
  
*/

Charlie Paxman's avatar
Charlie Paxman committed
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413

  // K states
  /*auto gr = K.GetKinematicLine3();
  gr->SetLineColor(kAzure+7);
  gr->SetLineWidth(3);
  gr->Draw("ac");
  K.SetExcitationHeavy(4);
  gr = K.GetKinematicLine3();
  gr->SetLineColor(kAzure+7);
  gr->SetLineWidth(2);
  gr->SetLineStyle(1);
  gr->Draw("c");

  AddTiStates(0); 
  AddTiStates(0.969); 
  AddTiStates(2.2292); 
  AddTiStates(2.419); 
  AddTiStates(3.223); 
  AddTiStates(3.332); 
  AddTiStates(3.622); 
  AddTiStates(4.388); 
  AddTiStates(4.458); 
  AddTiStates(4.719); 
  AddTiStates(4.852); 
  AddTiStates(5.151); 
  */   
}