11 string path =
"/unix/anita3/linda/SimulatedFiles/Production4/anita3/wais_MaskingAndDeadTime//Energy_222/";
18 TChain *tHead =
new TChain(
"headTree");
19 TChain *tTrue =
new TChain(
"truthAnitaTree");
22 for (
int irun=firstRun; irun<=lastRun; irun++){
23 tHead->Add(Form(
"%s/run%d/SimulatedAnitaHeadFile%d.root", path.c_str(), irun, irun));
24 tTrue->Add(Form(
"%s/run%d/SimulatedAnitaTruthFile%d.root", path.c_str(), irun, irun));
31 tHead->SetBranchAddress(
"header", &header);
32 tTrue->SetBranchAddress(
"truth", &truth);
34 int nentries = tHead->GetEntries();
41 TH1D *hNum =
new TH1D (
"hNum",
"", ntot, snrmin, snrmax);
42 TH1D *hDenom =
new TH1D (
"hDenom",
"", ntot, snrmin, snrmax);
46 TH1D *hNumt =
new TH1D (
"hNumt",
"", ntot, snrmin, snrmax);
47 TH1D *hDenomt =
new TH1D (
"hDenomt",
"", ntot, snrmin, snrmax);
55 TFile *fout =
new TFile(
"icemcWAISeff2.root",
"recreate");
59 for (
int ientry=0; ientry<nentries; ientry++){
61 tHead->GetEntry(ientry);
62 tTrue->GetEntry(ientry);
66 if (snr>snrmax) snr=snrmax*0.9999;
69 if (snrt>snrmax) snrt=snrmax*0.9999;
72 hDenomt->Fill(snrt, 1);
87 cout << hDenom <<
" = denominator" <<endl;
88 cout << hDenom <<
" = numerator" << endl;
89 cout << nentries <<
" = number of entries/events" << endl;
92 TEfficiency *efft = 0;
95 if (TEfficiency::CheckConsistency(*hNum, *hDenom)){
96 eff =
new TEfficiency(*hNum, *hDenom);
98 TCanvas *c =
new TCanvas(
"c");
101 eff->Write(
"icemcWAIS");
105 if (TEfficiency::CheckConsistency(*hNumt, *hDenomt)){
106 efft =
new TEfficiency(*hNumt, *hDenomt);
108 efft->Write(
"icemcWAIS");
TruthAnitaEvent – The Truth ANITA Event.
Double_t maxSNRAtTriggerH
Max SNR at trigger H-POL.
Double_t maxSNRAtDigitizerH
Max SNR at digitizer H-POL.