23 #include "TClonesArray.h"
42 fRichProjections(NULL),
47 fDrawProjections(
true)
60 if (NULL == ioman) {Fatal(
"CbmRichEventDisplay::Init",
"RootManager not instantiated!");}
63 if (NULL ==
fRichHits) {Fatal(
"CbmRichEventDisplay::Init",
"No RichHit array!");}
66 if (NULL ==
fRichRings) { Fatal(
"CbmRichEventDisplay::Init",
"No RichRing array!");}
69 if (NULL ==
fRichPoints) {Fatal(
"CbmRichEventDisplay::Init",
"No RichPoint array!");}
72 if (NULL ==
fRichMatches) {Fatal(
"CbmRichEventDisplay::Init",
"No RichRingMatch array!");}
75 if (NULL ==
fRichProjections) {Fatal(
"CbmRichEventDisplay::Init",
"No RichProjection array!");}
78 if (NULL ==
fMcTracks ) {Fatal(
"CbmRichEventDisplay::Init",
"No MCTrack array!");}
94 ss <<
"rich_event_display_event_"<<
fEventNum;
95 TCanvas *
c =
new TCanvas(ss.str().c_str(), ss.str().c_str(), 800, 800);
98 TH2D* padU =
new TH2D(
"padU",
";x [cm];y [cm]", 1, -110., 110., 1, 90., 180);
100 padU->GetYaxis()->SetTitleOffset(0.75);
101 gPad->SetLeftMargin(0.1);
102 gPad->SetRightMargin(0.05);
106 TH2D* padD =
new TH2D(
"padD",
";x [cm];y [cm]", 1, -110., 110., 1, -180., -90.);
108 padD->GetYaxis()->SetTitleOffset(0.75);
109 gPad->SetLeftMargin(0.1);
110 gPad->SetRightMargin(0.05);
120 for (
int iP = 0; iP < nofProjections; iP++){
122 if (NULL == pr)
continue;
123 if ( (plane ==
"up" && pr->
GetY() >= 0.) ||
124 (plane ==
"down" && pr->
GetY() < 0.) ){
125 TMarker*
m =
new TMarker(pr->
GetX(), pr->
GetY(), 3.);
126 m->SetMarkerSize(0.7);
127 m->SetMarkerColor(kGreen+3);
135 int nofHits =
fRichHits->GetEntriesFast();
136 for (
int iH = 0; iH < nofHits; iH++){
138 if (NULL == hit)
continue;
139 if ( (plane ==
"up" && hit->
GetY() >= 0.) ||
140 (plane ==
"down" && hit->
GetY() < 0.) ){
142 TEllipse* hitDr =
new TEllipse(hit->
GetX(), hit->
GetY(), 0.6);
143 hitDr->SetFillColor(kRed);
144 hitDr->SetLineColor(kRed);
153 for (
int iR = 0; iR < nofRings; iR++){
155 if (NULL == ring)
continue;
156 if ( (plane ==
"up" && ring->
GetCenterY() >= 0.) ||
157 (plane ==
"down" && ring->
GetCenterY() < 0.) ){
166 for (
int iP = 0; iP < nofPoints; iP++){
168 if (NULL == point)
continue;
169 if ( (plane ==
"up" && point->
GetY() >= 0.) ||
170 (plane ==
"down" && point->
GetY() < 0.) ){
171 TEllipse* pointDr =
new TEllipse(point->
GetX(), point->
GetY(), 0.4);
184 circle->SetFillStyle(0);
185 circle->SetLineWidth(2);
186 circle->SetLineColor(kBlue);
189 center->SetMarkerColor(kBlue);
190 center->SetMarkerSize(0.4);