FairRoot/PandaRoot
Pnd2Pi+2Pi-.C
Go to the documentation of this file.
1 // macro for the PndJRGen event generator
2 // modified by A.Galoyan
3 
4 {
5 
6  // load shared libraries
7  gROOT->Reset();
8  gSystem->Load("libPhysics.so");
9  gSystem->Load("libEG.so");
10  gSystem->Load("lib/libPndJRGen.so");
11 
12  // define beam - target system
13 
14  if (!(TDatabasePDG::Instance())->GetParticle(999))
15  (TDatabasePDG::Instance())->AddParticle("BeamTarget",
16  "Title",
17  4.0,
18  0,
19  4.0,
20  0,
21  "Unknown",
22  999);
23 
24  // define how the compound object "BeamTarget" should decay
25  // here: 100% branching ratio into four charged pions
26 
27  Int_t array[4]={211,-211,211,-211}; // 4 charged pions
28  ((TDatabasePDG::Instance())->GetParticle(999))
29  -> AddDecayChannel(1, 1.0, 4, array);
30 
31  TLorentzVector Vertex, Beam, Target, s;
32 
33  // beam: antiproton (-2212)
34  Beam. SetXYZM(0.,0.,10.,((TDatabasePDG::Instance())
35  -> GetParticle(-2212)) -> Mass());
36 
37  // target: proton (2212)
38  Target.SetXYZM(0.,0.,0.0,((TDatabasePDG::Instance())
39  -> GetParticle( 2212)) -> Mass());
40 
41  s = Beam+Target;
42 
43  // mean location of the target
44  Vertex.SetXYZT(0,0,0,0); // zero by default
45 
46  // smearing of the primary vertex (Gauss with the above mean, and this sigma)
47  TVector3 VtxRes(.1,.1,.2); // what target smearing do you want???
48  // TVector3 VtxRes(0,0,0);
49 
50  TParticle BeamTarget(999,1,0,0,0,0,s,Vertex);
51 
52  // output root file
53 
54  PndReaction reaction( BeamTarget, VtxRes, "Gen_2Pi+2Pi-.root" );
55 
56  // number of events
57  reaction.Loop(1001);
58 
59 }
60 
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)