Pluto v6.3.0
Loading...
Searching...
No Matches
analyze_g3He.C
Go to the documentation of this file.
1//root -l 3He_breakup_1500_MeV_in_GeV.root analyze_g3He.C
2
3{
4
5 gROOT->LoadMacro("KineticRecoilEnergy.C");
6
7 TFile *f = (TFile*) gFile;
8
9 TTree *Reaction = (TTree*)gDirectory->Get("data");
10
11 TClonesArray *evt=new TClonesArray("PParticle", 11);
12 Reaction->SetBranchAddress("Particles", &evt);
13
15
16 const double r2d=180./3.14159265358979323846;
17
18 TH1F *hMomAf = new TH1F("hMomAf" ,"Momentum final Nucleus" , 1000,0.,1.);
19 TH1F *hMomAfRec = new TH1F("hMomAfRec" ,"Fermi Momentum Reconstructed",1000,0.,1.);
20
21 TH1F *hThetaEta = new TH1F("hThetaEta","Polar angle theta of the Eta",180,0.,180.);
22 TH1F *hThetaPi0 = new TH1F("hThetaPi0","Polar angle theta of the Pi0",180,0.,180.);
23 TH1F *hThetaPro = new TH1F("hThetaPro","Polar angle theta of the Proton",180,0.,180.);
24 TH1F *hPhiEta = new TH1F("hPhiEta","Azimuthal angle phi of the Eta",360,-180.,180.);
25 TH1F *hPhiPi0 = new TH1F("hPhiPi0","Azimuthal angle phi of the Pi0",360,-180.,180.);
26 TH1F *hPhiPro = new TH1F("hPhiPro","Azimuthal angle phi of the Proton",360,-180.,180.);
27
28 TCanvas *can = new TCanvas("can","g+3He->Pi0+Eta+p+d",200,10,600,400);
29 can->Divide(3, 3, .001, .001);
30
31 TLorentzVector NewAfinal;
32 TLorentzVector GrandParent;
33 TLorentzVector RecProton;
34 TLorentzVector Pi0plusEta;
35 TLorentzVector NewProton;
36 TLorentzVector Eta2g;
37 TLorentzVector Pi02g;
38 TLorentzVector Ainitial;
39 TLorentzVector Afinal;
40 TLorentzVector ggg(0,0,1.5,1.5);
41
42 TVector3 MomAf;
43 TVector3 NewAfinalMom;
44
45 double massP;
46 double massAi;
47 double massAf;
48 double BeamEnergy;
49
50 Int_t nentries = Reaction->GetEntries();
51 for (Int_t i=0; i<nentries;i++)
52 {
53 Reaction->GetEntry(i);
54 par[0] = (PParticle*)evt->At(0);
55 par[1] = (PParticle*)evt->At(1);
56 par[2] = (PParticle*)evt->At(2);
57 par[3] = (PParticle*)evt->At(3);
58 par[4] = (PParticle*)evt->At(4);
59 par[5] = (PParticle*)evt->At(5);
60 par[6] = (PParticle*)evt->At(6);
61 par[7] = (PParticle*)evt->At(7);
62 par[8] = (PParticle*)evt->At(8);
63 par[9] = (PParticle*)evt->At(9);
64 par[10] = (PParticle*)evt->At(10);
65
66 Eta2g = par[9]->Vect4() + par[10]->Vect4();
67 Pi02g = par[7]->Vect4() + par[8]->Vect4();
69 RecProton = par[6]->Vect4();
70
71 Ainitial = par[0]->Vect4() - ggg;
72 Afinal = par[1]->Vect4();
73
74 GrandParent = par[0]->Vect4();
75 massAi = Ainitial.M();
76 massAf = Afinal.M();
77 massP = par[6]->M();
78
79 MomAf = par[1]->Vect();
80
81 BeamEnergy = ggg.E();
83
85 NewAfinalMom = NewAfinal.Vect();
86
87 hMomAfRec -> Fill( NewAfinalMom.Mag() );
88 hMomAf -> Fill( MomAf.Mag() );
89
90 hThetaEta->Fill(Eta2g.Theta()*r2d);
91 hThetaPi0->Fill(Pi02g.Theta()*r2d);
92 hThetaPro->Fill(par[6]->Theta()*r2d);
93 hPhiEta->Fill(Eta2g.Phi()*r2d);
94 hPhiPi0->Fill(Pi02g.Phi()*r2d);
95 hPhiPro->Fill(par[6]->Phi()*r2d);
96
97 }
98
99 double px,py,pz;
100 TH1F *h1 = new TH1F("h1","Distribution of Fermi Momentum inside Helium-3",1000,0.,1.);
101 makeDistributionManager()->Exec("nucleus_fermi:gamma");
102 makeDistributionManager()->LinkDB();
104 ((PFermiMomentumGA*)makeDistributionManager()->GetDistribution("gp_in_3He"));
105 for(int i=0;i<10000;i++) h1->Fill(f1->GetRandomFermiMomentum(px,py,pz));
106
107 can->cd(1);
108 hThetaEta->SetLineColor(3);
109 hThetaEta->Draw();
110 can->cd(2);
111 hThetaPi0->SetLineColor(3);
112 hThetaPi0->Draw();
113 can->cd(3);
114 hThetaPro->SetLineColor(3);
115 hThetaPro->Draw();
116 can->cd(4);
117 hPhiEta->SetLineColor(4);
118 hPhiEta->Draw();
119 can->cd(5);
120 hPhiPi0->SetLineColor(4);
121 hPhiPi0->Draw();
122 can->cd(6);
123 hPhiPro->SetLineColor(4);
124 hPhiPro->Draw();
125
126 can->cd(7);
127 hMomAf->SetLineColor(2);
128 hMomAf->Draw();
129
130 can->cd(8);
131 hMomAfRec->SetLineColor(2);
132 hMomAfRec->Draw();
133
134 can->cd(9);
135 h1->SetLineColor(2);
136 h1->Draw();
137
138 can->Print("g3He_BreakUp.eps");
139 can->Print("g3He_BreakUp.root");
140
141 can->Modified();
142
143}
TLorentzVector doCalEnergy(double BeamEnergy, TLorentzVector Particle1, TLorentzVector Particle2, double nucleusMass, double Particle2Mass, double Particle3Mass)
double BeamEnergy
Int_t nentries
double pz
TCanvas * can
TVector3 MomAf
TTree * Reaction
TVector3 NewAfinalMom
TLorentzVector NewAfinal
TH1F * hThetaEta
PFermiMomentumGA * f1
double massAi
TH1F * hPhiPi0
TH1F * hMomAf
TLorentzVector Afinal
double massAf
TFile * f
Definition analyze_g12C.C:8
TLorentzVector ggg(0, 0, 1.5, 1.5)
double px
TLorentzVector Ainitial
TH1F * h1
TH1F * hThetaPi0
PParticle * par[11]
TH1F * hPhiEta
double py
TLorentzVector Pi0plusEta
const double r2d
TLorentzVector Pi02g
TH1F * hMomAfRec
TLorentzVector GrandParent
TLorentzVector Eta2g
TClonesArray * evt
double massP
makeDistributionManager() -> Exec("nucleus_fermi:gamma")
TH1F * hPhiPro
TLorentzVector NewProton
TLorentzVector ggg(0, 0, 1.5, 1.5)
TLorentzVector RecProton
TH1F * hThetaPro
new TCanvas()