Home » Hades » Pluto » [SOLVED] GetBeam Function
[SOLVED] GetBeam Function [message #13334] |
Mon, 16 April 2012 19:31 |
Michael Kunkel
Messages: 53 Registered: June 2011
|
continuous participant |
From: 129.57.114*
|
|
Greetings,
I attempted to use the GetBeam() functionality of the new update and I seem to not understand how to use it.
Here is a macro
{
TH1F * histo1 = new TH1F ("histo1","Beam",100,1.,6);
TH1F * histo2 = new TH1F ("histo2","GetBeam",100,1.,6);
TH1F * histo3 = new TH1F ("histo3","Beam Reconstructed",100,1.,6);
TH1F * histo4 = new TH1F ("histo4","e+e-",100,0.0,0.6);
//For Beam Smearing
double ebeam_min = 1.1725;
double ebeam_max = 5.44575;
PBeamSmearing *beam_smear = new PBeamSmearing("beam_smear", "Beam smearing");
TF1* beam_smear_fn = new TF1("beam_smear_fn", "1./x", ebeam_min, ebeam_max);
beam_smear->SetReaction("g + p");
beam_smear->SetMomentumFunction(beam_smear_fn);
makeDistributionManager()->Add(beam_smear);
//For Form Factor =1 ie. QED
((PDalitzDecay * )makeDistributionManager()->GetDistribution("eta_dalitz"))->SetUseQED(1);
//Set-up Reaction
PReaction my_reaction("_P1 = 2.2","g","p","p eta [dilepton [e+ e-] g]","eta_dalitz",1,0,0,0);
//Do Histograms
my_reaction.Do(histo1,"_x = [g,1]->E()");
my_reaction.Do(histo2,"_x = [g+p]->GetBeam()");
my_reaction.Do(histo3,"ene = (([p,2] + [eta]) -[p,1]) ;_x=ene->E()");
my_reaction.Do(histo4,"mass = [e+] + [e-] ;_x=mass->M()");
//Do Reaction
my_reaction.Print();
my_reaction.Loop(10000);
//Draw
TCanvas c1; TCanvas c2; TCanvas c3; TCanvas c4;
c1->cd();
histo1->Draw();
c2->cd();
histo2->Draw();
c3->cd();
histo3->Draw();
c4->cd();
histo4->Draw();
}
What I am trying to do, it ensure that a bream photon beam is being used. Also it seems my histo3 will not return values.
Would someone tell me what I am doing incorrectly.
I am using PLUTO 5.40 with ROOT 5.30
Thanks in advance.
Michael C. Kunkel
[Updated on: Wed, 22 May 2013 12:40] by Moderator Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Oct 04 13:54:47 CEST 2024
Total time taken to generate the page: 0.00926 seconds
|