FairRoot/PandaRoot
Pnd_etac_2gamma.C
Go to the documentation of this file.
1 // macro for the PndJRGen event generator
2 // modified by A.Galoyan
3 
4 {
5  // load shared libraries
6  gROOT->Reset();
7  gSystem->Load("libPhysics.so");
8  gSystem->Load("libEG.so");
9  gSystem->Load("lib/libPndJRGen.so");
10 
11 gRandom.SetSeed(123456);
12 
13 
14 
15 if (!(TDatabasePDG::Instance())->GetParticle(999))
16  (TDatabasePDG::Instance())->AddParticle("BeamTarget","Title",4.0,0,4.0,0,"Unknown",999);
17 
18 
19 Int_t array[2]={22,22};
20 ((TDatabasePDG::Instance())->GetParticle(999))-> AddDecayChannel(1, 1.0, 2, array);
21 
22 double m_prot=.938272;
23 double m_etac=2.9798;
24 double E_pbar=(m_etac*m_etac-2*m_prot*m_prot)/(2*m_prot);
25 double pz_pbar=sqrt(E_pbar*E_pbar-m_prot*m_prot);
26 
27 
28 
29 TLorentzVector Vertex, Beam, Target, s;
30 Beam. SetXYZM(0.,0.,pz_pbar,((TDatabasePDG::Instance()) -> GetParticle(-2212)) -> Mass());
31 Target.SetXYZM(0.,0.,0.,((TDatabasePDG::Instance()) -> GetParticle( 2212)) -> Mass());
32 s = Beam+Target;
33 
34 // // mean location of the target
35 // //Vertex.SetXYZT(0,0,0,0); // zero by default
36 
37 // // smearing of the primary vertex (Gauss with the above mean, and this sigma)
38 // TVector3 VtxRes(.1,.1,.2); // what target smearing do you want???
39 
40 //TParticle BeamTarget(999,1,0,0,0,0,s,Vertex);
41 
42  cout << s.M() << endl;
43 
44 // mean location of the target
45 //Vertex.SetXYZT(0,0,0,0); // zero by default
46 
47 // smearing of the primary vertex (Gauss with the above mean, and this sigma)
48 //TVector3 VtxRes(.1,.1,.2); // what target smearing do you want???
49 
50 TVector3 VtxRes(0,0,0); // what target smearing do you want???
51 
52 TParticle BeamTarget(999,1,0,0,0,0,s,Vertex);
53 
54 PndReaction reaction( BeamTarget, VtxRes, "Gen_etac_2gamma.root" );
55 
56  reaction.Loop(10000);
57 
58 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
PndReaction reaction(BeamTarget, VtxRes,"Gen_2K02Pi0.root")
TLorentzVector s
Definition: Pnd2DStar.C:50
TFile * Target
Definition: hadd.C:35
TLorentzVector Vertex
Definition: Pnd2DStar.C:50
TParticle BeamTarget(999, 1, 0, 0, 0, 0, s, Vertex)
Beam SetXYZM(0., 0., 8,((TDatabasePDG::Instance()) -> GetParticle(-2212)) -> Mass())
double m_etac
double m_prot
TLorentzVector Beam
Definition: Pnd2DStar.C:50
TVector3 VtxRes(.1,.1,.2)
double pz_pbar
double E_pbar