Pluto v6.3.0
Loading...
Searching...
No Matches
analyze_g12C.C
Go to the documentation of this file.
1//call: root -l 12C_breakup_1500_MeV_in_GeV.root analyze_g12C.C
2
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+12C->Pi0+Eta+n+11C",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 for (Int_t i=0; i<nentries;i++)
53 {
54 Reaction->GetEntry(i);
55 par[0] = (PParticle*)evt->At(0);
56 par[1] = (PParticle*)evt->At(1);
57 par[2] = (PParticle*)evt->At(2);
58 par[3] = (PParticle*)evt->At(3);
59 par[4] = (PParticle*)evt->At(4);
60 par[5] = (PParticle*)evt->At(5);
61 par[6] = (PParticle*)evt->At(6);
62 par[7] = (PParticle*)evt->At(7);
63 par[8] = (PParticle*)evt->At(8);
64 par[9] = (PParticle*)evt->At(9);
65 par[10] = (PParticle*)evt->At(10);
66
67 Eta2g = par[9]->Vect4() + par[10]->Vect4();
68 Pi02g = par[7]->Vect4() + par[8]->Vect4();
70 RecNeutron = par[6]->Vect4();
71
72 Ainitial = par[0]->Vect4() - ggg;
73 Afinal = par[1]->Vect4();
74
75 GrandParent = par[0]->Vect4();
76 massAi = Ainitial.M();
77 massAf = Afinal.M();
78 massN = par[6]->M();
79
80 MomAf = par[1]->Vect();
81
82 BeamEnergy = ggg.E();
84
86 NewAfinalMom = NewAfinal.Vect();
87
88 hMomAfRec -> Fill( NewAfinalMom.Mag() );
89 hMomAf -> Fill( MomAf.Mag() );
90
91 hThetaEta->Fill(Eta2g.Theta()*r2d);
92 hThetaPi0->Fill(Pi02g.Theta()*r2d);
93 hThetaNeu->Fill(par[6]->Theta()*r2d);
94 hPhiEta->Fill(Eta2g.Phi()*r2d);
95 hPhiPi0->Fill(Pi02g.Phi()*r2d);
96 hPhiNeu->Fill(par[6]->Phi()*r2d);
97
98 }
99
100 double px,py,pz;
101 TH1F *h1 = new TH1F("h1","Distribution of Fermi Momentum inside Carbon-12",1000,0.,1.);
102 makeDistributionManager()->Exec("nucleus_fermi:gamma");
103 makeDistributionManager()->LinkDB();
105 ((PFermiMomentumGA*)makeDistributionManager()->GetDistribution("gn_in_12C"));
106 for(int i=0;i<10000;i++) h1->Fill(f1->GetRandomFermiMomentum(px,py,pz));
107
108 can->cd(1);
109 hThetaEta->SetLineColor(3);
110 hThetaEta->Draw();
111 can->cd(2);
112 hThetaPi0->SetLineColor(3);
113 hThetaPi0->Draw();
114 can->cd(3);
115 hThetaNeu->SetLineColor(3);
116 hThetaNeu->Draw();
117 can->cd(4);
118 hPhiEta->SetLineColor(4);
119 hPhiEta->Draw();
120 can->cd(5);
121 hPhiPi0->SetLineColor(4);
122 hPhiPi0->Draw();
123 can->cd(6);
124 hPhiNeu->SetLineColor(4);
125 hPhiNeu->Draw();
126
127 can->cd(7);
128 hMomAf->SetLineColor(2);
129 hMomAf->Draw();
130
131 can->cd(8);
132 hMomAfRec->SetLineColor(2);
133 hMomAfRec->Draw();
134
135 can->cd(9);
136 h1->SetLineColor(2);
137 h1->Draw();
138
139 can->Print("g12C_BreakUp.eps");
140 can->Print("g12C_BreakUp.root");
141
142 can->Modified();
143
144}
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
makeDistributionManager() -> Exec("nucleus_fermi:gamma")
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
new TCanvas()