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
|
|
|
Re: GetBeam Function [message #13335 is a reply to message #13334] |
Mon, 16 April 2012 20:26 |
Ingo Froehlich
Messages: 167 Registered: March 2004 Location: IKF - Frankfurt
|
first-grade participant |
From: *dip.t-dialin.net
|
|
GetBeam() returns a PParticle object, so I think you should use something like
my_reaction.Do(histo2,"_x = ([g+p]->GetBeam())->E()");
to project a scalar onto the x-axis.
ene is empty, because you use a second proton, but in the outgoing channel you have only one (I know I should throw some warning but this is not so easy for mixed channels)
--
Ingo Froehlich
IKF - University of Frankfurt
069-798-47027, FAX: -47024
|
|
|
Re: GetBeam Function [message #13337 is a reply to message #13335] |
Mon, 16 April 2012 21:42 |
Michael Kunkel
Messages: 53 Registered: June 2011
|
continuous participant |
From: 129.57.114*
|
|
Thanks for helping me with the GetBeam, I had tried that but I used
_x = [g+p]->GetBeam()->E()
instead of
_x = ([g+p]->GetBeam())->E()
Thanks for that clarification.
As for the histo3, I understand. I had tried using
[p,1]+[eta]-([g+p]->GetTarget())
but as you stated before, this just points to the PParticle, instead I had to
my_reaction.Do(histo3,"ene = (([p,1] + [eta])) ;_x=ene->E() - 0.938272");
|
|
|
|
|
Goto Forum:
Current Time: Sun Dec 22 07:12:05 CET 2024
Total time taken to generate the page: 0.00602 seconds
|