Analyze the polar angle as created with useAngularDistribution


{
    TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("angular_distribution.root");
    if (!f) {  
	f = new TFile("angular_distribution.root"); 
    }
    TTree *Reaction = (TTree*)gDirectory->Get("data");
    
    TClonesArray *evt = new TClonesArray("PParticle", 20);
    Reaction->SetBranchAddress("Particles", &evt);
    const double r2d = 180./3.14159265358979323846; 
    PParticle *par[3];
    TH1F *hf1 = new TH1F("hf1", "#Theta_{lab} (deg.)", 20, -1., 1.);
    //TH1F *hf1 = new TH1F("hf1", "#Theta_{lab} (deg.)", 20, 0, 1.);
    hf1->SetMinimum(0);
    Int_t nentries = Reaction->GetEntries();
    for (Int_t i=0; i<nentries; i++) {
	Reaction->GetEntry(i);
	par[0] = (PParticle*)evt->At(0);
	par[1] = (PParticle*)evt->At(1);
	par[2] = (PParticle*)evt->At(2);
	par[1]->Boost(-par[0]->BoostVector());
	par[2]->Boost(-par[0]->BoostVector());
	//  hf1->Fill(fabs(cos(par[1]->Theta())));
	hf1->Fill((cos(par[1]->Theta())));
    } 
    hf1->Draw("e1"); 
}

 anaAngularDistribution.C:1
 anaAngularDistribution.C:2
 anaAngularDistribution.C:3
 anaAngularDistribution.C:4
 anaAngularDistribution.C:5
 anaAngularDistribution.C:6
 anaAngularDistribution.C:7
 anaAngularDistribution.C:8
 anaAngularDistribution.C:9
 anaAngularDistribution.C:10
 anaAngularDistribution.C:11
 anaAngularDistribution.C:12
 anaAngularDistribution.C:13
 anaAngularDistribution.C:14
 anaAngularDistribution.C:15
 anaAngularDistribution.C:16
 anaAngularDistribution.C:17
 anaAngularDistribution.C:18
 anaAngularDistribution.C:19
 anaAngularDistribution.C:20
 anaAngularDistribution.C:21
 anaAngularDistribution.C:22
 anaAngularDistribution.C:23
 anaAngularDistribution.C:24
 anaAngularDistribution.C:25
 anaAngularDistribution.C:26
 anaAngularDistribution.C:27
 anaAngularDistribution.C:28
 anaAngularDistribution.C:29
 anaAngularDistribution.C:30