FairRoot/PandaRoot
Functions
gem_material_ana1.C File Reference
#include <map>
#include <string>
#include <iostream>
#include <vector>
#include <TStopwatch.h>
#include <TFile.h>
#include <TTree.h>
#include <TGeoManager.h>
#include <TClonesArray.h>
#include <TH1D.h>
#include <TROOT.h>
#include <TH2D.h>
#include <TVector3.h>
#include <TPad.h>
#include <TCanvas.h>
#include <THStack.h>
#include <TProfile.h>
#include <TProfile2D.h>
#include <TColor.h>

Go to the source code of this file.

Functions

int gem_material_ana1 (int nEvents=1000000, bool verbose=false)
 

Function Documentation

int gem_material_ana1 ( int  nEvents = 1000000,
bool  verbose = false 
)

Definition at line 33 of file gem_material_ana1.C.

References a, allDigiFile, b, can1, can2, can3, can4, can5, ctime, detname, Double_t, DrawCopy(), f, Fill(), geoMan, PndMCTrack::GetMomentum(), PndMCTrack::GetMotherID(), gGeoManager, hisrz, hisxy, i, inFile, mc_array, MCFile, mom, name, name2, name3, name4, name5, nEvents, out, par, parFile, phi, point, res, rtime, sysFile, t, theta, timer, TString, and verbose.

34 {
35 // int nEvents = 100;
36 // verbose = true;
37  bool draw1 = true;
38  bool draw2 = true;
39  bool draw3 = true;
40  bool draw4 = true;
41 
42 // ----- Load libraries ------------------------------------------------
43 // gROOT->Macro("../Libs.C");
44  gROOT->LoadMacro("../run/Tools.C");
45  //LoadPandaStyle();
46 
47  TString sysFile = gSystem->Getenv("VMCWORKDIR");
48 
49 
50  TString MCFile = "gem_mat_sim_geantino.root";
51  //TString MCFile = "gem_mat_sim_withoutpipe.root";
52  //TString MCFile = "gem_mat_sim_GemPipe.root";
53  //TString MCFile = "gem_mat_sim_Gem.root";
54 
55  TString parFile = "gem_mat_simparams_geantino.root";
56  //TString parFile = "gem_mat_simparams_withoutpipe.root";
57  //TString parFile = "gem_mat_simparams_GemPipe.root";
58  //TString parFile = "gem_mat_simparams_Gem.root";
59 
60  // std::cout << "Output File: " << outFile.Data()<< std::endl;
61 
62  // ----- Timer --------------------------------------------------------
63  TStopwatch timer;
64  timer.Start();
65  // ------------------------------------------------------------------------
66 
67  std::string inFile = "../../geometry/pndcave.geo";
68  std::string inFile = "../../geometry/pipebeamtarget.geo";
69  std::string inFile = "../../geometry/gem_3Stations_realistic_v1.root";
70  TString allDigiFile = sysFile+"/macro/params/gem_3Stations_realistic_v1.root";
71 
72  TFile* f = new TFile(MCFile.Data()); // the sim file you want to analyse
73  TTree* t =(TTree *) f->Get("pndsim") ;
74  TFile* par = TFile::Open(parFile.Data());
75 
76  cout << "file name = " << f->GetName() << ", tree = " << t->GetName() << endl;
77 
78  TClonesArray* mc_array=new TClonesArray("PndMCTrack");
79  t->SetBranchAddress("MCTrack",&mc_array );//Branch names
80 
81  TClonesArray* rad_array=new TClonesArray("FairRadLenPoint");
82  t->SetBranchAddress("RadLen",&rad_array);
83 
84  // TGeoManager *geoMan = (TGeoManager*) gDirectory->Get("FAIRGeom");
85  TGeoManager *geoMan = (TGeoManager*) gDirectory->Get("FairGeoParSet");
86  //PndGeoHandling* fGeoH = new PndGeoHandling();
87 
88 //---------------------------------------------------------------------------------
89  // histos
90  int res = 1000; int angres = 180;
91  TH1D* hRadLenDistMat = new TH1D("radldm","Material thicknesses",100,0,15);
92  TH1D* hRadLenDistEff = new TH1D("radlde","Effective Radiation length values per volume",100,0,0.2);
93  TH2D* hisxy = new TH2D("hisxy","MC Points, xy view",res,-85.,85.,res,-85.,85.);
94  TH2D* hisrz = new TH2D("hisrz","MC Points, rz view",res,-90.,210.,res,-85.,85.);
95 
96  TClonesArray* arrhisxy = new TClonesArray("TH2D");
97  TClonesArray* arrhisrz = new TClonesArray("TH2D");
98  TClonesArray* arrprothe = new TClonesArray("TProfile");
99  TClonesArray* arrprophi = new TClonesArray("TProfile");
100  TClonesArray* arrprothephi = new TClonesArray("TProfile2D");
101 
102  std::vector<std::string> namesList;
103 
104  //namesList.push_back("pipe");
105  //namesList.push_back("pipeTS");
106  //namesList.push_back("cave");//Reste, ausser "/cave"
107  //namesList.push_back("Tcross");
108  //namesList.push_back("Sensor");
109  //namesList.push_back("Disk");
110  //namesList.push_back("Gemriddle");
111  namesList.push_back("Seg");
112  //namesList.push_back("GEM");
113  //namesList.push_back("Volume");
114  //namesList.push_back("Ring");
115  //namesList.push_back("riddle");
116  //namesList.push_back("DISK");
117  //namesList.push_back("GemHLayers");
118  //namesList.push_back("copperbar");
119 
120  double radlList[100];
121 
122  //std::map<int,double> radlList;
123  //radlList.insert(std::pair<int,double>(0,7.));
124  int maxnames=namesList.size();
125  cout << "before maxnames loop" << endl;
126 
127  for(int i=0;i<maxnames;i++){
128  TString name = "hisxy-";
129  TString name2 = "hisrz-";
130  TString name3 = "hthe-";
131  TString name4 = "hphi-";
132  TString name5 = "hthephi-";
133 
134  name += i; name2 += i; name3 += i; name4 += i; name5 += i;
135 
136  new ((*arrhisxy)[i]) TH2D(name.Data(),(namesList[i]).c_str(),2*res,-85.,85.,2*res,-85.,85.);
137  new ((*arrhisrz)[i]) TH2D(name2.Data(),(namesList[i]).c_str(),2*res,-100.,225.,2*res,-85.,85.);
138  new ((*arrprothe)[i]) TProfile(name3.Data(),(namesList[i]).c_str(),angres,0.,180.);//angres,0.,TMath::Pi());
139  new ((*arrprophi)[i]) TProfile(name4.Data(),(namesList[i]).c_str(),angres,-180.,180.);//angres,-1.*TMath::Pi(),TMath::Pi());
140  new ((*arrprothephi)[i]) TProfile2D(name5.Data(),(namesList[i]).c_str(),angres,0.,180.,angres,-180.,180.);
141  //cout << "why?" << endl;
142  radlList[i] = 0.;
143  }
144 
145  cout << "after maxnames loop " << endl;
146 
147  new ((*arrhisxy)[maxnames]) TH2D("hisxy-rest","Gemrest",2*res,-85.,85.,2*res,-85.,85.);
148  new ((*arrhisrz)[maxnames]) TH2D("hisrz-rest","Gemrest",2*res,100.,225.,2*res,-85.,85.);
149  new ((*arrprothe)[maxnames]) TProfile("hthe-rest","Gemrest",angres,0.,180.);//angres,0.,TMath::Pi());
150  new ((*arrprophi)[maxnames]) TProfile("hphi-rest","Gemrest",angres,-180.,180.);//angres,-1.*TMath::Pi(),TMath::Pi());
151  new ((*arrprothephi)[maxnames]) TProfile2D("hthephi-rest","Gemrest",angres,0.,180.,angres,-180.,180.);
152  radlList[maxnames]=0.;
153 
154  TProfile* thetaprofile = new TProfile("thetaprof","(a)Radiation length vs #theta;#theta[degree];X/X_{0}",angres,0.,180.);//angres,0.,TMath::Pi());
155  TProfile* phiprofile = new TProfile("phiprof","(b)Radiation length vs #phi;#phi[degree];X/X_{0}",angres,-180.,180.);//angres,-1.*TMath::Pi(),TMath::Pi());
156 
157 // TH2D* histhephi = new TH2D("hThePhi","",100,0.2,TMath::Pi()-0.3,100,-1.*TMath::Pi(),TMath::Pi());
158  TProfile2D* histhephi = new TProfile2D("hThePhi","",angres,0.0,180.0,angres,-180.,180.);//-1.*TMath::Pi(),TMath::Pi());
159  histhephi->SetTitle("(c)Radiation length map vs #theta & #phi;#theta[degree];#phi[degree];X/X_{0}");
160 
161  TH1D* hisx = new TH1D("hX","X",100,-80.,80.);
162  TH1D* hisy = new TH1D("hY","Y",100,-80.,80.);
163  TH1D* hisz = new TH1D("hZ","Z",100,0.,210.);
164 
165  TString detname,volname;
166  double radlen=0.,effradl=0.,effradlsum=0.,theta=0.,phi=0.;
167  TVector3 in, out, dist, point;
168  TVector3 vtx, mom;
169 
170  cout << "before event lop" << endl;
171  for (Int_t event=0; event<nEvents && event<t->GetEntriesFast(); event++)
172  {
173  t->GetEntry(event);
174  if(verbose) cout<<"Event No "<<event<<endl;
175  else if (!(event%100)) cout <<"Event No "<<event<<endl;
176 
177  //cout << "before track loop" << endl;
178  //cout << "there are " << mc_array->GetEntriesFast() << " tracks" << endl;
179 
180  for (Int_t trackno=0; trackno<mc_array->GetEntriesFast();trackno++){
181  PndMCTrack* aTrack = (PndMCTrack*)mc_array->At(trackno);
182  //if ( !aTrack ) cout << "adg" << endl;
183  if (aTrack->GetMotherID()==-1)
184  {
185  mapMCIndex[trackno] = trackno;
186  }
187  else continue;
188 
189  mom = aTrack->GetMomentum();
190  // cout << " got mom = " << mom.X() << endl;
191 
192  theta = mom.Theta()*TMath::RadToDeg(); phi = mom.Phi()*TMath::RadToDeg();
193 // if(theta < 0.05 || theta > (TMath::Pi()-0.05)) continue; // cut strange angles
194 // vtx = aTrack->GetStartVertex();
195 
196  effradl=0.; effradlsum=0.;
197  for(int i=0; i<100; i++) radlList[i]=0.;
198 
199  //cout << "before radlen loop" << endl;
200 
201  for (Int_t k=0; k<rad_array->GetEntriesFast(); k++){
202  FairRadLenPoint* radpoint = (FairRadLenPoint*)rad_array->At(k);
203  if (radpoint->GetTrackID() != trackno) continue;
204 
205  // cout << "got point " << k << endl;
206 
207  radlen = radpoint->GetRadLength();
208  in = radpoint->GetPosition();
209  out = radpoint->GetPositionOut();
210  dist = in - out;
211  //point.SetXYZ(0.5*(in.x()+out.x()),0.5*(in.y()+out.y()),0.5*(in.z()+out.z()));
212  point.SetXYZ(0.5*(in.x()+in.x()),0.5*(in.y()+in.y()),0.5*(in.z()+in.z()));
213 
214  // cout << "got dist = " << dist.X() << endl;
215 
216  if(in.Mag() < 0.02) continue; // cut target // Mag()= magnitude=rho in spherical coordinates=sqrt(x*x+y*y+z*z)
217 
218  effradl = dist.Mag()/radlen;
219  //cout << " effradl = " << effradl << endl;
220  effradlsum += effradl;
221 
222  //cout << "ADDED " << effradl << " to the sum (" << effradlsum << ")" << endl;
223 
224  //cout << " effradlsum = " << effradlsum << endl;
225 
226  if ( !geoMan) cout << "have no manager" << endl;
227  //cout << "got manager at " << point.x() << " " << point.y() << " " << point.z() << endl;
228 
229  TGeoNode* node = gGeoManager->FindNode(point.x(),point.y(),point.z());
230  if( 0==node)
231  {
232  std::cout<<"Warning: There is a node not defined properly!"<<std::endl;
233  cout<<"\tEvent No "<<event<<" \t RadLenPoint No."<< k <<endl;
234  continue;
235  }
236 
237  //cout << "got node!" << endl;
238  node->cd();
239 // detname = geoMan->GetPath();
240  volname = node->GetVolume()->GetName();
241  //cout << "for point " << point.x() << "," << point.y() << "," << point.z() << " got vol "
242  //<< volname.Data() << endl;
243 
244  // if(verbose)cout<<detname.Data()<<endl;
245 
246  if("cave" == volname && point.Mag() > 20. ) {
247  // cout << " CONTINUE! in " << volname << " at " << point.Mag() << endl;
248  continue; // cut mainly the outer cave
249  }
250 
251 
252  if(verbose){
253  cout<<"---> "<<volname.Data()<<endl;
254  }
255 
256  hRadLenDistMat->Fill(dist.Mag());
257  hRadLenDistEff->Fill(effradl);
258 
259  hisx->Fill(in.X(),effradl);
260  hisy->Fill(in.Y(),effradl);
261  hisz->Fill(in.Z(),effradl);
262 
263  hisxy->Fill(in.X(),in.Y());
264  if(in.Y()>0.) hisrz->Fill(in.Z(),in.Perp());
265  else hisrz->Fill(in.Z(),-1.*in.Perp());
266 
267  //cout << "NAMEIS " << volname.Data() << endl;
268 
269  int selected = maxnames;
270  for(int i=0; i<namesList.size(); i++){
271  if (volname.Contains( (namesList[i]).c_str())){
272  selected=i;
273  break;
274  }
275  }
276 
277  radlList[selected]+=effradl;
278  //cout << "ADDING " << effradl << " (radlList[" << selected << "] = " << radlList[selected] << ") for volume " << volname << " //// " << radlList[0]+radlList[1] << endl;
279  ((TH2D*)arrhisxy->At(selected))->Fill(point.X(),point.Y(),effradl);
280  if(point.Y()>0.) ((TH2D*)arrhisrz->At(selected))->Fill(point.Z(),point.Perp(),effradl); // Perp() get transverse component
281  else ((TH2D*)(arrhisrz->At(selected)))->Fill(point.Z(),-1.*point.Perp(),effradl);
282  }//radpoints
283 
284  thetaprofile->Fill(theta,effradlsum);
285  phiprofile->Fill(phi,effradlsum);
286  histhephi->Fill(theta,phi,effradlsum);
287 
288  // here add cout for effradlsum
289  //cout << "effradlsum = " << " " << effradlsum << endl;
290 
291  for(int i=0;i<=maxnames;i++){
292  effradl=radlList[i];
293 
294  //here add cout for effradl
295  //cout << "effradl(" << i << ") = " << " " << effradl << endl;
296 
297  ((TProfile*)arrprothe->At(i))->Fill(theta,effradl);
298  ((TProfile*)arrprophi->At(i))->Fill(phi,effradl);
299  ((TProfile2D*)arrprothephi->At(i))->Fill(theta,phi,effradl);
300  }
301 
302  }//tracks
303 
304  }// end for event
305  cout << "finished the loop" << endl;
306 
307 
308  Int_t a=3,b=3;
309 int resol = 250;
310 if(draw1){
311 TCanvas* can1 = new TCanvas("can1","MCHit view in GEM",0,0,a*resol,b*resol);
312 can1->Divide(a,b);
313 
314 can1->cd(1);
315 hisxy->SetStats(false);
316 hisxy->DrawCopy("colz");
317  cout << "doing 2" << endl;
318 
319  can1->cd(2);
320  hisrz->SetStats(false);
321  hisrz->DrawCopy("colz");
322  cout << "doing 3" << endl;
323 
324  can1->cd(3);
325 
326  cout << gPad->GetName() << endl;
327  //cout << "Ja" << endl;
328  //TPad* gPad = (TPad*) gPad;
329  //cout << "Ja" << endl;
330  if ( !gPad ) cout << "have no damn pad" << endl;
331  //cout << "gotpad?" << endl;
332  cout << gPad->GetName()<< endl;
333  gPad->Divide(200,200);
334  //cout << "Ja" << endl;
335  gPad->cd(1);
336  //cout << "Ja" << endl;
337  hisx->SetFillColor(38);
338  //cout << "Ja" << endl;
339  hisx->DrawCopy();
340  //cout << "Ja" << endl;
341  gPad->cd(2);
342  //cout << "Ja" << endl;
343  hisy->SetFillColor(45);
344  //cout << "Ja" << endl;
345  hisy->DrawCopy();
346  //cout << "Ja" << endl;
347  gPad->cd(3);
348  //cout << "Ja" << endl;
349  hisz->SetFillColor(60);
350  //cout << "Ja" << endl;
351  hisz->DrawCopy();
352  gPad->cd(4);
353 
354  cout << "doing 4" << endl;
355 
356  THStack* hs = new THStack("hs","test stacked histograms");
357  //makes no sens - just test technics
358  hs->Add(hisx);
359  hs->Add(hisy);
360  //hs->Add(hisz);
361  hs->Draw();
362 
363  // THStack* hsz = new THStack("hsz","test stacked histograms");
364  // //makes no sens - just test technics
365  // hs->Add(hisz);
366  // hs->Draw();
367 
368 
369  // TLegend* legend = BuildLegend_THStack( hs, 0.8, 0.55, 0.98, 0.98);
370  TLegend* legend = new TLegend(0.8, 0.55, 0.98, 0.98);
371  legend->AddEntry(hisx,"","F");
372  legend->AddEntry(hisy,"","F");
373  //legend->AddEntry(hisz,"","F");
374  legend->Draw();
375 
376 can1->cd(4);
377 gPad->SetLogy();
378 hRadLenDistMat->SetFillColor(38);
379 hRadLenDistMat->DrawCopy();
380 
381 can1->cd(5);
382 gPad->SetLogy();
383 hRadLenDistEff->SetFillColor(38);
384 hRadLenDistEff->DrawCopy();
385 
386 can1->cd(6);
387  cout << gPad->GetName() << endl;
388  //cout << "Ja" << endl;
389  //TPad* gPad = (TPad*) gPad;
390  //cout << "Ja" << endl;
391  if ( !gPad ) cout << "have no damn pad" << endl;
392  //cout << "gotpad?" << endl;
393  cout << gPad->GetName()<< endl;
394  gPad->Divide(200,200);
395  //cout << "Ja" << endl;
396  gPad->cd(1);
397  //cout << "Ja" << endl;
398  hisx->SetFillColor(38);
399  //cout << "Ja" << endl;
400  hisx->DrawCopy();
401  //cout << "Ja" << endl;
402  gPad->cd(2);
403  //cout << "Ja" << endl;
404  hisy->SetFillColor(45);
405  //cout << "Ja" << endl;
406  hisy->DrawCopy();
407  //cout << "Ja" << endl;
408  gPad->cd(3);
409  //cout << "Ja" << endl;
410  hisz->SetFillColor(60);
411  //cout << "Ja" << endl;
412  hisz->DrawCopy();
413  gPad->cd(4);
414 
415  cout << "doing 4" << endl;
416 
417  THStack* hs = new THStack("hs","test stacked histograms");
418  //makes no sens - just test technics
419  //hs->Add(hisx);
420  //hs->Add(hisy);
421  hs->Add(hisz);
422  hs->Draw();
423 
424  // TLegend* legend = BuildLegend_THStack( hs, 0.8, 0.55, 0.98, 0.98);
425  TLegend* legend = new TLegend(0.8, 0.55, 0.98, 0.98);
426  //legend->AddEntry(hisx,"","F");
427  //legend->AddEntry(hisy,"","F");
428  legend->AddEntry(hisz,"","F");
429  legend->Draw();
430 
431 can1->cd(7);
432 gPad->SetLogy();
433 thetaprofile->SetFillColor(60);
434 thetaprofile->SetLineColor(60);
435 thetaprofile->Draw("hist");
436 
437 can1->cd(8);
438 gPad->SetLogy();
439 phiprofile->SetFillColor(45);
440 phiprofile->SetLineColor(45);
441 phiprofile->Draw("hist");
442 
443  can1->cd(9);
444  histhephi->SetStats(false);
445  histhephi->DrawCopy("colz");
446 
447 }
448 
449 
450 if(draw2){
451 resol = 250;
452 a=2,b=1;
453 TCanvas* can2 = new TCanvas("can2","MCHit view in GEM",50,50,a*2*resol,b*2*resol);
454 can2->Divide(a,b);
455 
456 resol = 300;
457 //a=maxnames+2, b=1;
458  a=2, b=1;
459 TCanvas* can4 = new TCanvas("can4","MCHit view in GEM",100,100,a*resol,b*resol);
460 can4->Divide(a,b);
461 //can4->Divide(3,b);
462 /*EColor colors[12] =
463  {kOrange,kAzure,kTeal ,kRed,kBlue,kGreen, kMagenta,kCyan,kYellow ,kPink,kViolet,kSpring };*/
464 //int colors[8] = {60,15,45,30,30,50,80,55};
465 //int colors[8] = {1,2,3,4,5,6,7,8};
466 int colors[5] = {60,45,15,30,80};
467 int coloff = -0;
468 
469 THStack* thetastack = new THStack("thetastack","");
470 thetastack->SetTitle("(a)Radiation length vs #theta;#theta[degree];X/X_{0} ");
471 THStack* phistack = new THStack("phistack","");
472 phistack->SetTitle("(b)Radiation length vs #phi;#phi[degree];X/X_{0} ");
473 
474 TProfile* aprof=0;
475 TH1D* ahist=0;
476 TLegend* legMat=new TLegend(0.6, 0.75, 0.8, 0.98);
477 
478 for(int i=maxnames;i>=0;i--){
479  aprof=(TProfile*)arrprothe->At(i);
480  ahist=aprof->ProjectionX();
481  ahist->SetFillColor(colors[i] + coloff);
482  ahist->SetLineColor(colors[i] + coloff);
483  legMat->AddEntry(ahist,"","F");
484  can4->cd(i+1);
485  gPad->SetLogy();
486  ahist->DrawCopy("hist");
487  thetastack->Add(ahist);
488 
489  aprof=(TProfile*)arrprophi->At(i);
490  ahist=aprof->ProjectionX();
491  ahist->SetFillColor(colors[i] + coloff);
492  ahist->SetLineColor(colors[i] + coloff);
493  phistack->Add(ahist);
494 
495  }
496  can2->cd(1);
497  thetastack->SetMaximum(2.0);
498  //thetastack->SetMaximum(7.6);
499  //thetastack->SetMaximum(0.6);
500  thetastack->Draw("hist,nostack");
501  legMat->Draw();
502 
503  can2->cd(2);
504  //phistack->SetMaximum(1.0);
505  phistack->SetMaximum(1.8);
506  //phistack->SetMaximum(0.4);
507  //phistack->SetMaximum(1.5);
508  phistack->Draw("hist,nostack");
509  legMat->Draw();
510 
511  }
512 //-------------------------------------------------------------------------------------
513 if(draw4){
514  resol = 250;
515  //a=maxnames+2, b=1;
516  a=2, b=1;
517  TCanvas* can5 = new TCanvas("can5","RadMap",50,50,a*2*resol,b*2*resol);
518  can5->Divide(a,b);
519  //can5->Divide(3,b);
520  TProfile2D* thephimap = new TProfile2D("thephimap","",angres,0.,180.,angres,-180.,180.);
521  thephimap->SetTitle("Radiation length map vs #theta & #phi;#theta[degree];#phi[degree];X/X_{0}");
522 
523  TProfile2D* bprof=0;
524  TLegend* legMat=new TLegend(0.6, 0.75, 0.8, 0.98);
525 
526  for(int i=maxnames;i>=0;i--){
527  bprof=(TProfile2D*)arrprothephi->At(i);
528  legMat->AddEntry(bprof,"","F");
529  can5->cd(i+1);
530  thephimap->SetStats(false);
531  bprof->DrawCopy("colz");
532  //legMat->Draw();
533  }
534 
535  }
536  //------------------------------------------------------------------------------------------------
537 
538 if(draw3){
539 
540  //a=maxnames+2,b=2;
541  a=maxnames+1,b=2;
542 if(a>4) resol = int(1200/a);
543 TCanvas* can3 = new TCanvas("can3","MCHit view in GEM",150,150,a*resol,b*resol);
544 can3->Divide(a,b);
545 
546 for(int i=0; i<a ;i++){
547  can3->cd(i+1);
548  ((TH2D*)arrhisxy->At(i))->DrawCopy("colz");
549  can3->cd(i+a+1);
550  ((TH2D*)arrhisrz->At(i))->DrawCopy("colz");
551  gStyle->SetOptStat();
552 }
553  }
554 
555 can1->Print("outAnaGemSim1.ps");
556  // ----- Finish -------------------------------------------------------
557  timer.Stop();
558  Double_t rtime = timer.RealTime();
559  Double_t ctime = timer.CpuTime();
560  cout << endl << endl;
561  cout << "Macro finished succesfully." << endl;
562  //cout << "Output file is " << outFile << endl;
563  //cout << "Parameter file is " << parFile << endl;
564  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
565  cout << endl;
566  // ------------------------------------------------------------------------
567 
568  return 0;
569 }
Int_t res
Definition: anadigi.C:166
Int_t i
Definition: run_full.C:25
TTree * b
#define verbose
TGeoManager * geoMan
Double_t par[3]
TVector3 GetMomentum() const
Definition: PndMCTrack.h:78
TClonesArray * mc_array
Definition: anaLmdCluster.C:25
Double_t mom
Definition: plot_dirc.C:14
TCanvas * can4
Definition: anaLmdReco.C:203
TString inFile
Definition: hit_dirc.C:8
TGeoManager * gGeoManager
TString allDigiFile
Definition: hit_muo.C:36
Int_t a
Definition: anaLmdDigi.C:126
TCanvas * can5
Definition: anaLmdReco.C:211
TString sysFile
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
TClonesArray * point
Definition: anaLmdDigi.C:29
TFile * f
Definition: bump_analys.C:12
TString detname
Definition: anasim.C:61
TFile * out
Definition: reco_muo.C:20
TH2D * hisxy
Definition: anaLmdDigi.C:38
TString name
Double_t ctime
Definition: hit_dirc.C:114
TH2D * hisrz
Definition: anaLmdDigi.C:41
HISThit_ene Fill(sum_hit_ene)
TCanvas * can2
TString MCFile
TTree * t
Definition: bump_analys.C:13
TCanvas * can1
Int_t GetMotherID() const
Definition: PndMCTrack.h:74
Double_t rtime
Definition: hit_dirc.C:113
TCanvas * can3
mcTheta DrawCopy()