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;
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
TH1F * hf1
Int_t nentries
TTree * Reaction
TFile * f
Definition analyze_g12C.C:8
PParticle * par[11]
const double r2d
TClonesArray * evt