Go to the source code of this file.
Definition at line 8 of file ReadHits.C.
References can1, can2, directory, f, fGeoH, geomFile, PndGeoHandling::GetPath(), h, name, point, t, TString, and y.
13 const Int_t numSens = 6;
17 SensName[0] =
"/TS_1/TTVol_0/TTDouble_0/StripActiveTD1_0";
18 SensName[1] =
"/TS_1/TTVol_0/TTSingle_0/StripActiveTS3a_0";
19 SensName[2] =
"/TS_1/TTVol_0/TTSingle_0/StripActiveTS3b_0";
20 SensName[3] =
"/TS_1/TTVol_0/TTSingle_0/StripActiveTS4a_0";
21 SensName[4] =
"/TS_1/TTVol_0/TTSingle_0/StripActiveTS4b_0";
22 SensName[5] =
"/TS_1/TTVol_0/TTDouble_0/StripActiveTD2_0";
27 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
33 TString HitsFile =
"test.hits.root";
38 TFile *geo =
new TFile(geomFile);
40 TGeoManager *myGeo = geo->Get(
"FAIRGeom");
45 TH1F *test =
new TH1F(
"Det",
"Det",5,0.5,numSens + 0.5);
47 TH2F *histOne =
new TH2F(
"Det1",
"Det1",100,-1,+1,100,-1,1);
49 TCanvas *
can1 =
new TCanvas();
51 TCanvas *
can2 =
new TCanvas();
59 TFile *
f =
new TFile(HitsFile);
61 TTree *
t=(TTree *) f->Get(
"pndsim") ;
63 TClonesArray* tr_array=
new TClonesArray(
"PndSdsHit");
64 t->SetBranchAddress(
"MVDHitsStrip",&tr_array);
66 cout <<
"Events: " << t->GetEntries() << endl;
68 for (Int_t j = 0 ; j < t->GetEntries() ; j++)
74 if (j%10000 == 0) cout <<
"Ev. " << j << endl;
76 for (Int_t
y = 0 ;
y < tr_array->GetEntries() ;
y++)
83 if (j < 10) cout << name << endl;
85 for (Int_t
h = 0 ;
h < numSens ;
h++)
88 if (name == SensName[
h]) test->Fill(h+1);
94 if (name == SensName[0])
97 histOne->Fill(point->GetX(),point->GetY());
107 test->GetXaxis()->SetTitle(
"Sensor");
108 test->GetYaxis()->SetTitle(
"Clusters");
112 gStyle->SetPalette(1);
113 histOne->Draw(
"COLZ");
114 histOne->GetXaxis()->SetTitle(
"x [cm]");
115 histOne->GetYaxis()->SetTitle(
"y [cm]");
TString GetPath(Int_t shortID)
for a given shortID the path is returned
Class to access the naming information of the MVD.