MakeCutFlow.C
Go to the documentation of this file.
1 //......................................................
5 
6 #include "CAFAna/Core/Loaders.h"
7 #include "CAFAna/Core/Spectrum.h"
10 
13 
14 #include "Utilities/rootlogon.C"
15 
16 #include "OscLib/OscCalcPMNSOpt.h"
17 
18 #include "TCanvas.h"
19 #include "TColor.h"
20 #include "TFile.h"
21 #include "TGraph.h"
22 #include "TGraphAsymmErrors.h"
23 #include "TH1.h"
24 #include "TH2.h"
25 #include "TLatex.h"
26 #include "TLegend.h"
27 #include "TStyle.h"
28 #include "TSystem.h"
29 
30 #include <fstream>
31 #include <iostream>
32 #include <string>
33 
34 bool IsFHC = false; // Global variable for whether I am running over FHC or RHC?
35 std::string sFHC = "RHC"; // Global variable for string related to FHC or RHC.
36 //......................................................
37 using namespace ana;
38 
39 //......................................................
40 TH1D* GetHistVectors ( TFile* InF, std::string InDir, double Norm, bool Cosm=false, std::string WhPred="" );
41 //......................................................
42 void SetBin( TH1D* hist, size_t ind, double Val );
43 //......................................................
44 void SetHistProp( TH1D* hist, int Colour, double Width, double Offset );
45 //......................................................
46 void MakeCanvasForData( std::vector<double> Data, std::vector<double> NuMuCC, std::vector<double> Beam, std::vector<double> Wrong, std::vector<double> Cosm );
47 //......................................................
48 void MakeCanvasForSim ( std::vector<double> NuMuCC, std::vector<double> Beam, std::vector<double> Wrong, std::vector<double> Cosm );
49 //......................................................
50 void MakeTextFile( std::string OutName, bool BarChart );
51 //......................................................
52 void CornerLabel(std::string Str);
53 //......................................................
54 // --- Define the names of my cuts.
55 std::vector<std::string> CutNames;
56 size_t NCuts = 0;
57 
58 // --- Define some new colours
59 TColor *Colour1 = new TColor(229, 0.37 , 0.05 , 0.67 ,"");
60 TColor *Colour2 = new TColor(230, 0 , 0.725, 0.659,"");
61 TColor *Colour3 = new TColor(231, 0.925, 0 , 0.549,"");
62 TColor *Colour4 = new TColor(232, 0.627, 0 , 0.373,"");
63 TColor *Colour5 = new TColor(233, 0 , 0.631, 0.569,"");
64 
65 double POTNorm = 0;
66 double LivNorm = 0;
67 
68 //......................................................
69 void MakeCutFlow( bool fhc ) {
70  // Set my global variables.
71  IsFHC = fhc;
72  sFHC = (IsFHC == true ? "FHC":"RHC" );
73 
74  gStyle->SetHistMinimumZero();
75 
76  // Where are my input files?
77  std::string InBase = "/nova/ana/users/karlwarb/Ana18/FD_CutFlow/";
78  std::string MontNa = "Combined_MonteCarloCutFlow.root";
79  //std::string MontNa = "Temp_MonteCarloCutFlow.root";
80  std::string DataNa = "Combined_DataCutFlow.root";
81 
82  std::string MontLoc = InBase + MontNa;
83  std::string DataLoc = InBase + DataNa;
84 
85  std::cerr << "Loading;"
86  << "\n\t Monte Carlo - " << MontLoc
87  << "\n\t Data Files - " << DataLoc
88  << std::endl;
89 
90  TFile *MontFile = TFile::Open( MontLoc.c_str() );
91  TFile *DataFile = TFile::Open( DataLoc.c_str() );
92 
93  // --- Do my cuts.
94  CutNames.emplace_back("NoCut");
95  CutNames.emplace_back("Quality");
96  CutNames.emplace_back("Containment");
97  CutNames.emplace_back("Cosmic_Rej");
98  CutNames.emplace_back("Particle_ID");
99 
100  NCuts = CutNames.size();
101 
102  // --- Define my histograms.
103  // Data
104  std::vector<TH1D*> hBeam; std::vector<double> nBeam;
105  std::vector<TH1D*> hCosm; std::vector<double> nCosm;
106  // Mont
107  std::vector<TH1D*> hFullPred ; std::vector<double> nFullPred;
108  std::vector<TH1D*> hAllNuMu; std::vector<double> nAllNuMu;
109  std::vector<TH1D*> hWrongSign; std::vector<double> nWrongSign;
110  std::vector<TH1D*> hBeamBack; std::vector<double> nBeamBack;
111  // True Mont.
112  std::vector<TH1D*> hTrueFullPred ; std::vector<double> nTrueFullPred;
113  std::vector<TH1D*> hTrueAllNuMu; std::vector<double> nTrueAllNuMu;
114  std::vector<TH1D*> hTrueWrongSign; std::vector<double> nTrueWrongSign;
115  std::vector<TH1D*> hTrueBeamBack; std::vector<double> nTrueBeamBack;
116 
117 
118  // --- Need to specify my POT and LiveTime
119  // Beam POT
120  std::unique_ptr<Spectrum> TempSpec_Beam = Spectrum::LoadFrom( DataFile, TString(CutNames[2])+TString("_BeamNus_")+TString(sFHC) ) ;
121  POTNorm = TempSpec_Beam -> POT();
122  // Cosm Livetime
123  std::unique_ptr<Spectrum> TempSpec_Cosm = Spectrum::LoadFrom( DataFile, TString(CutNames[2])+TString("_Cosmics_")+TString(sFHC) ) ;
124  LivNorm = TempSpec_Cosm->Livetime();
125  // What numbers did I get?
126  std::cerr << "\n My POT is " << POTNorm << ". My cosmic livetime is " << LivNorm << "\n" << std::endl;
127 
128  // --- Loop through my vector of cut names, and load the histograms.
129  for (size_t cc=0; cc<NCuts; ++cc) {
130  // --- Data strings.
131  std::cout << "\n\n Looking at cut level " << CutNames[cc] << std::endl;
132 
133  // --- Load the Monte Carlo
134  hFullPred .push_back( GetHistVectors( MontFile, CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "FullPred" ) );
135  hAllNuMu .push_back( GetHistVectors( MontFile, CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "AllNuMu" ) );
136  hBeamBack .push_back( GetHistVectors( MontFile, CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "BeamBack" ) );
137  hWrongSign .push_back( GetHistVectors( MontFile, CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "WrongSign" ) );
138  // --- Load the Monte Carlo with true containment cut.
139  hTrueFullPred .push_back( GetHistVectors( MontFile, "True-"+CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "FullPred" ) );
140  hTrueAllNuMu .push_back( GetHistVectors( MontFile, "True-"+CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "AllNuMu" ) );
141  hTrueBeamBack .push_back( GetHistVectors( MontFile, "True-"+CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "BeamBack" ) );
142  hTrueWrongSign.push_back( GetHistVectors( MontFile, "True-"+CutNames[cc]+"_FullMC_"+sFHC , POTNorm, false, "WrongSign" ) );
143  // --- Load the Data
144  hBeam.push_back( GetHistVectors( DataFile, CutNames[cc]+"_BeamNus_"+sFHC, POTNorm, false ) );
145  hCosm.push_back( GetHistVectors( DataFile, CutNames[cc]+"_Cosmics_"+sFHC, LivNorm, true ) );
146 
147  // --- Add push back the vectors of doubles.
148  // Monte Carlo
149  nFullPred .push_back( hFullPred .back()->Integral() );
150  nAllNuMu .push_back( hAllNuMu .back()->Integral() );
151  nBeamBack .push_back( hBeamBack .back()->Integral() );
152  nWrongSign .push_back( hWrongSign .back()->Integral() );
153  // Monte Carlo w Containment Cut
154  nTrueFullPred .push_back( hTrueFullPred .back()->Integral() );
155  nTrueAllNuMu .push_back( hTrueAllNuMu .back()->Integral() );
156  nTrueBeamBack .push_back( hTrueBeamBack .back()->Integral() );
157  nTrueWrongSign.push_back( hTrueWrongSign.back()->Integral() );
158  // Data
159  nBeam .push_back( hBeam .back()->Integral() );
160  nCosm .push_back( hCosm .back()->Integral() );
161 
162  std::cerr << "\n\t nFullPred -> " << nFullPred .back() << " [True = " << nTrueFullPred .back() << "]"
163  << "\n\t nAllNuMu -> " << nAllNuMu .back() << " [True = " << nTrueAllNuMu .back() << "]"
164  << "\n\t nBeamBack -> " << nBeamBack .back() << " [True = " << nTrueBeamBack .back() << "]"
165  << "\n\t nWrongSign -> " << nWrongSign.back() << " [True = " << nTrueWrongSign.back() << "]"
166  << "\n\t nCosm -> " << nCosm .back()
167  << "\n\t nBeam -> " << nBeam .back()
168  << std::endl;
169  }
170  return;
171 
172  // --- Now lets start drawing things!!!
173  std::cerr << "\n\nNow lets start plotting things..." << std::endl;
174 
175  gSystem -> MakeDirectory( "Plots" );
176  std::string OutName = "Plots/CutFlowPlots_NuMu_Ana2018_"+sFHC+".root";
177  TFile *OutFile = new TFile(OutName.c_str(), "RECREATE");
178  OutFile -> cd();
179 
180  // --- Make a canvas for FD Data, TotalPred, BeamBkg, Cosmics
181  MakeCanvasForData( nBeam, nFullPred, nBeamBack, nWrongSign, nCosm );
182 
183  // --- Make a canvas for event rate without data
184  MakeCanvasForSim ( nFullPred, nBeamBack, nWrongSign, nCosm );
185 
186  return;
187 }
188 
189 //......................................................
190 TH1D* GetHistVectors( TFile* InF, std::string InDir, double Norm, bool Cosm, std::string WhPred ) {
191  if ( Cosm ) {
192  std::unique_ptr<Spectrum> Temp = Spectrum::LoadFrom( InF, InDir );
193  return Temp -> ToTH1( Norm, kLivetime );
194  } else if (WhPred == "") {
195  std::unique_ptr<Spectrum> Temp = Spectrum::LoadFrom( InF, InDir );
196  return Temp -> ToTH1( Norm );
197  } else {
198  std::unique_ptr<PredictionNoExtrap> Temp = PredictionNoExtrap::LoadFrom( InF, InDir );
199  // -- Have a prediction object so need to figure some stuff out....
200  // First set my oscillation calculator
203  calc.SetdCP ( M_PI*0.17 );
204  calc.SetDmsq32( 0.00251 );
205  calc.SetTh23 ( asin(sqrt(0.58)) );
206  /*
207  if (IsFHC) {
208  calc.SetDmsq32(2.45e-3);
209  calc.SetTh23(asin(sqrt(0.51)));
210  } else {
211  calc.SetDmsq32(2.57e-3);
212  calc.SetTh23(asin(sqrt(0.36)));
213  }
214  */
215  // Now figure out which spectrum I want....
216  if ( WhPred == "FullPred" ) {
217  // Want the full prediction.
218  return Temp -> Predict(&calc).ToTH1( Norm );
219 
220  } else if ( WhPred == "AllNuMu" ) {
221  // Only want muon neutrinos
222  return Temp->PredictComponent( &calc, Flavors::kAllNuMu , Current::kCC , Sign::kBoth ).ToTH1( Norm );
223 
224  } else if ( WhPred == "BeamBack" ) {
225  // Want everything other than muon neutrinos
226  TH1D* AllNue = Temp->PredictComponent( &calc, Flavors::kAllNuE , Current::kCC, Sign::kBoth ).ToTH1( Norm );
227  TH1D* AllTau = Temp->PredictComponent( &calc, Flavors::kAllNuTau , Current::kCC, Sign::kBoth ).ToTH1( Norm );
228  TH1D* AllNC = Temp->PredictComponent( &calc, Flavors::kAll , Current::kNC, Sign::kBoth ).ToTH1( Norm );
229  TH1D* NueNumu = Temp->PredictComponent( &calc, Flavors::kNuEToNuMu, Current::kCC, Sign::kBoth ).ToTH1( Norm );
230  // Now want to add all of those histograms together...
231  TH1D* TempHist = (TH1D*)AllNue->Clone();
232  TempHist -> Add( AllTau );
233  TempHist -> Add( AllNC );
234  TempHist -> Add( NueNumu );
235  return TempHist;
236 
237  } else if ( WhPred == "WrongSign" ) {
238  // Want the wrong sign interaction component.
240  if (IsFHC) wrongs = Sign::kAntiNu;
241  return Temp->PredictComponent( &calc, Flavors::kAllNuMu , Current::kCC , wrongs ).ToTH1( Norm );
242  } else {
243  std::cout << "I don't recognise your argument....." << std::endl;
244  abort();
245  }
246  }
247 }
248 
249 //......................................................
250 void SetBin( TH1D* hist, size_t ind, double Val ) {
251  hist -> SetBinContent( ind, Val );
252  std::string BinText = CutNames[ NCuts-ind ];
253  while (BinText.find("_") != std::string::npos) BinText.replace(BinText.find("_"),1," ");
254  hist -> GetXaxis() -> SetBinLabel( ind, BinText.c_str() );
255  return;
256 }
257 //......................................................
258 void SetHistProp( TH1D* hist, int Colour, double Width, double Offset ) {
259  hist -> SetFillColor( Colour );
260  hist -> SetBarWidth ( Width );
261  hist -> SetBarOffset( Offset );
262  hist -> SetMinimum ( 0.1 );
263  hist -> SetStats(0);
264  for (int bi=0; bi<hist->GetNbinsY(); ++bi) hist->SetBinContent( bi, 0 );
265  return;
266 }
267 //..................................
268 void MakeTextFile( std::string OutName, bool BarChart ) {
269  // Determine output name, and caption.
270  std::string FNa = "Plots/"+OutName+".txt";
271  while (OutName.find("_") != std::string::npos) OutName.replace(OutName.find("_"),1," ");
272  std::string Cap = "Plot showing the number of events passing cuts for " + OutName;
273  if (BarChart) {
274  std::string DaCap = "for expected data rates, taken from MC and Cosmic sidebands.";
275  if (OutName.find("Data") != std::string::npos) DaCap = "with NuMi data shown, along with estimates from MC and Cosmic sidebands.";
276  Cap = "A bar chart showing the number of events changes as subsequent cuts are applied, " + DaCap;
277  }
278  Cap += " Plot is for "+sFHC+".";
279  std::cout << "\nFile name: " << FNa << "\n\tCaption: " << Cap << std::endl;
280  // Write to file.
281  std::ofstream TxtOut ( FNa.c_str(), std::ofstream::out );
282  TxtOut << Cap;
283  TxtOut.close();
284  // Done.
285  return;
286 }
287 //......................................................
289  TLatex* CornLab = new TLatex(.15, .93, Str.c_str());
290  CornLab->SetTextColor(kGray+1);
291  CornLab->SetNDC();
292  CornLab->SetTextSize (2/30.);
293  CornLab->SetTextAlign(11);
294  CornLab->Draw();
295 }
296 //......................................................
297 void MakeCanvasForData( std::vector<double> Data, std::vector<double> NuMuCC, std::vector<double> Beam, std::vector<double> Wrong, std::vector<double> Cosm ) {
298 //void MakeCanvasForData( std::vector<double> Beam, std::vector<double> NuMuCC, std::vector<double> NotNuMuCC, std::vector<double> Cosm ) {
299  // --- Declare a canvas.
300  TCanvas *DataCan = new TCanvas( "DataCan", "Cut Efficiency Canvas for Data vs MC" );
301  DataCan -> SetLogx();
302  DataCan -> SetGridx();
303  DataCan -> SetLeftMargin(0.15);
304  DataCan -> SetRightMargin(0.05);
305 
306  double HistWidth = 0.15;
307 
308  // First Total Predicted flux.
309  TH1D *hTot = new TH1D( "TotalFlux", "", NCuts, 0, NCuts );
310  SetHistProp( hTot, 229, HistWidth, 0.72 );
311  for(size_t i=1; i<=NCuts; i++) {
312  double TotBin = NuMuCC[ NCuts-i ] + Cosm[ NCuts-i ];
313  SetBin( hTot, i, TotBin );
314  }
315  // Draw.
316  hTot -> Draw("hbar0");
317  // Set axis range etc.
318  hTot -> GetXaxis() -> SetLabelSize( 0.055 );
319  hTot -> GetYaxis() -> SetTitle("Events");
320  hTot -> GetYaxis() -> CenterTitle();
321  if (IsFHC) hTot -> GetYaxis() -> SetRangeUser( 1 , 1e7 );
322  else hTot -> GetYaxis() -> SetRangeUser( 0.1, 1e7 );
323 
324  // Now Wrong sign
325  TH1D *hWrS = new TH1D("WrongSign","",NCuts, 0, NCuts);
326  SetHistProp( hWrS, 231, HistWidth, 0.57 );
327  for(size_t i=1; i<=NCuts; i++) {
328  SetBin( hWrS, i, Wrong[ NCuts-i ]);
329  }
330  hWrS -> Draw("hbar0 same");
331 
332  // Now Beam background
333  TH1D *hBea = new TH1D("BeamBack","",NCuts, 0, NCuts);
334  SetHistProp( hBea, 230, HistWidth, 0.42 );
335  for(size_t i=1; i<=NCuts; i++) {
336  SetBin( hBea, i, Beam[ NCuts-i ]);
337  }
338  hBea -> Draw("hbar0 same");
339 
340  // Now Cosmic background
341  TH1D *hCos = new TH1D("CosmBack","",NCuts, 0, NCuts);
342  SetHistProp( hCos, 232, HistWidth, 0.27 );
343  for(size_t i=1; i<=NCuts; i++) {
344  SetBin( hCos, i, Cosm[ NCuts-i ]);
345  }
346  hCos -> Draw("hbar0 same");
347 
348  // Last Data
349  TH1D *hDat = new TH1D("BeamData","",NCuts, 0, NCuts);
350  SetHistProp( hDat, 233, HistWidth, 0.12 );
351  for(size_t i=1; i<=NCuts; i++) {
352  SetBin( hDat, i, Data[ NCuts-i ]);
353  }
354  hDat -> Draw("hbar0 same");
355 
356  // Add a legend to the plot.
357  TLegend *l = new TLegend(0.58,0.12,0.93,0.42);
358  l->AddEntry(hTot,"Predicted Num. Events","f");
359  if (IsFHC) l->AddEntry(hWrS,"Wrong Sign: #bar{#nu_{#mu}} CC","f");
360  else l->AddEntry(hWrS,"Wrong Sign: #nu_{#mu} CC" ,"f");
361  l->AddEntry(hBea,"Beam Background" ,"f");
362  l->AddEntry(hCos,"Cosmic Background" ,"f");
363  l->AddEntry(hDat,"Recorded data" ,"f");
364 
365  l->Draw();
366 
367  // Draw Preliminary()
368  Preliminary();
369  if (IsFHC) CornerLabel("Neutrino beam");
370  else CornerLabel("Antineutrino beam");
371 
372  // And redraw axis
373  hTot -> Draw("axis same");
374  DataCan -> Update();
375 
376  // Finally, save the canvas.
377  std::string CanNa = "DataCutFlow_NuMu_"+sFHC;
378  DataCan -> SaveAs( TString("Plots/")+TString(CanNa)+TString(".pdf" ) );
379  DataCan -> SaveAs( TString("Plots/")+TString(CanNa)+TString(".pdf" ) );
380  DataCan -> Write ( CanNa.c_str() );
381  MakeTextFile ( CanNa , true );
382 
383  return;
384 }
385 //......................................................
386 void MakeCanvasForSim ( std::vector<double> NuMuCC, std::vector<double> Beam, std::vector<double> Wrong, std::vector<double> Cosm ) {
387  // --- Declare a canvas.
388  TCanvas *SimCan = new TCanvas( "SimCan", "Cut Efficiency Canvas for MC" );
389  SimCan -> SetLogx();
390  SimCan -> SetGridx();
391  SimCan -> SetLeftMargin(0.15);
392  SimCan -> SetRightMargin(0.05);
393 
394  double HistWidth = 0.2;
395 
396  // NuMC CC.
397  TH1D *hNuMu = new TH1D( "NuMu", "", NCuts, 0, NCuts );
398  SetHistProp( hNuMu, 229, HistWidth, 0.7 );
399  for(size_t i=1; i<=NCuts; i++) {
400  SetBin( hNuMu, i, NuMuCC[ NCuts-i ]);
401  }
402  // Draw.
403  hNuMu -> Draw("hbar0");
404  // Set axis range etc.
405  hNuMu -> GetXaxis() -> SetLabelSize( 0.055 );
406  hNuMu -> GetYaxis() -> SetTitle("Events");
407  hNuMu -> GetYaxis() -> CenterTitle();
408  if (IsFHC) hNuMu -> GetYaxis() -> SetRangeUser( 1 , 1e7 );
409  else hNuMu -> GetYaxis() -> SetRangeUser( 0.1, 1e7 );
410 
411  // Now Wrong sign
412  TH1D *hWrS = new TH1D("WrongSign2","",NCuts, 0, NCuts);
413  SetHistProp( hWrS, 231, HistWidth, 0.5 );
414  for(size_t i=1; i<=NCuts; i++) {
415  SetBin( hWrS, i, Wrong[ NCuts-i ]);
416  }
417  hWrS -> Draw("hbar0 same");
418 
419  // Now Beam background
420  TH1D *hBeam = new TH1D("BeamBkg","",NCuts, 0, NCuts);
421  SetHistProp( hBeam, 230, HistWidth, 0.3 );
422  for(size_t i=1; i<=NCuts; i++) {
423  SetBin( hBeam, i, Beam[ NCuts-i ]);
424  }
425  hBeam -> Draw("hbar0 same");
426 
427  // Now Cosmic background
428  TH1D *hCosm = new TH1D("Cosmics","",NCuts, 0, NCuts);
429  SetHistProp( hCosm, 232, HistWidth, 0.1 );
430  for(size_t i=1; i<=NCuts; i++) {
431  SetBin( hCosm, i, Cosm[ NCuts-i ]);
432  }
433  hCosm -> Draw("hbar0 same");
434 
435  // Add a legend to the plot.
436  TLegend *l = new TLegend(0.6,0.15,0.9,0.35);
437  if (IsFHC) l->AddEntry(hNuMu,"#nu_{#mu} Signal" ,"f");
438  else l->AddEntry(hNuMu,"#bar{#nu_{#mu}} Signal","f");
439  if (IsFHC) l->AddEntry(hWrS,"Wrong Sign: #bar{#nu_{#mu}} CC","f");
440  else l->AddEntry(hWrS,"Wrong Sign: #nu_{#mu} CC" ,"f");
441  l->AddEntry(hBeam,"Beam Background" ,"f");
442  l->AddEntry(hCosm,"Cosmic Background","f");
443  l->Draw();
444 
445  // Draw Preliminary()
446  Preliminary();
447  if (IsFHC) CornerLabel("Neutrino beam");
448  else CornerLabel("Antineutrino beam");
449 
450  // And redraw axis
451  hNuMu -> Draw("axis same");
452  SimCan -> Update();
453 
454  // Finally, save the canvas.
455  std::string CanNa = "SimCutFlow_NuMu_"+sFHC;
456  SimCan -> SaveAs( TString("Plots/")+TString(CanNa)+TString(".pdf" ) );
457  SimCan -> SaveAs( TString("Plots/")+TString(CanNa)+TString(".pdf" ) );
458  SimCan -> Write ( CanNa.c_str() );
459  MakeTextFile ( CanNa , true );
460  return;
461 }
462 //......................................................
tree Draw("slc.nhit")
void SetBin(TH1D *hist, size_t ind, double Val)
Definition: MakeCutFlow.C:205
size_t NCuts
Definition: MakeCutFlow.C:50
bin1_2sigma SetFillColor(3)
c1 SetGridx()
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
void ResetOscCalcToDefault(osc::IOscCalcAdjustable *calc)
Reset calculator to default assumptions for all parameters.
Definition: Calcs.cxx:23
Antineutrinos-only.
Definition: IPrediction.h:50
c1 Update()
correl_xv GetYaxis() -> SetDecimals()
double Integral(const Spectrum &s, const double pot, int cvnregion)
TColor * Colour4
Definition: MakeCutFlow.C:56
T sqrt(T number)
Definition: d0nt_math.hpp:156
bool IsFHC
Definition: MakeCutFlow.C:34
def BarChart(node, total, depth=0, startpos=0)
OStream cerr
Definition: OStream.cxx:7
double Width(Resonance_t res)
resonance width (GeV)
gargamelle SetTitle("Gargamelle #nu_{e} CC data")
osc::OscCalcDumb calc
double POTNorm
Definition: MakeCutFlow.C:59
#define M_PI
Definition: SbMath.h:34
void MakeTextFile(std::string OutName, bool BarChart)
Definition: MakeCutFlow.C:222
double LivNorm
Definition: MakeCutFlow.C:60
std::string sFHC
Definition: MakeCutFlow.C:35
Charged-current interactions.
Definition: IPrediction.h:39
TColor * Colour2
Definition: MakeCutFlow.C:54
TColor * Colour1
Definition: MakeCutFlow.C:53
void CornerLabel(std::string Str)
Definition: MakeCutFlow.C:288
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir, const std::string &name)
Definition: Spectrum.cxx:535
correl_xv GetXaxis() -> SetDecimals()
Optimized version of OscCalcPMNS.
Definition: StanTypedefs.h:31
void SetHistProp(TH1D *hist, int Colour, double Width, double Offset)
Definition: MakeCutFlow.C:213
TColor * Colour3
Definition: MakeCutFlow.C:55
c1 SetLogx()
void SetTh23(const T &th23) override
void Preliminary()
Neutrinos-only.
Definition: IPrediction.h:49
OStream cout
Definition: OStream.cxx:6
std::vector< double > POT
cout<< "--"<< endl;for(Int_t iP=1;iP<=hyz->GetNbinsX();iP++){for(Int_t iC=1;iC<=hyz->GetNbinsY();iC++){if(hyv->GetBinContent(iP, iC)>-999){goal_hyv-> SetBinContent(iP, iC,-(dy[iP-1][iC-1]))
void SetDmsq32(const T &dmsq32) override
void cc()
Definition: test_ana.C:28
Sign::Sign_t wrongs
Definition: saveFDMCHists.C:27
void SetdCP(const T &dCP) override
Neutral-current interactions.
Definition: IPrediction.h:40
Both neutrinos and antineutrinos.
Definition: IPrediction.h:52
void MakeCanvasForSim(std::vector< double > NuMuCC, std::vector< double > NotNuMuCC, std::vector< double > Cosm)
Definition: MakeCutFlow.C:313
void MakeCutFlow()
Definition: MakeCutFlow.C:63
TFile * OutFile
histo SetMinimum(1.0e-9)
correl_xv SetStats(0)
void Beam(bool isRHC)
All neutrinos, any flavor.
Definition: IPrediction.h:26
(&#39; appearance&#39;)
Definition: IPrediction.h:16
cosmicTree SaveAs("cosmicTree.root")
static std::unique_ptr< PredictionNoExtrap > LoadFrom(TDirectory *dir, const std::string &name)
void MakeCanvasForData(std::vector< double > Beam, std::vector< double > NuMuCC, std::vector< double > NotNuMuCC, std::vector< double > Cosm)
Definition: MakeCutFlow.C:241
c cd(1)
TH1D * GetHistVectors(TFile *InF, std::string InDir, double Norm, bool Cosm=false)
Definition: MakeCutFlow.C:191
T asin(T number)
Definition: d0nt_math.hpp:60
gm Write()
std::vector< std::string > CutNames
Definition: MakeCutFlow.C:49
enum BeamMode string
TColor * Colour5
Definition: MakeCutFlow.C:57