11 TFile *
file=TFile::Open(
"sim.root",
"read");
13 TTree *
tree = (TTree*)file->Get(
"pndsim");
15 TClonesArray *
particle =
new TClonesArray(
"PndDiscParticleMCPoint");
16 TClonesArray *
sensor =
new TClonesArray(
"PndDiscSensorMCPoint");
18 tree->SetBranchAddress(
"DiscParticleMCPoint", &particle);
19 tree->SetBranchAddress(
"DiscSensorMCPoint", &sensor);
21 int events = tree->GetEntries();
25 TH2F *posxy =
new TH2F(
"posxy",
"Position on Radiator Disk", 2000,-100,100,2000,-100,100);
26 posxy->GetXaxis()->SetTitle(
"Position x [mm]");
27 posxy->GetYaxis()->SetTitle(
"Position y [mm]");
32 for(
int i = 0;
i < events;
i++)
36 int entries = particle->GetEntries();
40 for(
int j = 0; j < entries; j++)
55 TCanvas *
c1 =
new TCanvas();
60 TH2F *possensor =
new TH2F(
"possensor",
"Position on PMT", 108,0,108,100,-30,30);
61 possensor->GetXaxis()->SetTitle(
"Position x [mm]");
62 possensor->GetYaxis()->SetTitle(
"Position y [mm]");
63 possensor->SetStats(0);
65 for(
int i = 0;
i < events;
i++)
69 int entries = sensor->GetEntries();
73 for(
int j = 0; j < entries; j++)
83 possensor->Fill(vol,y*10);
88 TCanvas *
c2 =
new TCanvas();
89 possensor->SetMinimum(-1);
90 possensor->Draw(
"colz");
93 TFile *file2=TFile::Open(
"digi.root",
"read");
94 TTree *
tree2 = (TTree*)file2->Get(
"pndsim");
95 TClonesArray *digit =
new TClonesArray(
"PndDiscDigitizedHit");
96 tree2->SetBranchAddress(
"DiscDigit", &digit);
99 TFile *file3=TFile::Open(
"reco.root",
"read");
100 TTree *tree3 = (TTree*)file3->Get(
"pndsim");
101 TClonesArray *recon =
new TClonesArray(
"PndDiscReconResult");
102 tree3->SetBranchAddress(
"DiscPatternPrediction", &recon);
105 TFile *file4=TFile::Open(
"pid.root",
"read");
106 TTree *tree4 = (TTree*)file4->Get(
"pndsim");
107 TClonesArray *
pid =
new TClonesArray(
"PndDiscPID");
108 tree4->SetBranchAddress(
"DiscPID", &pid);
112 TH2F *hitpattern =
new TH2F(
"hitpattern",
"Simulated Hitpattern", 108,0,108,100,0,100);
113 hitpattern->GetXaxis()->SetTitle(
"Sensor ID");
114 hitpattern->GetYaxis()->SetTitle(
"Pixel Number");
115 hitpattern->SetStats(0);
117 for(
int i = 0;
i < events;
i++)
121 int hits = digit->GetEntries();
125 for(
int j = 0; j <
hits; j++)
133 hitpattern->Fill(readout_id+27*detector_id, pixel, tdc);
139 TH2F *hprediction =
new TH2F(
"hprediction",
"Predicted Hitpattern", 108,0,108,100,0,100);
140 hprediction->GetXaxis()->SetTitle(
"Sensor ID");
141 hprediction->GetYaxis()->SetTitle(
"Pixel Number");
142 hprediction->SetStats(0);
144 for(
int i = 0;
i < events;
i++)
148 int entries = recon->GetEntries();
152 for(
int j = 0; j < entries; j++)
160 hprediction->Fill(sensor_id, pixel, time/events/3);
166 TCanvas *
c3 =
new TCanvas();
167 int width = c3->GetWw();
168 int height = c3->GetWh();
169 c3->SetWindowSize(1.5*width,height);
172 hitpattern->SetMinimum(-1);
173 hitpattern->Draw(
"colz");
175 hprediction->Draw(
"colz");
179 TH1F *hlikelihood =
new TH1F(
"hlikelihood",
"Difference of Likelihood", 100, -100, 100);
181 for(
int i = 0;
i < events;
i++)
185 int entries = pid->GetEntries();
189 for(
int j = 0; j < entries; j++)
193 hlikelihood->Fill(diff);
198 TCanvas *
c4 =
new TCanvas();