12 const Int_t numSens = 6;
13 const Int_t maxEvents = 1000000;
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");
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 *
h1 =
new TH2F(
"Det1",
"Det1",385,-0.96,+0.96,385,-0.96,+0.96);
48 TH2F *
h2 =
new TH2F(
"Det2",
"Det2",385,-0.96,+0.96,385,-0.96,+0.96);
49 TH2F *
h3 =
new TH2F(
"Det3",
"Det3",385,-0.96,+0.96,385,-0.96,+0.96);
50 TH2F *
h4 =
new TH2F(
"Det4",
"Det4",385,-0.96,+0.96,385,-0.96,+0.96);
52 TH1F *
h5 =
new TH1F(
"eloss1",
"eloss1",1000,0.,100.);
53 TH1F *
h6 =
new TH1F(
"eloss2",
"eloss2",1000,0.,100.);
54 TH1F *
h7 =
new TH1F(
"eloss3",
"eloss3",1000,0.,100.);
55 TH1F *
h8 =
new TH1F(
"eloss4",
"eloss4",1000,0.,100.);
57 TCanvas *can0 =
new TCanvas();
58 TCanvas *
can1 =
new TCanvas();
59 TCanvas *
can2 =
new TCanvas();
60 TCanvas *
can3 =
new TCanvas();
61 TCanvas *can4 =
new TCanvas();
62 TCanvas *can5 =
new TCanvas();
63 TCanvas *can6 =
new TCanvas();
64 TCanvas *can7 =
new TCanvas();
65 TCanvas *can8 =
new TCanvas();
71 TFile *
f =
new TFile(HitsFile);
73 TTree *
t=(TTree *) f->Get(
"pndsim");
75 TClonesArray* tr_array=
new TClonesArray(
"PndSdsHit");
76 t->SetBranchAddress(
"MVDHitsStrip",&tr_array);
78 cout <<
"Events: " << t->GetEntries() << endl;
85 for (Int_t j = 0 ; j < t->GetEntries() && j<maxEvents ; j++)
89 if (j%10000 == 0) cout <<
"Ev. " << j << endl;
94 for (Int_t
y = 0 ;
y < tr_array->GetEntries() ;
y++)
102 if (j < 10) cout << name << endl;
104 for (Int_t
h = 0 ;
h < numSens ;
h++)
106 if (name == SensName[
h]) test->Fill(h+1);
110 if (name == SensName[0]) {
111 h1->Fill(point->GetX(),point->GetY());
115 if (name == SensName[5]) {
116 h4->Fill(point->GetX(),point->GetY());
121 if (name == SensName[1]) TS3[0].Add(point);
122 if (name == SensName[2]) TS3[1].Add(point);
123 if (name == SensName[3]) TS4[0].Add(point);
124 if (name == SensName[4]) TS4[1].Add(point);
129 n1=TS3[0].GetEntries();
130 n2=TS3[1].GetEntries();
131 n3=TS4[0].GetEntries();
132 n4=TS4[1].GetEntries();
138 h6->Fill(((
PndSdsHit*)(TS3[0][0]))->GetEloss()*1e+6);
139 h6->Fill(((
PndSdsHit*)(TS3[1][0]))->GetEloss()*1e+6);
141 else cout<<
"multiple hits on sensor TS3"<<endl;
147 h7->Fill(((
PndSdsHit*)(TS4[0][0]))->GetEloss()*1e+6);
148 h7->Fill(((
PndSdsHit*)(TS4[1][0]))->GetEloss()*1e+6);
150 else cout<<
"multiple hits on sensor TS4"<<endl;
168 cout<<
"nr of hits on first station : "<<nrHits1<<endl;
169 cout<<
"nr of hits on second station : "<<nrHits2<<endl;
170 cout<<
"nr of hits on third station : "<<nrHits3<<endl;
171 cout<<
"nr of hits on fourth station : "<<nrHits4<<endl;
176 test->GetXaxis()->SetTitle(
"Sensor");
177 test->GetYaxis()->SetTitle(
"Clusters");
181 gStyle->SetPalette(1);
183 h1->GetXaxis()->SetTitle(
"x [cm]");
184 h1->GetYaxis()->SetTitle(
"y [cm]");
188 gStyle->SetPalette(1);
190 h2->GetXaxis()->SetTitle(
"x [cm]");
191 h2->GetYaxis()->SetTitle(
"y [cm]");
195 gStyle->SetPalette(1);
197 h3->GetXaxis()->SetTitle(
"x [cm]");
198 h3->GetYaxis()->SetTitle(
"y [cm]");
202 gStyle->SetPalette(1);
204 h4->GetXaxis()->SetTitle(
"x [cm]");
205 h4->GetYaxis()->SetTitle(
"y [cm]");
210 h5->GetXaxis()->SetTitle(
"eloss [keV]");
211 h5->GetYaxis()->SetTitle(
"counts");
216 h6->GetXaxis()->SetTitle(
"eloss [keV]");
217 h6->GetYaxis()->SetTitle(
"counts");
222 h6->GetXaxis()->SetTitle(
"eloss [keV]");
223 h6->GetYaxis()->SetTitle(
"counts");
228 h7->GetXaxis()->SetTitle(
"eloss [keV]");
229 h7->GetYaxis()->SetTitle(
"counts");
234 h8->GetXaxis()->SetTitle(
"eloss [keV]");
235 h8->GetYaxis()->SetTitle(
"counts");
Double_t GetEloss() const
TString GetPath(Int_t shortID)
for a given shortID the path is returned
Class to access the naming information of the MVD.