21 #include "TClonesArray.h"
37 fMCRichPointArray(NULL),
57 fh_Det1ev =
new TH2D(
"fh_Det1ev",
"points in detector plane (1 event)",170,-170,170,250,-250,250);
58 fh_Det1ev_zoom =
new TH2D(
"fh_Det1ev_zoom",
"points in detector plane (1 event, zoom in)",100,10,60,100,100,150);
59 fh_Detall =
new TH2D(
"fh_Detall",
"points in detector plane (all events)",170,-170,170,250,-250,250);
60 fh_n_vs_p =
new TH2D(
"fh_n_vs_p",
"Npoints versus momentum",150,0,15,100,0,400);
61 fh_v_el =
new TH2D(
"fh_v_el",
"(y,z) of production vertex of electrons",230,0,460,300,-300,300);
63 fh_Nall =
new TH1D(
"fh_Nall",
"Number of all rings in RICH",150,0,150);
64 fh_Nel =
new TH1D(
"fh_Nel",
"Number of electron rings in RICH",150,0,150);
65 fh_Nelprim =
new TH1D(
"fh_Nelprim",
"Number of electron (STS>6) rings in RICH",150,0,150);
66 fh_Npi =
new TH1D(
"fh_Npi",
"Number of pi rings in RICH",150,0,150);
67 fh_Nk =
new TH1D(
"fh_Nk",
"Number of K rings in RICH",150,0,150);
68 fh_Nhad =
new TH1D(
"fh_Nhad",
"Number of hadrons crossing PMT plane",50,0,50);
101 if ( NULL == det) Fatal(
"CbmRichTestSim::Init",
"no RICH Geo Node found!");
106 fDetZ = detPosLab.
Z() + detPosCen.
Z();
109 if (NULL == ioman) { Fatal(
"CbmRichTestSim::Init()",
"RootManager not instantised!");}
112 if ( NULL ==
fMCTrackArray) { Fatal(
"CbmRichTestSim::Init()",
"No MCTrack array!");}
115 if ( NULL ==
fMCRichPointArray) { Fatal(
"CbmRichTestSim::Init()",
"No RichPoint array!");}
130 Int_t Nhad, Nring, Nel, Nel_prim, Npi, Nk;
131 Nhad = Nring = Nel = Nel_prim = Npi = Nk = 0;
133 map<Int_t,Int_t> pointMap;
137 for(Int_t iPoint=0; iPoint<nPoints; iPoint++){
139 if( NULL == pPoint )
continue;
141 fh_Detall->Fill(position.X(),position.Y());
144 fh_Det1ev->Fill(position.X(),position.Y());
150 if (gcode != 50000050) Nhad++;
152 if (gcode == 50000050){
155 if (motherID == -1)
continue;
157 pointMap[motherID]++;
161 for (Int_t iMCTrack=0; iMCTrack<nMCTracks; iMCTrack++) {
163 if ( NULL == pTrack )
continue;
164 Int_t Npoints = pointMap[iMCTrack];
171 if (TMath::Abs(gcode) == 11) {
173 fh_v_el->Fill(vertex.Z(),vertex.Y());
176 if (TMath::Abs(gcode) == 211) Npi++;
177 if (TMath::Abs(gcode) == 321) Nk++;
189 cout <<
"--------------------------------------------------------------------------" << endl;
190 cout <<
"----------- Test Rich Simulation -----------" << endl;
192 cout <<
" Number of particles in RICH detector ----- event number " <<
fNEvents << endl;
193 cout <<
" hadrons in RICH (no Cherenkov photons) = " << Nhad << endl;
194 cout <<
" total rings = " << Nring << endl;
195 cout <<
" electrons = " << Nel << endl;
196 cout <<
" electrons (STS>=6) = " << Nel_prim << endl;
197 cout <<
" pions = " << Npi << endl;
198 cout <<
" Kaons = " << Nk << endl;
200 cout <<
"--------------------------------------------------------------------------" << endl;