46#if !(!defined(__CLING__) || defined(__MAKECLING__))
50 const Int_t nColors = 16;
51 Int_t ColorMap[nColors] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 49, 11, 12, 13, 14, 15, 16};
53 const Int_t boxWidth = 40;
55 TString inFileNameEve =
Form(
"eve-%d-isAll-nocurl.root", runID);
56 TString inFileNameBase =
Form(
"dst-%d.root", runID);
58 TString inFileNameEmb =
Form(
"dst-%d-emb-qgsm-4h-isAll-nocurl-BaseOff.root",
61 TString fnames[
COLS] = {inFileNameEve, inFileNameBase, inFileNameEmb};
62 TString treeNames[
COLS] = {
"bmndata",
"bmndata",
"bmndata"};
63 TString EHNames[
COLS] = {
"MCEventHeader.",
"DstEventHeader.",
"DstEventHeader."};
64 TString hitNames[
COLS] = {
"StsPoint",
"BmnInnerHits",
"BmnInnerHits"};
65 TString trackNames[
COLS] = {
"MCTrack",
"BmnGlobalTrack",
"BmnGlobalTrack"};
77 for (
Int_t ic = 0; ic < nColors; ic++) {
78 h[0][0][ic] =
new TH2D(
Form(
"h0-0-%d", ic),
"Hits XZ MC", 400, -boxWidth, boxWidth, 400, 0, 200);
79 h[0][1][ic] =
new TH2D(
Form(
"h0-1-%d", ic),
"Hits YZ MC", 400, -boxWidth, boxWidth, 400, 0, 200);
82 h[1][0][ic] =
new TH2D(
Form(
"h1-0-%d", ic),
"Hits XZ Base", 400, -boxWidth, boxWidth, 400, 0, 200);
83 h[1][1][ic] =
new TH2D(
Form(
"h1-1-%d", ic),
"Hits YZ Base", 400, -boxWidth, boxWidth, 400, 0, 200);
86 h[2][0][ic] =
new TH2D(
Form(
"h2-0-%d", ic),
"Hits XZ Embedded", 400, -boxWidth, boxWidth, 400, 0, 200);
87 h[2][1][ic] =
new TH2D(
Form(
"h2-1-%d", ic),
"Hits YZ Embedded", 400, -boxWidth, boxWidth, 400, 0, 200);
96 files[
i] =
new TFile(fnames[
i],
"READ");
97 if (files[
i]->IsOpen())
98 printf(
"file %s opened\n", fnames[
i].Data());
100 fprintf(stderr,
"file %s open error\n", fnames[
i].Data());
104 trees[
i] = (
TTree*)files[
i]->Get(treeNames[
i]);
108 for (
Int_t ic = 0; ic < nColors; ic++) {
120 printf(
" %d EH %08X\n",
i, EHs[
i]);
127 printf(
" %d EH %08X\n",
i, MCEH);
132 cout <<
"#recorded entries = " << nEvs <<
" in file" << endl;
139 iEv = (iEv == 0) ? iEv : iEv - 1;
142 iEv = (iEv < nEvs) ? iEv + 1 : iEv;
152 UInt_t EventId = MCEH->GetEventID();
153 printf(
"iEv = %d EventId = %u \n", iEv, EventId);
162 if (EventId == EHs[
i]->GetEventId())
164 if (EventId < EHs[
i]->GetEventId()) {
165 printf(
"\n%d tree %u event lost!\n",
i, EventId);
172 for (
Int_t ic = 0; ic < nColors; ic++)
173 h[
i][row][ic]->Reset();
177 h[
i][0][0]->
Fill(hit->GetX(), hit->GetZ());
178 h[
i][1][0]->
Fill(hit->GetY(), hit->GetZ());
186 printf(
"%d branch %d tracks\n",
i, tracks[
i]->GetEntriesFast());
189 if (iTrack > nColors - 2) {
190 printf(
"tracks overfull %d\n", iTrack);
194 if (track->GetSilTrackIndex() != -1) {
195 BmnTrack* silTr = (
BmnTrack*)silTrack[
i]->UncheckedAt(track->GetSilTrackIndex());
201 h[
i][0][iTrack + 1]->
Fill(hit->GetX(), hit->GetZ());
202 h[
i][1][iTrack + 1]->
Fill(hit->GetY(), hit->GetZ());
212 h[
i][0][iTrack + 1]->
Fill(hit->GetX(), hit->GetZ());
213 h[
i][1][iTrack + 1]->
Fill(hit->GetY(), hit->GetZ());
226 Int_t TrackID = hit->GetTrackID();
227 if (TrackID != iTrack)
229 h[
i][0][iTrack + 1]->
Fill(hit->GetX(), hit->GetZ());
230 h[
i][1][iTrack + 1]->
Fill(hit->GetY(), hit->GetZ());
234 Int_t TrackID = hit->GetTrackID();
235 if (TrackID != iTrack)
237 h[
i][0][iTrack + 1]->
Fill(hit->GetX(), hit->GetZ());
238 h[
i][1][iTrack + 1]->
Fill(hit->GetY(), hit->GetZ());
257 for (
Int_t iTrack = 0; iTrack < nColors; iTrack++)
259 h[col][row][iTrack]->
Draw(
"SAME");
261 h[col][row][iTrack]->
Draw(
"");
265 can->SaveAs(
Form(
"can-%d.pdf", runID));
270 for (
Int_t ic = 0; ic < nColors; ic++) {