Pluto
v6.3.0
Loading...
Searching...
No Matches
anaAngularDistribution.C
Go to the documentation of this file.
1
//TITLE Analyze the polar angle as created with useAngularDistribution
2
3
{
4
TFile *
f
= (TFile*)gROOT->GetListOfFiles()->FindObject(
"angular_distribution.root"
);
5
if
(!
f
) {
6
f
=
new
TFile(
"angular_distribution.root"
);
7
}
8
TTree *
Reaction
= (TTree*)gDirectory->Get(
"data"
);
9
10
TClonesArray *
evt
=
new
TClonesArray(
"PParticle"
, 20);
11
Reaction
->SetBranchAddress(
"Particles"
, &
evt
);
12
const
double
r2d
= 180./3.14159265358979323846;
13
PParticle
*
par
[3];
14
TH1F *
hf1
=
new
TH1F(
"hf1"
,
"#Theta_{lab} (deg.)"
, 20, -1., 1.);
15
//TH1F *hf1 = new TH1F("hf1", "#Theta_{lab} (deg.)", 20, 0, 1.);
16
hf1
->SetMinimum(0);
17
Int_t
nentries
=
Reaction
->GetEntries();
18
for
(Int_t i=0; i<
nentries
; i++) {
19
Reaction
->GetEntry(i);
20
par
[0] = (
PParticle
*)
evt
->At(0);
21
par
[1] = (
PParticle
*)
evt
->At(1);
22
par
[2] = (
PParticle
*)
evt
->At(2);
23
par
[1]->Boost(-
par
[0]->BoostVector());
24
par
[2]->Boost(-
par
[0]->BoostVector());
25
// hf1->Fill(fabs(cos(par[1]->Theta())));
26
hf1
->Fill((cos(
par
[1]->Theta())));
27
}
28
hf1
->Draw(
"e1"
);
29
}
30
hf1
TH1F * hf1
Definition
anaAngularDistribution.C:14
nentries
Int_t nentries
Definition
analyze_g12C.C:51
Reaction
TTree * Reaction
Definition
analyze_g12C.C:10
f
TFile * f
Definition
analyze_g12C.C:8
par
PParticle * par[11]
Definition
analyze_g12C.C:15
r2d
const double r2d
Definition
analyze_g12C.C:17
evt
TClonesArray * evt
Definition
analyze_g12C.C:12
PParticle
Definition
PParticle.h:25
pluto6
macros
anaAngularDistribution.C
Generated by
1.14.0