FairRoot/PandaRoot
PndGammaGamma.C
Go to the documentation of this file.
1 // $Id: PndGammaGamma.C,v 1.1 2003/06/12 10:08:57 ritman Exp $
2 //
3 // Macro for the PANDA event generator. It samples the reaction
4 // pbar + p --> gamma + gamma
5 //
6 // modified by A.Galoyan
7 
8 {
9  // load shared libraries
10  gROOT->Reset();
11  gSystem->Load("libPhysics.so");
12  gSystem->Load("libEG.so");
13  gSystem->Load("lib/libPndJRGen.so");
14 
15 
16  // define beam - target system
17 
18  if (!(TDatabasePDG::Instance())->GetParticle(999))
19  (TDatabasePDG::Instance())->AddParticle("BeamTarget",
20  "Title",
21  4.0,
22  0,
23  4.0,
24  0,
25  "Unknown",
26  999);
27 
28  Int_t array[2]={22,22}; // gamma gamma
29  ((TDatabasePDG::Instance())->GetParticle(999))
30  -> AddDecayChannel(1, 1.0, 2, array);
31 
32  TLorentzVector Vertex, Beam, Target, s;
33  Beam. SetXYZM(0.,0.,10.0,((TDatabasePDG::Instance())
34  -> GetParticle(-2212)) -> Mass());
35  Target.SetXYZM(0.,0.,0.0,((TDatabasePDG::Instance())
36  -> GetParticle( 2212)) -> Mass());
37  s = Beam+Target;
38 
39  // mean location of the target
40  Vertex.SetXYZT(0,0,0,0); // zero by default
41 
42  // smearing of the primary vertex (Gauss with the above mean, and this sigma)
43  //TVector3 VtxRes(.1,.1,.2); // what target smearing do you want???
44  TVector3 VtxRes(0,0,0);
45  TParticle BeamTarget(999,1,0,0,0,0,s,Vertex);
46 
47  PndReaction reaction( BeamTarget, VtxRes, "Gen_2Gamma.root");
48 
49  reaction.Loop(1001);
50 
51 }
52 
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())
TLorentzVector Beam
Definition: Pnd2DStar.C:50
TVector3 VtxRes(.1,.1,.2)