FairRoot/PandaRoot
plotHoughSpaces.C
Go to the documentation of this file.
1 // Martin Galuska
2 // currently not used, might be useful in the future
3 
5 {
6 
7  UInt_t fVerbose = 0;
8 
9 
10  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
11  // basiclibs(); // this gives an error when compiling
12 
13  // Load the example libraries
14  gSystem->Load("libGeoBase");
15  gSystem->Load("libParBase");
16  gSystem->Load("libBase");
17  gSystem->Load("libField");
18 
19 
20 
21  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
22  gROOT->SetStyle("Plain");
23  gStyle->SetMarkerStyle(20);
24  gStyle->SetOptStat(0);
25  gStyle->SetPalette(1);
26 
27 
28 
29  // -----------------------------------------------------------------------
30  // FileNames
31  TString RecoFile = "reco_complete.root";
32  TString SimFile = "sim_complete.root";
33  // -----------------------------------------------------------------------
34 
35 
36 
37 
38 
39 
40  // General stuff
41  const Double_t BeamMomentum = 15.; //6.991;
42  const Double_t meinpi = 3.14159265;
43  const Int_t ResolutionX = 800, ResolutionY = 600; // for plotting
44 
45  // -----------------------------------------------------------------------
46 
47 
48 
49 
50 
51 
52 
53 
54  // get Hough spaces
55  TFile* fReco = new TFile(RecoFile.Data());
56  TTree* tReco = (TTree*) (fReco->Get("pndsim"));
57  //tReco->StartViewer();
58 
59  PndFtsHoughSpace* fHoughSpace = new PndFtsHoughSpace();
60  // TODO here I should do something else instead
61  tReco->SetBranchAddress("FTSHit", &fHoughSpace);
62 
63 
64  if (nEvents==0) nEvents = tReco->GetEntriesFast();
65  for (Int_t iEvent=0; iEvent< nEvents; ++iEvent)
66  {
67  cout << "processing event " << iEvent << "\n";
68  tReco->GetEntry(iEvent); // Look at event iEvent
69 
70 
71 
72 
73 
74 
75  TCanvas *choughspaceLine = new TCanvas("choughspaceLine", "choughspaceLine",
76  ResolutionX, ResolutionY);
77  fHoughSpace->DrawCopy("Lego2z");
78 
79 
80  } // end of event loop
81  return 0;
82 
83 }
int plotHoughSpaces()
int fVerbose
Definition: poormantracks.C:24
TString RecoFile
double BeamMomentum
Definition: sim_ftof_stof.C:17
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
Class for Hough space based on TH2S (for the moment). Saves the hits which enter this Hough space and...