Pluto v6.3.0
Loading...
Searching...
No Matches
analyze_pp_delta_dalitz.C
Go to the documentation of this file.
1{
2 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("pp_delta_dalitz.root");
3 if (!f) f = new TFile("pp_delta_dalitz.root");
4 TTree *Reaction = (TTree*)gDirectory->Get("data");
5 TClonesArray *evt = new TClonesArray("PParticle", 7);
6 TClonesArray *evt2 = new TClonesArray("PParticle", 3);
7 Reaction->SetBranchAddress("Particles", &evt);
8 Reaction->SetBranchAddress("Accepted", &evt2);
9
12
13 const double r2d = 180./3.14159265358979323846;
14 TVector3 v1, v2;
15
16 TH1F *hf1 = new TH1F("hf1", "#Delta mass", 200, 1.05, 1.4);
17 TH1F *hf2 = new TH1F("hf2", "#Delta lab prod angle (deg)", 200, 0., 45.);
18 TH1F *hf3 = new TH1F("hf3", "Dilepton mass", 200, 0., .37);
19 TH1F *hf4 = new TH1F("hf4", "accepted e^{+} and e^{-} scattering angle (deg)", 200, 10., 90.);
20 TH1F *hf5 = new TH1F("hf5", "accepted dilepton rapidity", 200, 0, 2);
21 TH1F *hf6 = new TH1F("hf6", "accepted e^{+}e^{-} opening angle", 200, 0., 160.);
22
23 c1 = new TCanvas("c1", "p + p -> p + Delta -> p + p + gamma* -> p + p + e- + e+", 200, 10, 900, 900);
24 c1->Divide(3, 2);
25 c1->SetFillColor(10);
26 c1_3->SetLogy();
27 c1_6->SetLogy();
28 hf1->SetFillColor(10);
29 hf2->SetFillColor(10);
30 hf3->SetFillColor(10);
31 hf4->SetFillColor(10);
32 hf5->SetFillColor(10);
33 hf6->SetFillColor(10);
34
35 Int_t nentries = Reaction->GetEntries();
36 for (Int_t i=0; i<nentries; i++) {
37 Reaction->GetEntry(i);
38 par[2] = (PParticle*)evt->At(2);
39 par[4] = (PParticle*)evt->At(4);
40 par[5] = (PParticle*)evt->At(5);
41 par[6] = (PParticle*)evt->At(6);
42 hf1->Fill(par[2]->M());
43 hf2->Fill(r2d*(par[2]->Theta()));
44 hf3->Fill(par[4]->M());
45
46
47 par2[0] = (PParticle*)evt2->At(0);
48 par2[1] = (PParticle*)evt2->At(1);
49 par2[2] = (PParticle*)evt2->At(2);
50 if ( par2[0] ) {
51 hf4->Fill(r2d*(par2[1]->Theta()));
52 hf4->Fill(r2d*(par2[2]->Theta()));
53 hf5->Fill(par2[0]->Rapidity());
54 v1 = par2[1]->Vect();
55 v2 = par2[2]->Vect();
56 hf6->Fill(r2d*(acos(v1.Dot(v2)/(v1.Mag()*v2.Mag()))));
57 }
58 }
59 c1_1->cd();
60 c1_1->SetFillColor(10);
61 hf1->Draw();
62 c1_2->cd();
63 c1_2->SetFillColor(10);
64 hf2->Draw();
65 c1_3->cd();
66 c1_3->SetFillColor(10);
67 hf3->Draw();
68 c1_4->cd();
69 c1_4->SetFillColor(10);
70 hf4->Draw();
71 c1_5->cd();
72 c1_5->SetFillColor(10);
73 hf5->Draw();
74 c1_6->cd();
75 c1_6->SetFillColor(10);
76 hf6->Draw();
77}
TH1F * hf1
Int_t nentries
TTree * Reaction
TFile * f
Definition analyze_g12C.C:8
PParticle * par[11]
const double r2d
TClonesArray * evt
TVector3 v2
TVector3 v1
TH1F * hf2
TH1F * hf3
PParticle * par2[3]
TH1F * hf6
TClonesArray * evt2
TH1F * hf5
TH1F * hf4
new TCanvas()
PChannel * c1_1
PChannel * c1_2