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