90 FairRootManager* ioman = FairRootManager::Instance();
92 std::cout <<
"-E- PndLmdPerformanceTask::Init: "
93 <<
"RootManager not instantiated!" << std::endl;
122 true_tracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
128 true_points = (TClonesArray*) ioman->GetObject(
"LMDPoint");
151 fDetName =
new TClonesArray(
"TObjString");
152 ioman->Register(
"DetName",
"Geane",
fDetName, kTRUE);
154 fPro =
new FairGeanePro();
160 lmddim -> Read_transformation_matrices(
"",
true);
161 lmddim -> Read_transformation_matrices(
"",
false);
171 std::cout <<
" Setting up histograms in PndLmdPerformanceTask ";
176 gROOT->SetStyle(
"Plain");
177 const Int_t NRGBs = 5;
178 const Int_t NCont = 255;
179 Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
180 Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
181 Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
182 Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
183 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
184 gStyle->SetNumberContours(NCont);
185 gStyle->SetTitleFont(10*13+2,
"xyz");
186 gStyle->SetTitleSize(0.06,
"xyz");
187 gStyle->SetTitleOffset(1.3,
"y");
188 gStyle->SetTitleOffset(1.3,
"z");
189 gStyle->SetLabelFont(10*13+2,
"xyz");
190 gStyle->SetLabelSize(0.06,
"xyz");
191 gStyle->SetLabelOffset(0.009,
"xyz");
192 gStyle->SetPadBottomMargin(0.16);
193 gStyle->SetPadTopMargin(0.16);
194 gStyle->SetPadLeftMargin(0.16);
195 gStyle->SetPadRightMargin(0.16);
196 gStyle->SetOptTitle(1);
197 gStyle->SetOptStat(1);
199 gStyle->SetFrameFillColor(0);
200 gStyle->SetFrameFillStyle(0);
201 TGaxis::SetMaxDigits(3);
208 "hist_angular_distr_gen", 400, 2.e-3, 12.e-3, 400, -3.141, 3.141);
210 "hist_angular_distr_acc", 400, 2.e-3, 12.e-3, 400, -3.141, 3.141);
219 "hist_theta_over_mom_gen", 2000, 1., 20., 100, 2.e-3, 12.e-3);
221 "hist_theta_over_mom_acc", 2000, 1., 20., 100, 2.e-3, 12.e-3);
224 "hist_phi_over_mom_gen", 2000, 1., 20., 400, -3.141, 3.141);
226 "hist_phi_over_mom_acc", 2000, 1., 20., 400, -3.141, 3.141);
228 tree_results =
new TTree(
"tree_results",
"tree_results");
295 TCanvas temp_canvas(
"temp_canvas",
"canvas for initialization", 100, 100);
298 cout <<
" constructing histograms for " <<
nplanes <<
" planes with "
301 stringstream hist_name;
302 stringstream hist_title;
303 for (
unsigned int _iplane = 0; _iplane <
nplanes; _iplane++) {
308 hist_name <<
"hist_xy_plane_" << _iplane;
309 hist_title <<
"xy hit distribution plane " << _iplane;
310 hist_xy[_iplane] =
new TH2F(hist_name.str().c_str(),
311 hist_title.str().c_str(), 100, -10, 10, 100, -10, 10);
313 hist_xy[_iplane]->GetXaxis()->SetTitle(
"X [cm]");
314 hist_xy[_iplane]->GetYaxis()->SetTitle(
"Y [cm]");
319 hist_name <<
"hist_theta_init_plane_" << _iplane;
320 hist_title <<
"initial #Theta distribution plane " << _iplane;
322 hist_title.str().c_str(), 150, 0, 15e-3, 360, -3.141, +3.141);
330 hist_name <<
"hist_theta_in_plane_" << _iplane;
331 hist_title <<
"#Theta distribution at plane " << _iplane;
333 hist_title.str().c_str(), 200, 0, 20e-3, 360, -3.141, +3.141);
335 hist_theta_in[_iplane]->GetXaxis()->SetTitle(
"#Theta [rad]");
341 hist_name <<
"hist_rec_theta_with_plane_" << _iplane;
342 hist_title <<
"#Theta reconstructed distribution with plane " << _iplane;
344 hist_title.str().c_str(), 200, 0, 20e-3, 360, -3.141, +3.141);
352 hist_name <<
"hist_theta_diff_in_plane_" << _iplane;
353 hist_title <<
"#Delta#Theta distribution at plane " << _iplane;
355 hist_title.str().c_str(), 100, -40e-4, 40e-4, 360, -3.141, +3.141);
363 hist_name <<
"hist_theta_rec_diff_in_plane_" << _iplane;
364 hist_title <<
"#Delta#Theta reco distribution at plane " << _iplane;
366 hist_title.str().c_str(), 100, -40e-4, 40e-4, 360, -3.141, +3.141);
374 hist_name <<
"hist_theta_diff_rel_in_plane_" << _iplane;
375 hist_title <<
"#Delta#Theta/#Theta distribution at plane " << _iplane;
377 hist_title.str().c_str(), 100, -1, 1, 360, -3.141, +3.141);
385 hist_name <<
"hist_theta_rec_diff_rel_in_plane_" << _iplane;
386 hist_title <<
"#Delta#Theta/#Theta reco distribution at plane " << _iplane;
388 hist_title.str().c_str(), 100, -1, 1, 360, -3.141, +3.141);
398 hist_name <<
"hist_xy_plane_" << _iplane <<
"_sensor_" << _isensor;
399 hist_title <<
"xy hit distribution plane " << _iplane <<
" sensor "
401 hists_xy[_iplane][_isensor] =
new TH2F(hist_name.str().c_str(),
402 hist_title.str().c_str(), 100, -10, 10, 100, -10, 10);
403 hists_xy[_iplane][_isensor]->Draw();
404 hists_xy[_iplane][_isensor]->GetXaxis()->SetTitle(
"X [cm]");
405 hists_xy[_iplane][_isensor]->GetYaxis()->SetTitle(
"Y [cm]");
410 hist_name <<
"hist_xy_local_plane_" << _iplane <<
"_sensor_" << _isensor;
411 hist_title <<
"xy local hit distribution plane " << _iplane <<
" sensor "
413 hists_xy_local[_iplane][_isensor] =
new TH2F(hist_name.str().c_str(),
414 hist_title.str().c_str(), 100, -2, 2, 100, -2, 2);
416 hists_xy_local[_iplane][_isensor]->GetXaxis()->SetTitle(
"X [cm]");
417 hists_xy_local[_iplane][_isensor]->GetYaxis()->SetTitle(
"Y [cm]");
419 hist_name <<
"hist_theta_init_plane_" << _iplane <<
"_sensor_"
421 hist_title <<
"initial #Theta distribution plane " << _iplane
422 <<
" sensor " << _isensor;
424 hist_name.str().c_str(), hist_title.str().c_str(), 150, 0,
434 hist_name <<
"hist_theta_in_plane_" << _iplane <<
"_sensor_"
436 hist_title <<
"#Theta distribution at plane " << _iplane
437 <<
" sensor " << _isensor;
438 hists_theta_in[_iplane][_isensor] =
new TH1F(hist_name.str().c_str(),
439 hist_title.str().c_str(), 200, 0, 20e-3);
443 hists_theta_in[_iplane][_isensor]->GetYaxis()->SetTitle(
"entries");
448 hist_name <<
"hist_theta_diff_in_plane_" << _iplane <<
"_sensor_"
450 hist_title <<
"#Delta#Theta distribution at plane " << _iplane
451 <<
" sensor " << _isensor;
453 hist_name.str().c_str(), hist_title.str().c_str(), 100,
457 "#Delta#Theta [rad]");
463 hist_name <<
"hist_theta_diff_rel_in_plane_" << _iplane
464 <<
"_sensor_" << _isensor;
465 hist_title <<
"#Delta#Theta/#Theta distribution at plane "
466 << _iplane <<
" sensor " << _isensor;
468 hist_name.str().c_str(), hist_title.str().c_str(), 100, -1,
472 "#Delta#Theta/#Theta");
481 hist_name <<
"hist_theta_diff_prop_true";
482 hist_title <<
"#Delta#Theta true distribution (Error by Geane back propagation) ";
484 hist_title.str().c_str(), 300, -10e-5, 10e-5, 360, -3.141, +3.141);
492 hist_name <<
"hist_theta_diff_prop_true_o_theta";
493 hist_title <<
"#Delta#Theta true distribution (Error by Geane back propagation) ";
495 hist_title.str().c_str(), 300, -10e-5, 10e-5, 200, 2.e-3, 10.e-3);
501 std::cout <<
" done " << std::endl;
514 fgGeoMan = (TGeoManager*) gROOT->FindObject(
"FAIRGeom");
515 if (!
fgGeoMan) cout <<
"Error: could not find the geometry manager!" << endl;
static PndLmdDim * Instance()
static PndGeoHandling * Instance()
void init(GFAbsBField *b)
set the magntic field here. Magnetic field classes must be derived from GFAbsBField ...
static GFFieldManager * getInstance()