FairRoot/PandaRoot
Hough.C
Go to the documentation of this file.
1 int Hough(int i)
2 {
3 gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
4  gSystem->Load("libriemann.C");
5 
6  TString MCFile = "Mvd_Test.root";
7 
8  PndFileNameCreator creator(MCFile.Data());
9  TString DigiFile = creator.GetDigiFileName(false).c_str();
10  TString RecoFile = creator.GetRecoFileName(false).c_str();
11  TString TrackFFile = creator.GetTrackFindingFileName(false).c_str();
12 
13  TH2D h2("h2","h2", 200,0,TMath::Pi(), 200,-TMath::Pi(), TMath::Pi());
14 
15  TFile* fReco = new TFile(RecoFile.Data());
16 
17 
18  TTree* t = (TTree*)(fReco->Get("pndsim"));
19 
20  t->StartViewer();
21 
22  TClonesArray* PixReco = new TClonesArray("PndSdsHit");
23  TClonesArray* StripReco = new TClonesArray("PndSdsHit");
24 
25  t->SetBranchAddress("MVDHitsPixel", &PixReco);
26  t->SetBranchAddress("MVDHitsStrip", &StripReco);
27 
28  t->GetEntry(i);
29 
30  for (int l = 0; l < PixReco->GetEntriesFast(); l++)
31  {
32  PndSdsHit* myPixHit = (PndSdsHit*)PixReco->At(l);
33  TVector3 hit;
34  myPixHit->Position(hit);
35  h2.Fill(hit.Theta(), hit.Phi());
36  std::cout << "Pixel " << l << " : ";
37  //myPixHit->Print();
38  std::cout << "Theta: " << hit.Theta() << " Phi: " << hit.Phi() << std::endl;
39 
40  }
41 
42  for (int l = 0; l < StripReco->GetEntriesFast(); l++)
43  {
44  PndSdsHit* myStripHit = (PndSdsHit*)StripReco->At(l);
45  TVector3 striphit;
46  myStripHit->Position(striphit);
47  h2.Fill(striphit.Theta(), striphit.Phi());
48  std::cout << "Strip " << l << " : ";
49  //myStripHit->Print();
50  std::cout << "Theta: " << striphit.Theta() << " Phi: " << striphit.Phi() << std::endl;
51  }
52  gStyle->SetPalette(1);
53  h2.DrawCopy("colz");
54  return 0;
55 }
TString RecoFile
Int_t i
Definition: run_full.C:25
TString DigiFile
int Hough(int i)
Definition: Hough.C:1
A simple class which adds the corresponding file extensions to a given base class.
PndMvdCreateDefaultApvMap * creator
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
TString MCFile
TTree * t
Definition: bump_analys.C:13
Double_t Pi